Revision: 134 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=134&view=rev Author: yurand Date: 2008-07-23 07:16:46 +0000 (Wed, 23 Jul 2008)
Log Message: ----------- Update to Geany API 78
Modified Paths: -------------- trunk/geanyprj/src/geanyprj.c trunk/geanyprj/src/sidebar.c trunk/geanyprj/src/xproject.c
Modified: trunk/geanyprj/src/geanyprj.c =================================================================== --- trunk/geanyprj/src/geanyprj.c 2008-07-22 13:53:07 UTC (rev 133) +++ trunk/geanyprj/src/geanyprj.c 2008-07-23 07:16:46 UTC (rev 134) @@ -36,7 +36,7 @@
#include "geanyprj.h"
-PLUGIN_VERSION_CHECK(71); +PLUGIN_VERSION_CHECK(78); PLUGIN_SET_INFO(_("Project"), _("Alternative project support."), VERSION, _("Yura Siamashka yurand2@gmail.com"));
Modified: trunk/geanyprj/src/sidebar.c =================================================================== --- trunk/geanyprj/src/sidebar.c 2008-07-22 13:53:07 UTC (rev 133) +++ trunk/geanyprj/src/sidebar.c 2008-07-23 07:16:46 UTC (rev 134) @@ -458,8 +458,8 @@ gtk_container_add(GTK_CONTAINER(file_view_vbox), scrollwin);
gtk_widget_show_all(file_view_vbox); - gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), file_view_vbox, - gtk_label_new(_("Project"))); + gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), + file_view_vbox, gtk_label_new(_("Project"))); }
void
Modified: trunk/geanyprj/src/xproject.c =================================================================== --- trunk/geanyprj/src/xproject.c 2008-07-22 13:53:07 UTC (rev 133) +++ trunk/geanyprj/src/xproject.c 2008-07-23 07:16:46 UTC (rev 134) @@ -61,22 +61,22 @@ void xproject_close(gboolean cache) { - GeanyProject *project = geany->app->project; - debug("%s\n", __FUNCTION__); - g_return_if_fail(project != NULL);
- p_ui->set_statusbar(TRUE, _("Project "%s" closed."), project->name); + if (!geany->app->project) + return;
- g_free(project->name); - g_free(project->description); - g_free(project->file_name); - g_free(project->base_path); - g_free(project->run_cmd); + p_ui->set_statusbar(TRUE, _("Project "%s" closed."), geany->app->project->name);
- g_free(project); - project = NULL; + g_free(geany->app->project->name); + g_free(geany->app->project->description); + g_free(geany->app->project->file_name); + g_free(geany->app->project->base_path); + g_free(geany->app->project->run_cmd);
+ g_free(geany->app->project); + geany->app->project = NULL; + if (!g_current_project) return;
@@ -98,8 +98,6 @@ void xproject_open(const gchar * path) { - GeanyProject *project = geany->app->project; - guint i; struct GeanyPrj *p = NULL; debug("%s\n", __FUNCTION__); @@ -121,13 +119,13 @@
p_ui->set_statusbar(TRUE, _("Project "%s" opened."), p->name);
- project = g_new0(struct GeanyProject, 1); - project->type = PROJECT_TYPE; - project->name = g_strdup(p->name); - project->description = g_strdup(p->description); - project->base_path = g_strdup(p->base_path); - project->run_cmd = g_strdup(p->run_cmd); - project->make_in_base_path = TRUE; + geany->app->project = g_new0(struct GeanyProject, 1); + geany->app->project->type = PROJECT_TYPE; + geany->app->project->name = g_strdup(p->name); + geany->app->project->description = g_strdup(p->description); + geany->app->project->base_path = g_strdup(p->base_path); + geany->app->project->run_cmd = g_strdup(p->run_cmd); + geany->app->project->make_in_base_path = TRUE;
g_hash_table_foreach(p->tags, add_tag, NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org