Updated GTK3 entry icon handling in the server list UI to use icon names (and NULL clears) while keeping GTK2 stock calls under #if !HAVE_GTK3.

Updated GTK3 entry icon handling in the main search UI to use icon names (and NULL clears) while keeping GTK2 stock calls under #if !HAVE_GTK3.
This commit is contained in:
2026-01-23 13:04:19 -07:00
parent 2b6fc7dbe5
commit 19ecc6a284
2 changed files with 20 additions and 10 deletions

View File

@@ -3285,7 +3285,8 @@ search_handle_event(int search_type, session *sess)
{
#if HAVE_GTK3
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, "dialog-error");
#else
#endif
#if !HAVE_GTK3
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
#endif
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, _(err->message));
@@ -3297,7 +3298,8 @@ search_handle_event(int search_type, session *sess)
{
#if HAVE_GTK3
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
#else
#endif
#if !HAVE_GTK3
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
#endif
}
@@ -3309,7 +3311,8 @@ search_handle_event(int search_type, session *sess)
{
#if HAVE_GTK3
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, "dialog-error");
#else
#endif
#if !HAVE_GTK3
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
#endif
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, _("No results found."));
@@ -3320,7 +3323,8 @@ search_handle_event(int search_type, session *sess)
{
#if HAVE_GTK3
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
#else
#endif
#if !HAVE_GTK3
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
#endif
}
@@ -3371,7 +3375,8 @@ mg_search_toggle(session *sess)
/* Reset search state */
#if HAVE_GTK3
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
#else
#endif
#if !HAVE_GTK3
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
#endif