[glom] Main window: Simplify widgets at top.



commit 01673b88d353766732a35ec12cf02dc7d866e3c7
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Jun 22 22:15:48 2011 +0200

    Main window: Simplify widgets at top.
    
    * glom/glom.glade:
    * glom/frame_glom.[h|cc]: Remove the Table: label. Make the
    table name normal sized, but still bold. Remove the mode
    labels, because there are only two modes now, and it should
    be obvious when you are in the middle of entering find criteria.

 ChangeLog          |   10 ++++++++++
 glom/frame_glom.cc |   11 +----------
 glom/frame_glom.h  |    1 -
 glom/glom.glade    |   42 +-----------------------------------------
 4 files changed, 12 insertions(+), 52 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c9427ba..20b754c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2011-06-22  Murray Cumming  <murrayc murrayc com>
 
+	Main window: Simplify widgets at top.
+
+	* glom/glom.glade:
+	* glom/frame_glom.[h|cc]: Remove the Table: label. Make the 
+	table name normal sized, but still bold. Remove the mode 
+	labels, because there are only two modes now, and it should 
+	be obvious when you are in the middle of entering find criteria.
+
+2011-06-22  Murray Cumming  <murrayc murrayc com>
+
 	glom.glade: Resave with glade.
 
 	* glom/glom.glade: Resave with glade 3.10, which changes 
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index b31e9f6..d6818e7 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -81,7 +81,6 @@ Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
   m_pLabel_Table(0),
   m_box_header(0),
   m_box_footer(0),
-  m_pLabel_Mode(0),
   m_pLabel_userlevel(0),
   m_pBox_RecordsCount(0),
   m_pLabel_RecordsCount(0),
@@ -117,7 +116,6 @@ Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
 
   builder->get_widget("hbox_header", m_box_header);
   builder->get_widget("hbox_footer", m_box_footer);
-  builder->get_widget("label_mode", m_pLabel_Mode);
   builder->get_widget("label_user_level", m_pLabel_userlevel);
 
   //Hide unnecessary widgets on maemo that take too much space,
@@ -409,7 +407,6 @@ void Frame_Glom::show_table_allow_empty(const Glib::ustring& table_name, const G
 
   //Show the table:
   m_table_name = table_name;
-  Glib::ustring strMode;
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Update the document with any new information in the database if necessary (though the database _should never have changed information)
   update_table_in_document_from_database();
@@ -426,7 +423,6 @@ void Frame_Glom::show_table_allow_empty(const Glib::ustring& table_name, const G
   {
     case(MODE_Data):
     {
-      strMode = _("Data");
       FoundSet found_set;
 
       //Start with the last-used found set (sort order and where clause)
@@ -477,7 +473,6 @@ void Frame_Glom::show_table_allow_empty(const Glib::ustring& table_name, const G
     }
     case(MODE_Find):
     {
-      strMode = _("Find");
       m_Notebook_Find.init_db_details(m_table_name, get_active_layout_platform(get_document()));
       set_mode_widget(m_Notebook_Find);
       break;
@@ -485,13 +480,10 @@ void Frame_Glom::show_table_allow_empty(const Glib::ustring& table_name, const G
     default:
     {
       std::cout << "debug: " << G_STRFUNC << ": Unexpected mode" << std::endl;
-      strMode = _("Unknown");
       break;
     }
   }
 
-  m_pLabel_Mode->set_text(strMode);
-
   show_table_title();
 
   //List the reports and print layouts in the menus:
@@ -1483,10 +1475,9 @@ void Frame_Glom::show_table_title()
   if(app)
     app->set_title(document->get_name() + ": " + table_label);
 
-  // xx-large is too large on maemo, using far too much (vertical) space.
   // We hide this anyway: m_pLabel_Table->set_markup("<b>" + table_label + "</b>");
 #else
-  m_pLabel_Table->set_markup("<b><span size=\"xx-large\">" + table_label + "</span></b>"); //Show the table title in large text, because it's very important to the user.
+  m_pLabel_Table->set_markup("<b>" + table_label + "</b>"); //Show the table title in bold text, because it's important to the user.
 #endif
 }
 
diff --git a/glom/frame_glom.h b/glom/frame_glom.h
index c347779..ac933fc 100644
--- a/glom/frame_glom.h
+++ b/glom/frame_glom.h
@@ -256,7 +256,6 @@ private:
   Gtk::Label* m_pLabel_Table;
   Gtk::HBox* m_box_header;
   Gtk::HBox* m_box_footer;
-  Gtk::Label* m_pLabel_Mode;
   Gtk::Label* m_pLabel_userlevel;
 
   Gtk::HBox* m_pBox_RecordsCount; //Only show this when in Data mode.
diff --git a/glom/glom.glade b/glom/glom.glade
index 165b102..47ea89a 100644
--- a/glom/glom.glade
+++ b/glom/glom.glade
@@ -1608,23 +1608,10 @@ The data in the field was not recognized. Please try to correct the data or reve
                 <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <child>
-                  <object class="GtkLabel" id="label23">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Table:</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="GtkLabel" id="label_table_name_main">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">&lt;b&gt;&lt;span size="xx-large"&gt;None selected&lt;/span&gt;&lt;/b&gt;</property>
+                    <property name="label" translatable="yes">&lt;b&gt;No Table Selected&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
                   <packing>
@@ -1633,33 +1620,6 @@ The data in the field was not recognized. Please try to correct the data or reve
                     <property name="position">1</property>
                   </packing>
                 </child>
-                <child>
-                  <object class="GtkLabel" id="label_mode">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Data</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="pack_type">end</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label22">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Mode:</property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="pack_type">end</property>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
               </object>
               <packing>
                 <property name="expand">False</property>



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