[goffice] Fix interpolation widgets visibility. [#663283]



commit 7f72e5535ba441e62469179cc38a21bed52fbd80
Author: Jean Brefort <jean brefort normalesup org>
Date:   Thu Nov 3 18:26:03 2011 +0100

    Fix interpolation widgets visibility. [#663283]

 ChangeLog                         |    6 +
 goffice/graph/gog-series-prefs.ui |  283 +++++++++++++++++++++----------------
 goffice/graph/gog-series.c        |   47 +++---
 goffice/utils/go-style-prefs.ui   |   66 +++++----
 goffice/utils/go-style.c          |    6 +-
 5 files changed, 228 insertions(+), 180 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 675e2d4..956bc93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-11-03  Jean Brefort  <jean brefort normalesup org>
+	* goffice/graph/gog-series.c (gog_series_populate_editor): fix interpolation
+	widgets visibility. [#663283]
+	* goffice/utils/go-style.c (outline_init), (line_init),
+	(fill_init), (go_style_populate_editor): enhanced layout.
+
 2011-11-03  Morten Welinder  <terra gnome org>
 
 	* goffice/utils/go-string.c (go_string_new_rich_nocopy): New function.
diff --git a/goffice/graph/gog-series-prefs.ui b/goffice/graph/gog-series-prefs.ui
index 368995c..4622dc3 100644
--- a/goffice/graph/gog-series-prefs.ui
+++ b/goffice/graph/gog-series-prefs.ui
@@ -1,138 +1,19 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkListStore" id="model1">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">content</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkBox" id="interpolation_prefs">
-    <property name="visible">True</property>
-    <property name="orientation">vertical</property>
-    <child>
-      <object class="GtkLabel" id="interpolation-label">
-        <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="label" translatable="yes">&lt;b&gt;Interpolation&lt;/b&gt;</property>
-        <property name="use_markup">True</property>
-      </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">False</property>
-        <property name="position">0</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkAlignment" id="alignment8">
-        <property name="visible">True</property>
-        <property name="top_padding">6</property>
-        <property name="left_padding">18</property>
-        <child>
-          <object class="GtkTable" id="interpolation-table">
-            <property name="visible">True</property>
-            <property name="n_rows">3</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">12</property>
-            <property name="row_spacing">6</property>
-            <child>
-              <object class="GtkTable" id="clamps-table">
-                <property name="n_rows">2</property>
-                <property name="n_columns">2</property>
-                <property name="column_spacing">12</property>
-                <property name="row_spacing">6</property>
-                <child>
-                  <object class="GtkLabel" id="deriv-last-btn">
-                    <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes" comments="derivative (curve slope) at last point for the clamped cubic spline">&lt;i&gt;y'&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;last&lt;/sub&gt;):</property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="deriv-first-btn">
-                    <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes" comments="derivative (curve slope) at first point for the clamped cubic spline">&lt;i&gt;y'&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;first&lt;/sub&gt;):</property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="x_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="right_attach">2</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="interpolation-type-label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="yalign">0.46000000834465027</property>
-                <property name="label" translatable="yes">_Type:</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="interpolation-skip-invalid">
-                <property name="label" translatable="yes">S_kip invalid data</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-                <property name="draw_indicator">True</property>
-              </object>
-              <packing>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-        </child>
-      </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="position">1</property>
-      </packing>
-    </child>
-  </object>
   <object class="GtkBox" id="fill_type_prefs">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="orientation">vertical</property>
     <child>
       <object class="GtkBox" id="hbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="spacing">12</property>
         <child>
           <object class="GtkLabel" id="label2">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="xalign">0</property>
             <property name="yalign">0.46000000834465027</property>
             <property name="label" translatable="yes">Fill _to:</property>
@@ -147,6 +28,7 @@
         <child>
           <object class="GtkComboBox" id="fill_type_combo">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="model">model1</property>
             <child>
               <object class="GtkCellRendererText" id="renderer1"/>
@@ -164,8 +46,163 @@
       </object>
       <packing>
         <property name="expand">False</property>
+        <property name="fill">True</property>
         <property name="position">0</property>
       </packing>
     </child>
   </object>
+  <object class="GtkGrid" id="interpolation-prefs">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="halign">start</property>
+    <property name="valign">start</property>
+    <property name="hexpand">True</property>
+    <property name="row_spacing">6</property>
+    <property name="column_spacing">12</property>
+    <child>
+      <object class="GtkLabel" id="interpolation-label">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">&lt;b&gt;Interpolation&lt;/b&gt;</property>
+        <property name="use_markup">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="interpolation-skip-invalid">
+        <property name="label" translatable="yes">S_kip invalid data</property>
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="margin_left">18</property>
+        <property name="use_action_appearance">False</property>
+        <property name="use_underline">True</property>
+        <property name="xalign">0</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">2</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="interpolation-type-label">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_left">18</property>
+        <property name="xalign">0</property>
+        <property name="yalign">0.46000000834465027</property>
+        <property name="label" translatable="yes">_Type:</property>
+        <property name="use_underline">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">1</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkGrid" id="clamps-grid">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="row_spacing">6</property>
+        <property name="column_spacing">12</property>
+        <child>
+          <object class="GtkLabel" id="deriv-first-btn">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_left">18</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes" comments="derivative (curve slope) at first point for the clamped cubic spline">&lt;i&gt;y'&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;first&lt;/sub&gt;):</property>
+            <property name="use_markup">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="deriv-last-btn">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_left">18</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes" comments="derivative (curve slope) at last point for the clamped cubic spline">&lt;i&gt;y'&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;last&lt;/sub&gt;):</property>
+            <property name="use_markup">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">3</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">content</col>
+      </row>
+    </data>
+  </object>
 </interface>
diff --git a/goffice/graph/gog-series.c b/goffice/graph/gog-series.c
index 8e5f196..1e26685 100644
--- a/goffice/graph/gog-series.c
+++ b/goffice/graph/gog-series.c
@@ -445,14 +445,14 @@ cb_line_interpolation_changed (GtkComboBox *box, GogSeries *series)
 {
 	GtkBuilder *gui = g_object_get_data (G_OBJECT (box), "gui");
 	GtkWidget *widget = GTK_WIDGET (g_object_get_data (G_OBJECT(box), "skip-button"));
-	GtkWidget *table = go_gtk_builder_get_widget (gui, "clamps-table");
+	GtkWidget *grid = go_gtk_builder_get_widget (gui, "clamps-grid");
 	series->interpolation = gtk_combo_box_get_active (box);
 	gtk_widget_set_sensitive (widget, !go_line_interpolation_auto_skip (series->interpolation));
 	widget = GTK_WIDGET (g_object_get_data (G_OBJECT(box), "fill-type"));
 	if (series->interpolation == GO_LINE_INTERPOLATION_CLAMPED_CUBIC_SPLINE)
-		gtk_widget_show (table);
+		gtk_widget_show (grid);
 	else
-		gtk_widget_hide (table);
+		gtk_widget_hide (grid);
 	if (widget)
 		gtk_widget_set_sensitive (widget, !go_line_interpolation_auto_skip (series->interpolation));
 	gog_object_emit_changed (GOG_OBJECT (series), FALSE);
@@ -479,7 +479,7 @@ gog_series_populate_editor (GogObject *gobj,
 		   GOCmdContext *cc)
 {
 	static guint series_pref_page = 1;
-	GtkWidget *w, *box;
+	GtkWidget *w, *grid;
 	GtkTable  *table;
 	unsigned i, row = 0;
 	gboolean has_shared = FALSE;
@@ -553,8 +553,8 @@ gog_series_populate_editor (GogObject *gobj,
 
 	(GOG_OBJECT_CLASS(series_parent_klass)->populate_editor) (gobj, editor, dalloc, cc);
 
-	box = go_editor_get_registered_widget (editor, "line_box");
-	if (series_class->has_interpolation && box != NULL) {
+	grid = go_editor_get_registered_widget (editor, "line-grid");
+	if (series_class->has_interpolation && grid != NULL) {
 		GtkBuilder *gui;
 		GtkWidget *widget;
 
@@ -563,9 +563,8 @@ gog_series_populate_editor (GogObject *gobj,
 			int i;
 			GogAxisSet set = gog_plot_axis_set_pref (gog_series_get_plot (series));
 			GogDataset *clamp_set = gog_series_get_interpolation_params (series);
-			widget = go_gtk_builder_get_widget (gui, "interpolation_prefs");
-			gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
-			widget = go_gtk_builder_get_widget (gui, "interpolation-table");
+			widget = go_gtk_builder_get_widget (gui, "interpolation-prefs");
+			gtk_grid_attach (GTK_GRID (grid), widget, 0, 3, 4, 1);
 			/* create an interpolation type combo and populate it */
 			combo = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
 			if (set & 1 << GOG_AXIS_RADIAL)
@@ -579,28 +578,28 @@ gog_series_populate_editor (GogObject *gobj,
 			gtk_combo_box_set_active (GTK_COMBO_BOX (combo), series->interpolation);
 			g_signal_connect (combo, "changed",
 					  G_CALLBACK (cb_line_interpolation_changed), series);
-			gtk_table_attach (GTK_TABLE (widget), GTK_WIDGET (combo), 1, 2,
-					  0, 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
-					  (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), 0, 0);
-			gtk_widget_show_all (widget);
-			widget = go_gtk_builder_get_widget (gui, "interpolation-skip-invalid");
-			g_object_set_data (G_OBJECT (combo), "skip-button", widget);
-			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), series->interpolation_skip_invalid);
+			gtk_grid_attach (GTK_GRID (widget), GTK_WIDGET (combo), 1, 1, 1, 1),
+			w = go_gtk_builder_get_widget (gui, "interpolation-skip-invalid");
+			g_object_set_data (G_OBJECT (combo), "skip-button", w);
+			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), series->interpolation_skip_invalid);
 			if (go_line_interpolation_auto_skip (series->interpolation))
-				gtk_widget_set_sensitive (widget, FALSE);
-			g_signal_connect (widget, "toggled",
+				gtk_widget_set_sensitive (w, FALSE);
+			g_signal_connect (w, "toggled",
 					  G_CALLBACK (cb_line_interpolation_skip_changed), series);
+			gtk_widget_show_all (widget);
 			if (clamp_set) {
 				GtkWidget *w;
-				widget = go_gtk_builder_get_widget (gui, "clamps-table");
+				widget = go_gtk_builder_get_widget (gui, "clamps-grid");
 				w = GTK_WIDGET (gog_data_allocator_editor (dalloc, clamp_set, 0, GOG_DATA_SCALAR));
 				gtk_widget_set_tooltip_text (w, _("Derivative at first point of the clamped cubic spline."));
 				gtk_widget_show (w);
-				gtk_table_attach (GTK_TABLE (widget), w, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+				gtk_widget_set_hexpand (w, TRUE);
+				gtk_grid_attach (GTK_GRID (widget), w, 1, 0, 2, 1);
 				w = GTK_WIDGET (gog_data_allocator_editor (dalloc, clamp_set, 1, GOG_DATA_SCALAR));
 				gtk_widget_set_tooltip_text (w, _("Derivative at last point of the clamped cubic spline."));
 				gtk_widget_show (w);
-				gtk_table_attach (GTK_TABLE (widget), w, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+				gtk_widget_set_hexpand (w, TRUE);
+				gtk_grid_attach (GTK_GRID (widget), w, 1, 1, 2, 1);
 				if (series->interpolation != GO_LINE_INTERPOLATION_CLAMPED_CUBIC_SPLINE)
 					gtk_widget_hide (widget);
 			}
@@ -609,8 +608,8 @@ gog_series_populate_editor (GogObject *gobj,
 		}
 	}
 
-	box = go_editor_get_registered_widget (editor, "fill_extension_box");
-	if (series_class->has_fill_type && box != NULL) {
+	grid = go_editor_get_registered_widget (editor, "fill-grid");
+	if (series_class->has_fill_type && grid != NULL) {
 		GtkBuilder *gui;
 		GtkWidget *widget;
 
@@ -625,7 +624,7 @@ gog_series_populate_editor (GogObject *gobj,
 			if (series->interpolation == GO_LINE_INTERPOLATION_CLOSED_SPLINE)
 				gtk_widget_set_sensitive (widget, FALSE);
 			widget = go_gtk_builder_get_widget (gui, "fill_type_prefs");
-			gtk_box_pack_start (GTK_BOX (box), widget, TRUE, TRUE, 0);
+			gtk_grid_attach (GTK_GRID (grid), widget, 0, 1, 3, 1);
 			g_object_set_data (G_OBJECT (widget), "gui", gui);
 
 			g_signal_connect_swapped (G_OBJECT (widget), "destroy",
diff --git a/goffice/utils/go-style-prefs.ui b/goffice/utils/go-style-prefs.ui
index 1814c2a..489a4d6 100644
--- a/goffice/utils/go-style-prefs.ui
+++ b/goffice/utils/go-style-prefs.ui
@@ -25,6 +25,7 @@
   <object class="GtkGrid" id="go-style-prefs">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
+    <property name="halign">start</property>
     <property name="row_spacing">6</property>
     <property name="column_spacing">24</property>
     <child>
@@ -37,18 +38,6 @@
         <property name="row_spacing">6</property>
         <property name="column_spacing">12</property>
         <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkLabel" id="label37">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
@@ -98,6 +87,7 @@
           <object class="GtkSpinButton" id="outline_size_spin">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
+            <property name="halign">start</property>
             <property name="invisible_char">â</property>
             <property name="invisible_char_set">True</property>
             <property name="adjustment">adjustment1</property>
@@ -126,6 +116,18 @@
             <property name="height">1</property>
           </packing>
         </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="left_attach">0</property>
@@ -140,13 +142,13 @@
         <property name="can_focus">False</property>
         <property name="halign">start</property>
         <property name="valign">start</property>
-        <property name="margin_left">18</property>
         <property name="row_spacing">6</property>
         <property name="column_spacing">12</property>
         <child>
           <object class="GtkLabel" id="label36">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="margin_left">18</property>
             <property name="xalign">0</property>
             <property name="label" translatable="yes">St_yle:</property>
             <property name="use_underline">True</property>
@@ -162,6 +164,7 @@
           <object class="GtkLabel" id="line_color_label">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="margin_left">18</property>
             <property name="xalign">0</property>
             <property name="label" translatable="yes">Co_lor:</property>
             <property name="use_underline">True</property>
@@ -177,6 +180,7 @@
           <object class="GtkLabel" id="line_size_label">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="margin_left">18</property>
             <property name="xalign">0</property>
             <property name="label" translatable="yes">_Size:</property>
             <property name="use_underline">True</property>
@@ -582,15 +586,6 @@
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -630,6 +625,15 @@
                     <property name="y_options">GTK_FILL</property>
                   </packing>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
               <packing>
                 <property name="position">2</property>
@@ -655,15 +659,6 @@
           </packing>
         </child>
         <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkLabel" id="filler">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
@@ -676,6 +671,15 @@
             <property name="height">1</property>
           </packing>
         </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="left_attach">2</property>
diff --git a/goffice/utils/go-style.c b/goffice/utils/go-style.c
index 23fc1ff..06a11af 100644
--- a/goffice/utils/go-style.c
+++ b/goffice/utils/go-style.c
@@ -114,6 +114,7 @@ create_go_combo_color (StylePrefState *state,
 	GtkWidget *w;
 
 	w = go_color_selector_new (initial_color, automatic_color, group);
+	gtk_widget_set_halign (w, GTK_ALIGN_START);
 	gtk_label_set_mnemonic_widget (
 		GTK_LABEL (gtk_builder_get_object (gui, label_name)), w);
 	g_signal_connect (G_OBJECT (w), "activate", G_CALLBACK (func), state);
@@ -207,11 +208,10 @@ outline_init (StylePrefState *state, gboolean enable, GOEditor *editor)
 		return;
 	}
 
-	go_editor_register_widget (editor, grid);
-
 	/* DashType */
 	w = go_line_dash_selector_new (style->line.dash_type,
 				       default_style->line.dash_type);
+	gtk_widget_set_halign (w, GTK_ALIGN_START);
 	gtk_grid_attach (GTK_GRID (grid), w, 1, 0, 2, 1);
 	g_signal_connect (G_OBJECT (w), "activate",
 			  G_CALLBACK (cb_outline_dash_type_changed), state);
@@ -286,6 +286,7 @@ line_init (StylePrefState *state, gboolean enable, GOEditor *editor)
 	/* DashType */
 	w = go_line_dash_selector_new (style->line.dash_type,
 				       default_style->line.dash_type);
+	gtk_widget_set_halign (w, GTK_ALIGN_START);
 	gtk_grid_attach (GTK_GRID (grid), w, 1, 0, 2, 1);
 	g_signal_connect (G_OBJECT (w), "activate",
 			  G_CALLBACK (cb_line_dash_type_changed), state);
@@ -664,6 +665,7 @@ fill_init (StylePrefState *state, gboolean enable, GOEditor *editor)
 		G_CALLBACK (cb_fill_type_changed), state);
 
 	w = go_gtk_builder_get_widget (state->gui, "fill-grid");
+	go_editor_register_widget (editor, w);
 	gtk_widget_show (GTK_WIDGET (w));
 
 	g_object_unref (state->fill.size_group);



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