mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 09:40:20 +00:00
Expanded GTK3 icon-menu construction in menu.c to build menu items with a GtkBox, GtkImage, and mnemonic label when using icon names.
Updated channel list icon menu items to build GTK3 menu items with GtkBox/GtkImage/GtkLabel while preserving GTK2 GtkImageMenuItem paths. Updated sexy spell entry icon menu items to build GTK3 menu items with GtkBox/GtkImage/GtkLabel while preserving GTK2 GtkImageMenuItem paths
This commit is contained in:
@@ -124,11 +124,12 @@ chanlist_icon_button (const char *label, const char *icon_name,
|
||||
return button;
|
||||
}
|
||||
|
||||
#if HAVE_GTK3
|
||||
static GtkWidget *
|
||||
chanlist_menu_item_new_with_icon (const char *label, const char *icon_name)
|
||||
chanlist_icon_menu_item (const char *label, const char *icon_name,
|
||||
GCallback callback, gpointer userdata)
|
||||
{
|
||||
GtkWidget *item;
|
||||
#if HAVE_GTK3
|
||||
GtkWidget *box;
|
||||
GtkWidget *image = NULL;
|
||||
GtkWidget *label_widget;
|
||||
@@ -142,18 +143,6 @@ chanlist_menu_item_new_with_icon (const char *label, const char *icon_name)
|
||||
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), label_widget, FALSE, FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (item), box);
|
||||
|
||||
return item;
|
||||
}
|
||||
#endif
|
||||
|
||||
static GtkWidget *
|
||||
chanlist_icon_menu_item (const char *label, const char *icon_name,
|
||||
GCallback callback, gpointer userdata)
|
||||
{
|
||||
GtkWidget *item;
|
||||
#if HAVE_GTK3
|
||||
item = chanlist_menu_item_new_with_icon (label, icon_name);
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
GtkWidget *image;
|
||||
|
||||
Reference in New Issue
Block a user