From 13c45a3626873c5e23422c41ccd0fa8531e9c2a5 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Tue, 30 Jul 2013 16:52:51 +0200 Subject: mate-about: Try to use 'mate' as icon, if available in icon theme Deleted old code because now we require GTK 2.24 --- mate-about/mate-about.c | 24 +++++++++--------------- mate-about/mate-about.h | 3 ++- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/mate-about/mate-about.c b/mate-about/mate-about.c index 9a1a9ca..fa25be6 100644 --- a/mate-about/mate-about.c +++ b/mate-about/mate-about.c @@ -72,24 +72,18 @@ { mate_about_dialog = (GtkAboutDialog*) gtk_about_dialog_new(); - gtk_window_set_default_icon_name(icon); + gtk_window_set_default_icon_name(desktop_icon); - #if GTK_CHECK_VERSION(3, 0, 0) || GTK_CHECK_VERSION(2, 6, 0) + GtkIconTheme* icon_theme = gtk_icon_theme_get_default(); + if (gtk_icon_theme_has_icon(icon_theme, icon)) + { gtk_about_dialog_set_logo_icon_name(mate_about_dialog, icon); - - #else - - GtkIconTheme* icon_theme = gtk_icon_theme_get_default(); - - if (gtk_icon_theme_has_icon(icon_theme, icon)) - { - GdkPixbuf* pixbuf = gtk_icon_theme_load_icon(icon_theme, icon, 64, 0, NULL); - gtk_about_dialog_set_logo(mate_about_dialog, pixbuf); - g_object_unref(pixbuf); - } - - #endif + } + else + { + gtk_about_dialog_set_logo_icon_name(mate_about_dialog, desktop_icon); + } // name #if GTK_CHECK_VERSION(3, 0, 0) || GTK_CHECK_VERSION(2, 12, 0) diff --git a/mate-about/mate-about.h b/mate-about/mate-about.h index fd74b1c..9b4f256 100644 --- a/mate-about/mate-about.h +++ b/mate-about/mate-about.h @@ -32,7 +32,8 @@ const char* program_name = "MATE Desktop Environment"; const char* version = PACKAGE_VERSION; - const char* icon = "desktop"; + const char* icon = "mate"; + const char* desktop_icon = "desktop"; const char* website = "http://www.mate-desktop.org/"; const char* copyright = "" -- cgit v1.2.1