[PATCH] Source tree contains old icon themes, causing extra strings



Hi

I've added this patch to bug 129924, the patch remove all traces of the old theme system (the one available in the gnome 1.x days)

http://bugzilla.gnome.org/show_bug.cgi?id=129924


Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.6437
diff -u -r1.6437 ChangeLog
--- ChangeLog	16 Mar 2005 08:32:19 -0000	1.6437
+++ ChangeLog	16 Mar 2005 19:33:39 -0000
@@ -1,3 +1,40 @@
+2005-03-16  Diego Gonzalez  <diego pemas net>
+
+	* libnautilus-private/Makefile.am: remove nautilus-theme.[c-h]
+	  from the build process.
+	* libnautilus-private/nautilus-icon-factory.c:
+	  (load_thumbnail_frame) remove the need to use the deprecated
+	  nautilus themes.
+	* libnautilus-private/nautilus-icon-canvas-item.c:
+	  (draw_strech_handles), (it_test_stretch_handle):
+	  remove the need to use the deprecated nautilus themes.
+	* libnautilus-private/nautilus-thumbnails.c:
+	* libnautilus-private/nautilus-icon-factory.c:
+	  remove nautilus-theme.h include
+
+	* src/nautilus-navigation-window.c:
+	* src/nautilus-property-browser.c:
+	* src/nautilus-notes-viewer.c:
+	* src/nautilus-sidebar-title.c:
+	* src/nautilus-window-manage-views.c:
+	* src/nautilus-window-toolbars.c:
+	* src/nautilus-zoom-control.c:
+	  remove nautilus-theme.h include
+
+	* src/nautilus-sidebar-title:
+	 (nautilus_sidebar_title_select_text_color): remove use of
+	 old theme stuff and adapt the shadow offset, made it equal to 1,
+	 which is the default.
+	 (nautilus_sidebar_title_theme_changed): remove, as there will be
+	 no sidebar theme changes.
+ 	 (nautilus_sidebar_title_init): remove the theme_changed callback, as
+	 there will not be sidebar theme changes anymore.
+	
+  * src/nautilus-notes-viewer.c:
+	 (nautilus_notes_viewer_init): remove use of old theme stuff.
+
+	* icons/Makefile.am: don't install old theme stuff.
+
 2005-03-16  Alexander Larsson  <alexl redhat com>
 
 	* configure.in:
Index: src/nautilus-navigation-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-navigation-window.c,v
retrieving revision 1.428
diff -u -r1.428 nautilus-navigation-window.c
--- src/nautilus-navigation-window.c	11 Jan 2005 10:53:58 -0000	1.428
+++ src/nautilus-navigation-window.c	16 Mar 2005 19:33:40 -0000
@@ -73,7 +73,6 @@
 #include <libnautilus-private/nautilus-mime-actions.h>
 #include <libnautilus-private/nautilus-program-choosing.h>
 #include <libnautilus-private/nautilus-sidebar.h>
-#include <libnautilus-private/nautilus-theme.h>
 #include <libnautilus-private/nautilus-view-factory.h>
 #include <libnautilus-private/nautilus-clipboard.h>
 #include <libnautilus-private/nautilus-undo.h>
Index: src/nautilus-property-browser.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-property-browser.c,v
retrieving revision 1.208
diff -u -r1.208 nautilus-property-browser.c
--- src/nautilus-property-browser.c	29 Nov 2004 16:39:31 -0000	1.208
+++ src/nautilus-property-browser.c	16 Mar 2005 19:33:41 -0000
@@ -84,7 +84,6 @@
 #include <libnautilus-private/nautilus-file.h>
 #include <libnautilus-private/nautilus-global-preferences.h>
 #include <libnautilus-private/nautilus-metadata.h>
-#include <libnautilus-private/nautilus-theme.h>
 #include <atk/atkrelationset.h>
 
 /* property types */
