aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEduardo Silva <edsiper@gmail.com>2011-05-19 08:38:25 -0400
committerMichal Marek <mmarek@suse.cz>2011-05-24 15:41:51 +0200
commit6ef3d36eee2a5593e31f9f77b4aa992024838ff7 (patch)
tree83a3937fe412f78377359203e795e2faaa4933b9 /scripts
parent2626e674021c28250874a68f47b0f4759fcf63db (diff)
gconfig: Hide unused left treeview when start up the interface
When the gconfig program starts in full mode view, it shows the left treeview which belongs to the 'split mode view'. The patch fix this visual issue. Signed-off-by: Eduardo Silva <edsiper@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/gconf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 0c8db7d63c2..a11d5f7b9ee 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -756,7 +756,6 @@ void on_load_clicked(GtkButton * button, gpointer user_data)
void on_single_clicked(GtkButton * button, gpointer user_data)
{
view_mode = SINGLE_VIEW;
- gtk_paned_set_position(GTK_PANED(hpaned), 0);
gtk_widget_hide(tree1_w);
current = &rootmenu;
display_tree_part();
@@ -782,7 +781,6 @@ void on_split_clicked(GtkButton * button, gpointer user_data)
void on_full_clicked(GtkButton * button, gpointer user_data)
{
view_mode = FULL_VIEW;
- gtk_paned_set_position(GTK_PANED(hpaned), 0);
gtk_widget_hide(tree1_w);
if (tree2)
gtk_tree_store_clear(tree2);
@@ -1444,6 +1442,12 @@ static void display_tree(struct menu *menu)
if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
|| (view_mode == FULL_VIEW)
|| (view_mode == SPLIT_VIEW))*/
+
+ /* Change paned position if the view is not in 'split mode' */
+ if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) {
+ gtk_paned_set_position(GTK_PANED(hpaned), 0);
+ }
+
if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT))
|| (view_mode == FULL_VIEW)
|| (view_mode == SPLIT_VIEW)) {