[glide] Clear out old theme preview stuff



commit d84e79c2e8537309259ce7504f13b51f62ce43af
Author: Robert Carr <racarr Valentine localdomain>
Date:   Sat Jun 5 16:44:44 2010 -0400

    Clear out old theme preview stuff

 libglide/glide-theme-chooser.c |  123 +---------------------------------------
 1 files changed, 1 insertions(+), 122 deletions(-)
---
diff --git a/libglide/glide-theme-chooser.c b/libglide/glide-theme-chooser.c
index 5925b56..820f675 100644
--- a/libglide/glide-theme-chooser.c
+++ b/libglide/glide-theme-chooser.c
@@ -27,7 +27,7 @@
 #include "glide-theme-chooser-priv.h"
 
 #include "glide-theme-manager.h"
-#include "glide-theme-preview-widget.h"
+#include "glide-theme-preview-actor.h"
 
 #include "glide-debug.h"
 
@@ -90,130 +90,14 @@ glide_theme_chooser_set_property (GObject *object,
     }
 }
 
-static GlideTheme *
-glide_theme_chooser_get_selection (GlideThemeChooser *chooser)
-{
-  GtkTreePath *path;
-  GtkTreeModel *model;
-  GtkTreeIter iter;
-  GlideTheme *theme = NULL;
-
-  
-  gtk_tree_view_get_cursor (GTK_TREE_VIEW (chooser->priv->tree_view), &path, NULL);
-  model = gtk_tree_view_get_model (GTK_TREE_VIEW (chooser->priv->tree_view));
-  
-  if (gtk_tree_model_get_iter (model, &iter, path))
-    {
-      gchar *name;
-      
-      gtk_tree_model_get (model, &iter, 0, &name, -1);
-      
-      theme = glide_theme_manager_get_theme (name);
-      g_free (name);
-    }
-  
-  return theme;
-}
-
-static void
-glide_theme_chooser_cursor_changed (GtkTreeView *tree_view, 
-				    gpointer user_data)
-{
-  GlideThemeChooser *chooser = (GlideThemeChooser *)user_data;
-  GlideTheme *theme = glide_theme_chooser_get_selection (chooser);
-
-  if (theme)
-    {
-      glide_theme_preview_widget_set_theme (GLIDE_THEME_PREVIEW_WIDGET (chooser->priv->preview), theme);
-      GLIDE_NOTE(THEME_CHOOSER, "Theme selected: %s", glide_theme_get_name (theme));
-    }  
-}
-
-static GtkListStore *
-glide_theme_chooser_get_list_store (GlideThemeChooser *chooser)
-{
-  GtkListStore *ret = gtk_list_store_new (1, G_TYPE_STRING);
-  GtkTreeIter iter;
-  GList *t;
-  
-  for (t = chooser->priv->themes; t; t = t->next)
-    {
-      GlideTheme *theme = (GlideTheme *)t->data;
-      const gchar *name;
-      
-      name = glide_theme_get_name (theme);
-      
-      gtk_list_store_append (ret, &iter);
-      gtk_list_store_set (ret, &iter, 0, name, -1);
-    }
-  return ret;
-}
-
-static GtkWidget *
-glide_theme_chooser_make_treeview (GlideThemeChooser *chooser)
-{
-  GtkWidget *ret = gtk_tree_view_new ();
-  GtkCellRenderer *renderer;
-  
-  renderer = gtk_cell_renderer_text_new ();
-  gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (ret), -1,
-					       "Name", renderer,
-					       "text", 0, 
-					       NULL);
-  
-  gtk_tree_view_set_model (GTK_TREE_VIEW (ret), GTK_TREE_MODEL (glide_theme_chooser_get_list_store (chooser)));
-  
-  g_signal_connect (ret, "cursor-changed", G_CALLBACK (glide_theme_chooser_cursor_changed), chooser);
-  
-  chooser->priv->tree_view = ret;
-  
-  return ret;
-}
-
 static GtkWidget *
 glide_theme_chooser_make_top_hbox (GlideThemeChooser *chooser)
 {
   GtkWidget *ret = gtk_hbox_new (FALSE, 0);
-  GtkWidget *tree_view, *preview;
-  
-  tree_view = glide_theme_chooser_make_treeview (chooser);
-  preview = glide_theme_preview_widget_new ();
-  
-  chooser->priv->preview = preview;
-  
-  gtk_widget_set_size_request (preview, 200, 150);
-  
-  gtk_box_pack_start (GTK_BOX (ret), tree_view, FALSE, 0, 0);
-  gtk_box_pack_start (GTK_BOX (ret), preview, FALSE, 0, 0);
   
   return ret;  
 }
 
-static void
-glide_theme_chooser_new_clicked (GtkWidget *button,
-				 gpointer user_data)
-{
-  GlideThemeChooser *chooser = (GlideThemeChooser *)user_data;
-  GlideTheme *theme = glide_theme_chooser_get_selection (chooser);
-  
-  chooser->priv->theme = theme;
-  g_object_notify (G_OBJECT (chooser), "theme");
-  
-  g_signal_emit (chooser, theme_chooser_signals[RESPONSE], 0);
-}
-
-static void
-glide_theme_chooser_cancel_clicked (GtkWidget *button,
-				    gpointer user_data)
-{
-  GlideThemeChooser *chooser = (GlideThemeChooser *)user_data;
-  
-  chooser->priv->theme = NULL;
-  g_object_notify (G_OBJECT (chooser), "theme");
-  
-  g_signal_emit (chooser, theme_chooser_signals[RESPONSE], 0);
-}
-
 static GtkWidget *
 glide_theme_chooser_make_bottom_hbox (GlideThemeChooser *chooser)
 {
@@ -223,11 +107,6 @@ glide_theme_chooser_make_bottom_hbox (GlideThemeChooser *chooser)
   new = gtk_button_new_with_label ("New");
   cancel = gtk_button_new_with_label ("Cancel");
   
-  g_signal_connect (new, "clicked",
-		    G_CALLBACK (glide_theme_chooser_new_clicked), chooser);
-  g_signal_connect (cancel, "clicked",
-		    G_CALLBACK (glide_theme_chooser_cancel_clicked), chooser);
-  
   gtk_box_pack_start (GTK_BOX (ret), cancel, FALSE, 0, 0);
   gtk_box_pack_start (GTK_BOX (ret), new, FALSE, 0, 0);
   



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