[gnome-terminal] Don't enable "Save Contents" for stable versions.
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] Don't enable "Save Contents" for stable versions.
- Date: Tue, 10 Aug 2010 13:02:03 +0000 (UTC)
commit 7b20f12bfaf8fdac24fa99a031d1bee11b3c23fc
Author: Christian Persch <chpe gnome org>
Date: Tue Aug 10 14:50:23 2010 +0200
Don't enable "Save Contents" for stable versions.
... until vte supports async saving.
This reverts commit d2fd62f189406b512d9550a571791de66b556d36.
src/terminal-accels.c | 2 ++
src/terminal-window.c | 21 ++++++++++++++++++++-
src/terminal.xml | 2 +-
3 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/src/terminal-accels.c b/src/terminal-accels.c
index 4c23d19..afcb3b3 100644
--- a/src/terminal-accels.c
+++ b/src/terminal-accels.c
@@ -124,8 +124,10 @@ static KeyEntry file_entries[] =
KEY_NEW_WINDOW, ACCEL_PATH_NEW_WINDOW, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_n, NULL, FALSE, TRUE },
{ N_("New Profile"),
KEY_NEW_PROFILE, ACCEL_PATH_NEW_PROFILE, 0, 0, NULL, FALSE, TRUE },
+#if 0
{ N_("Save Contents"),
KEY_SAVE_CONTENTS, ACCEL_PATH_SAVE_CONTENTS, 0, 0, NULL, FALSE, TRUE },
+#endif
{ N_("Close Tab"),
KEY_CLOSE_TAB, ACCEL_PATH_CLOSE_TAB, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_w, NULL, FALSE, TRUE },
{ N_("Close Window"),
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 6e7fb9a..2b176b6 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -107,6 +107,20 @@ struct _TerminalWindowPrivate
#define STOCK_NEW_WINDOW "window-new"
#define STOCK_NEW_TAB "tab-new"
+#if 1
+/*
+ * We don't want to enable content saving until vte supports it async.
+ * So we disable this code for stable versions.
+ */
+#include "terminal-version.h"
+
+#if (TERMINAL_MINOR_VERSION & 1) != 0
+#define ENABLE_SAVE
+#else
+#undef ENABLE_SAVE
+#endif
+#endif
+
static void terminal_window_dispose (GObject *object);
static void terminal_window_finalize (GObject *object);
static gboolean terminal_window_state_event (GtkWidget *widget,
@@ -147,8 +161,10 @@ static void file_new_profile_callback (GtkAction *action,
TerminalWindow *window);
static void file_close_window_callback (GtkAction *action,
TerminalWindow *window);
+#ifdef ENABLE_SAVE
static void file_save_contents_callback (GtkAction *action,
TerminalWindow *window);
+#endif
static void file_close_tab_callback (GtkAction *action,
TerminalWindow *window);
static void edit_copy_callback (GtkAction *action,
@@ -1778,9 +1794,11 @@ terminal_window_init (TerminalWindow *window)
{ "FileNewProfile", GTK_STOCK_OPEN, N_("New _Profileâ?¦"), "",
NULL,
G_CALLBACK (file_new_profile_callback) },
+#ifdef ENABLE_SAVE
{ "FileSaveContents", GTK_STOCK_SAVE, N_("_Save Contents"), "",
NULL,
G_CALLBACK (file_save_contents_callback) },
+#endif
{ "FileCloseTab", GTK_STOCK_CLOSE, N_("C_lose Tab"), "<shift><control>W",
NULL,
G_CALLBACK (file_close_tab_callback) },
@@ -3160,6 +3178,7 @@ file_close_window_callback (GtkAction *action,
gtk_widget_destroy (GTK_WIDGET (window));
}
+#ifdef ENABLE_SAVE
static void
save_contents_dialog_on_response (GtkDialog *dialog, gint response_id, gpointer terminal)
{
@@ -3244,7 +3263,7 @@ file_save_contents_callback (GtkAction *action,
gtk_window_present (GTK_WINDOW (dialog));
}
-
+#endif /* ENABLE_SAVE */
static void
file_close_tab_callback (GtkAction *action,
diff --git a/src/terminal.xml b/src/terminal.xml
index 3c9cbed..7f0af85 100644
--- a/src/terminal.xml
+++ b/src/terminal.xml
@@ -7,7 +7,7 @@
<menu action="FileNewTabProfiles" />
<separator />
<menuitem action="FileNewProfile" />
- <menuitem action="FileSaveContents" />
+ <!-- <menuitem action="FileSaveContents" /> -->
<separator />
<menuitem action="FileCloseTab" />
<menuitem action="FileCloseWindow" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]