Revision: 1003 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1003&view=re... Author: ntrel Date: 2009-10-14 12:01:07 +0000 (Wed, 14 Oct 2009)
Log Message: ----------- Fix building on GLib < 2.16. Declare variable before code for ISO C90.
Modified Paths: -------------- trunk/geany-plugins/codenav/ChangeLog trunk/geany-plugins/codenav/src/codenavigation.c
Modified: trunk/geany-plugins/codenav/ChangeLog =================================================================== --- trunk/geany-plugins/codenav/ChangeLog 2009-10-13 17:32:58 UTC (rev 1002) +++ trunk/geany-plugins/codenav/ChangeLog 2009-10-14 12:01:07 UTC (rev 1003) @@ -1,3 +1,10 @@ +2009-10-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/codenavigation.c: + Fix building on GLib < 2.16. + Declare variable before code for ISO C90. + + 2009-07-19 Lionel Fuentes funto66@gmail.com
* src/codenav.c: Initial import
Modified: trunk/geany-plugins/codenav/src/codenavigation.c =================================================================== --- trunk/geany-plugins/codenav/src/codenavigation.c 2009-10-13 17:32:58 UTC (rev 1002) +++ trunk/geany-plugins/codenav/src/codenavigation.c 2009-10-14 12:01:07 UTC (rev 1003) @@ -96,6 +96,18 @@
PLUGIN_KEY_GROUP(code_navigation, PLUGIN_KEYS_NUMBER)
+#if !GLIB_CHECK_VERSION(2, 16, 0) +int +g_strcmp0(const char *str1, const char *str2) +{ + if (!str1) + return -(str1 != str2); + if (!str2) + return str1 != str2; + return strcmp(str1, str2); +} +#endif + /* Utility function, which returns a newly-allocated string containing the * extension of the file path which is given, or NULL if it did not found any extension. */ @@ -306,9 +318,11 @@
/* Third : if not found, ask the user if he wants to create it or not. */ { + GtkWidget* dialog; + p_str = g_strdup_printf("%s.%s", basename_no_extension, (const gchar*)(p_extensions_to_test->data));
- GtkWidget* dialog = gtk_message_dialog_new( GTK_WINDOW(geany_data->main_widgets->window), + dialog = gtk_message_dialog_new( GTK_WINDOW(geany_data->main_widgets->window), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.