Revision: 131 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=131&view=rev Author: frlan Date: 2008-07-21 18:33:57 +0000 (Mon, 21 Jul 2008)
Log Message: ----------- Geanyprj: Make plugin compile with Geany svn r2798
Modified Paths: -------------- trunk/geanyprj/src/geanyprj.c trunk/geanyprj/src/menu.c trunk/geanyprj/src/project.c trunk/geanyprj/src/sidebar.c trunk/geanyprj/src/xproject.c
Modified: trunk/geanyprj/src/geanyprj.c =================================================================== --- trunk/geanyprj/src/geanyprj.c 2008-07-20 18:22:59 UTC (rev 130) +++ trunk/geanyprj/src/geanyprj.c 2008-07-21 18:33:57 UTC (rev 131) @@ -50,7 +50,9 @@ gchar *dir; gchar *proj; GeanyDocument *doc; + GeanyProject *project = geany->app->project;
+ debug("%s\n", __FUNCTION__);
doc = p_document->get_current(); @@ -117,7 +119,7 @@ reload_project(); }
-GeanyCallback geany_callbacks[] = { +PluginCallback plugin_callbacks[] = { {"document-open", (GCallback) & on_doc_open, TRUE, NULL}, {"document-save", (GCallback) & on_doc_save, TRUE, NULL}, {"document-activate", (GCallback) & on_doc_activate, TRUE, NULL}, @@ -129,7 +131,7 @@ plugin_init(G_GNUC_UNUSED GeanyData * data) { GtkWidget *prj = - p_support->lookup_widget(GTK_WIDGET(main_widgets->window), "menu_project1"); + p_support->lookup_widget(GTK_WIDGET(geany->main_widgets->window), "menu_project1"); tools_menu_init();
gtk_widget_set_child_visible(prj, FALSE); @@ -144,8 +146,9 @@ void plugin_cleanup() { + GeanyProject *project = geany->app->project; GtkWidget *prj = - p_support->lookup_widget(GTK_WIDGET(main_widgets->window), "menu_project1"); + p_support->lookup_widget(GTK_WIDGET(geany->main_widgets->window), "menu_project1"); gtk_widget_set_child_visible(prj, TRUE); gtk_widget_set_size_request(prj, -1, -1);
Modified: trunk/geanyprj/src/menu.c =================================================================== --- trunk/geanyprj/src/menu.c 2008-07-20 18:22:59 UTC (rev 130) +++ trunk/geanyprj/src/menu.c 2008-07-21 18:33:57 UTC (rev 131) @@ -78,7 +78,7 @@ GtkWidget *bbox; GtkWidget *label; GtkTooltips *tooltips = - GTK_TOOLTIPS(p_support->lookup_widget(main_widgets->window, "tooltips")); + GTK_TOOLTIPS(p_support->lookup_widget(geany->main_widgets->window, "tooltips")); PropertyDialogElements *e; gchar *dir = NULL; gchar *basename = NULL; @@ -103,7 +103,7 @@ { e->dialog = gtk_dialog_new_with_buttons(_("Project Preferences"), - GTK_WINDOW(main_widgets->window), + GTK_WINDOW(geany->main_widgets->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); @@ -112,7 +112,7 @@ { e->dialog = gtk_dialog_new_with_buttons(_("New Project"), - GTK_WINDOW(main_widgets->window), + GTK_WINDOW(geany->main_widgets->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
@@ -383,7 +383,7 @@ tooltips = gtk_tooltips_new();
menu_prj = gtk_image_menu_item_new_with_mnemonic(_("_Project")); - gtk_container_add(GTK_CONTAINER(main_widgets->tools_menu), menu_prj); + gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), menu_prj);
g_signal_connect((gpointer) menu_prj, "activate", G_CALLBACK(update_menu_items), NULL);
Modified: trunk/geanyprj/src/project.c =================================================================== --- trunk/geanyprj/src/project.c 2008-07-20 18:22:59 UTC (rev 130) +++ trunk/geanyprj/src/project.c 2008-07-21 18:33:57 UTC (rev 131) @@ -75,7 +75,7 @@ static gboolean project_filter_all(const gchar * file) { - if (p_filetypes->detect_from_filename(file)->id != GEANY_FILETYPES_ALL) + if (p_filetypes->detect_from_filename(file)->id != GEANY_FILETYPES_NONE) return TRUE; return FALSE; } @@ -231,6 +231,8 @@ void geany_project_set_name(struct GeanyPrj *prj, const gchar * name) { + GeanyProject *project = geany->app->project; + if (prj->name) g_free(prj->name); prj->name = g_strdup(name); @@ -273,6 +275,7 @@ void geany_project_set_description(struct GeanyPrj *prj, const gchar * description) { + GeanyProject *project = geany->app->project; if (prj->description) g_free(prj->description); prj->description = g_strdup(description); @@ -291,6 +294,8 @@ void geany_project_set_base_path(struct GeanyPrj *prj, const gchar * base_path) { + GeanyProject *project = geany->app->project; + if (prj->base_path) g_free(prj->base_path);
@@ -317,6 +322,8 @@ void geany_project_set_run_cmd(struct GeanyPrj *prj, const gchar * run_cmd) { + GeanyProject *project = geany->app->project; + if (prj->run_cmd) g_free(prj->run_cmd); prj->run_cmd = g_strdup(run_cmd);
Modified: trunk/geanyprj/src/sidebar.c =================================================================== --- trunk/geanyprj/src/sidebar.c 2008-07-20 18:22:59 UTC (rev 130) +++ trunk/geanyprj/src/sidebar.c 2008-07-21 18:33:57 UTC (rev 131) @@ -458,7 +458,7 @@ gtk_container_add(GTK_CONTAINER(file_view_vbox), scrollwin);
gtk_widget_show_all(file_view_vbox); - gtk_notebook_append_page(GTK_NOTEBOOK(main_widgets->sidebar_notebook), file_view_vbox, + gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), file_view_vbox, gtk_label_new(_("Project"))); }
Modified: trunk/geanyprj/src/xproject.c =================================================================== --- trunk/geanyprj/src/xproject.c 2008-07-20 18:22:59 UTC (rev 130) +++ trunk/geanyprj/src/xproject.c 2008-07-21 18:33:57 UTC (rev 131) @@ -61,6 +61,8 @@ void xproject_close(gboolean cache) { + GeanyProject *project = geany->app->project; + debug("%s\n", __FUNCTION__); g_return_if_fail(project != NULL);
@@ -96,6 +98,8 @@ void xproject_open(const gchar * path) { + GeanyProject *project = geany->app->project; + guint i; struct GeanyPrj *p = NULL; debug("%s\n", __FUNCTION__);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.