diff options
author | Nick Schermer <nick@xfce.org> | 2011-02-26 18:16:06 +0100 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2011-09-12 21:13:42 +0200 |
commit | d54adef49647b38e73fdd6c989d3ad9e7ad69f3b (patch) | |
tree | 28a02055cdacb631a689e6278636b022f5f57ad2 | |
parent | 378a53c53ca14c10eaf587592bd240fcc76704f8 (diff) | |
download | xfce4-session-d54adef49647b38e73fdd6c989d3ad9e7ad69f3b.tar.gz |
Remove the nopreview image.
It doesn't provide usefull information and the embedded
png file makes the executable huge (without png it's about
76% smaller).
(cherry picked from commit c8e93545d2dbe08564595b69abb351ce215b549b)
-rw-r--r-- | engines/mice/preview.png | bin | 231160 -> 2202 bytes | |||
-rw-r--r-- | settings/Makefile.am | 8 | ||||
-rw-r--r-- | settings/nopreview.png | bin | 308078 -> 0 bytes | |||
-rw-r--r-- | settings/splash-settings.c | 24 |
4 files changed, 16 insertions, 16 deletions
diff --git a/engines/mice/preview.png b/engines/mice/preview.png Binary files differindex 1c922285..34022211 100644 --- a/engines/mice/preview.png +++ b/engines/mice/preview.png diff --git a/settings/Makefile.am b/settings/Makefile.am index eb92b8d9..ba569ebe 100644 --- a/settings/Makefile.am +++ b/settings/Makefile.am @@ -4,7 +4,6 @@ xfce4_session_settings_SOURCES = \ main.c \ module.c \ module.h \ - nopreview.h \ session-editor.c \ splash-settings.c \ startup-settings.c \ @@ -58,11 +57,7 @@ BUILT_SOURCES = \ xfce4-session-marshal.h \ xfce4-session-settings_ui.h \ xfsm-client-dbus-client.h \ - xfsm-manager-dbus-client.h \ - nopreview.h - -nopreview.h: $(srcdir)/nopreview.png - $(AM_V_GEN) gdk-pixbuf-csource --static --raw --stream --name=nopreview $< > $@ + xfsm-manager-dbus-client.h xfce4-session-marshal.h: stamp-xfce4-session-marshal.h @true @@ -87,7 +82,6 @@ endif EXTRA_DIST = \ $(desktop_in_files) \ - nopreview.png \ xfce4-session.xml \ xfce4-session-settings.glade diff --git a/settings/nopreview.png b/settings/nopreview.png Binary files differdeleted file mode 100644 index 100d61b2..00000000 --- a/settings/nopreview.png +++ /dev/null diff --git a/settings/splash-settings.c b/settings/splash-settings.c index 1f4a3981..a17ad61f 100644 --- a/settings/splash-settings.c +++ b/settings/splash-settings.c @@ -50,7 +50,6 @@ #include <libxfsm/xfsm-splash-engine.h> #include "module.h" -#include "nopreview.h" #include "xfce4-session-settings-common.h" #define SPLASH_ENGINE_PROP "/splash/Engine" @@ -264,11 +263,17 @@ splash_selection_changed (GtkTreeSelection *selection) gtk_widget_set_sensitive (splash_www1, TRUE); preview = module_preview (module); - if (G_UNLIKELY (preview == NULL)) - preview = gdk_pixbuf_new_from_inline (-1, nopreview, FALSE, NULL); - gtk_image_set_from_pixbuf (GTK_IMAGE (splash_image), preview); - g_object_unref (G_OBJECT (preview)); - + if (G_LIKELY (preview != NULL)) + { + gtk_image_set_from_pixbuf (GTK_IMAGE (splash_image), preview); + g_object_unref (G_OBJECT (preview)); + } + else + { + gtk_image_set_from_stock (GTK_IMAGE (splash_image), + GTK_STOCK_MISSING_IMAGE, + GTK_ICON_SIZE_DIALOG); + } channel = xfconf_channel_get (SETTINGS_CHANNEL); xfconf_channel_set_string (channel, SPLASH_ENGINE_PROP, module_engine (module)); @@ -279,9 +284,9 @@ splash_selection_changed (GtkTreeSelection *selection) } else { - preview = gdk_pixbuf_new_from_inline (-1, nopreview, FALSE, NULL); - gtk_image_set_from_pixbuf (GTK_IMAGE (splash_image), preview); - g_object_unref (G_OBJECT (preview)); + gtk_image_set_from_stock (GTK_IMAGE (splash_image), + GTK_STOCK_MISSING_IMAGE, + GTK_ICON_SIZE_DIALOG); gtk_label_set_text (GTK_LABEL (splash_descr1), _("None")); gtk_widget_set_sensitive (splash_descr1, FALSE); @@ -400,6 +405,7 @@ splash_settings_init (GtkBuilder *builder) splash_test, NULL); splash_image = GTK_WIDGET(gtk_builder_get_object (builder, "img_splash_preview")); + gtk_widget_set_size_request (splash_image, 300, 240); splash_descr0 = GTK_WIDGET(gtk_builder_get_object (builder, "lbl_splash_desc0")); splash_version0 =GTK_WIDGET(gtk_builder_get_object (builder, "lbl_splash_version0")); |