[Xfce4-commits] <xfce4-session:xfce-4.8> Remove the nopreview image.
Nick Schermer
noreply at xfce.org
Mon Sep 12 21:22:05 CEST 2011
Updating branch refs/heads/xfce-4.8
to d54adef49647b38e73fdd6c989d3ad9e7ad69f3b (commit)
from 378a53c53ca14c10eaf587592bd240fcc76704f8 (commit)
commit d54adef49647b38e73fdd6c989d3ad9e7ad69f3b
Author: Nick Schermer <nick at xfce.org>
Date: Sat Feb 26 18:16:06 2011 +0100
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)
engines/mice/preview.png | Bin 231160 -> 2202 bytes
settings/Makefile.am | 8 +-------
settings/nopreview.png | Bin 308078 -> 0 bytes
settings/splash-settings.c | 24 +++++++++++++++---------
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/engines/mice/preview.png b/engines/mice/preview.png
index 1c92228..3402221 100644
Binary files a/engines/mice/preview.png and b/engines/mice/preview.png differ
diff --git a/settings/Makefile.am b/settings/Makefile.am
index eb92b8d..ba569eb 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
deleted file mode 100644
index 100d61b..0000000
Binary files a/settings/nopreview.png and /dev/null differ
diff --git a/settings/splash-settings.c b/settings/splash-settings.c
index 1f4a398..a17ad61 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"));
More information about the Xfce4-commits
mailing list