[geany/geany] 3bcd7f: Merge pull request #19 from techee/fixes

Matthew Brush git-noreply at xxxxx
Thu Jul 26 00:03:35 UTC 2012


Branch:      refs/heads/document-messages
Author:      Matthew Brush <mbrush at codebrainz.ca>
Committer:   Matthew Brush <mbrush at codebrainz.ca>
Date:        Mon, 27 Feb 2012 05:04:50
Commit:      3bcd7fc40078efd601f0e9bed8efec971d505db2
             https://github.com/geany/geany/commit/3bcd7fc40078efd601f0e9bed8efec971d505db2

Log Message:
-----------
Merge pull request #19 from techee/fixes

Fixes


Modified Paths:
--------------
    src/document.c
    src/notebook.c
    src/notebook.h
    tagmanager/tm_workspace.c

Modified: src/document.c
3 files changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -2895,7 +2895,8 @@ gboolean document_check_disk_status(GeanyDocument *doc, gboolean force)
 	g_return_val_if_fail(doc != NULL, FALSE);
 
 	/* ignore remote files and documents that have never been saved to disk */
-	if (file_prefs.disk_check_timeout == 0 || doc->real_path == NULL || doc->priv->is_remote)
+	if (notebook_switch_in_progress() || file_prefs.disk_check_timeout == 0 
+			|| doc->real_path == NULL || doc->priv->is_remote)
 		return FALSE;
 
 	use_gio_filemon = (doc->priv->monitor != NULL);


Modified: src/notebook.c
12 files changed, 11 insertions(+), 1 deletions(-)
===================================================================
@@ -169,6 +169,8 @@ static gboolean on_key_release_event(GtkWidget *widget, GdkEventKey *ev, gpointe
 	/* user may have rebound keybinding to a different modifier than Ctrl, so check all */
 	if (switch_in_progress && is_modifier_key(ev->keyval))
 	{
+		GeanyDocument *doc;
+
 		switch_in_progress = FALSE;
 
 		if (switch_dialog)
@@ -177,8 +179,10 @@ static gboolean on_key_release_event(GtkWidget *widget, GdkEventKey *ev, gpointe
 			switch_dialog = NULL;
 		}
 
-		update_mru_docs_head(document_get_current());
+		doc = document_get_current();
+		update_mru_docs_head(doc);
 		mru_pos = 0;
+		document_check_disk_status(doc, TRUE);
 	}
 	return FALSE;
 }
@@ -289,6 +293,12 @@ void notebook_switch_tablastused(void)
 }
 
 
+gboolean notebook_switch_in_progress(void)
+{
+	return switch_in_progress;
+}
+
+
 static gboolean focus_sci(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 {
 	GeanyDocument *doc = document_get_current();


Modified: src/notebook.h
4 files changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -36,4 +36,8 @@
  * previous tabs. */
 void notebook_switch_tablastused(void);
 
+/* Returns TRUE when MRU tab switch is in progress (i.e. not at the final 
+ * document yet). */
+gboolean notebook_switch_in_progress(void);
+
 #endif


Modified: tagmanager/tm_workspace.c
8 files changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -384,15 +384,21 @@ gboolean tm_workspace_create_global_tags(const char *pre_process, const char **i
 	 */
 	if (pre_process != NULL)
 	{
+		gint ret;
 		command = g_strdup_printf("%s %s | grep -v -E '^\\s*(G_BEGIN_DECLS|G_END_DECLS)\\s*$' > %s",
 							  pre_process, temp_file, temp_file2);
 #ifdef TM_DEBUG
 		g_message("Executing: %s", command);
 #endif
-		system(command);
+		ret = system(command);
 		g_free(command);
 		g_unlink(temp_file);
 		g_free(temp_file);
+		if (ret == -1)
+		{
+			g_unlink(temp_file2);
+			return FALSE;
+		}
 	}
 	else
 	{


@@ Diff output truncated at 100000 characters. @@


--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Commits mailing list