From e5812d047892b6ad2079a866ca548996fe9c425a Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 15 Sep 2009 21:04:29 +0200 Subject: [PATCH] Don't connect to a monitor that wasn't created in the first place --- panels/midori-addons.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/panels/midori-addons.c b/panels/midori-addons.c index cd2d057a..db30288c 100644 --- a/panels/midori-addons.c +++ b/panels/midori-addons.c @@ -917,14 +917,15 @@ midori_addons_new (MidoriAddonKind kind, monitor = g_file_monitor_directory (directory, G_FILE_MONITOR_NONE, NULL, &error); - if (!monitor) + if (monitor) + g_signal_connect (monitor, "changed", + G_CALLBACK (midori_addons_directory_monitor_changed), addons); + else { - g_warning ("could not monitor %s: %s", g_file_get_parse_name (directory), - error->message); + g_warning (_("Can't monitor folder '%s': %s"), + g_file_get_parse_name (directory), error->message); g_error_free (error); } - g_signal_connect (monitor, "changed", - G_CALLBACK (midori_addons_directory_monitor_changed), addons); g_object_unref (directory); } g_slist_free (list); -- 2.39.5