Re: Question with selection



"Peter E. Snyder" <plastercast plastercast tzo com> writes:

> Attached is a patched version of the theme selector that also, if it
> detects metacity running, also allows you to change the metacity
> themes.  I realize the UI is not totally polished (there sizings/borders
> look slightly different), but for the most part it is complete. 
> However, in writing this, I have hit a snag that has stopped me from
> finishing it, namely the selection from one treeview seems to be
> slipping over into the other window (the problem reveals itself between
> lines 130 and 142).  If anyone could point me towards what I am doing
> wrong I would really apreciate it.

Hmm, maybe you'll find comparison with the attached useful ...
it's a patch that we are using for Red Hat. It doesn't try to
detect the window manager running, but it seems to work pretty
well for metacity theme switching.

(I've been told that there is some grand window manager virtualization
abstraction for control-center in the pipeline; having written the
old window manager capplet for GNOME-1.2, I'm a little skeptical
of ever being to present the idea of switching the window manager
to a user in a sensible fashion, but we'll see.)

Regards,
                                        Owen

--- control-center-2.0.0/capplets/theme-switcher/theme-switcher.c.switchwmtheme	Wed Jul 24 12:26:21 2002
+++ control-center-2.0.0/capplets/theme-switcher/theme-switcher.c	Wed Jul 24 12:26:40 2002
@@ -17,10 +17,18 @@
 #include "gconf-property-editor.h"
 #include "file-transfer-dialog.h"
 
+/* FIXME: This shouldn't be hardcoded
+ */
+#define METACITY_THEME_LOCATION "/usr/share/metacity/themes"
+
 #define GTK_THEME_KEY "/desktop/gnome/interface/gtk_theme"
+#define METACITY_THEME_DIR "/apps/metacity/general"
+#define METACITY_THEME_KEY METACITY_THEME_DIR "/theme"
 
 #define MAX_ELEMENTS_BEFORE_SCROLLING 8
 
+static void read_themes (GladeXML *dialog);
+
 enum
 {
   THEME_NAME_COLUMN,
@@ -55,13 +63,12 @@
 
 static void
 theme_selection_changed (GtkTreeSelection *selection,
-			 gpointer          data)
+			 const gchar      *gconf_key)
 {
   GtkTreeModel *model;
   gchar *new_key;
   GConfClient *client;
-  GtkTreeIter iter;
-
+  GtkTreeIter iter; 
   if (setting_model)
     return;
 
@@ -83,63 +90,139 @@
     {
       gchar *old_key;
 
-      old_key = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
+      old_key = gconf_client_get_string (client, gconf_key, NULL);
       if (old_key && strcmp (old_key, new_key))
 	{
-	  gconf_client_set_string (client, GTK_THEME_KEY, new_key, NULL);
+	  gconf_client_set_string (client, gconf_key, new_key, NULL);
 	}
       g_free (old_key);
     }
   else
     {
-      gconf_client_unset (client, GTK_THEME_KEY, NULL);
+      gconf_client_unset (client, gconf_key, NULL);
     }
   g_free (new_key);
+
+  g_object_unref (client);
+}
+ 
+static void
+gtk_theme_selection_changed (GtkTreeSelection *selection,
+			     gpointer          data)
+{
+  theme_selection_changed (selection, GTK_THEME_KEY);
 }
 
 static void
-read_themes (GladeXML *dialog)
+window_theme_selection_changed (GtkTreeSelection *selection,
+				gpointer          data)
+{
+  theme_selection_changed (selection, METACITY_THEME_KEY);
+}
+
+static void
+metacity_theme_dir_changed_callback (GnomeVFSMonitorHandle    *handle,
+				     const gchar              *monitor_uri,
+				     const gchar              *info_uri,
+				     GnomeVFSMonitorEventType  event_type,
+				     gpointer                  user_data)
+{
+  switch (event_type)
+    {
+    case GNOME_VFS_MONITOR_EVENT_CHANGED:
+    case GNOME_VFS_MONITOR_EVENT_CREATED:
+    case GNOME_VFS_MONITOR_EVENT_DELETED:
+      read_themes (user_data);
+      break;
+    default:
+      break;
+    }
+}
+/* A bit of the following is taken from metacity-setup by Peter Snyder
+ */
+static GList *
+get_metacity_themes (GladeXML *dialog)
+{
+  GList *result = NULL;
+  char *possible_theme_dirs[2];
+  int i;
+  static gboolean first_time = TRUE;
+
+  possible_theme_dirs[0] = g_strdup (METACITY_THEME_LOCATION);
+  possible_theme_dirs[1] = g_build_filename (g_get_home_dir (), ".metacity", "themes", NULL);
+    
+  for (i = 0; i < G_N_ELEMENTS (possible_theme_dirs); i++)
+    {
+      GDir *themeDirectory = g_dir_open (possible_theme_dirs[i], 0, NULL);
+
+      if (first_time)
+	{
+	  GnomeVFSMonitorHandle *handle = NULL;
+	  gnome_vfs_monitor_add (&handle,
+				 possible_theme_dirs[i],
+				 GNOME_VFS_MONITOR_DIRECTORY,
+				 metacity_theme_dir_changed_callback,
+				 dialog);
+	}
+      
+      if (themeDirectory)
+	{
+	  const char *filename;
+	  
+	  while ((filename = g_dir_read_name (themeDirectory)) != NULL)
+	    {
+	      char *theme_dir = g_build_filename (possible_theme_dirs[i], filename, NULL);
+	      
+	      if (g_file_test (theme_dir, G_FILE_TEST_IS_DIR))
+		result = g_list_prepend (result, g_strdup (filename));
+
+	      g_free (theme_dir);
+	    }
+	  
+	  g_dir_close (themeDirectory);
+	}
+
+      g_free (possible_theme_dirs[i]);
+    }
+
+  first_time = FALSE;
+
+  return result;
+}
+
+static void
+load_theme_names (GtkTreeView *tree_view,
+		  GList       *theme_list,
+		  const char  *current_theme)
 {
-  GConfClient *client;
-  GList *gtk_theme_list;
   GList *list;
   GtkTreeModel *model;
-  GtkTreeView *tree_view;
-  gchar *current_theme;
+  GtkWidget *swindow;
   gint i = 0;
   gboolean current_theme_found = FALSE;
   GtkTreeRowReference *row_ref = NULL;
 
-  client = gconf_client_get_default ();
-
-  gtk_theme_list = theme_common_get_list ();
-  tree_view = GTK_TREE_VIEW (WID ("theme_treeview"));
+  swindow = GTK_WIDGET (tree_view)->parent;
   model = gtk_tree_view_get_model (tree_view);
 
   setting_model = TRUE;
   gtk_list_store_clear (GTK_LIST_STORE (model));
-
-  current_theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
-  if (current_theme == NULL)
-    current_theme = g_strdup ("Default");
-  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("theme_swindow")),
+  
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
 				  GTK_POLICY_NEVER, GTK_POLICY_NEVER);
