Fix sensitivity settings for compile and build toolbar items

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4307 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Lex Trotman 2009-10-12 23:54:47 +00:00
parent 59971e7929
commit 563cca15c0
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2009-10-13 Lex Trotman <elextr(at)gmail(dot)com>
* src/build.c:
Fix sensitivity settings for compile and build toolbar items.
2009-10-12 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/templates.c:

View File

@ -1381,7 +1381,7 @@ void build_menu_update(GeanyDocument *doc)
gint i, cmdcount, cmd, grp;
gboolean vis = FALSE;
gboolean have_path, build_running, exec_running, have_errors, cmd_sensitivity;
gboolean can_compile, can_make, run_sensitivity = FALSE, run_running = FALSE;
gboolean can_compile, can_build, can_make, run_sensitivity = FALSE, run_running = FALSE;
GeanyBuildCommand *bc;
if (menu_items.menu == NULL)
@ -1481,10 +1481,10 @@ void build_menu_update(GeanyDocument *doc)
}
}
can_compile = get_build_cmd(doc, GEANY_GBG_FT, GBO_TO_CMD(GEANY_GBO_BUILD), NULL) != NULL
can_build = get_build_cmd(doc, GEANY_GBG_FT, GBO_TO_CMD(GEANY_GBO_BUILD), NULL) != NULL
&& have_path && ! build_running;
if (widgets.toolitem_build != NULL)
gtk_widget_set_sensitive(widgets.toolitem_build, can_compile);
gtk_widget_set_sensitive(widgets.toolitem_build, can_build);
can_make = FALSE;
if (widgets.toolitem_make_all != NULL)
gtk_widget_set_sensitive(widgets.toolitem_make_all,
@ -1501,6 +1501,8 @@ void build_menu_update(GeanyDocument *doc)
if (widgets.toolitem_set_args != NULL)
gtk_widget_set_sensitive(widgets.toolitem_set_args, TRUE);
can_compile = get_build_cmd(doc, GEANY_GBG_FT, GBO_TO_CMD(GEANY_GBO_COMPILE), NULL) != NULL
&& have_path && ! build_running;
gtk_action_set_sensitive(widgets.compile_action, can_compile);
gtk_action_set_sensitive(widgets.build_action, can_make);
gtk_action_set_sensitive(widgets.run_action, run_sensitivity);