[glom] Text and Image object Dialog adjustments.



commit 330a57758a4548447d9a269d5bc5a74157cd31d9
Author: Daniel Borgmann <danielb openismus com>
Date:   Thu Apr 8 11:26:42 2010 +0100

    Text and Image object Dialog adjustments.
    
    * glom/glom_developer.glade: Various dialog layout fixes.
    * glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc:
    * glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.h:
    * glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc:
    * glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h:
    Update box variable name and add window icons.

 ChangeLog                                          |   11 +
 glom/glom_developer.glade                          |  275 ++++++++++----------
 .../layout_item_dialogs/dialog_imageobject.cc      |    4 +-
 .../layout_item_dialogs/dialog_imageobject.h       |    2 +-
 .../layout_item_dialogs/dialog_textobject.cc       |    4 +-
 .../layout/layout_item_dialogs/dialog_textobject.h |    2 +-
 6 files changed, 160 insertions(+), 138 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bf3f9e4..e075637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-04-08  Daniel Borgmann  <danielb openismus com>
+
+	Text and Image object Dialog adjustments.
+
+	* glom/glom_developer.glade: Various dialog layout fixes.
+	* glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc:
+	* glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.h:
+	* glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc:
+	* glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h:
+	Update box variable name and add window icons.
+
 2010-04-08  David King  <davidk openismus com>
 
 	Update copyright information in about dialog
diff --git a/glom/glom_developer.glade b/glom/glom_developer.glade
index 7391334..e7aa62d 100644
--- a/glom/glom_developer.glade
+++ b/glom/glom_developer.glade
@@ -824,6 +824,7 @@
       <object class="GtkVBox" id="dialog-vbox2">
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
         <child>
           <object class="GtkVBox" id="vbox21">
             <property name="visible">True</property>
@@ -859,25 +860,22 @@
               </packing>
             </child>
             <child>
-              <object class="GtkAlignment" id="alignment16">
+              <object class="GtkScrolledWindow" id="scrolledwindow7">
                 <property name="visible">True</property>
-                <property name="left_padding">20</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
                 <child>
-                  <object class="GtkScrolledWindow" id="scrolledwindow7">
+                  <object class="GtkViewport" id="viewport1">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
-                    <property name="shadow_type">in</property>
+                    <property name="resize_mode">queue</property>
                     <child>
-                      <object class="GtkViewport" id="viewport1">
+                      <object class="GtkSourceView" id="textview_calculation">
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkSourceView" id="textview_calculation">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                          </object>
-                        </child>
+                        <property name="can_focus">True</property>
+                        <property name="left_margin">2</property>
+                        <property name="right_margin">2</property>
                       </object>
                     </child>
                   </object>
@@ -1024,6 +1022,7 @@
       <object class="GtkVBox" id="dialog-vbox2">
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
         <child>
           <object class="GtkVBox" id="vbox21">
             <property name="visible">True</property>
@@ -1091,25 +1090,22 @@
               </packing>
             </child>
             <child>
-              <object class="GtkAlignment" id="alignment16">
+              <object class="GtkScrolledWindow" id="scrolledwindow7">
                 <property name="visible">True</property>
-                <property name="left_padding">20</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
                 <child>
-                  <object class="GtkScrolledWindow" id="scrolledwindow7">
+                  <object class="GtkViewport" id="viewport1">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
-                    <property name="shadow_type">in</property>
+                    <property name="resize_mode">queue</property>
                     <child>
-                      <object class="GtkViewport" id="viewport1">
+                      <object class="GtkSourceView" id="textview_calculation">
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkSourceView" id="textview_calculation">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                          </object>
-                        </child>
+                        <property name="can_focus">True</property>
+                        <property name="left_margin">2</property>
+                        <property name="right_margin">2</property>
                       </object>
                     </child>
                   </object>
@@ -1216,28 +1212,31 @@
   </object>
   <object class="GtkDialog" id="window_textobject">
     <property name="title" translatable="yes">Text Object</property>
