[PATCH 4/4] Relax the fixed minimum sizes preventing shrinking



Hello,

Here I went through all the places that were setting default minimum
widget sizes to put these default minimum sizes to zero.  I am
wondering if I shouldn't just remove the ability for the (power) user
to set minimum sizes via {d,g}conf altogether.

Here is what I have committed to master for now.  I'll probably apply
it to gtk2-branch as well once I tested it there.

Thanks.

From: Dodji Seketeli <dodji gnome org>
Date: Sun, 25 Sep 2011 12:06:30 +0200
Subject: [PATCH 4/4] Relax the fixed minimum sizes preventing shrinking

	* data/schemas/gconf/nemiver-workbench.schemas
	(/apps/nemiver/workbench/window-minimum-width)
	(/apps/nemiver/workbench/window-minimum-height)
	(/apps/nemiver/dbgperspective/status-widget-minimum-width)
	(/apps/nemiver/dbgperspective/status-widget-minimum-height): Set these keys to
	zero.
	* data/schemas/gsettings/org.nemiver.gschema.xml
	(window-minimum-width, window-minimum-height)
	(status-widget-minimum-width, status-widget-minimum-height):
	Likewise.
	* src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc
	(DBGPerspectiveDefaultLayout::do_lay_out): Set the default minimum
	status widget size to zero.
	* src/persp/dbgperspective/nmv-dbg-perspective-two-pane-layout.cc
	(DBGPerspectiveTwoPaneLayout::do_lay_out): Set the default minimal
	size of the two status notebooks to zero.
	* src/persp/dbgperspective/nmv-dbg-perspective-wide-layout.cc
	(DBGPerspectiveWideLayout::do_lay_out):  Set the default minimal
	size of the status widget to zero.
	* src/persp/dbgperspective/nmv-dbg-perspective-dynamic-layout.cc
	(DBGPerspectiveDynamicLayout::add_view): Set the default minimal
	size of the terminal to zero.
	* src/workbench/nmv-workbench.cc (Workbench::init_window): Set the
	default minimum window size of Nemiver to zero.
---
 data/schemas/gconf/nemiver-dbgperspective.schemas  |    4 ++--
 data/schemas/gconf/nemiver-workbench.schemas       |    4 ++--
 data/schemas/gsettings/org.nemiver.gschema.xml     |    8 ++++----
 .../nmv-dbg-perspective-default-layout.cc          |    2 +-
 .../nmv-dbg-perspective-dynamic-layout.cc          |    4 ++--
 .../nmv-dbg-perspective-two-pane-layout.cc         |    2 +-
 .../nmv-dbg-perspective-wide-layout.cc             |    2 +-
 src/workbench/nmv-workbench.cc                     |    5 -----
 8 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/data/schemas/gconf/nemiver-dbgperspective.schemas b/data/schemas/gconf/nemiver-dbgperspective.schemas
index 05d3c06..3e519a3 100644
--- a/data/schemas/gconf/nemiver-dbgperspective.schemas
+++ b/data/schemas/gconf/nemiver-dbgperspective.schemas
@@ -129,7 +129,7 @@
       <applyto>/apps/nemiver/dbgperspective/status-widget-minimum-width</applyto>
       <owner>nemiver</owner>
       <type>int</type>
-      <default>100</default>
+      <default>0</default>
       <locale name="C">
 	<short>The minimum width of the status widget</short>
 	<long>The minimum width of the status widget</long>
@@ -140,7 +140,7 @@
       <applyto>/apps/nemiver/dbgperspective/status-widget-minimum-height</applyto>
       <owner>nemiver</owner>
       <type>int</type>
-      <default>70</default>
+      <default>0</default>
       <locale name="C">
 	<short>The minimum height of the status widget</short>
 	<long>The minimum height of the status widget</long>
diff --git a/data/schemas/gconf/nemiver-workbench.schemas b/data/schemas/gconf/nemiver-workbench.schemas
index cd3825c..095843e 100644
--- a/data/schemas/gconf/nemiver-workbench.schemas
+++ b/data/schemas/gconf/nemiver-workbench.schemas
@@ -61,7 +61,7 @@
       <applyto>/apps/nemiver/workbench/window-minimum-width</applyto>
       <owner>nemiver</owner>
       <type>int</type>
-      <default>700</default>
+      <default>0</default>
       <locale name="C">
 	<short>window minim width</short>
 	<long>The workbench main window minium width.</long>
@@ -72,7 +72,7 @@
       <applyto>/apps/nemiver/workbench/window-minimum-height</applyto>
       <owner>nemiver</owner>
       <type>int</type>
-      <default>500</default>
+      <default>0</default>
       <locale name="C">
 	<short>window minimum height</short>
 	<long>The workbench main window minium height.</long>
