Fix build menu updating

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/build-system@3195 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Lex Trotman 2008-11-10 00:49:16 +00:00
parent c857941e1d
commit 30de1c33b1
4 changed files with 151 additions and 130 deletions

View File

@ -1,3 +1,15 @@
2008-11-10 Lex Trotman <elextr(at)gmail(dot)com>
Fixed build menu updating after dialog close
* src/build.c:
on_includes_arguments_dialog_response calls projects::update_ui()
create_build_menu_gen() fixed reference to build_2_label SB 3
format it
* src/projects.c:
make update_ui() non-static
format it
2008-11-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> 2008-11-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/build.c: * src/build.c:

View File

@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>Geany</title> <title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
<meta name="date" content="2008-10-27" /> <meta name="date" content="2008-11-01" />
<style type="text/css"> <style type="text/css">
/* /*
@ -139,7 +139,7 @@ Stylesheet for Geany's documentation based on a version of John Gabriele.
<br />Nick Treleaven <br />Nick Treleaven
<br />Frank Lanitz</td></tr> <br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th> <tr><th class="docinfo-name">Date:</th>
<td>2008-10-27</td></tr> <td>2008-11-01</td></tr>
<tr><th class="docinfo-name">Version:</th> <tr><th class="docinfo-name">Version:</th>
<td>0.15</td></tr> <td>0.15</td></tr>
</tbody> </tbody>
@ -4506,7 +4506,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.</p>
<div class="footer"> <div class="footer">
<hr class="footer" /> <hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>. <a class="reference" href="geany.txt">View document source</a>.
Generated on: 2008-11-01 02:40 UTC. Generated on: 2008-11-04 00:47 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div> </div>

View File

@ -1127,9 +1127,9 @@ static void create_build_menu_gen(BuildMenuItems *menu_items)
menu_items->item_make_custom = item; menu_items->item_make_custom = item;
/* build the code with make object */ /* build the code with make object */
if (proj!=NULL && proj->build_2_label!=NULL) if (proj!=NULL && proj->build_3_label!=NULL)
{ {
item = gtk_image_menu_item_new_with_mnemonic(proj->build_2_label); item = gtk_image_menu_item_new_with_mnemonic(proj->build_3_label);
tiptext = NULL; tiptext = NULL;
} /* else if prefs */ } /* else if prefs */
else else
@ -1601,6 +1601,7 @@ on_includes_arguments_dialog_response (GtkDialog *dialog,
proj->build_3_cmd = g_strdup(newstr); proj->build_3_cmd = g_strdup(newstr);
} }
} }
update_ui();
} }
} }

View File

@ -219,6 +219,8 @@ static void run_open_dialog(GtkDialog *dialog)
} }
} }
} }
#endif #endif
@ -293,8 +295,9 @@ void project_open()
} }
/* Called when creating, opening, closing and updating projects. */ /* Called when creating, opening, closing and updating projects or changing
static void update_ui(void) * build commands. */
void update_ui(void)
{ {
build_default_menu(); build_default_menu();
ui_set_window_title(NULL); ui_set_window_title(NULL);
@ -747,6 +750,8 @@ static void run_dialog(GtkWidget *dialog, GtkWidget *entry)
} }
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);
} }
#endif #endif
@ -754,7 +759,8 @@ static void on_file_save_button_clicked(GtkButton *button, PropertyDialogElement
{ {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
gchar *path = win32_show_project_open_dialog(e->dialog, _("Choose Project Filename"), gchar *path = win32_show_project_open_dialog(e->dialog, _("Choose Project Filename"),
gtk_entry_get_text(GTK_ENTRY(e->file_name)), TRUE, TRUE); gtk_entry_get_text(GTK_ENTRY(
e->file_name)), TRUE, TRUE);
if (path != NULL) if (path != NULL)
{ {
gtk_entry_set_text(GTK_ENTRY(e->file_name), path); gtk_entry_set_text(GTK_ENTRY(e->file_name), path);
@ -783,7 +789,8 @@ static void on_file_open_button_clicked(GtkButton *button, PropertyDialogElement
{ {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
gchar *path = win32_show_project_open_dialog(e->dialog, _("Choose Project Run Command"), gchar *path = win32_show_project_open_dialog(e->dialog, _("Choose Project Run Command"),
gtk_entry_get_text(GTK_ENTRY(e->run_cmd)), FALSE, FALSE); gtk_entry_get_text(GTK_ENTRY(
e->run_cmd)), FALSE, FALSE);
if (path != NULL) if (path != NULL)
{ {
gtk_entry_set_text(GTK_ENTRY(e->run_cmd), path); gtk_entry_set_text(GTK_ENTRY(e->run_cmd), path);
@ -1011,7 +1018,8 @@ gchar *project_get_base_path()
if (g_path_is_absolute(project->base_path)) if (g_path_is_absolute(project->base_path))
return g_strdup(project->base_path); return g_strdup(project->base_path);
else else
{ /* build base_path out of project file name's dir and base_path */ {
/* build base_path out of project file name's dir and base_path */
gchar *path; gchar *path;
gchar *dir = g_path_get_dirname(project->file_name); gchar *dir = g_path_get_dirname(project->file_name);