Update of /cvsroot/audacity/lib-src/FileDialog/gtk
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv3019/gtk

Modified Files:
        FileDialog.hpp 
Log Message:

The native GTK dialog is back...this time fully expanded.


Index: FileDialog.hpp
===================================================================
RCS file: /cvsroot/audacity/lib-src/FileDialog/gtk/FileDialog.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- FileDialog.hpp      10 Apr 2007 02:22:21 -0000      1.2
+++ FileDialog.hpp      11 Apr 2007 00:05:54 -0000      1.3
@@ -38,6 +38,25 @@
 extern void wxapp_install_idle_handler();
 
 //-----------------------------------------------------------------------------
+// Open expanders on the dialog (really only the "Browser for other folders")
+//-----------------------------------------------------------------------------
+
+extern "C" {
+
+static void SetExpanded(GtkWidget *widget, gpointer data)
+{
+    if (GTK_IS_EXPANDER(widget)) {
+        gtk_expander_set_expanded(GTK_EXPANDER(widget), true);
+    }
+    else if (GTK_IS_CONTAINER(widget)) {
+        gtk_container_forall(GTK_CONTAINER(widget), SetExpanded, data);
+    }
+
+    return;
+}
+}
+
+//-----------------------------------------------------------------------------
 // "clicked" for OK-button
 //-----------------------------------------------------------------------------
 
@@ -268,11 +287,17 @@
 {
     if ( !m_buttonlabel.IsEmpty() )
     {
-        GtkWidget *btn;
-        btn = gtk_button_new_with_label(wxGTK_CONV(m_buttonlabel));
-        gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(m_widget), btn);
-        g_signal_connect(G_OBJECT(btn), "clicked",
+        GtkWidget *widget;
+        wxString label = m_buttonlabel;
+
+        label.Replace(wxT("&"), wxT("_"));
+
+        widget = gtk_button_new_with_mnemonic(wxGTK_CONV(label));
+        gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(m_widget), widget);
+        g_signal_connect(G_OBJECT(widget), "clicked",
             GTK_SIGNAL_FUNC(gtk_filedialog_extra_callback), (gpointer)this);
+
+        gtk_container_forall(GTK_CONTAINER(m_widget), SetExpanded, NULL);
     }
 
 #if defined(__WXGTK24__) && (!defined(__WXGPE__))


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to