[glide] Use inspector for font too



commit 0d429a6ea22accdd6a1ca6a0658f1fc6b6a133f7
Author: Robert Carr <racarr Valentine localdomain>
Date:   Sun May 2 03:17:35 2010 -0400

    Use inspector for font too

 src/glide-window.c |   28 +++-------------------------
 1 files changed, 3 insertions(+), 25 deletions(-)
---
diff --git a/src/glide-window.c b/src/glide-window.c
index 1fb7645..10227d9 100644
--- a/src/glide-window.c
+++ b/src/glide-window.c
@@ -181,26 +181,6 @@ glide_window_slide_changed_cb (GObject *object,
   gtk_widget_queue_draw (w->priv->slide_box);
 }
 
-void
-glide_window_font_set_cb (GtkWidget *b, gpointer user_data)
-{
-  GlideActor *selection;
-  GlideWindow *w = (GlideWindow *)user_data;
-  
-  selection = glide_stage_manager_get_selection (w->priv->manager);
-  
-  if (!selection || !GLIDE_IS_TEXT(selection))
-    return;
-  
-  glide_undo_manager_start_actor_action (glide_actor_get_undo_manager (GLIDE_ACTOR (selection)),
-					 GLIDE_ACTOR (selection),
-					 "Set font");
-  glide_text_set_font_name (GLIDE_TEXT (selection), gtk_font_button_get_font_name (GTK_FONT_BUTTON (b)));
-  glide_undo_manager_end_actor_action (glide_actor_get_undo_manager (GLIDE_ACTOR (selection)),
-				       GLIDE_ACTOR (selection));
-}
-
-
 static void
 glide_window_stage_selection_changed_cb (GlideStageManager *manager,
 					 GObject *old_selection,
@@ -212,9 +192,6 @@ glide_window_stage_selection_changed_cb (GlideStageManager *manager,
   
   if (selection && (GLIDE_IS_TEXT (selection)))
     {
-      gtk_font_button_set_font_name (GTK_FONT_BUTTON (gtk_builder_get_object (w->priv->builder, "text-font-button")),
-				     glide_text_get_font_name (GLIDE_TEXT (selection)));
-
       glide_window_set_text_palette_sensitive (w, TRUE);
     }
   else
@@ -643,7 +620,7 @@ glide_window_paste_contents_text_received (GtkClipboard *clipboard,
       glide_text_set_color (GLIDE_TEXT (ntext), &cc);
       
       glide_text_set_font_name (GLIDE_TEXT (ntext), 
-				gtk_font_button_get_font_name (GTK_FONT_BUTTON (gtk_builder_get_object (w->priv->builder, "text-font-button"))));  
+				glide_inspector_notebook_get_font_name (GLIDE_INSPECTOR_NOTEBOOK (w->priv->inspector_notebook)));
       glide_text_set_text (GLIDE_TEXT (ntext), (gchar *)text);
       
       glide_stage_manager_add_actor (w->priv->manager, GLIDE_ACTOR (ntext));
@@ -1024,7 +1001,8 @@ glide_window_new_text_action_activate (GtkAction *a,
   glide_text_set_color (GLIDE_TEXT (text), &cc);
 
   glide_text_set_font_name (GLIDE_TEXT (text), 
-			    gtk_font_button_get_font_name (GTK_FONT_BUTTON (gtk_builder_get_object (w->priv->builder, "text-font-button"))));  
+			    glide_inspector_notebook_get_font_name (GLIDE_INSPECTOR_NOTEBOOK (w->priv->inspector_notebook)));
+
   
   glide_stage_manager_add_actor (w->priv->manager, GLIDE_ACTOR (text));
   glide_undo_manager_append_insert (w->priv->undo_manager, GLIDE_ACTOR (text));



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