g_signal_emit (array_action, signals[ACTIVATE_ITEM], 0, item);
}
-static void
-katze_array_action_icon_cb (GdkPixbuf* icon,
- GtkWidget* widget)
-{
- GtkWidget* image = gtk_image_new_from_pixbuf (icon);
- g_object_unref (icon);
- gtk_widget_show (image);
- if (GTK_IS_IMAGE_MENU_ITEM (widget))
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget), image);
- else
- gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (widget), image);
- g_object_unref (widget);
-}
-
static void
katze_array_action_menu_item_select_cb (GtkWidget* proxy,
KatzeArrayAction* array_action);
GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU, NULL);
else
icon = katze_net_load_icon (array_action->net,
- katze_item_get_uri (item),
- (KatzeNetIconCb)katze_array_action_icon_cb,
- proxy, g_object_ref (menuitem));
+ katze_item_get_uri (item), NULL, proxy, NULL);
image = gtk_image_new_from_pixbuf (icon);
g_object_unref (icon);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
else if (!KATZE_IS_ARRAY (item) && !strcmp (property, "uri"))
{
icon = katze_net_load_icon (array_action->net, katze_item_get_uri (item),
- (KatzeNetIconCb)katze_array_action_icon_cb,
- GTK_WIDGET (toolitem), g_object_ref (toolitem));
+ NULL, GTK_WIDGET (toolitem), NULL);
image = gtk_image_new_from_pixbuf (icon);
g_object_unref (icon);
gtk_widget_show (image);
GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU, NULL);
else
icon = katze_net_load_icon (array_action->net, uri,
- (KatzeNetIconCb)katze_array_action_icon_cb,
- GTK_WIDGET (toolitem), g_object_ref (toolitem));
+ NULL, GTK_WIDGET (toolitem), NULL);
image = gtk_image_new_from_pixbuf (icon);
g_object_unref (icon);
gtk_widget_show (image);
pixbuf = gtk_widget_render_icon (treeview, GTK_STOCK_DIRECTORY,
GTK_ICON_SIZE_MENU, NULL);
else if (katze_item_get_uri (item))
- /* FIXME: Implement icon_cb */
pixbuf = katze_net_load_icon (
MIDORI_BROWSER (gtk_widget_get_toplevel (treeview))->net,
- katze_item_get_uri (item), NULL, treeview, treeview);
+ katze_item_get_uri (item), NULL, treeview, NULL);
g_object_set (renderer, "pixbuf", pixbuf, NULL);
if (pixbuf)
g_object_unref (pixbuf);
pixbuf = gtk_widget_render_icon (treeview, GTK_STOCK_DIRECTORY,
GTK_ICON_SIZE_MENU, NULL);
else
- /* FIXME: Implement icon_cb */
pixbuf = katze_net_load_icon (
MIDORI_BROWSER (gtk_widget_get_toplevel (treeview))->net,
- katze_item_get_uri (item), NULL, treeview, treeview);
+ katze_item_get_uri (item), NULL, treeview, NULL);
g_object_set (renderer, "pixbuf", pixbuf, NULL);
uri = katze_item_get_uri (item);
pixbuf = katze_net_load_icon (browser->net, katze_item_get_uri (item),
NULL, GTK_WIDGET (browser), NULL);
- midori_location_action_add_item (action, uri, pixbuf, katze_item_get_name (item));
+ midori_location_action_add_item (action, uri,
+ pixbuf, katze_item_get_name (item));
}
}
menuitem = gtk_image_menu_item_new_with_label (
katze_item_get_name (item));
image = gtk_image_new ();
- /* FIXME: Implement icon_cb */
icon = katze_net_load_icon (MIDORI_SEARCH_ACTION (action)->net,
- katze_item_get_uri (item),
- NULL /*(KatzeNetIconCb)midori_browser_bookmark_icon_cb*/,
- entry, NULL /*g_object_ref (image)*/);
+ katze_item_get_uri (item), NULL, entry, NULL);
gtk_image_set_from_pixbuf (GTK_IMAGE (image), icon);
g_object_unref (icon);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
if (search_action->current_item)
{
- /* FIXME: Implement icon_cb */
icon = katze_net_load_icon (search_action->net,
katze_item_get_uri (search_action->current_item),
- NULL /*(KatzeNetIconCb)midori_browser_bookmark_icon_cb*/,
- entry, NULL /*g_object_ref (entry)*/);
+ NULL, entry, NULL);
gtk_icon_entry_set_icon_from_pixbuf (GTK_ICON_ENTRY (entry),
GTK_ICON_ENTRY_PRIMARY, icon);
g_object_unref (icon);
/* FIXME: Use the net of the MidoriSearchAction */
net = katze_net_new ();
- /* FIXME: Implement icon_cb */
icon = katze_net_load_icon (net, katze_item_get_uri (item),
- NULL /*(KatzeNetIconCb)midori_search_action_dialog_icon_cb*/,
- treeview, NULL /*g_object_ref (treeview)*/);
+ NULL, treeview, NULL);
g_object_set (renderer, "pixbuf", icon, NULL);
g_object_unref (icon);
g_object_unref (net);