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:
parent
c857941e1d
commit
30de1c33b1
12
ChangeLog
12
ChangeLog
@ -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:
|
||||||
|
@ -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>
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ static void on_entries_changed(GtkEditable *editable, PropertyDialogElements *e)
|
|||||||
|
|
||||||
|
|
||||||
#define SHOW_ERR(args) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args)
|
#define SHOW_ERR(args) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args)
|
||||||
#define SHOW_ERR1(args,more) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args, more)
|
#define SHOW_ERR1(args, more) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args, more)
|
||||||
#define MAX_NAME_LEN 50
|
#define MAX_NAME_LEN 50
|
||||||
/* "projects" is part of the default project base path so be careful when translating
|
/* "projects" is part of the default project base path so be careful when translating
|
||||||
* please avoid special characters and spaces, look at the source for details or ask Frank */
|
* please avoid special characters and spaces, look at the source for details or ask Frank */
|
||||||
@ -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);
|
||||||
@ -903,12 +910,12 @@ static gboolean load_config(const gchar *filename)
|
|||||||
p->run_cmd = utils_get_setting_string(config, "project", "run_cmd", "");
|
p->run_cmd = utils_get_setting_string(config, "project", "run_cmd", "");
|
||||||
p->file_patterns = g_key_file_get_string_list(config, "project", "file_patterns", NULL, NULL);
|
p->file_patterns = g_key_file_get_string_list(config, "project", "file_patterns", NULL, NULL);
|
||||||
|
|
||||||
p->build_1_cmd = utils_get_setting_string(config, "build_menu", "cmd_1", NULL );
|
p->build_1_cmd = utils_get_setting_string(config, "build_menu", "cmd_1", NULL);
|
||||||
p->build_2_cmd = utils_get_setting_string(config, "build_menu", "cmd_2", NULL );
|
p->build_2_cmd = utils_get_setting_string(config, "build_menu", "cmd_2", NULL);
|
||||||
p->build_3_cmd = utils_get_setting_string(config, "build_menu", "cmd_3", NULL );
|
p->build_3_cmd = utils_get_setting_string(config, "build_menu", "cmd_3", NULL);
|
||||||
p->build_1_label = utils_get_setting_string(config, "build_menu", "label_1", NULL );
|
p->build_1_label = utils_get_setting_string(config, "build_menu", "label_1", NULL);
|
||||||
p->build_2_label = utils_get_setting_string(config, "build_menu", "label_2", NULL );
|
p->build_2_label = utils_get_setting_string(config, "build_menu", "label_2", NULL);
|
||||||
p->build_3_label = utils_get_setting_string(config, "build_menu", "label_3", NULL );
|
p->build_3_label = utils_get_setting_string(config, "build_menu", "label_3", NULL);
|
||||||
|
|
||||||
if (project_prefs.project_session)
|
if (project_prefs.project_session)
|
||||||
{
|
{
|
||||||
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user