Render disabled extensions as insensitive in the panel
This commit is contained in:
parent
b55c5bd587
commit
e3ce454b78
1 changed files with 9 additions and 6 deletions
|
@ -199,7 +199,8 @@ midori_extensions_set_property (GObject* object,
|
||||||
case PROP_APP:
|
case PROP_APP:
|
||||||
{
|
{
|
||||||
KatzeArray* array;
|
KatzeArray* array;
|
||||||
guint i, n;
|
MidoriExtension* extension;
|
||||||
|
guint i;
|
||||||
|
|
||||||
/* FIXME: Handle NULL and subsequent assignments */
|
/* FIXME: Handle NULL and subsequent assignments */
|
||||||
extensions->app = g_value_get_object (value);
|
extensions->app = g_value_get_object (value);
|
||||||
|
@ -207,10 +208,9 @@ midori_extensions_set_property (GObject* object,
|
||||||
g_signal_connect (array, "add-item",
|
g_signal_connect (array, "add-item",
|
||||||
G_CALLBACK (midori_extensions_add_item_cb), extensions);
|
G_CALLBACK (midori_extensions_add_item_cb), extensions);
|
||||||
|
|
||||||
if ((n = katze_array_get_length (array)))
|
i = 0;
|
||||||
for (i = 0; i < n; i++)
|
while ((extension = katze_array_get_nth_item (array, i++)))
|
||||||
midori_extensions_add_item_cb (array,
|
midori_extensions_add_item_cb (array, extension, extensions);
|
||||||
katze_array_get_nth_item (array, i), extensions);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -270,8 +270,11 @@ midori_extensions_treeview_render_text_cb (GtkTreeViewColumn* column,
|
||||||
g_free (name);
|
g_free (name);
|
||||||
g_free (version);
|
g_free (version);
|
||||||
g_free (desc);
|
g_free (desc);
|
||||||
g_object_set (renderer, "text", text, NULL);
|
g_object_set (renderer, "text", text,
|
||||||
|
"sensitive", midori_extension_is_active (extension),
|
||||||
|
NULL);
|
||||||
g_free (text);
|
g_free (text);
|
||||||
|
g_object_unref (extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue