summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/plugingui.c18
-rw-r--r--src/fe-gtk/sexy-spell-entry.c7
2 files changed, 4 insertions, 21 deletions
diff --git a/src/fe-gtk/plugingui.c b/src/fe-gtk/plugingui.c
index c6d90e2f..9b3186a6 100644
--- a/src/fe-gtk/plugingui.c
+++ b/src/fe-gtk/plugingui.c
@@ -161,11 +161,7 @@ plugingui_load (void)
 	sub_dir = g_build_filename (get_xdir(), "addons", NULL);
 
 	gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess,
-#ifdef WIN32
-							sub_dir, "*.dll;*.lua;*.pl;*.py;*.tcl;*.js", FRF_FILTERISINITIAL|FRF_EXTENSIONS);
-#else
-							sub_dir, "*.so;*.lua;*.pl;*.py;*.tcl;*.js", FRF_FILTERISINITIAL|FRF_EXTENSIONS);
-#endif
+							sub_dir, "*."G_MODULE_SUFFIX";*.lua;*.pl;*.py;*.tcl;*.js", FRF_FILTERISINITIAL|FRF_EXTENSIONS);
 
 	g_free (sub_dir);
 }
@@ -179,7 +175,6 @@ plugingui_loadbutton_cb (GtkWidget * wid, gpointer unused)
 static void
 plugingui_unload (GtkWidget * wid, gpointer unused)
 {
-	int len;
 	char *modname, *file, *buf;
 	GtkTreeView *view;
 	GtkTreeIter iter;
@@ -189,16 +184,7 @@ plugingui_unload (GtkWidget * wid, gpointer unused)
 	                                    FILE_COLUMN, &file, -1))
 		return;
 
-	len = strlen (file);
-#ifdef WIN32
-	if (len > 4 && g_ascii_strcasecmp (file + len - 4, ".dll") == 0)
-#else
-#if defined(__hpux)
-	if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".sl") == 0)
-#else
-	if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".so") == 0)
-#endif
-#endif
+	if (g_str_has_suffix (file, "."G_MODULE_SUFFIX))
 	{
 		if (plugin_kill (modname, FALSE) == 2)
 			fe_message (_("That plugin is refusing to unload.\n"), FE_MSG_ERROR);
diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c
index 6ad7ab49..c2c2a4db 100644
--- a/src/fe-gtk/sexy-spell-entry.c
+++ b/src/fe-gtk/sexy-spell-entry.c
@@ -153,11 +153,8 @@ initialize_enchant ()
 	GModule *enchant;
 	gpointer funcptr;
 
-#ifdef WIN32
-	enchant = g_module_open("libenchant.dll", 0);
-#else
-	enchant = g_module_open("libenchant", 0);
-#endif
+
+	enchant = g_module_open("libenchant."G_MODULE_SUFFIX, 0);
 	if (enchant == NULL)
 	{
 #ifndef WIN32