diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2011-12-28 15:57:36 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2011-12-28 15:57:36 -0800 |
commit | 565736a471e9ba66cbc68ce76c90d5e0c2fa57cf (patch) | |
tree | acc50192d0b27d0e48dd6dcd958dd2b15a5f5d10 /gtk-gui.c | |
parent | a8676438a72f3016daa74984def979797ded635a (diff) | |
download | subsurface-565736a471e9ba66cbc68ce76c90d5e0c2fa57cf.tar.gz |
Make icon file name OS helper function
This way we can load the correct icon on the Mac without ugly hacks in the
OS independent code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r-- | gtk-gui.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -523,11 +523,7 @@ static void about_dialog(GtkWidget *w, gpointer data) GdkPixbuf *logo = NULL; if (need_icon) { -#if defined __linux__ || defined __APPLE__ - GtkWidget *image = gtk_image_new_from_file("subsurface.svg"); -#elif defined WIN32 - GtkWidget *image = gtk_image_new_from_file("subsurface.ico"); -#endif + GtkWidget *image = gtk_image_new_from_file(subsurface_icon_name()); if (image) { logo = gtk_image_get_pixbuf(GTK_IMAGE(image)); @@ -703,11 +699,7 @@ void init_ui(int *argcp, char ***argvp) } } if (need_icon) -#if defined __linux__ || defined __APPLE__ - gtk_window_set_icon_from_file(GTK_WINDOW(win), "subsurface.svg", NULL); -#elif defined WIN32 - gtk_window_set_icon_from_file(GTK_WINDOW(win), "subsurface.ico", NULL); -#endif + gtk_window_set_icon_from_file(GTK_WINDOW(win), subsurface_icon_name(), NULL); g_signal_connect(G_OBJECT(win), "delete-event", G_CALLBACK(on_delete), NULL); g_signal_connect(G_OBJECT(win), "destroy", G_CALLBACK(on_destroy), NULL); main_window = win; |