[glom] Adjustments for Tables dialog.



commit 998e2c61f07dddfa61743c75b8a1000217f7933e
Author: Daniel Borgmann <danielb openismus com>
Date:   Fri Mar 26 10:14:32 2010 +0000

    	Adjustments for Tables dialog.
    
    	* glom/application.cc: Use gtkmm API to set document icon.
    	* glom/frame_glom.cc: Change Tables dialog title to "Edit Tables" to
    	match the command name.
    	* glom/glom.glade: Remove the frame.
    	* glom/navigation/box_tables.cc: Change column name from Tables to Table.
    	* glom/navigation/box_tables.h: Remove frame member.
    	* glom/window_boxholder.cc: Set icon and default position to center on
    	parent.

 ChangeLog                     |   13 ++++++++
 glom/application.cc           |    3 +-
 glom/frame_glom.cc            |    2 +-
 glom/glom.glade               |   66 ++++++++++++++++-------------------------
 glom/navigation/box_tables.cc |    5 +--
 glom/navigation/box_tables.h  |    1 -
 glom/window_boxholder.cc      |    6 ++++
 7 files changed, 48 insertions(+), 48 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 00487b5..0606fe5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-03-26  Daniel Borgmann  <danielb openismus com>
+
+	Adjustments for Tables dialog.
+
+	* glom/application.cc: Use gtkmm API to set document icon.
+	* glom/frame_glom.cc: Change Tables dialog title to "Edit Tables" to
+	match the command name.
+	* glom/glom.glade: Remove the frame.
+	* glom/navigation/box_tables.cc: Change column name from Tables to Table.
+	* glom/navigation/box_tables.h: Remove frame member.
+	* glom/window_boxholder.cc: Set icon and default position to center on
+	parent.
+
 2010-03-25  Murray Cumming  <murrayc murrayc com>
 
     Glade files: Remove adjustment objects, simplifying window instantiation.
