From patchwork Thu May 19 12:38:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Silva X-Patchwork-Id: 797512 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4JCcTbE017245 for ; Thu, 19 May 2011 12:38:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932472Ab1ESMi3 (ORCPT ); Thu, 19 May 2011 08:38:29 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:57428 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932401Ab1ESMi2 (ORCPT ); Thu, 19 May 2011 08:38:28 -0400 Received: by pvg12 with SMTP id 12so1165565pvg.19 for ; Thu, 19 May 2011 05:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=cN6j//EuuYkPxyFceAFGddY0HLmkz1Oe2T0+fqarr+k=; b=gkLgji2kBhCqYXJPtqJdR6KnY1UYmZJ65ucrb2b1+CbSTKUR+pS0FjzADNsCRw+sMY raVLLjdmV6zC+QSEINakmywi5l8IaECmilKrfVZ9wFRg/gc+pvQIGh07T/Zdj6auWLI3 +QIgpfqgr7trHrcVMoe4/NaVoCCHPheo5eR9Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=UmdrBCRzkWjGqNoQrjgh/q7to7H4SBowzgeBm+tfzahUVbXabqwB5AANo5eYyhzjQg KZE4YippqGnwkyyk8uHaKuBwTj31EJT8439zgTTEpDDgylyOuL2IuWK7qiDCtnU1hBH1 YwCLXcww0d8Mi9SaUFJuDbXzvEhmoH8QIBqo8= Received: by 10.68.49.73 with SMTP id s9mr4582146pbn.117.1305808708197; Thu, 19 May 2011 05:38:28 -0700 (PDT) Received: from [10.20.0.102] (pc-200-3-214-201.cm.vtr.net [201.214.3.200]) by mx.google.com with ESMTPS id x4sm1727891pbr.71.2011.05.19.05.38.26 (version=SSLv3 cipher=OTHER); Thu, 19 May 2011 05:38:27 -0700 (PDT) Subject: [PATCH 2/2] gconfig: Hide unused left treeview when start up the interface From: Eduardo Silva To: Roman Zippel Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 19 May 2011 08:38:25 -0400 Message-ID: <1305808705.11775.4.camel@monotop> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 19 May 2011 12:38:29 +0000 (UTC) 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 --- scripts/kconfig/gconf.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 0c8db7d..52d14bf 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)) {