glom r1718 - in trunk: . glom



Author: murrayc
Date: Wed Nov  5 03:50:42 2008
New Revision: 1718
URL: http://svn.gnome.org/viewvc/glom?rev=1718&view=rev

Log:
2008-11-05  Murray Cumming  <murrayc murrayc com>

* glom/glom.glade: Remove the system name label. It is in the window 
title and this has always been a little weird. I never found a way to 
make it pretty without wasting space, so it is now gone.
* glom/frame_glom.[h|cc]: 
Removed show_system_name().
set_databases_selected(),
on_menu_developer_database_preferences():
* glom/application.cc: Constructor: Don't call it. 

Modified:
   trunk/ChangeLog
   trunk/glom/application.cc
   trunk/glom/frame_glom.cc
   trunk/glom/frame_glom.h
   trunk/glom/glom.glade

Modified: trunk/glom/application.cc
==============================================================================
--- trunk/glom/application.cc	(original)
+++ trunk/glom/application.cc	Wed Nov  5 03:50:42 2008
@@ -1121,10 +1121,6 @@
         //Switch to operator mode when opening new documents:
         pDocument->set_userlevel(AppState::USERLEVEL_OPERATOR);
 
-#ifndef GLOM_ENABLE_MAEMO
-        m_pFrame->show_system_name();
-#endif // !GLOM_ENABLE_MAEMO
-
         //Open default table, or show list of tables instead:
         m_pFrame->do_menu_Navigate_Table(true /* open the default if there is one */);
 

Modified: trunk/glom/frame_glom.cc
==============================================================================
--- trunk/glom/frame_glom.cc	(original)
+++ trunk/glom/frame_glom.cc	Wed Nov  5 03:50:42 2008
@@ -65,7 +65,6 @@
 
 Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade)
 : PlaceHolder(cobject, refGlade),
-  m_pLabel_Name(0),
   m_pLabel_Table(0),
   m_box_footer(0),
   m_pLabel_Mode(0),
@@ -95,7 +94,6 @@
   m_pDialogConnection(0)
 {
   //Load widgets from glade file:
-  refGlade->get_widget("label_name", m_pLabel_Name);
   refGlade->get_widget("label_table_name", m_pLabel_Table);
 
   refGlade->get_widget("hbox_footer", m_box_footer);
@@ -129,8 +127,6 @@
 
   refGlade->get_widget_derived("vbox_mode", m_pBox_Mode);
 
-  //m_pLabel_Mode->set_text(_("No database selected.\n Use the Navigation menu, or open a previous Glom document."));
-
   m_Mode = MODE_None;
   m_Mode_Previous = MODE_None;
 
@@ -148,14 +144,6 @@
   add_view(&m_Notebook_Find); //Also a composite view.
 
   on_userlevel_changed(AppState::USERLEVEL_OPERATOR); //A default to show before a document is created or loaded.
-
-#ifdef GLOM_ENABLE_MAEMO
-  // Don't show the document name on maemo. The label is on top of the window,
-  // and the document name is already shown in the window title (note that
-  // there is not even a menu between them as in the non-maemo version). This
-  // looks a bit strange and takes vertical screen space.
-  m_pLabel_Name->hide();
-#endif
 }
 
 Frame_Glom::~Frame_Glom()
@@ -236,7 +224,7 @@
 
   get_document()->set_connection_database(strName);
 
-  show_system_name();
+  //show_system_name();
 
   do_menu_Navigate_Table(true /* open default */);
 }
@@ -1220,29 +1208,6 @@
   }
 }
 
-void Frame_Glom::show_system_name()
-{
-  // Don't show the document name on maemo. The label is on top of the window,
-  // and the document name is already shown in the window title (note that
-  // there is not even a menu between them as in the non-maemo version). This
-  // looks a bit strange and takes unnecessarily vertical screen space.
-#ifndef GLOM_ENABLE_MAEMO
-  const SystemPrefs prefs = get_database_preferences();
-  const Glib::ustring org = prefs.m_org_name;
-  const Glib::ustring name = prefs.m_name;
-
-  Glib::ustring system_name = org;
-  if(!system_name.empty() && !name.empty())
-    system_name += ": ";
-
-  system_name += name;
-
-  m_pLabel_Name->set_text ( Bakery::App_Gtk::util_bold_message(system_name) );
-  m_pLabel_Name->set_use_markup();
-  m_pLabel_Name->show();
-#endif // !GLOM_ENABLE_MAEMO
-}
-
 void Frame_Glom::load_from_document()
 {
   Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
@@ -1272,7 +1237,7 @@
       remove_view(dialog);
       delete dialog;
 
-      show_system_name(); //In case it has changed.
+      //show_system_name(); //In case it has changed.
     }
   }
 

Modified: trunk/glom/frame_glom.h
==============================================================================
--- trunk/glom/frame_glom.h	(original)
+++ trunk/glom/frame_glom.h	Wed Nov  5 03:50:42 2008
@@ -130,8 +130,6 @@
   virtual void set_document(Document_Glom* pDocument); //View override
   virtual void load_from_document(); //View override
 
-  void show_system_name();
-
   enum enumModes
   {
     MODE_None, //at the start.
@@ -210,7 +208,6 @@
   Glib::ustring m_table_name;
 
   //Child widgets:
-  Gtk::Label* m_pLabel_Name;
   Gtk::Label* m_pLabel_Table;
   Gtk::HBox* m_box_footer;
   Gtk::Label* m_pLabel_Mode;

Modified: trunk/glom/glom.glade
==============================================================================
--- trunk/glom/glom.glade	(original)
+++ trunk/glom/glom.glade	Wed Nov  5 03:50:42 2008
@@ -1049,17 +1049,6 @@
             <property name="border_width">12</property>
             <property name="spacing">6</property>
             <child>
-              <widget class="GtkLabel" id="label_name">
-                <property name="visible">True</property>
-                <property name="use_markup">True</property>
-                <property name="justify">GTK_JUSTIFY_CENTER</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
               <widget class="GtkHBox" id="hbox3">
                 <property name="visible">True</property>
                 <property name="spacing">6</property>



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