[glide] Remove more old badness from GlideWindow



commit 53b3a6f86023caca92815fe61c559e5f172234da
Author: Robert Carr <racarr Valentine localdomain>
Date:   Sun May 2 03:22:23 2010 -0400

    Remove more old badness from GlideWindow

 data/ui/glide-window.ui |  105 -----------------------------------------------
 src/glide-window.c      |   72 --------------------------------
 2 files changed, 0 insertions(+), 177 deletions(-)
---
diff --git a/data/ui/glide-window.ui b/data/ui/glide-window.ui
index cad1a17..474b813 100644
--- a/data/ui/glide-window.ui
+++ b/data/ui/glide-window.ui
@@ -382,90 +382,6 @@
               </packing>
             </child>
             <child>
-              <object class="GtkToolItem" id="text-toolpalette">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <child>
-                  <object class="GtkHBox" id="text-palette-hbox">
-                    <property name="visible">True</property>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="align-left-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="related_action">align-left-action</property>
-                        <child>
-                          <object class="GtkImage" id="align-left-image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-justify-left</property>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="align-center-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="related_action">align-center-action</property>
-                        <child>
-                          <object class="GtkImage" id="align-center-image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-justify-center</property>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="align-right-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="related_action">align-right-action</property>
-                        <child>
-                          <object class="GtkImage" id="align-right-image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-justify-right</property>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">4</property>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkSeparatorToolItem" id="separator3">
-                <property name="visible">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkToolButton" id="background-toolbutton">
                 <property name="visible">True</property>
                 <property name="related_action">background-action</property>
@@ -754,27 +670,6 @@
     <property name="sensitive">False</property>
     <signal name="activate" handler="glide_window_new_image_action_activate"/>
   </object>
-  <object class="GtkAction" id="align-left-action">
-    <property name="label">Align Left</property>
-    <property name="short_label">Left</property>
-    <property name="tooltip">Align the selected text object to the left boundary.</property>
-    <property name="stock_id">gtk-justify-left</property>
-    <signal name="activate" handler="glide_window_align_left_action_activate"/>
-  </object>
-  <object class="GtkAction" id="align-center-action">
-    <property name="label">Align Center</property>
-    <property name="short_label">Center</property>
-    <property name="tooltip">Align the selected text object between both boundaries.</property>
-    <property name="stock_id">gtk-justify-center</property>
-    <signal name="activate" handler="glide_window_align_center_action_activate"/>
-  </object>
-  <object class="GtkAction" id="align-right-action">
-    <property name="label">Align Right</property>
-    <property name="short_label">Right</property>
-    <property name="tooltip">Align the selected text object to the right boundary.</property>
-    <property name="stock_id">gtk-justify-right</property>
-    <signal name="activate" handler="glide_window_align_right_action_activate"/>
-  </object>
   <object class="GtkAction" id="present-action">
     <property name="label">Start Presentation</property>
     <property name="short_label">Present</property>
diff --git a/src/glide-window.c b/src/glide-window.c
index 10227d9..f495539 100644
--- a/src/glide-window.c
+++ b/src/glide-window.c
@@ -105,14 +105,6 @@ glide_window_construct_copy_buffer (GlideWindow *w)
 }
 
 static void
-glide_window_set_text_palette_sensitive (GlideWindow *w, gboolean sensitive)
-{
-  GtkWidget *tp = GTK_WIDGET (gtk_builder_get_object (w->priv->builder, "text-toolpalette"));
-  
-  gtk_widget_set_sensitive (tp, sensitive);
-}
-
-static void
 glide_window_enable_action (GlideWindow *w, const gchar *action)
 {
   GtkAction *a = 
@@ -182,23 +174,6 @@ glide_window_slide_changed_cb (GObject *object,
 }
 
 static void
-glide_window_stage_selection_changed_cb (GlideStageManager *manager,
-					 GObject *old_selection,
-					 gpointer user_data)
-{
-  GlideWindow *w = (GlideWindow *)user_data;
-  GlideActor *selection = 
-    glide_stage_manager_get_selection (w->priv->manager);
-  
-  if (selection && (GLIDE_IS_TEXT (selection)))
-    {
-      glide_window_set_text_palette_sensitive (w, TRUE);
-    }
-  else
-    glide_window_set_text_palette_sensitive (w, FALSE);
-}
-
-static void
 glide_window_unfullscreen_stage (GlideWindow *w)
 {
   gtk_window_unfullscreen (GTK_WINDOW (w));
@@ -368,10 +343,6 @@ glide_window_set_document (GlideWindow *w, GlideDocument *d)
 		    "notify::current-slide",
 		    G_CALLBACK (glide_window_slide_changed_cb),
 		    w);
-  g_signal_connect (w->priv->manager,
-		    "selection-changed",
-		    G_CALLBACK (glide_window_stage_selection_changed_cb),
-		    w);
   g_signal_connect (w->priv->manager, "notify::presenting",
 		    G_CALLBACK (glide_window_presenting_changed_cb),
 		    w);
@@ -934,49 +905,6 @@ glide_window_present_action_activate (GtkAction *a,
   glide_stage_manager_set_presenting (w->priv->manager, TRUE);
 }
 
-static void
-glide_window_align_selected_text (GlideWindow *w, PangoAlignment alignment)
-{
-  GlideActor *selected = glide_stage_manager_get_selection (w->priv->manager);
-  
-  if (!selected || !GLIDE_IS_TEXT (selected))
-    {
-      g_warning ("Align invoked on non-text selection, might mean a bug?");
-      return;
-    }
-
-  glide_undo_manager_start_actor_action (glide_actor_get_undo_manager (GLIDE_ACTOR (selected)),
-					 GLIDE_ACTOR (selected),
-					 "Set text alignment");
-  glide_text_set_line_alignment (GLIDE_TEXT (selected), alignment);
-  glide_undo_manager_end_actor_action (glide_actor_get_undo_manager (GLIDE_ACTOR (selected)),
-				       GLIDE_ACTOR (selected));
-}
-
-void
-glide_window_align_left_action_activate (GtkAction *a, 
-					 gpointer user_data)
-{
-  GlideWindow *w = (GlideWindow *)user_data;
-  glide_window_align_selected_text (w, PANGO_ALIGN_LEFT);
-}
-
-void
-glide_window_align_right_action_activate (GtkAction *a, 
-					 gpointer user_data)
-{
-  GlideWindow *w = (GlideWindow *)user_data;
-  glide_window_align_selected_text (w, PANGO_ALIGN_RIGHT);
-}
-
-void
-glide_window_align_center_action_activate (GtkAction *a, 
-					 gpointer user_data)
-{
-  GlideWindow *w = (GlideWindow *)user_data;
-  glide_window_align_selected_text (w, PANGO_ALIGN_CENTER);
-}
-
 void
 glide_window_new_image_action_activate (GtkAction *a, 
 					gpointer user_data)



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