mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 12:26:22 +00:00
17
src/tray.c
17
src/tray.c
@@ -131,9 +131,22 @@ _tray_change_icon(gpointer data)
|
||||
unread_messages = wins_get_total_unread();
|
||||
|
||||
if (unread_messages) {
|
||||
gtk_status_icon_set_from_file(prof_tray, icon_msg_filename->str);
|
||||
if (!prof_tray) {
|
||||
prof_tray = gtk_status_icon_new_from_file(icon_msg_filename->str);
|
||||
} else {
|
||||
gtk_status_icon_set_from_file(prof_tray, icon_msg_filename->str);
|
||||
}
|
||||
} else {
|
||||
gtk_status_icon_set_from_file(prof_tray, icon_filename->str);
|
||||
if (prefs_get_boolean(PREF_TRAY_READ)) {
|
||||
if (!prof_tray) {
|
||||
prof_tray = gtk_status_icon_new_from_file(icon_filename->str);
|
||||
} else {
|
||||
gtk_status_icon_set_from_file(prof_tray, icon_filename->str);
|
||||
}
|
||||
} else {
|
||||
g_clear_object(&prof_tray);
|
||||
prof_tray = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user