[glom] Field Definition: Restore some parent containers.



commit ac8e3d65999b7008284d182596ba46d801f8c63a
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Jun 26 11:20:45 2014 +0200

    Field Definition: Restore some parent containers.
    
    And change them from (deprecated) GtkAlignment to GtkBox.

 .../developer/window_field_definition_edit.glade   |   76 ++++++++++----------
 glom/mode_design/fields/dialog_fielddefinition.cc  |    3 +
 glom/mode_design/fields/dialog_fielddefinition.h   |    4 +-
 3 files changed, 42 insertions(+), 41 deletions(-)
---
diff --git a/data/ui/developer/window_field_definition_edit.glade 
b/data/ui/developer/window_field_definition_edit.glade
index 8bfd590..42f4962 100644
--- a/data/ui/developer/window_field_definition_edit.glade
+++ b/data/ui/developer/window_field_definition_edit.glade
@@ -214,7 +214,7 @@
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
-                      <object class="GtkBox" id="vbox96">
+                      <object class="GtkBox" id="alignment_userentry">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="margin_left">12</property>
@@ -355,58 +355,56 @@
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
-                          <object class="GtkBox" id="hbox16">
+                      <object class="GtkBox" id="alignment_calculate">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow5">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
-                            <property name="margin_left">12</property>
-                            <property name="margin_top">6</property>
+                            <property name="can_focus">True</property>
+                            <property name="shadow_type">in</property>
                             <child>
-                              <object class="GtkScrolledWindow" id="scrolledwindow5">
+                              <object class="GtkSourceView" id="textview_calculate">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="shadow_type">in</property>
-                                  <child>
-                                  <object class="GtkSourceView" id="textview_calculate">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                  </object>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
+                               </object>
                             </child>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox" id="vbox22">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="orientation">vertical</property>
                             <child>
-                              <object class="GtkBox" id="vbox22">
+                              <object class="GtkButton" id="button_edit_calculation">
+                                <property name="label" translatable="yes">_Edit</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <object class="GtkButton" id="button_edit_calculation">
-                                    <property name="label" translatable="yes">_Edit</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="use_underline">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
-                                <property name="position">1</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                           </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
                     </child>
                     <child type="label">
                       <object class="GtkRadioButton" id="radiobutton_calculate">
diff --git a/glom/mode_design/fields/dialog_fielddefinition.cc 
b/glom/mode_design/fields/dialog_fielddefinition.cc
index 7437a0c..fbf1e74 100644
--- a/glom/mode_design/fields/dialog_fielddefinition.cc
+++ b/glom/mode_design/fields/dialog_fielddefinition.cc
@@ -99,6 +99,9 @@ Dialog_FieldDefinition::Dialog_FieldDefinition(BaseObjectType* cobject, const Gl
 
   Dialog_Properties::set_modified(false);
 
+  //This is mostly just to exercise some widgets during simple tests:
+  enforce_constraints();
+
   show_all_children();
 }
 
diff --git a/glom/mode_design/fields/dialog_fielddefinition.h 
b/glom/mode_design/fields/dialog_fielddefinition.h
index 14a8e57..54fa6f0 100644
--- a/glom/mode_design/fields/dialog_fielddefinition.h
+++ b/glom/mode_design/fields/dialog_fielddefinition.h
@@ -79,14 +79,14 @@ private:
   Gtk::Box* m_pBox_ValueTab;
 
   Gtk::RadioButton* m_pRadio_UserEntry;
-  Gtk::Bin* m_pAlignment_UserEntry;
+  Gtk::Box* m_pAlignment_UserEntry;
   Gtk::CheckButton* m_pCheck_Lookup;
   Gtk::Widget* m_pTable_Lookup; //So we can make it insensitive.
   ComboBox_Relationship* m_pCombo_LookupRelationship;
   Gtk::ComboBoxText* m_pCombo_LookupField;
 
   Gtk::RadioButton* m_pRadio_Calculate;
-  Gtk::Bin* m_pAlignment_Calculate;
+  Gtk::Box* m_pAlignment_Calculate;
   Gsv::View* m_pTextView_Calculation;
   Gtk::Button* m_pButton_EditCalculation;
 


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