Skip to content

Commit 6ef3d36

Browse files
edsipermichal42
authored andcommitted
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>
1 parent 2626e67 commit 6ef3d36

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎scripts/kconfig/gconf.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,6 @@ void on_load_clicked(GtkButton * button, gpointer user_data)
756756
void on_single_clicked(GtkButton * button, gpointer user_data)
757757
{
758758
view_mode = SINGLE_VIEW;
759-
gtk_paned_set_position(GTK_PANED(hpaned), 0);
760759
gtk_widget_hide(tree1_w);
761760
current = &rootmenu;
762761
display_tree_part();
@@ -782,7 +781,6 @@ void on_split_clicked(GtkButton * button, gpointer user_data)
782781
void on_full_clicked(GtkButton * button, gpointer user_data)
783782
{
784783
view_mode = FULL_VIEW;
785-
gtk_paned_set_position(GTK_PANED(hpaned), 0);
786784
gtk_widget_hide(tree1_w);
787785
if (tree2)
788786
gtk_tree_store_clear(tree2);
@@ -1444,6 +1442,12 @@ static void display_tree(struct menu *menu)
14441442
if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
14451443
|| (view_mode == FULL_VIEW)
14461444
|| (view_mode == SPLIT_VIEW))*/
1445+
1446+
/* Change paned position if the view is not in 'split mode' */
1447+
if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) {
1448+
gtk_paned_set_position(GTK_PANED(hpaned), 0);
1449+
}
1450+
14471451
if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT))
14481452
|| (view_mode == FULL_VIEW)
14491453
|| (view_mode == SPLIT_VIEW)) {

0 commit comments

Comments
 (0)