diff --git a/glom/application.cc b/glom/application.cc
index b7db6f7..1ca7879 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -89,8 +89,7 @@ Application::Application(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builde
 #endif // !GLOM_ENABLE_CLIENT_ONLY
   m_show_sql_debug(false)
 {
-  // TODO: Use the C++ method when we can use gtkmm 2.18:
-  gtk_window_set_icon_name(GTK_WINDOW(gobj()), "glom");
+  set_icon_name("glom");
 
   //Load widgets from glade file:
   builder->get_widget("bakery_vbox", m_pBoxTop);
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 0166c03..5f8741d 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -1386,7 +1386,7 @@ void Frame_Glom::do_menu_Navigate_Table(bool open_default)
   if(!m_pBox_Tables)
   {
     Utils::get_glade_widget_derived_with_warning("box_navigation_tables", m_pBox_Tables);
-    m_pDialog_Tables = new Window_BoxHolder(m_pBox_Tables, _("Tables"));
+    m_pDialog_Tables = new Window_BoxHolder(m_pBox_Tables, _("Edit Tables"));
     m_pDialog_Tables->signal_hide().connect(sigc::mem_fun(*this, &Frame_Glom::on_dialog_tables_hide));
 
     Gtk::Window* pWindow = get_app_window();
diff --git a/glom/glom.glade b/glom/glom.glade
index b01322a..e6528a3 100644
--- a/glom/glom.glade
+++ b/glom/glom.glade
@@ -4,61 +4,47 @@
   <!-- interface-naming-policy toplevel-contextual -->
   <object class="GtkWindow" id="window_tables">
     <property name="border_width">12</property>
-    <property name="title" translatable="yes">Tables</property>
+    <property name="title" translatable="yes">Edit Tables</property>
     <child>
       <object class="GtkVBox" id="box_navigation_tables">
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
         <child>
-          <object class="GtkFrame" id="frame2">
+          <object class="GtkAlignment" id="alignment">
             <property name="visible">True</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">none</property>
             <child>
-              <object class="GtkAlignment" id="alignment">
+              <object class="GtkVBox" id="vbox5">
                 <property name="visible">True</property>
-                <property name="left_padding">12</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
                 <child>
-                  <object class="GtkVBox" id="vbox5">
+                  <object class="GtkAlignment" id="alignment_placeholder_adddel">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkAlignment" id="alignment_placeholder_adddel">
-                        <property name="visible">True</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
                     <child>
-                      <object class="GtkCheckButton" id="checkbutton_show_hidden">
-                        <property name="label" translatable="yes">Show hidden tables</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="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
+                      <placeholder/>
                     </child>
                   </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="checkbutton_show_hidden">
+                    <property name="label" translatable="yes">_Show hidden tables</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="relief">none</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
+                  </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="GtkLabel" id="label_frame_title">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">&lt;b&gt;Tables in database&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
               </object>
             </child>
           </object>
diff --git a/glom/navigation/box_tables.cc b/glom/navigation/box_tables.cc
index 68888a5..396b3e8 100644
--- a/glom/navigation/box_tables.cc
+++ b/glom/navigation/box_tables.cc
@@ -28,7 +28,6 @@ namespace Glom
 
 Box_Tables::Box_Tables(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
 : Box_WithButtons(cobject, builder),
-  m_pLabelFrameTitle(0),
   m_pCheckButtonShowHidden(0),
   m_colTableName(0),
   m_colHidden(0),
@@ -48,8 +47,6 @@ Box_Tables::Box_Tables(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
   builder->get_widget("alignment_placeholder_adddel", pAligmentPlaceholder);
   pAligmentPlaceholder->add(m_AddDel);
 
-  builder->get_widget("label_frame_title", m_pLabelFrameTitle);
-
   builder->get_widget("checkbutton_show_hidden", m_pCheckButtonShowHidden);
   m_pCheckButtonShowHidden->signal_toggled().connect(sigc::mem_fun(*this, &Box_Tables::on_show_hidden_toggled));
 
@@ -125,7 +122,7 @@ bool Box_Tables::fill_from_database()
 
   const bool editable = developer_mode;
   const bool visible_extras = developer_mode;
-  m_colTableName = m_AddDel.add_column(_("Tables"), AddDelColumnInfo::STYLE_Text, editable, visible_extras);
+  m_colTableName = m_AddDel.add_column(_("Table"), AddDelColumnInfo::STYLE_Text, editable, visible_extras);
   m_AddDel.prevent_duplicates(m_colTableName); //Prevent two tables with the same name from being added.
   m_AddDel.set_prevent_duplicates_warning(_("This table already exists. Please choose a different table name"));
 
diff --git a/glom/navigation/box_tables.h b/glom/navigation/box_tables.h
index 8dd4a7e..ee79809 100644
--- a/glom/navigation/box_tables.h
+++ b/glom/navigation/box_tables.h
@@ -60,7 +60,6 @@ private:
 
   virtual void on_userlevel_changed(AppState::userlevels userlevel);
       
-  Gtk::Label* m_pLabelFrameTitle;
   Gtk::CheckButton* m_pCheckButtonShowHidden;
   guint m_colTableName;
   guint m_colHidden;
diff --git a/glom/window_boxholder.cc b/glom/window_boxholder.cc
index b38b2c2..39aec59 100644
--- a/glom/window_boxholder.cc
+++ b/glom/window_boxholder.cc
@@ -31,6 +31,12 @@ Window_BoxHolder::Window_BoxHolder(Box_WithButtons* pBox, const Glib::ustring& t
   if(!title.empty())
     set_title(title);
 
+  //Use the glom icon by default:
+  set_icon_name("glom");
+
+  //Set default position:
+  set_position(Gtk::WIN_POS_CENTER_ON_PARENT);
+
 #ifndef GLOM_ENABLE_MAEMO
 
 #else



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