Branch: refs/heads/build-exec Author: Nick Treleaven n@trelsoft.com Committer: Nick Treleaven n@trelsoft.com Date: Sat, 05 Oct 2019 11:31:09 UTC Commit: b7f525852dcb61ca205aaddd82e601fc6075cfbb https://github.com/geany/geany/commit/b7f525852dcb61ca205aaddd82e601fc6075cf...
Log Message: ----------- Fix not saving project filetype execute commands after dialog editing
Modified Paths: -------------- src/project.c
Modified: src/project.c 27 lines changed, 17 insertions(+), 10 deletions(-) =================================================================== @@ -811,8 +811,6 @@ static gboolean update_config(const PropertyDialogElements *e, gboolean new_proj GtkTextIter start, end; GtkTextBuffer *buffer; GeanyDocument *doc = document_get_current(); - GeanyBuildCommand *oldvalue; - GeanyFiletype *ft = doc ? doc->file_type : NULL; GtkWidget *widget; gchar *tmp; GString *str; @@ -828,16 +826,25 @@ static gboolean update_config(const PropertyDialogElements *e, gboolean new_proj stash_group_update(node->data, e->dialog);
/* read the project build menu */ - oldvalue = ft ? ft->priv->projfilecmds : NULL; - build_read_project(ft, e->build_properties); - - if (ft != NULL && ft->priv->projfilecmds != oldvalue && ft->priv->project_list_entry < 0) + GeanyFiletype *ft = doc ? doc->file_type : NULL; + if (ft && ft->priv->project_list_entry < 0) { - if (p->priv->build_filetypes_list == NULL) - p->priv->build_filetypes_list = g_ptr_array_new(); - ft->priv->project_list_entry = p->priv->build_filetypes_list->len; - g_ptr_array_add(p->priv->build_filetypes_list, ft); + GeanyBuildCommand *oldbuild = ft->priv->projfilecmds; + GeanyBuildCommand *oldexec = ft->priv->projexeccmds; + build_read_project(ft, e->build_properties); + + if (ft->priv->projfilecmds != oldbuild || + ft->priv->projexeccmds != oldexec) + { + if (p->priv->build_filetypes_list == NULL) + p->priv->build_filetypes_list = g_ptr_array_new(); + ft->priv->project_list_entry = p->priv->build_filetypes_list->len; + g_ptr_array_add(p->priv->build_filetypes_list, ft); + } } + else + build_read_project(NULL, e->build_properties); + build_menu_update(doc);
widget = ui_lookup_widget(e->dialog, "radio_long_line_disabled_project");
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).