[Xfce4-commits] <midori:master> Tweak last_folder handling to avoid warnings

Christian Dywan noreply at xfce.org
Mon Nov 21 03:14:03 CET 2011


Updating branch refs/heads/master
         to c60a9d220a731abc37b80cfded22acb4655a48a5 (commit)
       from 0d2a6cd72f2297744be04ff4429ed4e693b2674d (commit)

commit c60a9d220a731abc37b80cfded22acb4655a48a5
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Nov 20 22:19:08 2011 +0100

    Tweak last_folder handling to avoid warnings

 midori/midori-browser.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 4aea650..f93a66c 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -2251,9 +2251,9 @@ _action_open_activate (GtkAction*     action,
 {
     #if !GTK_CHECK_VERSION (3, 1, 10)
     static gchar* last_dir = NULL;
+    gboolean folder_set = FALSE;
     #endif
     gchar* uri = NULL;
-    gboolean folder_set = FALSE;
     GtkWidget* dialog;
     GtkWidget* view;
 
@@ -2274,7 +2274,9 @@ _action_open_activate (GtkAction*     action,
              if (dirname && g_file_test (dirname, G_FILE_TEST_IS_DIR))
              {
                  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), dirname);
+                 #if !GTK_CHECK_VERSION (3, 1, 10)
                  folder_set = TRUE;
+                 #endif
              }
 
              g_free (dirname);
@@ -2289,16 +2291,15 @@ _action_open_activate (GtkAction*     action,
 
      if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
      {
+         #if !GTK_CHECK_VERSION (3, 1, 10)
          gchar* folder;
-
          folder = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dialog));
+         katze_assign (last_dir, folder);
+         #endif
          uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
          midori_browser_set_current_uri (browser, uri);
          g_free (uri);
 
-         #if !GTK_CHECK_VERSION (3, 1, 10)
-         katze_assign (last_dir, folder);
-         #endif
      }
     gtk_widget_destroy (dialog);
 }


More information about the Xfce4-commits mailing list