changeset 30223:f30a02140f74

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
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 30 Jun 2010 02:26:33 +0000
parents 1c20a2115ad4
children bc4771aff549 c31e1c0cf27f
files finch/finch.c pidgin/gtkmain.c
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/finch/finch.c	Wed Jun 30 01:46:42 2010 +0000
+++ b/finch/finch.c	Wed Jun 30 02:26:33 2010 +0000
@@ -252,6 +252,7 @@
 	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 @@
 	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);
 
--- a/pidgin/gtkmain.c	Wed Jun 30 01:46:42 2010 +0000
+++ b/pidgin/gtkmain.c	Wed Jun 30 02:26:33 2010 +0000
@@ -97,7 +97,6 @@
  */
 static const int catch_sig_list[] = {
 	SIGSEGV,
-	SIGHUP,
 	SIGINT,
 	SIGTERM,
 	SIGQUIT,
@@ -223,9 +222,6 @@
 	}
 
 	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 @@
 	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 @@
 	 * 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);