[Xfce4-commits] [apps/xfce4-terminal] 01/01: Add rewrap on resize control option
noreply at xfce.org
noreply at xfce.org
Thu Sep 29 15:47:43 CEST 2016
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit aa69c1066263504d03c25e16aa9cf404de31bf46
Author: Igor <f2404 at yandex.ru>
Date: Thu Sep 29 16:47:38 2016 +0300
Add rewrap on resize control option
---
terminal/terminal-preferences-dialog.c | 4 ++--
terminal/terminal-preferences.c | 11 +++++++++++
terminal/terminal-preferences.glade | 16 ++++++++++++++++
terminal/terminal-screen.c | 14 ++++++++++++++
4 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c
index 651cc34..5e417d7 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -143,8 +143,8 @@ terminal_preferences_dialog_init (TerminalPreferencesDialog *dialog)
"misc-cursor-shape", "misc-cursor-blinks",
"font-allow-bold", "misc-menubar-default",
"misc-toolbar-default", "misc-borders-default",
- "misc-tab-close-middle-click",
- "misc-mouse-autohide", "shortcuts-no-helpkey",
+ "misc-tab-close-middle-click", "misc-mouse-autohide",
+ "misc-rewrap-on-resize", "shortcuts-no-helpkey",
"shortcuts-no-mnemonics", "shortcuts-no-menukey",
"binding-backspace", "binding-delete",
"background-mode", "background-image-style",
diff --git a/terminal/terminal-preferences.c b/terminal/terminal-preferences.c
index 9b8723d..67c1baf 100644
--- a/terminal/terminal-preferences.c
+++ b/terminal/terminal-preferences.c
@@ -94,6 +94,7 @@ enum
PROP_MISC_HIGHLIGHT_URLS,
PROP_MISC_MIDDLE_CLICK_OPENS_URI,
PROP_MISC_DEFAULT_WORKING_DIR,
+ PROP_MISC_REWRAP_ON_RESIZE,
PROP_SCROLLING_BAR,
PROP_SCROLLING_LINES,
PROP_SCROLLING_ON_OUTPUT,
@@ -844,6 +845,16 @@ terminal_preferences_class_init (TerminalPreferencesClass *klass)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
+ * TerminalPreferences:misc-rewrap-on-resize:
+ **/
+ preferences_props[PROP_MISC_REWRAP_ON_RESIZE] =
+ g_param_spec_boolean ("misc-rewrap-on-resize",
+ NULL,
+ "MiscRewrapOnResize",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+ /**
* TerminalPreferences:scrolling-bar:
**/
preferences_props[PROP_SCROLLING_BAR] =
diff --git a/terminal/terminal-preferences.glade b/terminal/terminal-preferences.glade
index 3dc72d2..63b7294 100644
--- a/terminal/terminal-preferences.glade
+++ b/terminal/terminal-preferences.glade
@@ -3026,6 +3026,22 @@ when double clicking:</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="misc-rewrap-on-resize">
+ <property name="label" translatable="yes">Re_wrap terminal contents on resize</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">start</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 4661ad6..2c0fa8d 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -114,6 +114,7 @@ static void terminal_screen_update_misc_bell (TerminalScreen
static void terminal_screen_update_misc_cursor_blinks (TerminalScreen *screen);
static void terminal_screen_update_misc_cursor_shape (TerminalScreen *screen);
static void terminal_screen_update_misc_mouse_autohide (TerminalScreen *screen);
+static void terminal_screen_update_misc_rewrap_on_resize (TerminalScreen *screen);
static void terminal_screen_update_scrolling_lines (TerminalScreen *screen);
static void terminal_screen_update_scrolling_on_output (TerminalScreen *screen);
static void terminal_screen_update_scrolling_on_keystroke (TerminalScreen *screen);
@@ -291,6 +292,7 @@ terminal_screen_init (TerminalScreen *screen)
terminal_screen_update_misc_cursor_blinks (screen);
terminal_screen_update_misc_cursor_shape (screen);
terminal_screen_update_misc_mouse_autohide (screen);
+ terminal_screen_update_misc_rewrap_on_resize (screen);
terminal_screen_update_scrolling_bar (screen);
terminal_screen_update_scrolling_lines (screen);
terminal_screen_update_scrolling_on_output (screen);
@@ -543,6 +545,8 @@ terminal_screen_preferences_changed (TerminalPreferences *preferences,
terminal_screen_update_misc_cursor_shape (screen);
else if (strcmp ("misc-mouse-autohide", name) == 0)
terminal_screen_update_misc_mouse_autohide (screen);
+ else if (strcmp ("misc-rewrap-on-resize", name) == 0)
+ terminal_screen_update_misc_rewrap_on_resize (screen);
else if (strcmp ("scrolling-bar", name) == 0)
terminal_screen_update_scrolling_bar (screen);
else if (strcmp ("scrolling-lines", name) == 0 || strcmp ("scrolling-unlimited", name) == 0)
@@ -1078,6 +1082,16 @@ terminal_screen_update_misc_mouse_autohide (TerminalScreen *screen)
static void
+terminal_screen_update_misc_rewrap_on_resize (TerminalScreen *screen)
+{
+ gboolean bval;
+ g_object_get (G_OBJECT (screen->preferences), "misc-rewrap-on-resize", &bval, NULL);
+ vte_terminal_set_rewrap_on_resize (VTE_TERMINAL (screen->terminal), bval);
+}
+
+
+
+static void
terminal_screen_update_scrolling_lines (TerminalScreen *screen)
{
guint lines;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list