[glom] Related Records Portals: Change rows count to min and max counts.



commit bfa248e907f425e673e3ccda20f2d577080bf09a
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Oct 11 22:19:06 2011 +0200

    Related Records Portals: Change rows count to min and max counts.
    
    * glom/glom_document.dtd: Adapted.
    * glom/libglom/data_structure/layout/layoutitem_portal.[h|cc]:
    set_rows_count(): Return a min and max, and change it from double to
    gulong.
    * glom/libglom/document/document.cc: load_after(), save_before():
    Store it in the document. The old XML attribute was new in Glom 1.19
    anyway, so we can change it.
    
    * ui/developer/window_data_layout.glade: Add an extra SpinButton,
    adjust the labels, and add explanatory tooltips.
    * glom/mode_design/layout/dialog_layout_details.[h|cc]: Adapted.
    
    * glom/mode_data/db_adddel/db_adddel.[h|cc]: set_height_rows():
    Take the min and max.
    construct_specified_column(): Increase the size if appropriate when
    there are more database rows to show.
    * glom/mode_design/layout/dialog_layout_list_related.cc:
    * glom/print_layout/print_layout_utils.cc:
    * glom/libglom/db_utils.cc:
    * glom/mode_data/box_data_list_related.cc: Adapted.

 ChangeLog                                          |   25 +++++++++++++++
 glom/glom_document.dtd                             |    3 +-
 .../data_structure/layout/layoutitem_portal.cc     |   19 +++++++----
 .../data_structure/layout/layoutitem_portal.h      |    6 ++--
 glom/libglom/db_utils.cc                           |    2 +-
 glom/libglom/document/document.cc                  |   21 +++++++++---
 glom/mode_data/box_data_list_related.cc            |   10 +++--
 glom/mode_data/db_adddel/db_adddel.cc              |   33 +++++++++++++++++--
 glom/mode_data/db_adddel/db_adddel.h               |    9 +++++-
 glom/mode_design/layout/dialog_layout_details.cc   |    6 ++-
 glom/mode_design/layout/dialog_layout_details.h    |    3 +-
 .../layout/dialog_layout_list_related.cc           |   22 +++++++++---
 glom/print_layout/print_layout_utils.cc            |    8 +++--
 ui/developer/window_data_layout.glade              |   33 ++++++++++++++++++-
 14 files changed, 159 insertions(+), 41 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c5ed36e..94c566c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,30 @@
 2011-10-11  Murray Cumming  <murrayc murrayc com>
 
+	Related Records Portals: Change rows count to min and max counts.
+
+	* glom/glom_document.dtd: Adapted.
+	* glom/libglom/data_structure/layout/layoutitem_portal.[h|cc]: 
+	set_rows_count(): Return a min and max, and change it from double to 
+	gulong.
+	* glom/libglom/document/document.cc: load_after(), save_before():
+	Store it in the document. The old XML attribute was new in Glom 1.19
+	anyway, so we can change it.
+
+	* ui/developer/window_data_layout.glade: Add an extra SpinButton, 
+	adjust the labels, and add explanatory tooltips.
+	* glom/mode_design/layout/dialog_layout_details.[h|cc]: Adapted.
+
+	* glom/mode_data/db_adddel/db_adddel.[h|cc]: set_height_rows():
+	Take the min and max.
+	construct_specified_column(): Increase the size if appropriate when 
+	there are more database rows to show.
+	* glom/mode_design/layout/dialog_layout_list_related.cc:
+	* glom/print_layout/print_layout_utils.cc:
+	* glom/libglom/db_utils.cc:
+	* glom/mode_data/box_data_list_related.cc: Adapted.
+
+2011-10-11  Murray Cumming  <murrayc murrayc com>
+
 	Print Layout: Create Standard: Use the full page width.
 
 	* glom/print_layout/print_layout_utils.cc: Instead of hard-coding the 
diff --git a/glom/glom_document.dtd b/glom/glom_document.dtd
index 0d977a9..1f34e70 100644
--- a/glom/glom_document.dtd
+++ b/glom/glom_document.dtd
@@ -351,7 +351,8 @@ TODO: Add 'title_singular' element.
         sequence CDATA #IMPLIED
         hide CDATA #IMPLIED
         columns_count CDATA #IMPLIED
