mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 09:16:22 +00:00
Grouped tray icon initialisation code
This commit is contained in:
@@ -103,14 +103,6 @@ static gboolean gtk_ready = FALSE;
|
|||||||
void
|
void
|
||||||
prof_run(char *log_level, char *account_name)
|
prof_run(char *log_level, char *account_name)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GTK
|
|
||||||
gtk_ready = gtk_init_check(0, NULL);
|
|
||||||
log_debug("Env is GTK-ready: %s", gtk_ready ? "true" : "false");
|
|
||||||
if (gtk_ready) {
|
|
||||||
gtk_init(0, NULL);
|
|
||||||
gtk_main_iteration_do(FALSE);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
_init(log_level);
|
_init(log_level);
|
||||||
plugins_on_start();
|
plugins_on_start();
|
||||||
_connect_default(account_name);
|
_connect_default(account_name);
|
||||||
@@ -373,9 +365,15 @@ _init(char *log_level)
|
|||||||
atexit(_shutdown);
|
atexit(_shutdown);
|
||||||
plugins_init();
|
plugins_init();
|
||||||
#ifdef HAVE_GTK
|
#ifdef HAVE_GTK
|
||||||
if (gtk_ready && prefs_get_boolean(PREF_TRAY)) {
|
gtk_ready = gtk_init_check(0, NULL);
|
||||||
log_debug("Building GTK icon");
|
log_debug("Env is GTK-ready: %s", gtk_ready ? "true" : "false");
|
||||||
create_tray();
|
if (gtk_ready) {
|
||||||
|
gtk_init(0, NULL);
|
||||||
|
gtk_main_iteration_do(FALSE);
|
||||||
|
if (prefs_get_boolean(PREF_TRAY)) {
|
||||||
|
log_debug("Building GTK icon");
|
||||||
|
create_tray();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
inp_nonblocking(TRUE);
|
inp_nonblocking(TRUE);
|
||||||
|
|||||||
Reference in New Issue
Block a user