summary refs log tree commit diff stats
path: root/src/fe-gtk/plugingui.c
diff options
context:
space:
mode:
authorArnavion <arnavion@gmail.com>2012-11-03 10:24:25 -0700
committerArnavion <arnavion@gmail.com>2012-11-03 19:04:02 -0700
commit5d9264aff6d7bcdd2f0595bfdf2a3a7a23330d46 (patch)
tree17765368da40d67405ec22c0e1d608f706fbe055 /src/fe-gtk/plugingui.c
parente0b1724158d44370d34d108a5f07fe0b36e4e254 (diff)
Initial commit for utf8 everywhere.
Diffstat (limited to 'src/fe-gtk/plugingui.c')
-rw-r--r--src/fe-gtk/plugingui.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/fe-gtk/plugingui.c b/src/fe-gtk/plugingui.c
index a488b19e..e344c336 100644
--- a/src/fe-gtk/plugingui.c
+++ b/src/fe-gtk/plugingui.c
@@ -147,30 +147,18 @@ plugingui_load_cb (session *sess, char *file)
 void
 plugingui_load (void)
 {
-	/* let's do it the Perl way */
-	const char *xdir;
 	char *sub_dir;
 
-	xdir = get_xdir_utf8 ();
-	sub_dir = malloc (strlen (xdir) + 8);
-	strcpy (sub_dir, xdir);
-	strcat (sub_dir, "/addons");
+	sub_dir = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "addons", get_xdir());
 
 	gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess,
-#if 0	/* native file dialogs */
-#ifdef WIN32
-							"Plugins and Scripts\0*.dll;*.lua;*.pl;*.py;*.tcl\0"
-							"All files\0*.*\0\0", 0);
-#else
-#endif
-#endif	/* native file dialogs */
 #ifdef WIN32
 							sub_dir, "*.dll;*.lua;*.pl;*.py;*.tcl", FRF_ADDFOLDER|FRF_FILTERISINITIAL|FRF_EXTENSIONS);
 #else
 							sub_dir, "*.so;*.lua;*.pl;*.py;*.tcl", FRF_ADDFOLDER|FRF_FILTERISINITIAL|FRF_EXTENSIONS);
 #endif
 
-	free (sub_dir);
+	g_free (sub_dir);
 }
 
 static void