diff options
author | Diego Escalante Urrelo <diegoe@igalia.com> | 2012-02-03 14:45:30 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@igalia.com> | 2012-02-09 04:01:06 +0800 |
commit | 99251b7d6ec60966bafc8982f0b0b48a3e93865b (patch) | |
tree | 4fb5e805ae98af8f0c0dfcefcee157ce9c5b4d8d /src | |
parent | b02b30cddb187cdc65623bef1660d80341c416f9 (diff) | |
download | gsoc2013-epiphany-99251b7d6ec60966bafc8982f0b0b48a3e93865b.tar.gz gsoc2013-epiphany-99251b7d6ec60966bafc8982f0b0b48a3e93865b.tar.zst gsoc2013-epiphany-99251b7d6ec60966bafc8982f0b0b48a3e93865b.zip |
ephy-main: always set a default icon for windows
The web-browser icon for the normal/private mode, or the corresponding
Web Application icon.
https://bugzilla.gnome.org/show_bug.cgi?id=669182
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c index 768c3eeb7..99acbb71b 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -433,10 +433,13 @@ main (int argc, mode = EPHY_EMBED_SHELL_MODE_PRIVATE; else if (application_mode) { char *app_name; + char *app_icon; mode = EPHY_EMBED_SHELL_MODE_APPLICATION; app_name = g_strrstr (profile_directory, EPHY_WEB_APP_PREFIX); + app_icon = g_build_filename (profile_directory, EPHY_WEB_APP_ICON_NAME, NULL); + if (app_name) { /* Skip the 'app-' part */ app_name += strlen (EPHY_WEB_APP_PREFIX); @@ -444,15 +447,21 @@ main (int argc, g_set_prgname (app_name); g_set_application_name (app_name); + gtk_window_set_default_icon_from_file (app_icon, NULL); + /* We need to re-set this because we have already parsed the * options, which inits GTK+ and sets this as a side effect. */ gdk_set_program_class (app_name); } + + g_free (app_icon); } else { mode = EPHY_EMBED_SHELL_MODE_BROWSER; g_set_prgname ("epiphany"); g_set_application_name (_("Web")); + + gtk_window_set_default_icon_name ("web-browser"); } _ephy_shell_create_instance (mode); |