[glom/maemo5] glom.glade: Removed Help buttons.



commit e1d9a6e504476465032844bb6f942eb31e23fc25
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Sep 28 10:21:54 2009 +0200

    glom.glade: Removed Help buttons.

 glom/glom.glade  |  245 ++----------------------------------------------------
 glom/main.cc     |    1 +
 glom/utils_ui.cc |   13 ++-
 glom/utils_ui.h  |    3 +
 4 files changed, 20 insertions(+), 242 deletions(-)
---
diff --git a/glom/glom.glade b/glom/glom.glade
index e82b519..bd1f88c 100644
--- a/glom/glom.glade
+++ b/glom/glom.glade
@@ -93,126 +93,6 @@
       </object>
     </child>
   </object>
-  <object class="GtkWindow" id="window_adddel">
-    <property name="title" translatable="yes">window2</property>
-    <child>
-      <object class="GtkVBox" id="vbox6">
-        <property name="visible">True</property>
-        <property name="spacing">6</property>
-        <child>
-          <object class="GtkScrolledWindow" id="scrolledwindow1">
-            <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="GtkTreeView" id="treeview">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="reorderable">True</property>
-                <property name="rules_hint">True</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkHButtonBox" id="hbuttonbox4">
-            <property name="visible">True</property>
-            <property name="spacing">6</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="button_add">
-                <property name="label">gtk-add</property>
-                <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="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button_remove">
-                <property name="label">gtk-remove</property>
-                <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="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button_edit">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <child>
-                  <object class="GtkAlignment" id="alignment6">
-                    <property name="visible">True</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <object class="GtkHBox" id="hbox2">
-                        <property name="visible">True</property>
-                        <property name="spacing">2</property>
-                        <child>
-                          <object class="GtkImage" id="image2">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-ok</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="label18">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Edit</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>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
   <object class="GtkDialog" id="dialog_existing_or_new">
     <property name="title" translatable="yes">Welcome to Glom</property>
     <property name="default_width">480</property>
@@ -265,13 +145,6 @@
                   <object class="GtkNotebook" id="existing_or_new_notebook">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <!--
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="existing_or_new_notebook-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Open or create Document</property>
-                      </object>
-                    </child>
-                    -->
                     <child>
                       <object class="GtkScrolledWindow" id="scrolledwindow2">
                         <property name="visible">True</property>
@@ -284,13 +157,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <!--
-                            <child internal-child="accessible">
-                              <object class="AtkObject" id="existing_or_new_existing_treeview-atkobject">
-                                <property name="AtkObject::accessible-name" translatable="yes">Open Existing Document</property>
-                              </object>
-                            </child>
-                            -->
                           </object>
                         </child>
                       </object>
@@ -317,13 +183,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <!--
-                            <child internal-child="accessible">
-                              <object class="AtkObject" id="existing_or_new_new_treeview-atkobject">
-                                <property name="AtkObject::accessible-name" translatable="yes">Create New Document</property>
-                              </object>
-                            </child>
-                            -->
                           </object>
                         </child>
                       </object>
@@ -362,20 +221,6 @@
             <property name="visible">True</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="cancelbutton1">
                 <property name="label">gtk-quit</property>
                 <property name="visible">True</property>
@@ -387,7 +232,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">1</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
@@ -401,7 +246,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">2</property>
+                <property name="position">1</property>
               </packing>
             </child>
           </object>
@@ -414,7 +259,6 @@
       </object>
     </child>
     <action-widgets>
-      <action-widget response="-11">helpbutton</action-widget>
       <action-widget response="-7">cancelbutton1</action-widget>
       <action-widget response="0">existing_or_new_button_select</action-widget>
     </action-widgets>
@@ -494,13 +338,6 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">&#x2022;</property>
-                        <!--
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="entry_host-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes">Host</property>
-                          </object>
-                        </child>
-                        -->
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -516,13 +353,6 @@
                         <property name="visibility">False</property>
                         <property name="invisible_char">&#x2022;</property>
                         <property name="activates_default">True</property>
-                        <!--
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="entry_password-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes">Password</property>
-                          </object>
-                        </child>
-                        -->
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -537,13 +367,6 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">&#x2022;</property>
-                        <!--
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="entry_user-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes">User</property>
-                          </object>
-                        </child>
-                        -->
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -623,13 +446,6 @@
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="selectable">True</property>
-                        <!--
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="label_database-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes">Database</property>
-                          </object>
-                        </child>
-                        -->
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -663,21 +479,6 @@
             <property name="visible">True</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <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="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="button12">
                 <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
@@ -689,7 +490,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">1</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
@@ -739,7 +540,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">2</property>
+                <property name="position">1</property>
               </packing>
             </child>
           </object>
@@ -752,7 +553,6 @@
       </object>
     </child>
     <action-widgets>
-      <action-widget response="-11">button11</action-widget>
       <action-widget response="-6">button12</action-widget>
       <action-widget response="-5">button13</action-widget>
     </action-widgets>
@@ -961,7 +761,7 @@
       </object>
     </child>
   </object>
