Revision: 1498
http://svn.sourceforge.net/geany/?rev=1498&view=rev
Author: ntrel
Date: 2007-05-01 08:48:53 -0700 (Tue, 01 May 2007)
Log Message:
-----------
Allow a blank project base path to use the default Make All command.
Update the 'project already open' & 'base path not found' dialogs.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/project.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-05-01 12:27:56 UTC (rev 1497)
+++ trunk/ChangeLog 2007-05-01 15:48:53 UTC (rev 1498)
@@ -8,6 +8,9 @@
* src/build.c, src/project.c:
Allow run for any file (with a path) when a valid project run command
is set.
+ * src/project.c:
+ Allow a blank project base path to use the default Make All command.
+ Update the 'project already open' & 'base path not found' dialogs.
2007-04-30 Nick Treleaven <nick.treleaven(a)btinternet.com>
Modified: trunk/src/project.c
===================================================================
--- trunk/src/project.c 2007-05-01 12:27:56 UTC (rev 1497)
+++ trunk/src/project.c 2007-05-01 15:48:53 UTC (rev 1498)
@@ -381,6 +381,9 @@
gtk_misc_set_alignment(GTK_MISC(label), 1, 0);
e->base_path = gtk_entry_new();
+ gtk_tooltips_set_tip(tooltips, e->base_path,
+ _("Directory to run Make All from. "
+ "Leave blank to use the default command."), NULL);
button = gtk_button_new();
g_signal_connect((gpointer) button, "clicked",
G_CALLBACK(on_folder_open_button_clicked), e->base_path);
@@ -496,11 +499,9 @@
{
if (app->project != NULL)
{
- gchar *msg =
- _("The '%s' project is already open. "
- "Do you want to close it before proceeding?");
-
- if (dialogs_show_question(msg, app->project->name))
+ if (dialogs_show_question_full(GTK_STOCK_OK, GTK_STOCK_CANCEL,
+ _("Do you want to close it before proceeding?"),
+ _("The '%s' project is already open. "), app->project->name))
{
project_close();
return TRUE;
@@ -548,19 +549,15 @@
}
base_path = gtk_entry_get_text(GTK_ENTRY(e->base_path));
- if (strlen(base_path) == 0)
- {
- SHOW_ERR(_("You have specified an invalid project base path."));
- gtk_widget_grab_focus(e->base_path);
- return FALSE;
- }
- else
+ if (NZV(base_path))
{ // check whether the given directory actually exists
gchar *locale_path = utils_get_locale_from_utf8(base_path);
if (! g_file_test(locale_path, G_FILE_TEST_IS_DIR))
{
- if (dialogs_show_question(
- _("The specified project base path does not exist. Should it be created?")))
+ if (dialogs_show_question_full(GTK_STOCK_OK, GTK_STOCK_CANCEL,
+ _("Create the project's base path directory?"),
+ _("The path \"%s\" does not exist."),
+ base_path))
{
utils_mkdir(locale_path, TRUE);
}
@@ -894,7 +891,7 @@
const gchar *project_get_make_dir()
{
- if (app->project != NULL)
+ if (app->project != NULL && NZV(app->project->base_path))
return app->project->base_path;
else
return NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.