-  gtk_widget_set_usize (WID ("theme_swindow"), -1, -1);
+  gtk_widget_set_usize (swindow, -1, -1);
 
-  for (list = gtk_theme_list; list; list = list->next)
+  for (list = theme_list; list; list = list->next)
     {
-      ThemeInfo *info = list->data;
+      const char *name = list->data;
       GtkTreeIter iter;
 
-      if (! info->has_gtk)
-	continue;
-
       gtk_list_store_prepend (GTK_LIST_STORE (model), &iter);
       gtk_list_store_set (GTK_LIST_STORE (model), &iter,
-			  THEME_NAME_COLUMN, info->name,
+			  THEME_NAME_COLUMN, name,
 			  -1);
 
-      if (strcmp (current_theme, info->name) == 0)
+      if (strcmp (current_theme, name) == 0)
 	{
 	  GtkTreeSelection *selection;
 
@@ -160,8 +243,8 @@
 	{
 	  GtkRequisition rectangle;
 	  gtk_widget_size_request (GTK_WIDGET (tree_view), &rectangle);
-	  gtk_widget_set_usize (WID ("theme_swindow"), -1, rectangle.height);
-	  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("theme_swindow")),
+	  gtk_widget_set_usize (swindow, -1, rectangle.height);
+	  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
 					  GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
 	}
       i++;
@@ -187,7 +270,6 @@
 	}
     }
 
-
   if (row_ref && initial_scroll)
     {
       GtkTreePath *path;
@@ -201,8 +283,54 @@
       initial_scroll = FALSE;
     }
   setting_model = FALSE;