-        portal_rows_count CDATA #IMPLIED
+        portal_rows_count_min CDATA #IMPLIED
+        portal_rows_count_max CDATA #IMPLIED
         line_color CDATA #IMPLIED
         column_line_color CDATA #IMPLIED >
 
diff --git a/glom/libglom/data_structure/layout/layoutitem_portal.cc b/glom/libglom/data_structure/layout/layoutitem_portal.cc
index 86a3562..1af0fa8 100644
--- a/glom/libglom/data_structure/layout/layoutitem_portal.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_portal.cc
@@ -31,7 +31,8 @@ LayoutItem_Portal::LayoutItem_Portal()
   m_print_layout_row_line_width(1), //Sensible default.
   m_print_layout_column_line_width(1), //Sensible default.
   m_navigation_type(LayoutItem_Portal::NAVIGATION_AUTOMATIC),
-  m_rows_count(6) //Sensible default.
+  m_rows_count_min(6), //Sensible default.
+  m_rows_count_max(6) //Sensible default.
 {
 }
 
@@ -45,7 +46,8 @@ LayoutItem_Portal::LayoutItem_Portal(const LayoutItem_Portal& src)
   m_print_layout_column_line_width(src.m_print_layout_column_line_width),
   m_print_layout_line_color(src.m_print_layout_line_color),
   m_navigation_type(src.m_navigation_type),
-  m_rows_count(src.m_rows_count)
+  m_rows_count_min(src.m_rows_count_min),
+  m_rows_count_max(src.m_rows_count_max)
 {
 }
 
@@ -71,7 +73,8 @@ LayoutItem_Portal& LayoutItem_Portal::operator=(const LayoutItem_Portal& src)
   m_print_layout_column_line_width = src.m_print_layout_column_line_width;
   m_print_layout_line_color = src.m_print_layout_line_color;
   m_navigation_type = src.m_navigation_type;
-  m_rows_count = src.m_rows_count;
+  m_rows_count_min = src.m_rows_count_min;
+  m_rows_count_max = src.m_rows_count_max;
 
   return *this;
 }
@@ -180,14 +183,16 @@ void LayoutItem_Portal::set_navigation_type(LayoutItem_Portal::navigation_type t
   m_navigation_type = type;
 }
 
-double LayoutItem_Portal::get_rows_count() const
+void LayoutItem_Portal::get_rows_count(gulong& rows_count_min, gulong& rows_count_max) const
 {
-  return m_rows_count;
+  rows_count_min = m_rows_count_min;
+  rows_count_max = m_rows_count_max;
 }
   
-void LayoutItem_Portal::set_rows_count(double rows_count)
+void LayoutItem_Portal::set_rows_count(gulong rows_count_min, gulong rows_count_max)
 {
-  m_rows_count = rows_count;
+  m_rows_count_min = rows_count_min;
+  m_rows_count_max = rows_count_max;
 }
 
 double LayoutItem_Portal::get_print_layout_row_line_width() const
diff --git a/glom/libglom/data_structure/layout/layoutitem_portal.h b/glom/libglom/data_structure/layout/layoutitem_portal.h
index dd2044d..46964db 100644
--- a/glom/libglom/data_structure/layout/layoutitem_portal.h
+++ b/glom/libglom/data_structure/layout/layoutitem_portal.h
@@ -138,11 +138,11 @@ public:
   
   /** Get the number of rows that should be displayed.
    */
-  double get_rows_count() const;
+  void get_rows_count(gulong& rows_count_min, gulong& rows_count_max) const;
   
   /** Set the number of rows that should be displayed.
    */
-  void set_rows_count(double rows_count);
+  void set_rows_count(gulong rows_count_min, gulong rows_count_max);
 
 
 private:
@@ -161,7 +161,7 @@ private:
   //If no navigation relationship has been specified then it will be automatically chosen or navigation will be disabled:
   navigation_type m_navigation_type;
   
