[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara caolanm at redhat.com
Tue Oct 21 07:19:15 PDT 2014


 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx |   28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)

New commits:
commit 6b398581f387dd98e02d709dbdc8000e6ce4deb1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 21 15:18:35 2014 +0100

    Resolves: fdo#33598 don't show filter list any more
    
    Change-Id: I4100600455f1cc48c6d8957dacfe232192895e50

diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index c5b43b2..7837962 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -239,22 +239,6 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
     gtk_container_add (GTK_CONTAINER (m_pFilterExpander), scrolled_window);
     gtk_widget_show (scrolled_window);
 
-    OString sExpand(getenv("SAL_EXPANDFPICKER"));
-    sal_Int32 nExpand  = sExpand.toInt32();
-    switch (nExpand)
-    {
-        default:
-        case 0:
-            break;
-        case 1:
-            gtk_expander_set_expanded(GTK_EXPANDER(m_pFilterExpander), true);
-            break;
-        case 2:
-            expandexpanders(GTK_CONTAINER(m_pDialog));
-            gtk_expander_set_expanded(GTK_EXPANDER(m_pFilterExpander), true);
-            break;
-    }
-
     m_pFilterStore = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_STRING,
         G_TYPE_STRING, G_TYPE_STRING);
     m_pFilterView = gtk_tree_view_new_with_model (GTK_TREE_MODEL(m_pFilterStore));
@@ -1339,9 +1323,7 @@ throw( uno::RuntimeException, std::exception )
 
     GtkWidget *pWidget;
 
-    if ( nControlId == ExtendedFilePickerElementIds::LISTBOX_FILTER_SELECTOR )
-        gtk_expander_set_expanded( GTK_EXPANDER( m_pFilterExpander ), bEnable );
-    else if( ( pWidget = getWidget( nControlId ) ) )
+    if ( ( pWidget = getWidget( nControlId ) ) )
     {
         if( bEnable )
         {
@@ -1971,11 +1953,9 @@ void SalGtkFilePicker::SetFilters()
         }
     }
 
-    // Hide the expander if there's no choice to be made there
-    if (gtk_tree_model_iter_n_children(GTK_TREE_MODEL(m_pFilterStore), NULL) > 1)
-        gtk_widget_show( m_pFilterExpander );
-    else
-        gtk_widget_hide( m_pFilterExpander );
+    // We always hide the expander now and depend on the user using the glob
+    // list, or type a filename suffix, to select a filter by inference.
+    gtk_widget_hide(m_pFilterExpander);
 
     // set the default filter
     if (!sPseudoFilter.isEmpty())


More information about the Libreoffice-commits mailing list