Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /src/dialogs.c [db140b] .. [0998f1] Maximize Restore

  Switch to side-by-side view

--- a/src/dialogs.c
+++ b/src/dialogs.c
@@ -156,7 +156,7 @@
 		}
 		g_slist_free(filelist);
 	}
-	if (app->project && NZV(app->project->base_path))
+	if (app->project && !EMPTY(app->project->base_path))
 		gtk_file_chooser_remove_shortcut_folder(GTK_FILE_CHOOSER(dialog),
 			app->project->base_path, NULL);
 }
@@ -469,7 +469,7 @@
 		if (initdir != NULL && g_path_is_absolute(initdir))
 				gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), initdir);
 
-		if (app->project && NZV(app->project->base_path))
+		if (app->project && !EMPTY(app->project->base_path))
 			gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog),
 					app->project->base_path, NULL);
 
@@ -486,7 +486,7 @@
 	GeanyDocument *doc = document_get_current();
 	gboolean success = FALSE;
 
-	g_return_val_if_fail(NZV(utf8_filename), FALSE);
+	g_return_val_if_fail(!EMPTY(utf8_filename), FALSE);
 
 	if (doc->file_name != NULL)
 	{
@@ -515,7 +515,7 @@
 	{
 		case GEANY_RESPONSE_RENAME:
 			/* rename doesn't check for empty filename or overwriting */
-			if (G_UNLIKELY(! NZV(new_filename)))
+			if (G_UNLIKELY(EMPTY(new_filename)))
 			{
 				utils_beep();
 				break;
@@ -628,7 +628,7 @@
 		g_free(fname);
 	}
 
-	if (app->project && NZV(app->project->base_path))
+	if (app->project && !EMPTY(app->project->base_path))
 		gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog),
 			app->project->base_path, NULL);
 
@@ -639,7 +639,7 @@
 	}
 	while (! save_as_dialog_handle_response(dialog, resp));
 
-	if (app->project && NZV(app->project->base_path))
+	if (app->project && !EMPTY(app->project->base_path))
 		gtk_file_chooser_remove_shortcut_folder(GTK_FILE_CHOOSER(dialog),
 			app->project->base_path, NULL);