mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 09:40:20 +00:00
Updated GTK3 menu item creation in menu_quick_item and create_icon_menu to use GtkBox with GtkImage and GtkLabel while keeping GTK2 image menu items intact.
Reworked GTK3 channel list context menu items to use GtkBox-packed images and mnemonic labels, preserving GTK2 behavior under !HAVE_GTK3. Added GTK3 menu item layouts for spell entry actions and suggestion menu with icon-name images and mnemonic labels, while retaining GTK2 image menu items.
This commit is contained in:
@@ -682,33 +682,44 @@ chanlist_button_cb (GtkTreeView *tree, GdkEventButton *event, server *serv)
|
||||
#if HAVE_GTK3
|
||||
{
|
||||
GtkWidget *item;
|
||||
GtkWidget *box;
|
||||
GtkWidget *image;
|
||||
GtkWidget *label;
|
||||
|
||||
item = gtk_image_menu_item_new_with_mnemonic (_("_Join Channel"));
|
||||
item = gtk_menu_item_new ();
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
image = gtk_image_new_from_icon_name (ICON_CHANLIST_JOIN, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
|
||||
gtk_widget_show (image);
|
||||
label = gtk_label_new_with_mnemonic (_("_Join Channel"));
|
||||
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (item), box);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (chanlist_join), serv);
|
||||
gtk_widget_show (item);
|
||||
gtk_widget_show_all (item);
|
||||
|
||||
item = gtk_image_menu_item_new_with_mnemonic (_("_Copy Channel Name"));
|
||||
item = gtk_menu_item_new ();
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
image = gtk_image_new_from_icon_name (ICON_CHANLIST_COPY, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
|
||||
gtk_widget_show (image);
|
||||
label = gtk_label_new_with_mnemonic (_("_Copy Channel Name"));
|
||||
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (item), box);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
g_signal_connect (G_OBJECT (item), "activate",
|
||||
G_CALLBACK (chanlist_copychannel), serv);
|
||||
gtk_widget_show (item);
|
||||
gtk_widget_show_all (item);
|
||||
|
||||
item = gtk_image_menu_item_new_with_mnemonic (_("Copy _Topic Text"));
|
||||
item = gtk_menu_item_new ();
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
image = gtk_image_new_from_icon_name (ICON_CHANLIST_COPY, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
|
||||
gtk_widget_show (image);
|
||||
label = gtk_label_new_with_mnemonic (_("Copy _Topic Text"));
|
||||
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (item), box);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
g_signal_connect (G_OBJECT (item), "activate",
|
||||
G_CALLBACK (chanlist_copytopic), serv);
|
||||
gtk_widget_show (item);
|
||||
gtk_widget_show_all (item);
|
||||
}
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
|
||||
Reference in New Issue
Block a user