[gedit] Bug 383293 - Don't show the revert confirmation dialog if the tab can be closed
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Bug 383293 - Don't show the revert confirmation dialog if the tab can be closed
- Date: Sat, 22 May 2010 16:12:51 +0000 (UTC)
commit f9e2665791a828a2081e6aaeb3e9eb44cbbb2974
Author: Garrett Regier <alias301 gmail com>
Date: Sat May 22 09:08:26 2010 -0700
Bug 383293 - Don't show the revert confirmation dialog if the tab can be closed
gedit/gedit-commands-file.c | 6 ++++--
gedit/gedit-window.c | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index 598adea..788b441 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -1324,9 +1324,11 @@ _gedit_cmd_file_revert (GtkAction *action,
g_return_if_fail (tab != NULL);
/* If we are already displaying a notification
- * reverting will drop local modifications, do
+ * reverting will drop local modifications or
+ * if the document has not been modified, do
* not bug the user further */
- if (gedit_tab_get_state (tab) == GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION)
+ if (gedit_tab_get_state (tab) == GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION ||
+ _gedit_tab_can_close (tab))
{
do_revert (window, tab);
return;
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 96d9e6d..33b01d5 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -2263,7 +2263,7 @@ update_cursor_position_statusbar (GtkTextBuffer *buffer,
gtk_text_buffer_get_insert (buffer));
row = gtk_text_iter_get_line (&iter);
- col = gtk_source_view_get_visual_column (view, &iter);
+ col = gtk_source_view_get_visual_column (GTK_SOURCE_VIEW (view), &iter);
gedit_statusbar_set_cursor_position (
GEDIT_STATUSBAR (window->priv->statusbar),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]