+}
+
+static void
+read_themes (GladeXML *dialog)
+{
+  GList *theme_list, *gtk_theme_list;
+  GList *list;
+  GConfClient *client;
+  char *current_theme;
 
+  client = gconf_client_get_default ();
+
+  /*
+   * Read in GTK+ themes
+   */
+  theme_list = theme_common_get_list ();
+
+  gtk_theme_list = NULL;
+  for (list = theme_list; list; list = list->next)
+    {
+      ThemeInfo *info = list->data;
+
+      if (info->has_gtk)
+	gtk_theme_list = g_list_prepend (gtk_theme_list, info->name);
+    }
+
+  current_theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
+  if (current_theme == NULL)
+    current_theme = g_strdup ("Default");
+
+  load_theme_names (GTK_TREE_VIEW (WID ("theme_treeview")), gtk_theme_list, current_theme);
+
+  g_list_free (gtk_theme_list);
   g_free (current_theme);
+
+  /*
+   * Read in Metacity themes
+   */
+  theme_list = get_metacity_themes (dialog);
+
+  current_theme = gconf_client_get_string (client, METACITY_THEME_KEY, NULL);
+  if (current_theme == NULL)
+    current_theme = g_strdup ("Atlanta");
+
+  load_theme_names (GTK_TREE_VIEW (WID ("window_theme_treeview")), theme_list, current_theme);
+
+  g_list_foreach (theme_list, (GFunc)g_free, NULL);
+  g_list_free (theme_list);
 }
 
 static void
@@ -217,6 +345,18 @@
   read_themes ((GladeXML *)user_data);
 }
 
+static void
+metacity_key_changed (GConfClient *client,
+		      guint        cnxn_id,
+		      GConfEntry  *entry,
+		      gpointer     user_data)
+{
+  if (strcmp (entry->key, METACITY_THEME_KEY))
+    return;
+
+  read_themes ((GladeXML *)user_data);
+}
+
 
 static void
 theme_changed_func (gpointer uri,
@@ -324,6 +464,44 @@
 }
 
 static void
+show_manage_window_themes (GtkWidget *button, gpointer data)
+{
+	gchar *path, *command;
+	GnomeVFSURI *uri;
+
+	path = g_strdup_printf ("%s/.metacity/themes", g_get_home_dir ());
+	uri = gnome_vfs_uri_new (path);
+
+	if (!gnome_vfs_uri_exists (uri)) {
+		/* Create the directory */
+		gnome_vfs_make_directory_for_uri (uri, 0775);
+	}
+	gnome_vfs_uri_unref (uri);
+
+	command = g_strdup_printf ("nautilus --no-desktop %s", path);
+	g_free (path);
+
+	g_spawn_command_line_async (command, NULL);
+	g_free (command);
+}
+
+static void
+ensure_manage_window_themes (void)
+{
+	gchar *path, *command;
+	GnomeVFSURI *uri;
+
+	path = g_strdup_printf ("%s/.metacity/themes", g_get_home_dir ());
+	uri = gnome_vfs_uri_new (path);
+
+	if (!gnome_vfs_uri_exists (uri)) {
+		/* Create the directory */
+		gnome_vfs_make_directory_for_uri (uri, 0775);
+	}
+	gnome_vfs_uri_unref (uri);
+}
+
+static void
 transfer_cancel_cb (GtkWidget *dlg, gchar *path)
 {
 	gnome_vfs_unlink (path);
@@ -420,33 +598,56 @@
 }
 
 static void
