mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-19 12:10:19 +00:00
Updated server list entry icon handling to use GTK3 icon names with stock fallbacks for GTK2.
Switched main search entry error/clear icons to GTK3 icon-name API while preserving GTK2 stock icons.
This commit is contained in:
@@ -3285,8 +3285,7 @@ search_handle_event(int search_type, session *sess)
|
|||||||
{
|
{
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
||||||
#endif
|
#endif
|
||||||
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, _(err->message));
|
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, _(err->message));
|
||||||
@@ -3298,8 +3297,7 @@ search_handle_event(int search_type, session *sess)
|
|||||||
{
|
{
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -3311,8 +3309,7 @@ search_handle_event(int search_type, session *sess)
|
|||||||
{
|
{
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
||||||
#endif
|
#endif
|
||||||
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, _("No results found."));
|
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, _("No results found."));
|
||||||
@@ -3323,8 +3320,7 @@ search_handle_event(int search_type, session *sess)
|
|||||||
{
|
{
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -3375,8 +3371,7 @@ mg_search_toggle(session *sess)
|
|||||||
/* Reset search state */
|
/* Reset search state */
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_stock (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1565,8 +1565,7 @@ servlist_username_changed_cb (GtkEntry *entry, gpointer userdata)
|
|||||||
{
|
{
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
||||||
#endif
|
#endif
|
||||||
gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY,
|
gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY,
|
||||||
@@ -1577,8 +1576,7 @@ servlist_username_changed_cb (GtkEntry *entry, gpointer userdata)
|
|||||||
{
|
{
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#endif
|
||||||
gtk_widget_set_sensitive (connect_btn, TRUE);
|
gtk_widget_set_sensitive (connect_btn, TRUE);
|
||||||
@@ -1597,8 +1595,7 @@ servlist_nick_changed_cb (GtkEntry *entry, gpointer userdata)
|
|||||||
entry = GTK_ENTRY(!nick1[0] ? entry_nick1 : entry_nick2);
|
entry = GTK_ENTRY(!nick1[0] ? entry_nick1 : entry_nick2);
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
||||||
#endif
|
#endif
|
||||||
gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY,
|
gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY,
|
||||||
@@ -1609,8 +1606,7 @@ servlist_nick_changed_cb (GtkEntry *entry, gpointer userdata)
|
|||||||
{
|
{
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, "dialog-error");
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
|
||||||
#endif
|
#endif
|
||||||
gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY,
|
gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY,
|
||||||
@@ -1622,8 +1618,7 @@ servlist_nick_changed_cb (GtkEntry *entry, gpointer userdata)
|
|||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_nick1), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_nick1), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_nick2), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_nick2), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_entry_set_icon_from_stock (GTK_ENTRY(entry_nick1), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_stock (GTK_ENTRY(entry_nick1), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
gtk_entry_set_icon_from_stock (GTK_ENTRY(entry_nick2), GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_stock (GTK_ENTRY(entry_nick2), GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user