[Goodies-commits] r5204 - in thunar-shares-plugin/trunk: . libshares thunar-plugin
Daniel Morales
danielm at xfce.org
Wed Aug 6 02:05:30 CEST 2008
Author: danielm
Date: 2008-08-06 00:05:30 +0000 (Wed, 06 Aug 2008)
New Revision: 5204
Modified:
thunar-shares-plugin/trunk/ChangeLog
thunar-shares-plugin/trunk/libshares/shares.c
thunar-shares-plugin/trunk/libshares/shares.h
thunar-shares-plugin/trunk/thunar-plugin/thunar-shares-plugin.c
Log:
Ensure the shares-tables are freed when shutting down the plugin
Modified: thunar-shares-plugin/trunk/ChangeLog
===================================================================
--- thunar-shares-plugin/trunk/ChangeLog 2008-08-05 22:52:50 UTC (rev 5203)
+++ thunar-shares-plugin/trunk/ChangeLog 2008-08-06 00:05:30 UTC (rev 5204)
@@ -1,3 +1,9 @@
+2008-08-05 Daniel Morales <daniel at daniel.com.uy>
+
+ * libshares/share.[ch]:
+ * thunar-plugin/thunar-shares-plugin.c: Free shares tables when
+ shutting down the plugin.
+
2008-08-01 Daniel Morales <daniel at daniel.com.uy>
* libshares/share.c: Avoid verbose logging by default. Now using
Modified: thunar-shares-plugin/trunk/libshares/shares.c
===================================================================
--- thunar-shares-plugin/trunk/libshares/shares.c 2008-08-05 22:52:50 UTC (rev 5203)
+++ thunar-shares-plugin/trunk/libshares/shares.c 2008-08-06 00:05:30 UTC (rev 5204)
@@ -319,14 +319,6 @@
return TRUE;
}
-static void
-free_all_shares (void)
-{
- ensure_hashes ();
- g_hash_table_foreach_remove (path_share_info_hash, remove_from_path_hash_cb, NULL);
- g_hash_table_foreach_remove (share_name_share_info_hash, remove_from_share_name_hash_cb, NULL);
-}
-
static char *
get_string_from_key_file (GKeyFile *key_file, const char *group, const char *key)
{
@@ -1075,6 +1067,14 @@
}
void
+free_all_shares (void)
+{
+ ensure_hashes ();
+ g_hash_table_foreach_remove (path_share_info_hash, remove_from_path_hash_cb, NULL);
+ g_hash_table_foreach_remove (share_name_share_info_hash, remove_from_share_name_hash_cb, NULL);
+}
+
+void
shares_set_debug (gboolean error_on_refresh,
gboolean error_on_add,
gboolean error_on_modify,
Modified: thunar-shares-plugin/trunk/libshares/shares.h
===================================================================
--- thunar-shares-plugin/trunk/libshares/shares.h 2008-08-05 22:52:50 UTC (rev 5203)
+++ thunar-shares-plugin/trunk/libshares/shares.h 2008-08-06 00:05:30 UTC (rev 5204)
@@ -39,6 +39,8 @@
SHARES_ERROR_NONEXISTENT
} SharesError;
+void free_all_shares (void);
+
GQuark shares_error_quark (void);
void shares_free_share_info (ShareInfo *info);
Modified: thunar-shares-plugin/trunk/thunar-plugin/thunar-shares-plugin.c
===================================================================
--- thunar-shares-plugin/trunk/thunar-plugin/thunar-shares-plugin.c 2008-08-05 22:52:50 UTC (rev 5203)
+++ thunar-shares-plugin/trunk/thunar-plugin/thunar-shares-plugin.c 2008-08-06 00:05:30 UTC (rev 5204)
@@ -23,6 +23,7 @@
#endif
#include <glib/gi18n.h>
+#include <libshares/shares.h>
#include "tsp-page-provider.h"
#include "tsp-prefs-provider.h"
@@ -69,6 +70,9 @@
#ifdef G_ENABLE_DEBUG
g_message ("Shutting down thunar-archive-plugin extension");
#endif
+
+ /* Free all shares */
+ free_all_shares ();
}
G_MODULE_EXPORT void
More information about the Goodies-commits
mailing list