-    <property name="default_width">500</property>
-    <property name="default_height">600</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="default_width">300</property>
+    <property name="default_height">400</property>
     <property name="type_hint">dialog</property>
     <property name="has_separator">False</property>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox2">
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
+        <property name="spacing">6</property>
         <child>
           <object class="GtkVBox" id="vbox21">
             <property name="visible">True</property>
             <property name="border_width">6</property>
             <property name="orientation">vertical</property>
-            <property name="spacing">6</property>
+            <property name="spacing">12</property>
             <child>
-              <object class="GtkHBox" id="hbox_title">
+              <object class="GtkVBox" id="vbox_title">
                 <property name="visible">True</property>
-                <property name="spacing">6</property>
+                <property name="orientation">vertical</property>
                 <child>
                   <object class="GtkLabel" id="label232">
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Title&lt;/b&gt;</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Title:&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
                   <packing>
@@ -1250,6 +1249,7 @@
                   <object class="GtkEntry" id="entry_title">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
                   </object>
                   <packing>
                     <property name="position">1</property>
@@ -1262,42 +1262,45 @@
               </packing>
             </child>
             <child>
-              <object class="GtkFrame" id="frame40">
+              <object class="GtkVBox" id="vbox2">
                 <property name="visible">True</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="orientation">vertical</property>
                 <child>
-                  <object class="GtkAlignment" id="alignment82">
+                  <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
-                    <property name="left_padding">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Text:&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow7">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">in</property>
                     <child>
-                      <object class="GtkScrolledWindow" id="scrolledwindow7">
+                      <object class="GtkViewport" id="viewport1">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
-                        <property name="shadow_type">in</property>
+                        <property name="resize_mode">queue</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <object class="GtkViewport" id="viewport1">
+                          <object class="GtkTextView" id="textview_text">
                             <property name="visible">True</property>
-                            <child>
-                              <object class="GtkTextView" id="textview_text">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                              </object>
-                            </child>
+                            <property name="can_focus">True</property>
                           </object>
                         </child>
                       </object>
                     </child>
                   </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label233">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Text&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
                 </child>
               </object>
               <packing>
@@ -1375,33 +1378,35 @@
   </object>
   <object class="GtkDialog" id="window_imageobject">
     <property name="title" translatable="yes">Image Object</property>
-    <property name="default_width">500</property>
-    <property name="default_height">600</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="default_width">300</property>
+    <property name="default_height">360</property>
     <property name="type_hint">dialog</property>
     <property name="has_separator">False</property>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox2">
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
+        <property name="spacing">6</property>
         <child>
           <object class="GtkVBox" id="vbox21">
             <property name="visible">True</property>
             <property name="border_width">6</property>
             <property name="orientation">vertical</property>
-            <property name="spacing">6</property>
+            <property name="spacing">12</property>
             <child>
-              <object class="GtkHBox" id="hbox_title">
+              <object class="GtkVBox" id="vbox_title">
                 <property name="visible">True</property>
-                <property name="spacing">6</property>
+                <property name="orientation">vertical</property>
                 <child>
-                  <object class="GtkLabel" id="label232">
+                  <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Title&lt;/b&gt;</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Title:&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>
@@ -1409,8 +1414,10 @@
                   <object class="GtkEntry" id="entry_title">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
                   </object>
                   <packing>
+                    <property name="expand">False</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -1421,103 +1428,100 @@
               </packing>
             </child>
             <child>
-              <object class="GtkFrame" id="frame40">
+              <object class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="orientation">vertical</property>
                 <child>
-                  <object class="GtkAlignment" id="alignment82">
+                  <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
-                    <property name="left_padding">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Image:&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox97">
+                    <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
                     <child>
-                      <object class="GtkVBox" id="vbox97">
+                      <object class="GtkEventBox" id="imageglom">
                         <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <property name="spacing">6</property>
                         <child>
-                          <object class="GtkEventBox" id="imageglom">
-                            <property name="visible">True</property>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
+                          <placeholder/>
                         </child>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHButtonBox" id="hbuttonbox1">
+                        <property name="visible">True</property>
+                        <property name="layout_style">end</property>
                         <child>
-                          <object class="GtkHBox" id="hbox112">
+                          <object class="GtkButton" id="button_choose_image">
                             <property name="visible">True</property>
