[glide] Remove the top color button



commit 540aae2805864e4b5731f50239a1017e67a4da91
Author: Robert Carr <racarr Valentine localdomain>
Date:   Sun May 2 03:15:06 2010 -0400

    Remove the top color button

 data/ui/glide-window.ui |   50 +++++++++++++++-------------------------------
 src/glide-window.c      |   47 --------------------------------------------
 2 files changed, 16 insertions(+), 81 deletions(-)
---
diff --git a/data/ui/glide-window.ui b/data/ui/glide-window.ui
index 33e4b81..5e49089 100644
--- a/data/ui/glide-window.ui
+++ b/data/ui/glide-window.ui
@@ -22,8 +22,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="new-menuitem">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">new-action</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                         <accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/>
@@ -62,8 +62,8 @@
                             <child>
                               <object class="GtkImageMenuItem" id="export-pdf-menuitem">
                                 <property name="visible">True</property>
-                                <property name="use_action_appearance">True</property>
                                 <property name="related_action">pdf-export-action</property>
+                                <property name="use_action_appearance">True</property>
                                 <property name="use_underline">True</property>
                                 <property name="use_stock">True</property>
                               </object>
@@ -71,8 +71,8 @@
                             <child>
                               <object class="GtkImageMenuItem" id="export-image-menuitem">
                                 <property name="visible">True</property>
-                                <property name="use_action_appearance">True</property>
                                 <property name="related_action">png-export-action</property>
+                                <property name="use_action_appearance">True</property>
                                 <property name="use_underline">True</property>
                                 <property name="use_stock">True</property>
                               </object>
@@ -136,8 +136,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="undo-menuitem">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">undo-action</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                         <accelerator key="z" signal="activate" modifiers="GDK_CONTROL_MASK"/>
@@ -146,8 +146,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="redo-menuitem">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">redo-action</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                         <accelerator key="z" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
@@ -171,8 +171,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="copy-menuitem">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">copy-action</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                         <accelerator key="c" signal="activate" modifiers="GDK_CONTROL_MASK"/>
@@ -242,8 +242,8 @@
             <child>
               <object class="GtkToolButton" id="new-toolbutton">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">new-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">New File</property>
                 <property name="use_underline">True</property>
               </object>
@@ -255,8 +255,8 @@
             <child>
               <object class="GtkToolButton" id="open-toolbutton">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">open-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">Open File</property>
                 <property name="use_underline">True</property>
               </object>
@@ -268,8 +268,8 @@
             <child>
               <object class="GtkToolButton" id="save-toolbutton">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">save-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">Save File</property>
                 <property name="use_underline">True</property>
               </object>
@@ -290,8 +290,8 @@
             <child>
               <object class="GtkToolButton" id="undo-toolbutton">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">undo-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">Undo</property>
                 <property name="use_underline">True</property>
               </object>
@@ -303,8 +303,8 @@
             <child>
               <object class="GtkToolButton" id="Redo">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">redo-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">Redo</property>
                 <property name="use_underline">True</property>
               </object>
@@ -326,8 +326,8 @@
               <object class="GtkToolButton" id="text-toolbutton">
                 <property name="visible">True</property>
                 <property name="sensitive">False</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">new-text-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">Text</property>
                 <property name="use_underline">True</property>
               </object>
@@ -340,8 +340,8 @@
               <object class="GtkToolButton" id="image-toolbutton">
                 <property name="visible">True</property>
                 <property name="sensitive">False</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">new-image-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">Image</property>
                 <property name="use_underline">True</property>
               </object>
@@ -362,8 +362,8 @@
             <child>
               <object class="GtkToolButton" id="inspector-button">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">inspector-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">Inspector</property>
                 <property name="use_underline">True</property>
               </object>
@@ -382,24 +382,6 @@
               </packing>
             </child>
             <child>
-              <object class="GtkToolItem" id="color-chooser-toolitem">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkColorButton" id="text-color-button">
-                    <property name="visible">True</property>
-                    <property name="sensitive">False</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="color">#000000000000</property>
-                    <signal name="color_set" handler="glide_window_color_set_cb"/>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkToolItem" id="text-toolpalette">
                 <property name="visible">True</property>
                 <property name="sensitive">False</property>
@@ -497,8 +479,8 @@
             <child>
               <object class="GtkToolButton" id="background-toolbutton">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">background-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">Set Background</property>
                 <property name="use_underline">True</property>
               </object>
@@ -510,8 +492,8 @@
             <child>
               <object class="GtkToolButton" id="present-toolbutton">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">present-action</property>
+                <property name="use_action_appearance">True</property>
                 <property name="label" translatable="yes">Present</property>
                 <property name="use_underline">True</property>
               </object>
diff --git a/src/glide-window.c b/src/glide-window.c
index bc0a0ce..1fb7645 100644
--- a/src/glide-window.c
+++ b/src/glide-window.c
@@ -121,14 +121,6 @@ glide_window_enable_action (GlideWindow *w, const gchar *action)
 }
 
 static void
-glide_window_enable_widget (GlideWindow *w, const gchar *widget)
-{
-  GtkWidget *wd =
-    GTK_WIDGET (gtk_builder_get_object (w->priv->builder, widget));
-  gtk_widget_set_sensitive (wd, TRUE);
-}
-
-static void
 glide_window_enable_document_actions (GlideWindow *w)
 {
   glide_window_enable_action (w, "new-image-action");
@@ -144,7 +136,6 @@ glide_window_enable_document_actions (GlideWindow *w)
   glide_window_enable_action (w, "png-export-action");
   glide_window_enable_action (w, "inspector-action");
   
-  glide_window_enable_widget (w, "text-color-button");
 }
 
 static void
@@ -191,35 +182,6 @@ glide_window_slide_changed_cb (GObject *object,
 }
 
 void
-glide_window_color_set_cb (GtkWidget *b,
-			   gpointer user_data)
-{
-  GlideActor *selection;
-  GlideWindow *w = (GlideWindow *)user_data;
-  GdkColor c;
-  ClutterColor cc;
-  
-  selection = glide_stage_manager_get_selection (w->priv->manager);
-
-  gtk_color_button_get_color (GTK_COLOR_BUTTON (b), &c);
-  glide_clutter_color_from_gdk_color (&c, &cc);
-
-  if (GLIDE_IS_SLIDE (selection))
-    {
-      GlideSlide *s = GLIDE_SLIDE (selection);
-      
-      glide_undo_manager_start_slide_action (w->priv->undo_manager, s, "Set slide color.");
-      glide_slide_set_color (s, &cc);
-      glide_undo_manager_end_slide_action (w->priv->undo_manager, s);
-    }
-    
-  if (!GLIDE_IS_TEXT (selection))
-    return;
-  
-  glide_text_set_color (GLIDE_TEXT (selection), &cc);  
-}
-
-void
 glide_window_font_set_cb (GtkWidget *b, gpointer user_data)
 {
   GlideActor *selection;
@@ -248,15 +210,6 @@ glide_window_stage_selection_changed_cb (GlideStageManager *manager,
   GlideActor *selection = 
     glide_stage_manager_get_selection (w->priv->manager);
   
-  if (GLIDE_IS_SLIDE (selection) || GLIDE_IS_TEXT (selection))
-    {
-      gtk_widget_set_sensitive (GTK_WIDGET (GLIDE_WINDOW_UI_OBJECT (w, "text-color-button")), TRUE);
-    }
-  else
-    {
-      gtk_widget_set_sensitive (GTK_WIDGET (GLIDE_WINDOW_UI_OBJECT (w, "text-color-button")), FALSE);
-    }
-  
   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")),



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