diff options
author | Sébastien Wilmet <swilmet@gnome.org> | 2015-11-28 19:19:29 +0100 |
---|---|---|
committer | Sébastien Wilmet <swilmet@gnome.org> | 2015-11-28 21:00:15 +0100 |
commit | ad1075742d6376a32513e65e8a4694f755562bd7 (patch) | |
tree | e79b29bb1d29b8c8a3b76725c857c249786a41b1 | |
parent | c0d078fa8816e679911b3b7dd6360c5b515c25be (diff) | |
download | gedit-ad1075742d6376a32513e65e8a4694f755562bd7.tar.gz |
Use GResource for the gedit logo
And keep all pixmaps together, to not have two different directories.
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | gedit/Makefile.am | 1 | ||||
-rw-r--r-- | gedit/gedit-commands-help.c | 19 | ||||
-rw-r--r-- | gedit/gedit.rc | 2 | ||||
-rw-r--r-- | gedit/resources/gedit.gresource.xml.in | 1 | ||||
-rw-r--r-- | gedit/resources/pixmaps/gedit-logo.png (renamed from pixmaps/gedit-logo.png) | bin | 25918 -> 25918 bytes | |||
-rw-r--r-- | gedit/resources/pixmaps/gedit-logo.svgz (renamed from pixmaps/gedit-logo.svgz) | bin | 8608 -> 8608 bytes | |||
-rw-r--r-- | gedit/resources/pixmaps/gedit.ico (renamed from pixmaps/gedit.ico) | bin | 9662 -> 9662 bytes | |||
-rw-r--r-- | pixmaps/Makefile.am | 4 | ||||
-rw-r--r-- | win32/qt-ifw/config/config.xml | 4 |
10 files changed, 13 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am index 5f1076436..78238f7e1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -88,7 +88,6 @@ BUILT_SOURCES = CLEANFILES = include data/Makefile.am -include pixmaps/Makefile.am include win32/Makefile.am include osx/bundle/data/Makefile.am include plugins/Makefile.am diff --git a/gedit/Makefile.am b/gedit/Makefile.am index a502e8ccd..42c1cfcc8 100644 --- a/gedit/Makefile.am +++ b/gedit/Makefile.am @@ -260,6 +260,7 @@ EXTRA_DIST += \ gedit/gedit.rc \ gedit/Gedit-3.0.metadata \ gedit/resources/gedit.gresource.xml.in \ + gedit/resources/pixmaps/gedit.ico \ $(gedit_dist_resource_deps) if HAVE_INTROSPECTION diff --git a/gedit/gedit-commands-help.c b/gedit/gedit-commands-help.c index 75d0c3c04..5f45f9c06 100644 --- a/gedit/gedit-commands-help.c +++ b/gedit/gedit-commands-help.c @@ -79,18 +79,16 @@ _gedit_cmd_help_about (GeditWindow *window) N_("gedit is a small and lightweight text editor for the GNOME Desktop"); GdkPixbuf *logo; - const gchar *data_dir; - gchar *logo_file; + GError *error = NULL; gedit_debug (DEBUG_COMMANDS); - data_dir = gedit_dirs_get_gedit_data_dir (); - logo_file = g_build_filename (data_dir, - "logo", - "gedit-logo.png", - NULL); - logo = gdk_pixbuf_new_from_file (logo_file, NULL); - g_free (logo_file); + logo = gdk_pixbuf_new_from_resource ("/org/gnome/gedit/pixmaps/gedit-logo.png", &error); + if (error != NULL) + { + g_warning ("Error when loading the gedit logo: %s", error->message); + g_clear_error (&error); + } gtk_show_about_dialog (GTK_WINDOW (window), "program-name", "gedit", @@ -106,8 +104,7 @@ _gedit_cmd_help_about (GeditWindow *window) "website-label", "www.gedit.org", NULL); - if (logo) - g_object_unref (logo); + g_clear_object (&logo); } /* ex:set ts=8 noet: */ diff --git a/gedit/gedit.rc b/gedit/gedit.rc index 17d8eb134..28cac882d 100644 --- a/gedit/gedit.rc +++ b/gedit/gedit.rc @@ -1 +1 @@ -A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "../pixmaps/gedit.ico"
+A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "resources/pixmaps/gedit.ico"
diff --git a/gedit/resources/gedit.gresource.xml.in b/gedit/resources/gedit.gresource.xml.in index 2fde722ab..9191e31e2 100644 --- a/gedit/resources/gedit.gresource.xml.in +++ b/gedit/resources/gedit.gresource.xml.in @@ -3,6 +3,7 @@ <gresource prefix="/org/gnome/gedit"> <file preprocess="xml-stripblanks">gtk/menus.ui</file> <file preprocess="xml-stripblanks">gtk/menus-common.ui</file> + <file preprocess="to-pixdata">pixmaps/gedit-logo.png</file> <file preprocess="xml-stripblanks">ui/gedit-encodings-dialog.ui</file> <file preprocess="xml-stripblanks">ui/gedit-preferences-dialog.ui</file> <file preprocess="xml-stripblanks">ui/gedit-replace-dialog.ui</file> diff --git a/pixmaps/gedit-logo.png b/gedit/resources/pixmaps/gedit-logo.png Binary files differindex 43a36bdc0..43a36bdc0 100644 --- a/pixmaps/gedit-logo.png +++ b/gedit/resources/pixmaps/gedit-logo.png diff --git a/pixmaps/gedit-logo.svgz b/gedit/resources/pixmaps/gedit-logo.svgz Binary files differindex d9f35ab25..d9f35ab25 100644 --- a/pixmaps/gedit-logo.svgz +++ b/gedit/resources/pixmaps/gedit-logo.svgz diff --git a/pixmaps/gedit.ico b/gedit/resources/pixmaps/gedit.ico Binary files differindex e9b7f5c27..e9b7f5c27 100644 --- a/pixmaps/gedit.ico +++ b/gedit/resources/pixmaps/gedit.ico diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am deleted file mode 100644 index c39b8eae5..000000000 --- a/pixmaps/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -pixmaps_logodir = $(datadir)/gedit/logo -dist_pixmaps_logo_DATA = pixmaps/gedit-logo.png - -EXTRA_DIST += pixmaps/gedit.ico diff --git a/win32/qt-ifw/config/config.xml b/win32/qt-ifw/config/config.xml index 4de4cf48f..1d83c072f 100644 --- a/win32/qt-ifw/config/config.xml +++ b/win32/qt-ifw/config/config.xml @@ -9,6 +9,6 @@ <StartMenuDir>gedit Text Editor</StartMenuDir> <RunProgram>@TargetDir@/bin/gedit.exe</RunProgram> <RunProgramArguments></RunProgramArguments> - <InstallerApplicationIcon>../../../pixmaps/gedit.ico</InstallerApplicationIcon> - <InstallerWindowIcon>../../../pixmaps/gedit.ico</InstallerWindowIcon> + <InstallerApplicationIcon>../../../gedit/resources/pixmaps/gedit.ico</InstallerApplicationIcon> + <InstallerWindowIcon>../../../gedit/resources/pixmaps/gedit.ico</InstallerWindowIcon> </Installer> |