Index: src/nautilus-notes-viewer.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-notes-viewer.c,v
retrieving revision 1.2
diff -u -r1.2 nautilus-notes-viewer.c
--- src/nautilus-notes-viewer.c	22 Nov 2004 15:24:37 -0000	1.2
+++ src/nautilus-notes-viewer.c	16 Mar 2005 19:33:42 -0000
@@ -44,7 +44,6 @@
 #include <libnautilus-private/nautilus-global-preferences.h>
 #include <libnautilus-private/nautilus-metadata.h>
 #include <libnautilus-private/nautilus-clipboard.h>
-#include <libnautilus-private/nautilus-theme.h>
 #include <libnautilus-private/nautilus-module.h>
 #include <libnautilus-private/nautilus-sidebar-provider.h>
 #include <libnautilus-extension/nautilus-property-page-provider.h>
@@ -320,7 +319,7 @@
         
         details->uri = g_strdup ("");
 
-        image_path = nautilus_theme_get_image_path ("note-indicator.png");
+        image_path = nautilus_pixmap_file ("note-indicator.png");
         if (image_path) {
                 details->icon = gdk_pixbuf_new_from_file (image_path, NULL);
                 g_free (image_path);
Index: src/nautilus-sidebar-title.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-sidebar-title.c,v
retrieving revision 1.148
diff -u -r1.148 nautilus-sidebar-title.c
--- src/nautilus-sidebar-title.c	29 Nov 2004 16:39:32 -0000	1.148
+++ src/nautilus-sidebar-title.c	16 Mar 2005 19:33:42 -0000
@@ -50,7 +50,6 @@
 #include <libnautilus-private/nautilus-global-preferences.h>
 #include <libnautilus-private/nautilus-icon-factory.h>
 #include <libnautilus-private/nautilus-metadata.h>
-#include <libnautilus-private/nautilus-theme.h>
 #include <libnautilus-private/nautilus-sidebar.h>
 #include <string.h>
 #include <stdlib.h>
@@ -59,6 +58,7 @@
 #define MAX_TITLE_SIZE 		256
 #define MINIMUM_INFO_WIDTH	32
 #define SIDEBAR_INFO_MARGIN	4
+#define SHADOW_OFFSET		1
 
 #define MORE_INFO_FONT_SIZE 	 12
 #define MIN_TITLE_FONT_SIZE 	 12
@@ -69,7 +69,6 @@
 static void                nautilus_sidebar_title_init       (NautilusSidebarTitle      *pixmap);
 static void                nautilus_sidebar_title_size_allocate    (GtkWidget                 *widget,
 								    GtkAllocation             *allocation);
-static void                nautilus_sidebar_title_theme_changed    (gpointer                   user_data);
 static void                update_icon                             (NautilusSidebarTitle      *sidebar_title);
 static GtkWidget *         sidebar_title_create_title_label        (void);
 static GtkWidget *         sidebar_title_create_more_info_label    (void);
@@ -90,7 +89,6 @@
 	GtkWidget		*emblem_box;
 	GtkWidget		*notes;
 
-	int			 shadow_offset;
 	gboolean		 determined_icon;
 };
 
@@ -174,13 +172,7 @@
 	/* Keep track of changes in graphics trade offs */
 	update_all (sidebar_title);
 
-	eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_THEME,
-						  nautilus_sidebar_title_theme_changed,
-						  sidebar_title,
-						  G_OBJECT (sidebar_title));
-
 	/* initialize the label colors & fonts */
-	nautilus_sidebar_title_theme_changed (sidebar_title);
 	style_set (GTK_WIDGET (sidebar_title), NULL);
 }
 
@@ -245,32 +237,16 @@
 	sidebar_info_title_color = NULL;
 	sidebar_title_shadow_color = NULL;
 	