-  <object class="HildonStackableWindow" id="window_main">
+  <object class="HildonWindow" id="window_main">
     <property name="title" translatable="yes">Glom</property>
     <property name="default_width">900</property>
     <property name="default_height">700</property>
@@ -1562,20 +1362,6 @@
                 <property name="position">1</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -1588,7 +1374,6 @@
     <action-widgets>
       <action-widget response="-6">import_csv_cancel_button</action-widget>
       <action-widget response="-3">import_csv_import_button</action-widget>
-      <action-widget response="-11">helpbutton</action-widget>
     </action-widgets>
   </object>
   <object class="GtkDialog" id="dialog_data_invalid_format">
@@ -1667,21 +1452,6 @@ The data in the field was not recognized. Please try to correct the data or reve
             <property name="visible">True</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <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="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="button_revert">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -1727,7 +1497,7 @@ The data in the field was not recognized. Please try to correct the data or reve
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">1</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
@@ -1743,7 +1513,7 @@ The data in the field was not recognized. Please try to correct the data or reve
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">2</property>
+                <property name="position">1</property>
               </packing>
             </child>
           </object>
@@ -1756,7 +1526,6 @@ The data in the field was not recognized. Please try to correct the data or reve
       </object>
     </child>
     <action-widgets>
-      <action-widget response="-11">button1</action-widget>
       <action-widget response="2">button_revert</action-widget>
       <action-widget response="-5">button4</action-widget>
     </action-widgets>
diff --git a/glom/main.cc b/glom/main.cc
index bfb7082..010c873 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -492,6 +492,7 @@ main(int argc, char* argv[])
 
     Glom::App_Glom* pApp_Glom = 0;
     refXml->get_widget_derived("window_main", pApp_Glom);
+    g_assert(pApp_Glom);
 
     pApp_Glom->set_command_line_args(argc, argv);
     pApp_Glom->set_show_sql_debug(group.m_arg_debug_sql);
diff --git a/glom/utils_ui.cc b/glom/utils_ui.cc
index 91518f4..0c93a84 100644
--- a/glom/utils_ui.cc
+++ b/glom/utils_ui.cc
@@ -95,11 +95,16 @@ namespace Glom
 int Utils::dialog_run_with_help(Gtk::Dialog* dialog, const Glib::ustring& id)
 {
   int result = dialog->run();
+  
+  //Maemo has no help system since Maemo 5, 
+  //so we hide the buttons in anyway.
+  #ifndef GLOM_ENABLE_MAEMO
   while (result == Gtk::RESPONSE_HELP)
   {
     show_help(id);
     result = dialog->run();
   }
+  #endif //GLOM_ENABLE_MAEMO
 
   dialog->hide();
   return result;
@@ -112,10 +117,10 @@ int Utils::dialog_run_with_help(Gtk::Dialog* dialog, const Glib::ustring& id)
  * If the help cannot be found an error dialog will be shown
  */
 
+// Maemo has no help system since Maemo 5 (Fremantle).
+#ifndef GLOM_ENABLE_MAEMO
 void Utils::show_help(const Glib::ustring& id)
 {
-  // TODO_maemo: Show help on maemo by some other means
-#ifndef GLOM_ENABLE_MAEMO
   GError* err = 0;
   const gchar* pId;
   if(id.length())
@@ -157,14 +162,14 @@ void Utils::show_help(const Glib::ustring& id)
     Gtk::MessageDialog dialog(message, false, Gtk::MESSAGE_ERROR);
     dialog.run();
   }
-#endif
 }
+#endif //GLOM_ENABLE_MAEMO
 
 void Utils::show_ok_dialog(const Glib::ustring& title, const Glib::ustring& message, Gtk::Window* parent, Gtk::MessageType message_type)
 {
 #undef GLOM_ENABLE_MAEMO
 #ifdef GLOM_ENABLE_MAEMO
-  // TODO_maemo: Map message_type to a senseful stock_id?
+  // TODO_maemo: Map message_type to a sensible stock_id?
   Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, parent, message);
 #else
   Gtk::MessageDialog dialog("<b>" + title + "</b>", true /* markup */, message_type, Gtk::BUTTONS_OK);
diff --git a/glom/utils_ui.h b/glom/utils_ui.h
index 18afcf4..0eacf96 100644
--- a/glom/utils_ui.h
+++ b/glom/utils_ui.h
@@ -50,11 +50,14 @@ enum DefaultSpacings
 
 int dialog_run_with_help(Gtk::Dialog* dialog, const Glib::ustring& id = Glib::ustring());
 
+// Maemo has no help system since Maemo 5 (Fremantle).
+#ifndef GLOM_ENABLE_MAEMO
 /** This is a replacement for gnome_help_display(), 
  * to avoid the libgnome dependency.
  * TODO: GTK+ should have a function for this soon.
  */
 void show_help(const Glib::ustring& id = Glib::ustring());
+#endif //GLOM_ENABLE_MAEMO
 
 void show_ok_dialog(const Glib::ustring& title, const Glib::ustring& message, Gtk::Window& parent, Gtk::MessageType message_type);
 void show_ok_dialog(const Glib::ustring& title, const Glib::ustring& message, Gtk::Window* parent, Gtk::MessageType message_type);



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