[maemo-commits] [maemo-commits] r9296 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Jan 24 15:28:21 EET 2007
Author: mitch
Date: 2007-01-24 15:28:19 +0200 (Wed, 24 Jan 2007)
New Revision: 9296

Modified:
   projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
   projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkrc.c
Log:
2007-01-24  Michael Natterer  <mitch at imendio.com>

	* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): port over parsing
	order change: parse theme and key theme first (makes styles
	available when parsing with gtk_rc_context_parse_string)



Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-01-24 13:27:27 UTC (rev 9295)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-01-24 13:28:19 UTC (rev 9296)
@@ -1,3 +1,9 @@
+2007-01-24  Michael Natterer  <mitch at imendio.com>
+
+	* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): port over parsing
+	order change: parse theme and key theme first (makes styles
+	available when parsing with gtk_rc_context_parse_string)
+
 Wed Jan 24 14:11:58 2007  Tim Janik  <timj at imendio.com>
 
 	* gtk/gtktoolbutton.h (struct _GtkToolButtonClass): 

Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkrc.c
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkrc.c	2007-01-24 13:27:27 UTC (rev 9295)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkrc.c	2007-01-24 13:28:19 UTC (rev 9296)
@@ -1753,6 +1753,25 @@
 
       gtk_rc_parse_default_files (context);
 
+#ifdef MAEMO_CHANGES
+      /* Swapped these sections of code, so the styles from the
+       * XSettings theme are available when parsing with
+       * gtk_rc_context_parse_string
+       */
+      g_free (context->theme_name);
+      g_free (context->key_theme_name);
+
+      g_object_get (context->settings,
+		    "gtk-theme-name", &context->theme_name,
+		    "gtk-key-theme-name", &context->key_theme_name,
+		    NULL);
+
+      if (context->theme_name && context->theme_name[0])
+	gtk_rc_parse_named (context, context->theme_name, NULL);
+      if (context->key_theme_name && context->key_theme_name[0])
+	gtk_rc_parse_named (context, context->key_theme_name, "key");
+#endif /* MAEMO_CHANGES */
+
       tmp_list = global_rc_files;
       while (tmp_list)
 	{
@@ -1766,6 +1785,7 @@
 	  tmp_list = tmp_list->next;
 	}
 
+#ifndef MAEMO_CHANGES
       g_free (context->theme_name);
       g_free (context->key_theme_name);
 
@@ -1778,6 +1798,7 @@
 	gtk_rc_parse_named (context, context->theme_name, NULL);
       if (context->key_theme_name && context->key_theme_name[0])
 	gtk_rc_parse_named (context, context->key_theme_name, "key");
+#endif /* !MAEMO_CHANGES */
 
       context->reloading = FALSE;
 


More information about the maemo-commits mailing list