Re: Will be GNOME 2.10 based on GTK+ 2.6?
- From: Luca Ferretti <elle uca libero it>
- To: GNOME Desktop Hackers <desktop-devel-list gnome org>
- Subject: Re: Will be GNOME 2.10 based on GTK+ 2.6?
- Date: Fri, 01 Oct 2004 11:05:17 +0200
Il gio, 2004-09-30 alle 19:45, Luca Ferretti ha scritto:
> Will be GNOME 2.10 based on GTK+ 2.6?
>
woops, I forgot the patch....
diff -Naur gedit/data/gedit.desktop.in gedit-new/data/gedit.desktop.in
--- gedit/data/gedit.desktop.in 2004-09-28 15:06:37.272027536 +0200
+++ gedit-new/data/gedit.desktop.in 2004-09-28 15:05:21.639525424 +0200
@@ -5,7 +5,7 @@
Exec=gedit %U
Terminal=false
Type=Application
-Icon=gedit-icon.png
+Icon=stock_edit
X-GNOME-DocPath=gedit/gedit.xml
Categories=Application;Utility;TextEditor;
X-GNOME-Bugzilla-Bugzilla=GNOME
diff -Naur gedit/gedit/gedit2.c gedit-new/gedit/gedit2.c
--- gedit/gedit/gedit2.c 2004-09-28 15:06:37.357014616 +0200
+++ gedit-new/gedit/gedit2.c 2004-09-28 15:06:23.819072696 +0200
@@ -35,6 +35,8 @@
#include <locale.h>
#include <string.h>
+#include <gtk/gtkicontheme.h>
+
#include <libgnome/libgnome.h>
#include <libgnomeui/libgnomeui.h>
#include <libgnomeui/gnome-window-icon.h>
@@ -57,6 +59,9 @@
#define GNOME_ICONDIR ""
#endif
+/* stock_edit is a generic icon. Maybe we need something like /apps/text-editor.png */
+#define GEDIT_ICON "stock_edit"
+
GeditMDI *gedit_mdi = NULL;
BonoboObject *gedit_app_server = NULL;
@@ -100,16 +105,21 @@
static void
gedit_set_default_icon ()
{
- if (!g_file_test (GNOME_ICONDIR "/gedit-icon.png", G_FILE_TEST_EXISTS))
+ GtkIconTheme *icon_theme;
+
+ icon_theme = gtk_icon_theme_get_default();
+
+ /* Use themed icon for window. This needs GTK >= 2.5.x */
+
+ if (gtk_icon_theme_has_icon (icon_theme, GEDIT_ICON))
{
- g_warning ("Could not find %s", GNOME_ICONDIR "/gedit-icon.png");
-
- /* In case we haven't yet been installed */
- gnome_window_icon_set_default_from_file ("../pixmaps/gedit-icon.png");
+ gtk_window_set_default_icon_name (GEDIT_ICON);
}
else
{
- gnome_window_icon_set_default_from_file (GNOME_ICONDIR "/gedit-icon.png");
+ g_warning ("Could not find '%s' in icon theme", GEDIT_ICON);
+
+ gtk_window_set_default_icon_name (GTK_STOCK_EDIT);
}
}
diff -Naur gedit/pixmaps/Makefile.am gedit-new/pixmaps/Makefile.am
--- gedit/pixmaps/Makefile.am 2004-09-28 15:06:37.410006560 +0200
+++ gedit-new/pixmaps/Makefile.am 2004-09-28 15:05:44.400065296 +0200
@@ -1,11 +1,7 @@
-appicondir = $(datadir)/pixmaps
-appicon_DATA = gedit-icon.png
-
applogodir = $(datadir)/pixmaps
applogo_DATA = gedit-logo.png \
gedit-plugin-manager.png
EXTRA_DIST = \
- $(appicon_DATA) \
$(applogo_DATA)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]