Revision: 2023 http://geany.svn.sourceforge.net/geany/?rev=2023&view=rev Author: ntrel Date: 2007-11-06 05:05:20 -0800 (Tue, 06 Nov 2007)
Log Message: ----------- Fix gtk_widget_destroy() warning when unloading plugin and no svn binary is in /usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/nmt/bin.
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/svndiff.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-06 12:54:04 UTC (rev 2022) +++ trunk/ChangeLog 2007-11-06 13:05:20 UTC (rev 2023) @@ -2,6 +2,9 @@
* plugins/svndiff.c: Fix sign comparison warning. + * plugins/svndiff.c: + Fix gtk_widget_destroy() warning when unloading plugin and no svn + binary is in $PATH.
2007-11-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/plugins/svndiff.c =================================================================== --- trunk/plugins/svndiff.c 2007-11-06 12:54:04 UTC (rev 2022) +++ trunk/plugins/svndiff.c 2007-11-06 13:05:20 UTC (rev 2023) @@ -321,15 +321,11 @@
// Check for svn inside $PATH. Thanks to Yura Siamashka yurand2@gmail.com tmp = g_find_program_in_path("svn"); - if (!tmp) - return; - have_svn = TRUE; + have_svn = (tmp != NULL); g_free(tmp);
tooltips = gtk_tooltips_new();
- plugin_fields->flags = PLUGIN_IS_DOCUMENT_SENSITIVE; - menu_svndiff = gtk_image_menu_item_new_with_mnemonic(_("_SVNdiff")); gtk_container_add(GTK_CONTAINER(data->tools_menu), menu_svndiff);
@@ -375,6 +371,10 @@ gtk_widget_show_all(menu_svndiff);
plugin_fields->menu_item = menu_svndiff; + if (have_svn) + plugin_fields->flags = PLUGIN_IS_DOCUMENT_SENSITIVE; + else + gtk_widget_set_sensitive(plugin_fields->menu_item, FALSE); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.