mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-13 17:20:21 +00:00
Updated the GTK3 Help menu icon constant so _Contents now uses help-contents instead of help-browser, which fixes the oversized icon appearance on Linux and keeps it consistent with other menu icons.
Updated menu_setting_foreach() to safely handle sessions where menu_item[id] is still NULL by storing it in a local pointer and only toggling check state when it exists. This avoids GTK/GLib criticals during layout/menu synchronization paths while preserving normal behavior for initialized menu items. Fixed the a few dialog box layout so the scrolled keybindings list expands to fill available vertical space in the window. It now packs the scroller into the parent GtkBox with expand/fill enabled (gtk_box_pack_start(..., TRUE, TRUE, 0)) instead of adding it as a generic container child. This allows the window height to be fully utilized.
This commit is contained in:
@@ -919,11 +919,18 @@ menu_setting_foreach (void (*callback) (session *), int id, guint state)
|
||||
if (sess->gui->is_tab)
|
||||
maindone = TRUE;
|
||||
if (id != -1)
|
||||
{
|
||||
GtkWidget *menu_item = sess->gui->menu_item[id];
|
||||
|
||||
if (menu_item != NULL)
|
||||
{
|
||||
#if HAVE_GTK3
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (sess->gui->menu_item[id]), state);
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), state);
|
||||
#else
|
||||
GTK_CHECK_MENU_ITEM (sess->gui->menu_item[id])->active = state;
|
||||
GTK_CHECK_MENU_ITEM (menu_item)->active = state;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (callback)
|
||||
callback (sess);
|
||||
}
|
||||
@@ -1958,7 +1965,7 @@ menu_about (GtkWidget *wid, gpointer sess)
|
||||
#define ICON_SAVE "document-save"
|
||||
#define ICON_SEARCH "edit-find"
|
||||
#define ICON_FIND "edit-find"
|
||||
#define ICON_HELP "help-browser"
|
||||
#define ICON_HELP "help-contents"
|
||||
#define ICON_ABOUT "help-about"
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
|
||||
Reference in New Issue
Block a user