-	if (is_default) {
-		sidebar_title_color = nautilus_theme_get_theme_data ("sidebar", "title_color");
-		sidebar_info_title_color = nautilus_theme_get_theme_data ("sidebar", "title_info_color");
-		sidebar_title_shadow_color = nautilus_theme_get_theme_data ("sidebar", "title_shadow_color"); 
-	}
-		
-	if (sidebar_title_color == NULL) {
-		/* FIXME bugzilla.gnome.org 42496: for now, both the title and info
-		 * colors are the same - and hard coded */
-		if (eel_background_is_dark (background)) {
-			sidebar_title_color = g_strdup ("#FFFFFF");
-			sidebar_info_title_color = g_strdup ("#FFFFFF");
-			sidebar_title_shadow_color = g_strdup ("#000000");
-				
-		} else {
-			sidebar_title_color = g_strdup ("#000000");
-			sidebar_info_title_color = g_strdup ("#000000");
-			sidebar_title_shadow_color = g_strdup ("#FFFFFF");
-		}
+	/* FIXME bugzilla.gnome.org 42496: for now, both the title and info
+	 * colors are the same - and hard coded */
+	if (eel_background_is_dark (background)) {
+		sidebar_title_color = g_strdup ("#FFFFFF");
+		sidebar_info_title_color = g_strdup ("#FFFFFF");
+		sidebar_title_shadow_color = g_strdup ("#000000");
 	} else {
-		if (sidebar_info_title_color == NULL) {
-			sidebar_info_title_color = g_strdup (sidebar_title_color);
-		}
-		if (sidebar_title_shadow_color == NULL) {
-			sidebar_title_shadow_color = g_strdup ("#FFFFFF");
-		}
+		sidebar_title_color = g_strdup ("#000000");
+		sidebar_info_title_color = g_strdup ("#000000");
+		sidebar_title_shadow_color = g_strdup ("#FFFFFF");
 	}
 
 	eel_gtk_widget_set_foreground_color (sidebar_title->details->title_label,
@@ -283,32 +259,14 @@
 	eel_gtk_label_set_drop_shadow_color (GTK_LABEL (sidebar_title->details->more_info_label),
 					     eel_parse_rgb_with_white_default (sidebar_title_shadow_color));
 
-	eel_gtk_label_set_drop_shadow_offset (GTK_LABEL (sidebar_title->details->title_label),
-					      sidebar_title->details->shadow_offset);
+	eel_gtk_label_set_drop_shadow_offset (GTK_LABEL (sidebar_title->details->title_label), 
+					      SHADOW_OFFSET);
 	eel_gtk_label_set_drop_shadow_offset (GTK_LABEL (sidebar_title->details->more_info_label),
-					      sidebar_title->details->shadow_offset);
+					      SHADOW_OFFSET);
 		
 	g_free (sidebar_title_color);	
 	g_free (sidebar_info_title_color);	
 	g_free (sidebar_title_shadow_color);
-}
-
-/* handle theme changes by setting up the color of the labels */
-static void
-nautilus_sidebar_title_theme_changed (gpointer user_data)
-{
-	char *shadow_offset_str;
-	NautilusSidebarTitle *sidebar_title;	
-
-	sidebar_title = NAUTILUS_SIDEBAR_TITLE (user_data);		
-	
-	shadow_offset_str = nautilus_theme_get_theme_data ("sidebar", "shadow_offset");
-	if (shadow_offset_str) {
-		sidebar_title->details->shadow_offset = atoi (shadow_offset_str);	
-		g_free (shadow_offset_str);
-	} else {
-		sidebar_title->details->shadow_offset = 1;	
-	}
 }
 
 static char*
Index: src/nautilus-window-manage-views.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window-manage-views.c,v
retrieving revision 1.347
diff -u -r1.347 nautilus-window-manage-views.c
--- src/nautilus-window-manage-views.c	14 Feb 2005 10:59:23 -0000	1.347
+++ src/nautilus-window-manage-views.c	16 Mar 2005 19:33:43 -0000
@@ -58,7 +58,6 @@
 #include <libnautilus-private/nautilus-metadata.h>
 #include <libnautilus-private/nautilus-mime-actions.h>
 #include <libnautilus-private/nautilus-monitor.h>