-  double m_rows_count;
+  gulong m_rows_count_min, m_rows_count_max;
 };
 
 } //namespace Glom
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index 46ddf05..6cb4d1f 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -864,7 +864,7 @@ type_vec_fields get_fields_for_table_from_database(const Glib::ustring& table_na
 
       //Examine each field:
       guint row = 0;
-      const guint rows_count = data_model_fields->get_n_rows();
+      const gulong rows_count = data_model_fields->get_n_rows();
       while(row < rows_count)
       {
         Glib::RefPtr<Gnome::Gda::Column> field_info = Gnome::Gda::Column::create();
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index bf86a12..706c876 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -73,7 +73,8 @@ static const char GLOM_NODE_DATA_LAYOUT_NOTEBOOK[] = "data_layout_notebook";
 
 static const char GLOM_NODE_DATA_LAYOUT_PORTAL[] = "data_layout_portal";
 static const char GLOM_NODE_DATA_LAYOUT_PORTAL_NAVIGATIONRELATIONSHIP[] = "portal_navigation_relationship";
-static const char GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT[] = "portal_rows_count";
+static const char GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MIN[] = "portal_rows_count_min";
+static const char GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MAX[] = "portal_rows_count_max";
 static const char GLOM_ATTRIBUTE_PORTAL_NAVIGATION_TYPE[] = "navigation_type";
 static const char GLOM_ATTRIBUTE_PORTAL_NAVIGATION_TYPE_AUTOMATIC[] = "automatic";
 static const char GLOM_ATTRIBUTE_PORTAL_NAVIGATION_TYPE_SPECIFIC[] = "specific";
@@ -2376,11 +2377,14 @@ void Document::load_after_layout_group(const xmlpp::Element* node, const Glib::u
 
         if(!calendar_portal)
         {
-          const double rows_count = 
+          const gulong rows_count_min = 
             get_node_attribute_value_as_decimal_double(element, 
-              GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT);
-          if(rows_count) //0 is both a useless value and possible with older files that didn't have this attribute.
-            portal->set_rows_count(rows_count);
+              GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MIN);
+          const gulong rows_count_max = 
+            get_node_attribute_value_as_decimal_double(element, 
+              GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MAX);
+          if(rows_count_min || rows_count_max) //Ignore useless 0, 0 values.
+            portal->set_rows_count(rows_count_min, rows_count_max);
             
           //Print Layout specific stuff:
           portal->set_print_layout_row_height(
@@ -3360,8 +3364,13 @@ void Document::save_before_layout_group(xmlpp::Element* node, const sharedptr<co
 
               if(!calendar_portal)
               {
+                gulong rows_count_min = 0;
+                gulong rows_count_max = 0;
+                portal->get_rows_count(rows_count_min, rows_count_max);
+                set_node_attribute_value_as_decimal_double(child, 
+                  GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MIN, rows_count_min);
                 set_node_attribute_value_as_decimal_double(child, 
-                  GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT, portal->get_rows_count());
+                  GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MAX, rows_count_max);
 
                 //Print Layout specific stuff:
                 set_node_attribute_value_as_decimal(child,
diff --git a/glom/mode_data/box_data_list_related.cc b/glom/mode_data/box_data_list_related.cc
index 80cee34..3b0ca58 100644
--- a/glom/mode_data/box_data_list_related.cc
+++ b/glom/mode_data/box_data_list_related.cc
@@ -35,7 +35,7 @@ Box_Data_List_Related::Box_Data_List_Related()
   m_Alignment.add(m_AddDel);
   add_view(&m_AddDel); //Give it access to the document.
   m_AddDel.show();
-  m_AddDel.set_height_rows(5);
+  m_AddDel.set_height_rows(6, 6);
   m_Alignment.show();
 
   //Connect signals:
@@ -384,9 +384,11 @@ void Box_Data_List_Related::create_layout()
   
   if(m_portal)
   {
-    const double rows_count = m_portal->get_rows_count();
-    if(rows_count) //0 is a silly value.
-      m_AddDel.set_height_rows(rows_count);
+    gulong rows_count_min = 0;
+    gulong rows_count_max = 0;
+    m_portal->get_rows_count(rows_count_min, rows_count_max);
+    if(rows_count_min) //0 is a silly value.
+      m_AddDel.set_height_rows(rows_count_min, rows_count_max);
   }
 
   sharedptr<Field> field_primary_key = get_field_primary_key_for_table(Base_DB_Table::m_table_name);
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index 927bf02..ae5c10c 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -56,7 +56,9 @@ DbAddDel::DbAddDel()
   m_allow_view(true),
   m_allow_view_details(false),
   m_treeviewcolumn_button(0),
-  m_fixed_cell_height(0)
+  m_fixed_cell_height(0),
+  m_rows_count_min(0),
+  m_rows_count_max(0)
 {
   set_prevent_user_signals();
   set_ignore_treeview_signals(true);
@@ -84,7 +86,7 @@ DbAddDel::DbAddDel()
   m_TreeView.show();
 
   //Make sure that the TreeView doesn't start out only big enough for zero items.
-  set_height_rows(5);
+  set_height_rows(6, 6);
 
   //Allow the user to change the column order:
   //m_TreeView.set_column_drag_function( sigc::mem_fun(*this, &DbAddDel::on_treeview_column_drop) );
@@ -123,10 +125,18 @@ DbAddDel::~DbAddDel()
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 }
 
-void DbAddDel::set_height_rows(guint rows)
+void DbAddDel::set_height_rows(gulong rows_count_min, gulong rows_count_max)
+{
+  m_rows_count_min = rows_count_min;
+  m_rows_count_max = rows_count_max;
+
+  set_height_rows_actual(m_rows_count_min);
+}
+
+void DbAddDel::set_height_rows_actual(gulong rows_count)
 {
   //TODO: File a bug about API for this in GtkTreeView.
-  const guint height_for_rows = rows * get_fixed_cell_height();
+  const guint height_for_rows = rows_count * get_fixed_cell_height();
   //std::cout << "debug: height_for_rows = " << height_for_rows << std::endl;
   const guint extra_for_treeview = 50; //TODO: Find some way to guess this.
   m_ScrolledWindow.set_min_content_height(height_for_rows + extra_for_treeview);
@@ -764,6 +774,21 @@ void DbAddDel::construct_specified_columns()
 
   //Make sure there's a blank row after the database rows that have just been added.
   //add_blank();
+
+  //Adjust the number of rows to show.
+  //This can change the amount of height requested for the widget.
+  //Show as many rows as needed, but not more than the maximum:
+  gulong total = 0; //ignored
+  gulong db_rows_count_found = 0;
+  Glib::RefPtr<DbTreeModel> refModelDerived = Glib::RefPtr<DbTreeModel>::cast_dynamic(m_refListStore);
+  if(refModelDerived)
+    refModelDerived->get_record_counts(total, db_rows_count_found);
+  
+  //+1 for the empty row:
+  gulong rows_count = std::min(m_rows_count_max,  db_rows_count_found + 1);
+  //Do not use less than the minimum:
+  rows_count = std::max(rows_count, m_rows_count_min);
+  set_height_rows_actual(rows_count);
 }
 
 bool DbAddDel::refresh_from_database()
diff --git a/glom/mode_data/db_adddel/db_adddel.h b/glom/mode_data/db_adddel/db_adddel.h
index e4abb82..541069f 100644
--- a/glom/mode_data/db_adddel/db_adddel.h
+++ b/glom/mode_data/db_adddel/db_adddel.h
@@ -258,8 +258,10 @@ public:
   bool start_new_record();
   
   /** Request a height for this widget, based on the number of rows to show.
+   * The widget will change its requested height if it is filled with enough 
+   * data to need more than the @a rows_count_min, if @a rows_count_max allows that.
    */
-  void set_height_rows(guint rows);
+  void set_height_rows(gulong rows_count_min, gulong rows_count_max);
 
 private:
 
@@ -489,11 +491,16 @@ private:
   void user_changed(const Gtk::TreeModel::iterator& row, guint col);
   void user_requested_delete(const Gtk::TreeModel::iterator& rowStart, const Gtk::TreeModel::iterator&  /* rowEnd TODO */);
 
+  void set_height_rows_actual(gulong rows_count);
+
   //TODO_refactor: Make some other methods private too.
   /** Get an iterator to the blank row in which the user should add data for the new row.
    * You can then add the row to your underlying data store when some data has been filled, by handling signal_user_changed.
    */
   Gtk::TreeModel::iterator get_item_placeholder(); //Return index of the placeholder row.
+
+  gulong m_rows_count_min;
+  gulong m_rows_count_max;
 };
 
 } //namespace Glom
diff --git a/glom/mode_design/layout/dialog_layout_details.cc b/glom/mode_design/layout/dialog_layout_details.cc
index 6c81370..0d103b0 100644
--- a/glom/mode_design/layout/dialog_layout_details.cc
+++ b/glom/mode_design/layout/dialog_layout_details.cc
@@ -59,7 +59,8 @@ Dialog_Layout_Details::Dialog_Layout_Details(BaseObjectType* cobject, const Glib
   m_button_edit(0),
   m_label_table_name(0),
   m_hbox_rows_count(0),
-  m_spinbutton_rows_count(0)
+  m_spinbutton_rows_count_min(0),
+  m_spinbutton_rows_count_max(0)
 {
   // Get the alternate sets of widgets, only one of which should be shown:
   // Derived classes will hide one and show the other:
@@ -80,7 +81,8 @@ Dialog_Layout_Details::Dialog_Layout_Details(BaseObjectType* cobject, const Glib
   
   //This is only shown in Dialog_Layout_List_Related:
   builder->get_widget("hbox_rows_count", m_hbox_rows_count);
-  builder->get_widget("spinbutton_rows_count", m_spinbutton_rows_count);
+  builder->get_widget("spinbutton_rows_count_min", m_spinbutton_rows_count_min);
+  builder->get_widget("spinbutton_rows_count_max", m_spinbutton_rows_count_max);
   m_hbox_rows_count->hide();
   
   builder->get_widget("treeview_fields", m_treeview_fields);
diff --git a/glom/mode_design/layout/dialog_layout_details.h b/glom/mode_design/layout/dialog_layout_details.h
index 384c63f..001e559 100644
--- a/glom/mode_design/layout/dialog_layout_details.h
+++ b/glom/mode_design/layout/dialog_layout_details.h
@@ -123,7 +123,8 @@ protected:
   Gtk::Label* m_label_table_name;
   
   Gtk::Box* m_hbox_rows_count;
-  Gtk::SpinButton* m_spinbutton_rows_count;
+  Gtk::SpinButton* m_spinbutton_rows_count_min;
+  Gtk::SpinButton* m_spinbutton_rows_count_max;
 
   Glib::RefPtr<TreeStore_Layout> m_model_items;
 };
diff --git a/glom/mode_design/layout/dialog_layout_list_related.cc b/glom/mode_design/layout/dialog_layout_list_related.cc
index 9ad97a9..a3ef120 100644
--- a/glom/mode_design/layout/dialog_layout_list_related.cc
+++ b/glom/mode_design/layout/dialog_layout_list_related.cc
@@ -56,9 +56,13 @@ Dialog_Layout_List_Related::Dialog_Layout_List_Related(BaseObjectType* cobject,
   m_box_related_navigation->show();
   m_hbox_rows_count->show();
   
-  m_spinbutton_rows_count->set_range(0, 100); //Otherwise only 0 would be allowed.
-  m_spinbutton_rows_count->set_increments(1, 10); //Otherwise the buttons do nothing.
-  m_spinbutton_rows_count->signal_value_changed().connect(
+  m_spinbutton_rows_count_min->set_range(0, 100); //Otherwise only 0 would be allowed.
+  m_spinbutton_rows_count_min->set_increments(1, 10); //Otherwise the buttons do nothing.
+  m_spinbutton_rows_count_min->signal_value_changed().connect(
+    sigc::mem_fun(*this, &Dialog_Layout_List_Related::on_spinbutton_changed));
+  m_spinbutton_rows_count_max->set_range(0, 100); //Otherwise only 0 would be allowed.
+  m_spinbutton_rows_count_max->set_increments(1, 10); //Otherwise the buttons do nothing.
+  m_spinbutton_rows_count_max->signal_value_changed().connect(
     sigc::mem_fun(*this, &Dialog_Layout_List_Related::on_spinbutton_changed));
 
   builder->get_widget_derived("combo_relationship_name", m_combo_relationship);
@@ -129,8 +133,12 @@ void Dialog_Layout_List_Related::set_document(const Glib::ustring& layout_name,
     m_portal = glom_sharedptr_clone(portal);
   else
     m_portal = sharedptr<LayoutItem_Portal>::create(); //The rest of the class assumes that this is not null.
-    
-  m_spinbutton_rows_count->set_value( m_portal->get_rows_count() );
+
+  gulong rows_count_min = 0;
+  gulong rows_count_max = 0;
+  m_portal->get_rows_count(rows_count_min, rows_count_max);
+  m_spinbutton_rows_count_min->set_value(rows_count_min);
+  m_spinbutton_rows_count_max->set_value(rows_count_max);
 
   type_vecConstLayoutFields empty_fields; //Just to satisfy the base class.
   Dialog_Layout::set_document(layout_name, layout_platform, document, actual_from_table, empty_fields);
@@ -354,7 +362,9 @@ void Dialog_Layout_List_Related::save_to_document()
       m_portal->set_navigation_type(LayoutItem_Portal::NAVIGATION_NONE);
     }
     
-    m_portal->set_rows_count( m_spinbutton_rows_count->get_value() );
+    m_portal->set_rows_count(
+      m_spinbutton_rows_count_min->get_value(),
+      m_spinbutton_rows_count_max->get_value());
     
     if(m_for_print_layout)
     {
diff --git a/glom/print_layout/print_layout_utils.cc b/glom/print_layout/print_layout_utils.cc
index e913b5a..8312163 100644
--- a/glom/print_layout/print_layout_utils.cc
+++ b/glom/print_layout/print_layout_utils.cc
@@ -116,9 +116,11 @@ static void create_standard(const sharedptr<const LayoutGroup>& layout_group, co
     portal_clone->set_print_layout_row_height(field_height); //Otherwise it will be 0, which is useless.
 
     double height = ITEM_HEIGHT;
-    const double rows_count = portal->get_rows_count();
-    if(rows_count)
-      height = ITEM_HEIGHT * rows_count;
+    gulong rows_count_min = 0;
+    gulong rows_count_max = 0;
+    portal->get_rows_count(rows_count_min, rows_count_max);
+    if(rows_count_min)
+      height = ITEM_HEIGHT * rows_count_min; //TODO: Expand to max when necessary.
 
     portal_clone->set_print_layout_position(x, y, item_width, height); //TODO: Enough and no more.
     y += height + gap; //padding.
diff --git a/ui/developer/window_data_layout.glade b/ui/developer/window_data_layout.glade
index b3ec220..7bc13d7 100644
--- a/ui/developer/window_data_layout.glade
+++ b/ui/developer/window_data_layout.glade
@@ -1089,7 +1089,7 @@
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Number of rows to show:</property>
+                <property name="label" translatable="yes">Minimum number of rows:</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -1098,9 +1098,10 @@
               </packing>
             </child>
             <child>
-              <object class="GtkSpinButton" id="spinbutton_rows_count">
+              <object class="GtkSpinButton" id="spinbutton_rows_count_min">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="tooltip_text" translatable="yes">Show at least this many rows.</property>
                 <property name="invisible_char">â</property>
                 <property name="invisible_char_set">True</property>
                 <property name="primary_icon_activatable">False</property>
@@ -1112,6 +1113,34 @@
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Maximum number of rows:</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="spinbutton_rows_count_max">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="tooltip_text" translatable="yes">Show no more than this many rows.</property>
+                <property name="invisible_char">â</property>
+                <property name="invisible_char_set">True</property>
+                <property name="primary_icon_activatable">False</property>
+                <property name="secondary_icon_activatable">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</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]