-                            <property name="spacing">6</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="can_focus">True</property>
+                            <property name="can_default">True</property>
+                            <property name="receives_default">True</property>
                             <child>
-                              <object class="GtkButton" id="button_choose_image">
+                              <object class="GtkAlignment" id="alignment87">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="can_default">True</property>
-                                <property name="receives_default">False</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
                                 <child>
-                                  <object class="GtkAlignment" id="alignment87">
+                                  <object class="GtkHBox" id="hbox111">
                                     <property name="visible">True</property>
-                                    <property name="xscale">0</property>
-                                    <property name="yscale">0</property>
+                                    <property name="spacing">2</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox111">
+                                      <object class="GtkImage" id="image48">
                                         <property name="visible">True</property>
-                                        <property name="spacing">2</property>
-                                        <child>
-                                          <object class="GtkImage" id="image48">
-                                            <property name="visible">True</property>
-                                            <property name="stock">gtk-open</property>
-                                          </object>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label241">
-                                            <property name="visible">True</property>
-                                            <property name="label">Choose Image</property>
-                                            <property name="use_underline">True</property>
-                                          </object>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
+                                        <property name="stock">gtk-open</property>
                                       </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label241">
+                                        <property name="visible">True</property>
+                                        <property name="label">C_hoose Image</property>
+                                        <property name="use_underline">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
                                     </child>
                                   </object>
                                 </child>
                               </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
                             </child>
                           </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="position">1</property>
+                      </packing>
                     </child>
                   </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label233">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Image&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
                 </child>
               </object>
               <packing>
@@ -2340,16 +2344,19 @@
     </action-widgets>
   </object>
   <object class="GtkDialog" id="dialog_error_create_database">
+    <property name="border_width">6</property>
     <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
     <child internal-child="vbox">
       <object class="GtkVBox" id="vbox31">
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
         <child>
           <object class="GtkHBox" id="hbox26">
             <property name="visible">True</property>
             <property name="border_width">12</property>
-            <property name="spacing">6</property>
+            <property name="spacing">12</property>
             <child>
               <object class="GtkImage" id="image16">
                 <property name="visible">True</property>
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc
index 4d07d5f..e2489cb 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc
@@ -35,10 +35,12 @@ Dialog_ImageObject::Dialog_ImageObject(BaseObjectType* cobject, const Glib::RefP
   m_entry_title(0),
   m_image(0)
 {
-  builder->get_widget("hbox_title", m_box_title);
+  builder->get_widget("vbox_title", m_box_title);
   builder->get_widget("entry_title", m_entry_title);
   builder->get_widget_derived("imageglom", m_image);
 
+  set_icon_name("glom");
+
   builder->get_widget("button_choose_image", m_button_choose_image);
   m_button_choose_image->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_ImageObject::on_button_choose));
 
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.h b/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.h
index f8f4952..1c0b2c4 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.h
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.h
@@ -45,7 +45,7 @@ public:
 private:
   void on_button_choose();
 
-  Gtk::HBox* m_box_title;
+  Gtk::VBox* m_box_title;
   Gtk::Entry* m_entry_title;
   ImageGlom* m_image;
   Gtk::Button* m_button_choose_image;
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc
index fdc186f..4b6b326 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc
@@ -35,10 +35,12 @@ Dialog_TextObject::Dialog_TextObject(BaseObjectType* cobject, const Glib::RefPtr
   m_entry_title(0),
   m_text_view(0)
 {
-  builder->get_widget("hbox_title",  m_box_title);
+  builder->get_widget("vbox_title",  m_box_title);
   builder->get_widget("entry_title",  m_entry_title);
   builder->get_widget("textview_text",  m_text_view);
 
+  set_icon_name("glom");
+
   //on_foreach_connect(*this);
 
   //Dialog_Properties::set_modified(false);
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h b/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h
index 6495b28..6abcd8f 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h
@@ -43,7 +43,7 @@ public:
   void get_textobject(sharedptr<LayoutItem_Text>& textobject) const;
 
 private:
-  Gtk::HBox* m_box_title;
+  Gtk::VBox* m_box_title;
   Gtk::Entry* m_entry_title;
   Gtk::TextView* m_text_view;
 



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