diff --git a/data/schemas/gsettings/org.nemiver.gschema.xml b/data/schemas/gsettings/org.nemiver.gschema.xml
index fb02098..ff2bdcd 100644
--- a/data/schemas/gsettings/org.nemiver.gschema.xml
+++ b/data/schemas/gsettings/org.nemiver.gschema.xml
@@ -67,13 +67,13 @@
     </key>
 
     <key name="status-widget-minimum-width" type="i">
-      <default>100</default>
+      <default>0</default>
       <summary>The minimum width of the status widget</summary>
       <description>The minimum width of the status widget.</description>
     </key>
 
     <key name="status-widget-minimum-height" type="i">
-      <default>70</default>
+      <default>0</default>
       <summary>The minimum height of the status widget</summary>
       <description>The minimum height of the status widget.</description>
     </key>
@@ -193,13 +193,13 @@
     </key>
 
     <key name="window-minimum-width" type="i">
-      <default>700</default>
+      <default>0</default>
       <summary>window minim width</summary>
       <description>The workbench main window minium width.</description>
     </key>
 
     <key name="window-minimum-height" type="i">
-      <default>500</default>
+      <default>0</default>
       <summary>window minimum height</summary>
       <description>The workbench main window minium height.</description>
     </key>
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc b/src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc
index ba5a7c5..05f7619 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc
@@ -99,7 +99,7 @@ DBGPerspectiveDefaultLayout::do_lay_out (IPerspective &a_perspective)
     m_priv->body_main_paned->pack1
         (m_priv->dbg_perspective.get_source_view_widget (), true, true);
 
-    int width=100, height=70;
+    int width = 0, height = 0;
 
     NEMIVER_TRY
     conf_mgr.get_key_value (CONF_KEY_STATUS_WIDGET_MINIMUM_WIDTH, width);
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective-dynamic-layout.cc b/src/persp/dbgperspective/nmv-dbg-perspective-dynamic-layout.cc
index 70a823a..796549a 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective-dynamic-layout.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective-dynamic-layout.cc
@@ -253,8 +253,8 @@ DBGPerspectiveDynamicLayout::add_view (Gtk::Widget &a_widget,
     if (a_index == TARGET_TERMINAL_VIEW_INDEX) {
 #endif // WITH_MEMORYVIEW
         IConfMgr &conf_mgr = m_priv->dbg_perspective.get_conf_mgr ();
-        int width = 100;
-        int height = 70;
+        int width = 0;
+        int height = 0;
 
         NEMIVER_TRY
         conf_mgr.get_key_value (CONF_KEY_STATUS_WIDGET_MINIMUM_WIDTH, width);
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective-two-pane-layout.cc b/src/persp/dbgperspective/nmv-dbg-perspective-two-pane-layout.cc
index f6bda48..deb0e27 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective-two-pane-layout.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective-two-pane-layout.cc
@@ -139,7 +139,7 @@ DBGPerspectiveTwoPaneLayout::do_lay_out (IPerspective &a_perspective)
         (m_priv->dbg_perspective.get_source_view_widget (), true, true);
     m_priv->horizontal_paned->pack2 (*m_priv->vertical_statuses_notebook);
 
-    int width=100, height=70;
+    int width = 0, height = 0;
 
     NEMIVER_TRY
     conf_mgr.get_key_value (CONF_KEY_STATUS_WIDGET_MINIMUM_WIDTH, width);
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective-wide-layout.cc b/src/persp/dbgperspective/nmv-dbg-perspective-wide-layout.cc
index cdf4828..72370ae 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective-wide-layout.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective-wide-layout.cc
@@ -96,7 +96,7 @@ DBGPerspectiveWideLayout::do_lay_out (IPerspective &a_perspective)
     m_priv->body_main_paned->pack1
         (m_priv->dbg_perspective.get_source_view_widget (), true, true);
 
-    int width=100, height=70;
+    int width = 0, height = 0;
 
     NEMIVER_TRY
     conf_mgr.get_key_value (CONF_KEY_STATUS_WIDGET_MINIMUM_WIDTH, width);
diff --git a/src/workbench/nmv-workbench.cc b/src/workbench/nmv-workbench.cc
index 8a7b72c..e82c13d 100644
--- a/src/workbench/nmv-workbench.cc
+++ b/src/workbench/nmv-workbench.cc
@@ -644,11 +644,6 @@ Workbench::init_window ()
     conf_mgr->get_key_value (CONF_KEY_NEMIVER_WINDOW_MINIMUM_HEIGHT, height);
     NEMIVER_CATCH
 
-    if (!width)
-        width = 700;
-    if (!height)
-        height = 500;
-
     m_priv->root_window->set_size_request (width, height);
     LOG_DD ("set windows min size to ("
             << (int) width
-- 
1.7.6.2


-- 
		Dodji


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