Unless I miss something the button just adds %d to the corresponding
fields, but this is already the default settings so I don't see any
point of doing it.
---
 src/build.c   |   12 ------------
 src/build.h   |    2 --
 src/project.c |   31 ++++---------------------------
 3 files changed, 4 insertions(+), 41 deletions(-)

diff --git a/src/build.c b/src/build.c
index 6a90c02..19b9e54 100644
--- a/src/build.c
+++ b/src/build.c
@@ -2254,18 +2254,6 @@ BuildMenuItems *build_get_menu_items(gint filetype_idx)
 }
 
 
-/* set non_ft working directory entries to %p for project */
-void build_set_non_ft_wd_to_proj(BuildTableData table_data)
-{
-	gint i, start, end;
-
-	start = build_groups_count[GEANY_GBG_FT];
-	end = start + build_groups_count[GEANY_GBG_NON_FT];
-	for (i = start; i < end; ++i)
-		gtk_entry_set_text(GTK_ENTRY(table_data->rows[i]->entries[GEANY_BC_WORKING_DIR]), "%p");
-}
-
-
 /*----------------------------------------------------------
  *
  * Load and store configuration
diff --git a/src/build.h b/src/build.h
index fd459e4..7162401 100644
--- a/src/build.h
+++ b/src/build.h
@@ -167,8 +167,6 @@ void build_read_project(GeanyFiletype *ft, BuildTableData build_properties);
 
 void build_free_fields(BuildTableData data);
 
-void build_set_non_ft_wd_to_proj(BuildTableData table_data);
-
 /* build response decode assistance function */
 gboolean build_parse_make_dir(const gchar *string, gchar **prefix);
 
diff --git a/src/project.c b/src/project.c
index b9f865e..f58f209 100644
--- a/src/project.c
+++ b/src/project.c
@@ -386,18 +386,12 @@ void project_close(gboolean open_default)
 }
 
 
-static void on_set_use_base_path_clicked(GtkWidget *unused1, gpointer user_data)
-{
-	build_set_non_ft_wd_to_proj((BuildTableData)user_data);
-}
-
-
 static gint build_page_num = 0;
 
+
 static void create_properties_dialog(PropertyDialogElements *e)
 {
 	GtkWidget *table, *notebook, *build_table;
-	GtkWidget *button;
 	GtkWidget *bbox;
 	GtkWidget *label;
 	GtkWidget *swin;
@@ -411,7 +405,7 @@ static void create_properties_dialog(PropertyDialogElements *e)
 
 	ui_entry_add_clear_icon(GTK_ENTRY(ui_lookup_widget(e->dialog, "spin_indent_width")));
 
-	table = gtk_table_new(6, 2, FALSE);
+	table = gtk_table_new(5, 2, FALSE);
 	gtk_container_set_border_width(GTK_CONTAINER(table), 6);
 	gtk_table_set_row_spacings(GTK_TABLE(table), 5);
 	gtk_table_set_col_spacings(GTK_TABLE(table), 10);
@@ -485,28 +479,11 @@ static void create_properties_dialog(PropertyDialogElements *e)
 	build_page_num = gtk_notebook_insert_page(GTK_NOTEBOOK(notebook), build_table, label, 2);
 	e->notebook = notebook;
 
-	label = gtk_label_new(_("Set the Build non-filetype working directories to use base path:"));
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-
-	button = gtk_button_new_with_label(_("Set"));
-	ui_widget_set_tooltip_text(button,
-		_("Set the working directories (on the Build tab) "
-		"for the non-filetype build commands to use the base path"));
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-	g_signal_connect(button, "clicked", G_CALLBACK(on_set_use_base_path_clicked), e->build_properties);
-	bbox = gtk_hbox_new(FALSE, 6);
-	gtk_box_pack_start(GTK_BOX(bbox), label, TRUE, TRUE, 0);
-	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-	gtk_table_attach(GTK_TABLE(table), bbox, 0, 2, 4, 5,
-					(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-					(GtkAttachOptions) (GTK_FILL), 0, 0);
-
 	g_signal_connect(ui_lookup_widget(e->dialog, "radio_long_line_custom"), "toggled",
 		G_CALLBACK(on_radio_long_line_custom_toggled), ui_lookup_widget(e->dialog, "spin_long_line"));
 
 	label = gtk_label_new(_("File patterns:"));
-	/* <small>Separate multiple patterns by a new line</small> */
-	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 6, 7,
+	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5,
 					(GtkAttachOptions) (GTK_FILL),
 					(GtkAttachOptions) (GTK_FILL), 0, 0);
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
@@ -521,7 +498,7 @@ static void create_properties_dialog(PropertyDialogElements *e)
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin),
 				GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(swin), GTK_WIDGET(e->patterns));
-	gtk_table_attach(GTK_TABLE(table), swin, 1, 2, 6, 7,
+	gtk_table_attach(GTK_TABLE(table), swin, 1, 2, 4, 5,
 					(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 					(GtkAttachOptions) (0), 0, 0);
 
_______________________________________________
Geany-devel mailing list
[email protected]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to