nautilus-sendto r326 - in trunk: . pidgin_plugin



Author: hadess
Date: Wed May 28 18:08:07 2008
New Revision: 326
URL: http://svn.gnome.org/viewvc/nautilus-sendto?rev=326&view=rev

Log:
2008-05-28  Bastien Nocera  <hadess hadess net>

	* pidgin_plugin/nautilus-sendto-plugin.c (force_load_once),
	(init_plugin): Patch from Stu Tomlinson <stu nosnilmot com> to force
	load the Pidgin plugin on startup (see:
	https://bugzilla.redhat.com/show_bug.cgi?id=242289)



Modified:
   trunk/ChangeLog
   trunk/pidgin_plugin/nautilus-sendto-plugin.c

Modified: trunk/pidgin_plugin/nautilus-sendto-plugin.c
==============================================================================
--- trunk/pidgin_plugin/nautilus-sendto-plugin.c	(original)
+++ trunk/pidgin_plugin/nautilus-sendto-plugin.c	Wed May 28 18:08:07 2008
@@ -296,9 +296,25 @@
     return TRUE;
 }
 
+static gboolean
+force_load_once (gpointer data)
+{
+    PurplePlugin *plugin = (PurplePlugin *)data;
+    if (!purple_prefs_get_bool ("/plugins/gtk/nautilus/auto_loaded")) {
+	    purple_debug_info ("nautilus", "Force loading nautilus plugin\n");
+	    purple_plugin_load (plugin);
+		purple_plugins_save_loaded (PIDGIN_PREFS_ROOT "/plugins/loaded");
+	    purple_prefs_set_bool ("/plugins/gtk/nautilus/auto_loaded", TRUE);
+    }
+
+    return FALSE;
+}
+
 static void 
 init_plugin(PurplePlugin *plugin) {
-	
+    purple_prefs_add_none ("/plugins/gtk/nautilus");
+    purple_prefs_add_bool ("/plugins/gtk/nautilus/auto_loaded", FALSE);
+	g_idle_add(force_load_once, plugin);
 }
 
 static PurplePluginInfo info = {



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