diff options
author | Philip Chimento <philip@endlessm.com> | 2013-08-30 13:38:12 -0700 |
---|---|---|
committer | Philip Chimento <philip@endlessm.com> | 2013-08-30 13:38:12 -0700 |
commit | 597a0affd233e3e415e3b6f8a6bf1c6ffb1aa7e6 (patch) | |
tree | 24c31eb77b841a64982231286eb5d5b1dd3f7f86 /endless | |
parent | f82f188cb3651ecf658201a8cc2805401ed8f356 (diff) |
Also set the GDK program class
When setting the application ID, sometimes the GDK program class is
not set, so set it explicitly to remove possiblities for having it
out of sync.
[endlessm/eos-sdk#285]
Diffstat (limited to 'endless')
-rw-r--r-- | endless/eosapplication.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/endless/eosapplication.c b/endless/eosapplication.c index fafb875..b7a9163 100644 --- a/endless/eosapplication.c +++ b/endless/eosapplication.c @@ -150,6 +150,13 @@ on_app_id_set (EosApplication *self) { const gchar *id = g_application_get_application_id (G_APPLICATION (self)); g_set_prgname (id); + + /* Just in case, since g_set_prgname() does not always update the GDK + program class, under mysterious circumstances */ + gchar *capitalized_id = g_strdup (id); + if (capitalized_id != NULL && capitalized_id[0] != '\0') + capitalized_id[0] = g_ascii_toupper (capitalized_id[0]); + gdk_set_program_class (capitalized_id); } static void |