-#include <libnautilus-private/nautilus-theme.h>
 #include <libnautilus-private/nautilus-view-factory.h>
 #include <libnautilus-private/nautilus-window-info.h>
 
Index: src/nautilus-window-toolbars.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window-toolbars.c,v
retrieving revision 1.111
diff -u -r1.111 nautilus-window-toolbars.c
--- src/nautilus-window-toolbars.c	22 Nov 2004 15:24:37 -0000	1.111
+++ src/nautilus-window-toolbars.c	16 Mar 2005 19:33:43 -0000
@@ -48,7 +48,6 @@
 #include <libnautilus-private/nautilus-ui-utilities.h>
 #include <libnautilus-private/nautilus-global-preferences.h>
 #include <libnautilus-private/nautilus-module.h>
-#include <libnautilus-private/nautilus-theme.h>
 
 /* FIXME bugzilla.gnome.org 41243: 
  * We should use inheritance instead of these special cases
Index: src/nautilus-zoom-control.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-zoom-control.c,v
retrieving revision 1.82
diff -u -r1.82 nautilus-zoom-control.c
--- src/nautilus-zoom-control.c	22 Nov 2004 15:24:37 -0000	1.82
+++ src/nautilus-zoom-control.c	16 Mar 2005 19:33:44 -0000
@@ -46,7 +46,6 @@
 #include <libnautilus-private/nautilus-file-utilities.h>
 #include <libnautilus-private/nautilus-global-preferences.h>
 #include <libnautilus-private/nautilus-marshal.h>
-#include <libnautilus-private/nautilus-theme.h>
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
Index: libnautilus-private/Makefile.am
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/Makefile.am,v
retrieving revision 1.243
diff -u -r1.243 Makefile.am
--- libnautilus-private/Makefile.am	12 Jan 2005 12:32:03 -0000	1.243
+++ libnautilus-private/Makefile.am	16 Mar 2005 19:33:44 -0000
@@ -157,8 +157,6 @@
 	nautilus-sidebar.h \
 	nautilus-sound.c \
 	nautilus-sound.h \
-	nautilus-theme.c \
-	nautilus-theme.h \
 	nautilus-thumbnails.c \
 	nautilus-thumbnails.h \
 	nautilus-trash-directory.c \
Index: libnautilus-private/nautilus-icon-factory.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-factory.c,v
retrieving revision 1.312
diff -u -r1.312 nautilus-icon-factory.c
--- libnautilus-private/nautilus-icon-factory.c	11 Jan 2005 12:14:12 -0000	1.312
+++ libnautilus-private/nautilus-icon-factory.c	16 Mar 2005 19:33:45 -0000
@@ -36,7 +36,6 @@
 #include "nautilus-icon-factory-private.h"
 #include "nautilus-lib-self-check-functions.h"
 #include "nautilus-link.h"
-#include "nautilus-theme.h"
 #include "nautilus-thumbnails.h"
 #include "nautilus-trash-monitor.h"
 #include <eel/eel-debug.h>
@@ -321,7 +320,7 @@
 {
 	char *image_path;
 	
-	image_path = nautilus_theme_get_image_path ("thumbnail_frame.png");
+	image_path = nautilus_pixmap_file ("thumbnail_frame.png");
 	if (factory->thumbnail_frame != NULL) {
 		g_object_unref (factory->thumbnail_frame);
 	}
Index: libnautilus-private/nautilus-icon-canvas-item.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-canvas-item.c,v
retrieving revision 1.187
diff -u -r1.187 nautilus-icon-canvas-item.c
--- libnautilus-private/nautilus-icon-canvas-item.c	29 Oct 2004 12:02:13 -0000	1.187
+++ libnautilus-private/nautilus-icon-canvas-item.c	16 Mar 2005 19:33:47 -0000
@@ -32,7 +32,6 @@
 #include "nautilus-global-preferences.h"
 #include "nautilus-icon-factory.h"
 #include "nautilus-icon-private.h"
-#include "nautilus-theme.h"
 #include <eel/eel-art-extensions.h>
 #include <eel/eel-gdk-extensions.h>
 #include <eel/eel-gdk-pixbuf-extensions.h>
@@ -1139,7 +1138,7 @@
 
 	gc = gdk_gc_new (drawable);
 
-	knob_filename = nautilus_theme_get_image_path ("knob.png");
+	knob_filename = nautilus_pixmap_file ("knob.png");
 	knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename, NULL);
 	knob_width = gdk_pixbuf_get_width (knob_pixbuf);
 	knob_height = gdk_pixbuf_get_height (knob_pixbuf);
@@ -2042,7 +2041,7 @@
 		return FALSE;
 	}
 
-	knob_filename = nautilus_theme_get_image_path ("knob.png");
+	knob_filename = nautilus_pixmap_file ("knob.png");
 	knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename, NULL);
 	knob_width = gdk_pixbuf_get_width (knob_pixbuf);
 	knob_height = gdk_pixbuf_get_height (knob_pixbuf);
Index: libnautilus-private/nautilus-thumbnails.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-thumbnails.c,v
retrieving revision 1.52
diff -u -r1.52 nautilus-thumbnails.c
--- libnautilus-private/nautilus-thumbnails.c	15 Dec 2004 11:20:41 -0000	1.52
+++ libnautilus-private/nautilus-thumbnails.c	16 Mar 2005 19:33:47 -0000
@@ -30,7 +30,6 @@
 #include "nautilus-global-preferences.h"
 #include "nautilus-icon-factory-private.h"
 #include "nautilus-icon-factory.h"
-#include "nautilus-theme.h"
 #include <eel/eel-gdk-pixbuf-extensions.h>
 #include <eel/eel-graphic-effects.h>
 #include <eel/eel-string.h>
@@ -229,10 +228,7 @@
 nautilus_thumbnail_frame_image (GdkPixbuf **pixbuf)
 {
 	GdkPixbuf *pixbuf_with_frame, *frame;
-	gboolean got_frame_offsets;
-	char *frame_offset_str;
 	int left_offset, top_offset, right_offset, bottom_offset;
-	char c;
 		
 	/* The pixbuf isn't already framed (i.e., it was not made by
 	 * an old Nautilus), so we must embed it in a frame.
@@ -243,22 +239,11 @@
 		return;
 	}
 	
-	got_frame_offsets = FALSE;
-	frame_offset_str = nautilus_theme_get_theme_data ("thumbnails", "FRAME_OFFSETS");
-	if (frame_offset_str != NULL) {
-		if (sscanf (frame_offset_str, " %d , %d , %d , %d %c",
-			    &left_offset, &top_offset, &right_offset, &bottom_offset, &c) == 4) {
-			got_frame_offsets = TRUE;
-		}
-		g_free (frame_offset_str);
-	}
-	if (!got_frame_offsets) {
-		/* use nominal values since the info in the theme couldn't be found */
-		left_offset = 3;
-		top_offset = 3;
-		right_offset = 6;
-		bottom_offset = 6;
-	}
+	/* use nominal values since the info in the theme couldn't be found */
+	left_offset = 3;
+	top_offset = 3;
+	right_offset = 6;
+	bottom_offset = 6;
 	
 	pixbuf_with_frame = eel_embed_image_in_frame
 		(*pixbuf, frame,
Index: icons/Makefile.am
===================================================================
RCS file: /cvs/gnome/nautilus/icons/Makefile.am,v
retrieving revision 1.117
diff -u -r1.117 Makefile.am
--- icons/Makefile.am	20 Jul 2003 06:06:21 -0000	1.117
+++ icons/Makefile.am	16 Mar 2005 19:33:47 -0000
@@ -1,14 +1,5 @@
 NULL=
 
-SUBDIRS =\
-	crux_eggplant \
-	crux_teal \
-	default \
-	gnome \
-	sierra \
-	tahoe \
-	$(NULL)
-
 icondir = $(datadir)/pixmaps/nautilus
 
 icon_DATA =\


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]