b4n commented on this pull request.


> @@ -74,6 +74,7 @@ static void reload_project(void)
        {
                if (g_current_project)
                        xproject_close(TRUE);
+               set_non_ft_build_wdir((gchar*)"");

should take a `const gchar *` as it doesn't need modifying the string anyway, 
and would remove the need for this odd cast

> @@ -269,6 +284,7 @@ void on_preferences(G_GNUC_UNUSED GtkMenuItem *menuitem, 
> G_GNUC_UNUSED gpointer
                geany_project_set_name(g_current_project, 
gtk_entry_get_text(GTK_ENTRY(e->name)));
                geany_project_set_description(g_current_project, "");
                geany_project_set_run_cmd(g_current_project, "");
+               geany_project_set_working_dir(g_current_project,  
gtk_entry_get_text(GTK_ENTRY(e->working_dir)));

double space after the comma

> @@ -275,3 +275,13 @@ GSList *get_file_list(const gchar *path, guint * length, 
> gboolean(*func)(const g
        return list;
 }
 
+/* update Geany's non-filetype working directories in the build menu to wdir */
+void set_non_ft_build_wdir(gchar* wdir) {
+       gint i;
+       for(i = 0; i < build_get_group_count(GEANY_GBG_NON_FT); ++i)
+               build_set_menu_item(GEANY_BCS_PREF, /* medium priority */
+                                                       GEANY_GBG_NON_FT, /* 
non-filetype build entries */
+                                                       i,
+                                                       GEANY_BC_WORKING_DIR, 
/* working dir field */
+                                                       wdir);

braces around the `for` would be nice for readability IMO as the body spans 
multiple lines (even though it's a single statement so doesn't change meaning)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/486#pullrequestreview-3432626

Reply via email to