[gtk+/places-sidebar] Present error dialogs from the places sidebar



commit 61a9a46bcef0e77e492761c2dbc659dcfb87ed76
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Oct 22 17:52:27 2012 -0500

    Present error dialogs from the places sidebar

 gtk/gtkfilechooserdefault.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 90baa84..2b98846 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -3771,6 +3771,16 @@ places_sidebar_location_selected_cb (GtkPlacesSidebar *sidebar, GFile *location,
   change_folder_and_display_error (impl, location, clear_entry);
 }
 
+/* Callback used when the places sidebar needs us to display an error message */
+static void
+places_sidebar_show_error_message_cb (GtkPlacesSidebar *sidebar,
+				      const char       *primary,
+				      const char       *secondary,
+				      GtkFileChooserDefault *impl)
+{
+  error_message (impl, primary, secondary);
+}
+
 /* Creates the widgets for the shortcuts/bookmarks pane */
 static GtkWidget *
 shortcuts_pane_create (GtkFileChooserDefault *impl,
@@ -3781,6 +3791,9 @@ shortcuts_pane_create (GtkFileChooserDefault *impl,
   g_signal_connect (impl->places_sidebar, "location-selected",
 		    G_CALLBACK (places_sidebar_location_selected_cb),
 		    impl);
+  g_signal_connect (impl->places_sidebar, "show-error-message",
+		    G_CALLBACK (places_sidebar_show_error_message_cb),
+		    impl);
 
   return impl->places_sidebar;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]