-setup_dialog (GladeXML *dialog)
+setup_tree_view (GtkTreeView *tree_view,
+		 GCallback    changed_callback)
 {
-  GConfClient *client;
-  GtkWidget *widget;
   GtkTreeModel *model;
   GtkTreeSelection *selection;
 
-  client = gconf_client_get_default ();
-
-  gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (WID ("theme_treeview")),
+  gtk_tree_view_insert_column_with_attributes (tree_view,
 					       -1, NULL,
 					       gtk_cell_renderer_text_new (),
 					       "text", THEME_NAME_COLUMN,
 					       NULL);
+  
+  model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, G_TYPE_STRING);
+  gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model), 0, sort_func, NULL, NULL);
+  gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), 0, GTK_SORT_ASCENDING);
+  gtk_tree_view_set_model (tree_view, model);
+  selection = gtk_tree_view_get_selection (tree_view);
+  gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
+  g_signal_connect (G_OBJECT (selection), "changed", changed_callback, NULL);
+}
+
+static void
+setup_dialog (GladeXML *dialog)
+{
+  GConfClient *client;
+  GtkWidget *widget;
+  
+  client = gconf_client_get_default ();
+
+  /* Laziness - instead of monitoring creation and destruction of
+   * ~/.metacity/themes, we just create it
+   */
+  ensure_manage_window_themes ();
+    
+  setup_tree_view (GTK_TREE_VIEW (WID ("theme_treeview")),
+		   G_CALLBACK (gtk_theme_selection_changed));
+  setup_tree_view (GTK_TREE_VIEW (WID ("window_theme_treeview")),
+		   G_CALLBACK (window_theme_selection_changed));
+  
   gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
   gconf_client_notify_add (client,
 			   GTK_THEME_KEY,
 			   (GConfClientNotifyFunc) &theme_key_changed,
 			   dialog, NULL, NULL);
 
-  model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, G_TYPE_STRING);
-  gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model), 0, sort_func, NULL, NULL);
-  gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), 0, GTK_SORT_ASCENDING);
-  gtk_tree_view_set_model (GTK_TREE_VIEW (WID ("theme_treeview")), model);
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("theme_treeview")));
-  gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
-  g_signal_connect (G_OBJECT (selection), "changed", (GCallback) theme_selection_changed, NULL);
+  gconf_client_add_dir (client, METACITY_THEME_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+  gconf_client_notify_add (client,
+			   METACITY_THEME_KEY,
+			   (GConfClientNotifyFunc) &metacity_key_changed,
+			   dialog, NULL, NULL);
 
   read_themes (dialog);
   theme_common_register_theme_change (theme_changed_func, dialog);
@@ -457,6 +658,9 @@
   widget = WID ("manage_button");
   g_signal_connect (G_OBJECT (widget), "clicked",
 		    G_CALLBACK (show_manage_themes), dialog);
+  widget = WID ("window_manage_button");
+  g_signal_connect (G_OBJECT (widget), "clicked",
+		    G_CALLBACK (show_manage_window_themes), dialog);
 
   widget = WID ("install_dialog");
   g_signal_connect (G_OBJECT (widget), "response",
--- control-center-2.0.0/capplets/theme-switcher/theme-properties.glade.switchwmtheme	Wed Jul 24 12:26:27 2002
+++ control-center-2.0.0/capplets/theme-switcher/theme-properties.glade	Wed Jul 24 12:26:35 2002
@@ -6,7 +6,7 @@
 
 <widget class="GtkDialog" id="theme_dialog">
   <property name="visible">True</property>
-  <property name="title" translatable="yes">Gtk+ Theme Preferences</property>
+  <property name="title" translatable="yes">Theme Preferences</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
@@ -68,11 +68,16 @@
 	  <property name="spacing">8</property>
 
 	  <child>
-	    <widget class="GtkFrame" id="frame1">
+	    <widget class="GtkNotebook" id="notebook1">
 	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+	      <property name="can_focus">True</property>
+	      <property name="show_tabs">True</property>
+	      <property name="show_border">True</property>
+	      <property name="tab_pos">GTK_POS_TOP</property>
+	      <property name="scrollable">False</property>
+	      <property name="tab_hborder">2</property>
+	      <property name="tab_vborder">2</property>
+	      <property name="enable_popup">False</property>
 
 	      <child>
 		<widget class="GtkVBox" id="vbox4">
@@ -82,32 +87,106 @@
 		  <property name="spacing">8</property>
 
 		  <child>
-		    <widget class="GtkHBox" id="hbox1">
+		    <widget class="GtkVBox" id="vbox5">
 		      <property name="visible">True</property>
 		      <property name="homogeneous">False</property>
-		      <property name="spacing">8</property>
+		      <property name="spacing">5</property>
 
 		      <child>
-			<widget class="GtkScrolledWindow" id="theme_swindow">
+			<widget class="GtkLabel" id="label11">
 			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-			  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-			  <property name="shadow_type">GTK_SHADOW_IN</property>
-			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+			  <property name="label" translatable="yes">Installed themes:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.49</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox1">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">8</property>
 
 			  <child>
-			    <widget class="GtkTreeView" id="theme_treeview">
+			    <widget class="GtkScrolledWindow" id="theme_swindow">
 			      <property name="visible">True</property>
 			      <property name="can_focus">True</property>
-			      <property name="headers_visible">False</property>
-			      <property name="rules_hint">False</property>
-			      <property name="reorderable">False</property>
-			      <property name="enable_search">True</property>
-			      <accessibility>
-				<atkproperty name="AtkObject::accessible_description" translatable="yes">List of available GTK+ themes</atkproperty>
-			      </accessibility>
+			      <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+			      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			      <child>
+				<widget class="GtkTreeView" id="theme_treeview">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="headers_visible">False</property>
+				  <property name="rules_hint">False</property>
+				  <property name="reorderable">False</property>
+				  <property name="enable_search">True</property>
+				</widget>
+			      </child>
 			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkVBox" id="vbox2">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">8</property>
+
+			      <child>
+				<widget class="GtkButton" id="install_button">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Install new theme...</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="manage_button">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Go to theme folder</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
 			  </child>
 			</widget>
 			<packing>
@@ -116,35 +195,193 @@
 			  <property name="fill">True</property>
 			</packing>
 		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox5">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">8</property>
+
+		      <child>
+			<widget class="GtkImage" id="image1">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-dialog-info</property>
+			  <property name="icon_size">6</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label3">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">New themes can also be installed by dragging them into the window.</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">True</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label9">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Application</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">tab</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox6">
+		  <property name="border_width">8</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">8</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox7">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">5</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label12">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Installed themes:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.49</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
 
 		      <child>
-			<widget class="GtkVBox" id="vbox2">
+			<widget class="GtkHBox" id="hbox7">
 			  <property name="visible">True</property>
 			  <property name="homogeneous">False</property>
 			  <property name="spacing">8</property>
 
 			  <child>
-			    <widget class="GtkButton" id="install_button">
+			    <widget class="GtkScrolledWindow" id="window_theme_swindow">
 			      <property name="visible">True</property>
 			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">_Install new theme...</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+			      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			      <child>
+				<widget class="GtkTreeView" id="window_theme_treeview">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="headers_visible">False</property>
+				  <property name="rules_hint">False</property>
+				  <property name="reorderable">False</property>
+				  <property name="enable_search">True</property>
+				</widget>
+			      </child>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
 			    </packing>
 			  </child>
 
 			  <child>
-			    <widget class="GtkButton" id="manage_button">
+			    <widget class="GtkVBox" id="vbox8">
 			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">_Go to theme folder</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">8</property>
+
+			      <child>
+				<widget class="GtkButton" id="window_install_button">
+				  <property name="visible">True</property>
+				  <property name="sensitive">False</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Install new theme...</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="window_manage_button">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Go to theme folder</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -155,8 +392,8 @@
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
 			</packing>
 		      </child>
 		    </widget>
@@ -168,13 +405,12 @@
 		  </child>
 
 		  <child>
-		    <widget class="GtkHBox" id="hbox5">
-		      <property name="visible">True</property>
+		    <widget class="GtkHBox" id="hbox8">
 		      <property name="homogeneous">False</property>
 		      <property name="spacing">8</property>
 
 		      <child>
-			<widget class="GtkImage" id="image1">
+			<widget class="GtkImage" id="image4">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-dialog-info</property>
 			  <property name="icon_size">6</property>
@@ -191,7 +427,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label3">
+			<widget class="GtkLabel" id="label13">
 			  <property name="visible">True</property>
 			  <property name="label" translatable="yes">New themes can also be installed by dragging them into the window.</property>
 			  <property name="use_underline">False</property>
@@ -218,12 +454,16 @@
 		    </packing>
 		  </child>
 		</widget>
+		<packing>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
+		</packing>
 	      </child>
 
 	      <child>
-		<widget class="GtkLabel" id="label9">
+		<widget class="GtkLabel" id="label10">
 		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Installed Themes</property>
+		  <property name="label" translatable="yes">Window Border</property>
 		  <property name="use_underline">False</property>
 		  <property name="use_markup">False</property>
 		  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -235,7 +475,7 @@
 		  <property name="ypad">0</property>
 		</widget>
 		<packing>
-		  <property name="type">label_item</property>
+		  <property name="type">tab</property>
 		</packing>
 	      </child>
 	    </widget>


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