[gedit] Use elif and fix get_locale_dir func.



commit c912b552f05caf9c03c3019eedb56feeee8327dd
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sun Nov 8 17:13:20 2009 +0100

    Use elif and fix get_locale_dir func.

 gedit/gedit-dirs.c |   22 +++++-----------------
 1 files changed, 5 insertions(+), 17 deletions(-)
---
diff --git a/gedit/gedit-dirs.c b/gedit/gedit-dirs.c
index d76f402..75c59a2 100644
--- a/gedit/gedit-dirs.c
+++ b/gedit/gedit-dirs.c
@@ -138,8 +138,7 @@ gedit_dirs_get_gedit_data_dir (void)
 				     NULL);
 	
 	g_free (win32_dir);
-#else
-#ifdef OS_OSX
+#elif defined (OS_OSX)
 	IgeMacBundle *bundle = ige_mac_bundle_get_default ();
 
 	if (ige_mac_bundle_get_is_app_bundle (bundle))
@@ -159,7 +158,6 @@ gedit_dirs_get_gedit_data_dir (void)
 	                             "gedit-2",
 	                             NULL);
 #endif
-#endif
 
 	return data_dir;
 }
@@ -180,8 +178,7 @@ gedit_dirs_get_gedit_locale_dir (void)
 				       NULL);
 	
 	g_free (win32_dir);
-#else
-#ifdef OS_OSX
+#elif defined (OS_OSX)
 	IgeMacBundle *bundle = ige_mac_bundle_get_default ();
 
 	if (ige_mac_bundle_get_is_app_bundle (bundle))
@@ -190,21 +187,14 @@ gedit_dirs_get_gedit_locale_dir (void)
 	}
 	else
 	{
-		gchar *data_dir = gedit_dirs_get_gedit_data_dir ();
-		locale_dir = g_build_filename (data_dir,
+		locale_dir = g_build_filename (DATADIR,
 		                               "locale",
 		                               NULL);
-		g_free (data_dir);
 	}
 #else
-	gchar *data_dir;
-
-	data_dir = gedit_dirs_get_data_dir ();
-	locale_dir = g_build_filename (data_dir,
+	locale_dir = g_build_filename (DATADIR,
 				       "locale",
 				       NULL);
-	g_free (data_dir);
-#endif
 #endif
 
 	return locale_dir;
@@ -226,8 +216,7 @@ gedit_dirs_get_gedit_lib_dir (void)
 				    NULL);
 	
 	g_free (win32_dir);
-#else
-#ifdef OS_OSX
+#elif defined (OS_OSX)
 	IgeMacBundle *bundle = ige_mac_bundle_get_default ();
 
 	if (ige_mac_bundle_get_is_app_bundle (bundle))
@@ -249,7 +238,6 @@ gedit_dirs_get_gedit_lib_dir (void)
 				    "gedit-2",
 				    NULL);
 #endif
-#endif
 
 	return lib_dir;
 }



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