From 61a9a46bcef0e77e492761c2dbc659dcfb87ed76 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 22 Oct 2012 17:52:27 -0500 Subject: [PATCH] Present error dialogs from the places sidebar --- gtk/gtkfilechooserdefault.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 90baa8471b..2b98846746 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; }