pidgin: 0a7239b5: Create the ~/.purple/plugins directory o.

nosnilmot at pidgin.im nosnilmot at pidgin.im
Tue Jun 29 22:31:33 EDT 2010


----------------------------------------------------------------------
Revision: 0a7239b54affab8c6c4a3a097560826d888cf991
Parent:   31244ee6c89ef7624aca49d70934e61fccab90d2
Author:   stu at nosnilmot.com
Date:     06/29/10 22:26:33
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0a7239b54affab8c6c4a3a097560826d888cf991

Changelog: 

Create the ~/.purple/plugins directory on startup if it does not exist
already, because the absence of this directory causes a surprising amount
of confusion for users told to put their plugins there
Also get rid of our SIGHUP handler, because it does nothing

Changes against parent 31244ee6c89ef7624aca49d70934e61fccab90d2

  patched  finch/finch.c
  patched  pidgin/gtkmain.c

-------------- next part --------------
============================================================
--- pidgin/gtkmain.c	d1d414d9a014e21b888358aac7494ffca725c1ac
+++ pidgin/gtkmain.c	17339c710ca574fdcf44a09e6371020cce05e6af
@@ -97,7 +97,6 @@ static const int catch_sig_list[] = {
  */
 static const int catch_sig_list[] = {
 	SIGSEGV,
-	SIGHUP,
 	SIGINT,
 	SIGTERM,
 	SIGQUIT,
@@ -223,9 +222,6 @@ mainloop_sighandler(GIOChannel *source, 
 	}
 
 	switch (sig) {
-	case SIGHUP:
-		purple_debug_warning("sighandler", "Caught signal %d\n", sig);
-		break;
 #if defined(USE_GSTREAMER) && !defined(GST_CAN_DISABLE_FORKING)
 /* By default, gstreamer forks when you initialize it, and waitpids for the
  * child.  But if libpurple reaps the child rather than leaving it to
@@ -550,6 +546,7 @@ int main(int argc, char *argv[])
 	gboolean debug_enabled;
 	gboolean migration_failed = FALSE;
 	GList *active_accounts;
+	struct stat st;
 
 	struct option long_options[] = {
 		{"config",       required_argument, NULL, 'c'},
@@ -853,6 +850,8 @@ int main(int argc, char *argv[])
 	 * in user's home directory.
 	 */
 	search_path = g_build_filename(purple_user_dir(), "plugins", NULL);
+	if (!g_stat(search_path, &st))
+		g_mkdir(search_path, S_IRUSR | S_IWUSR | S_IXUSR);
 	purple_plugins_add_search_path(search_path);
 	g_free(search_path);
 	purple_plugins_add_search_path(LIBDIR);
============================================================
--- finch/finch.c	14c60701e54c8d2a41257250ab723feebf412b03
+++ finch/finch.c	dcee1fe9c9089e8148968f37a3b14dd4c21c4ee3
@@ -252,6 +252,7 @@ init_libpurple(int argc, char **argv)
 	gboolean opt_version = FALSE;
 	char *opt_config_dir_arg = NULL;
 	gboolean debug_enabled = FALSE;
+	struct stat st;
 
 	struct option long_options[] = {
 		{"config",   required_argument, NULL, 'c'},
@@ -361,6 +362,8 @@ init_libpurple(int argc, char **argv)
 	purple_idle_set_ui_ops(finch_idle_get_ui_ops());
 
 	path = g_build_filename(purple_user_dir(), "plugins", NULL);
+	if (!g_stat(path, &st))
+		g_mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR);
 	purple_plugins_add_search_path(path);
 	g_free(path);
 


More information about the Commits mailing list