Code

Applied patch #1502407. Fixes bug #1500029.
authorjoncruz <joncruz@users.sourceforge.net>
Thu, 8 Jun 2006 04:39:37 +0000 (04:39 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Thu, 8 Jun 2006 04:39:37 +0000 (04:39 +0000)
ChangeLog
src/widgets/toolbox.cpp

index 2b43ae4c8e2c3f61ea7b3ba20bf7ee00f5b95e69..89bba40dba1b35392aafa34741252d122864a4b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-06-07  Jon A. Cruz  <jon@joncruz.org>
+
+       * src/widgets/toolbox.cpp:
+
+         Applied patch #1502407.
+         Fixes bug #1500049.
+
 2006-06-07  Jon A. Cruz  <jon@joncruz.org>
 
        * packaging/macosx/ScriptExec/main.c, packaging/osx-app.sh:
index d0f070886dc5a23b228f1c2ee660f81435823ee6..cb9557677a058ba52a13ace9144d454ab0748e59 100644 (file)
@@ -2928,20 +2928,23 @@ sp_text_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl)
         }
 
         //Orientation
+        //locking both buttons, changing one affect all group (both)
+        GtkWidget *button = GTK_WIDGET (g_object_get_data (G_OBJECT (tbl), "orientation-horizontal"));
+        g_object_set_data (G_OBJECT (button), "block", gpointer(1));
+        
+        GtkWidget *button1 = GTK_WIDGET (g_object_get_data (G_OBJECT (tbl), "orientation-vertical"));
+        g_object_set_data (G_OBJECT (button1), "block", gpointer(1));
+        
         if (query->writing_mode.computed == SP_CSS_WRITING_MODE_LR_TB)
         {
-            GtkWidget *button = GTK_WIDGET (g_object_get_data (G_OBJECT (tbl), "orientation-horizontal"));
-            g_object_set_data (G_OBJECT (button), "block", gpointer(1));
             gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
-            g_object_set_data (G_OBJECT (button), "block", gpointer(0));
         }
         else
         {
-            GtkWidget *button = GTK_WIDGET (g_object_get_data (G_OBJECT (tbl), "orientation-vertical"));
-            g_object_set_data (G_OBJECT (button), "block", gpointer(1));
-            gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
-            g_object_set_data (G_OBJECT (button), "block", gpointer(0));
+            gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button1), TRUE);
         }
+        g_object_set_data (G_OBJECT (button), "block", gpointer(0));
+        g_object_set_data (G_OBJECT (button1), "block", gpointer(0));
     }
 }
 
@@ -3142,8 +3145,11 @@ void
 sp_text_toolbox_orientation_toggled (GtkRadioButton  *button,
                                      gpointer         data)
 {
-    if (g_object_get_data (G_OBJECT (button), "block")) return;
-
+    if (g_object_get_data (G_OBJECT (button), "block")) {
+        g_object_set_data (G_OBJECT (button), "block", gpointer(0));
+        return;
+    }
+    
     SPDesktop   *desktop    = SP_ACTIVE_DESKTOP;
     SPCSSAttr   *css        = sp_repr_css_attr_new (); 
     int          prop       = GPOINTER_TO_INT(data);