From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pierre-Charles David Newsgroups: gmane.emacs.devel Subject: Re: GTK file selector Date: Fri, 16 Dec 2005 19:53:23 +0100 Message-ID: <1134759204.9530.6.camel@localhost.localdomain> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1134768771 10587 80.91.229.2 (16 Dec 2005 21:32:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2005 21:32:51 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 16 22:32:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EnNA8-0007yt-73 for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2005 22:30:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EnNAq-0002dA-9u for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2005 16:31:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EnKie-0003FU-Bf for emacs-devel@gnu.org; Fri, 16 Dec 2005 13:54:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EnKib-0003Ez-UO for emacs-devel@gnu.org; Fri, 16 Dec 2005 13:54:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EnKiY-0003Ek-Pi for emacs-devel@gnu.org; Fri, 16 Dec 2005 13:54:11 -0500 Original-Received: from [193.252.22.23] (helo=smtp8.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EnKl1-0007bf-JZ for emacs-devel@gnu.org; Fri, 16 Dec 2005 13:56:43 -0500 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0802.wanadoo.fr (SMTP Server) with ESMTP id EE9A01C0020F for ; Fri, 16 Dec 2005 19:53:24 +0100 (CET) Original-Received: from [192.168.1.100] (AGrenoble-152-1-49-98.w82-122.abo.wanadoo.fr [82.122.133.98]) by mwinf0802.wanadoo.fr (SMTP Server) with ESMTP id 2C1441C0020C for ; Fri, 16 Dec 2005 19:53:24 +0100 (CET) X-ME-UUID: 20051216185324180.2C1441C0020C@mwinf0802.wanadoo.fr Original-To: emacs-devel@gnu.org X-Mailer: Evolution 2.4.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:47892 Archived-At: > These sound like reasonable features. What is missing is something > to give the user a clue to them. The Gtk+ file chooser supports the addition of arbitrary widgets, which are shown below the file list. One could use a toggle button to make the "Show hidden files" feature visible: toggle = gtk_check_button_new_with_label ("Show hidden files."); gtk_widget_show (toggle); gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), toggle); g_signal_connect (G_OBJECT (toggle_button), "clicked", G_CALLBACK (toggle_visibility), G_OBJECT(dialog)); with: static void toggle_visibility(GtkWidget *widget, gpointer data) { GtkFileChooser *dialog = GTK_FILE_CHOOSER(data); gboolean visible = ! gtk_file_chooser_get_show_hidden(dialog); gtk_file_chooser_set_show_hidden(dialog, visible); } The default visibility state could also be exposed as an Emacs configuration variable.