* Merge feature branch for tab/terminal title editing from Haim Daniel
* Tweak the shortcuts * Update the HTML manual * Add a missing image
This commit is contained in:
commit
e2f7f429ac
|
@ -501,15 +501,15 @@ Or maybe for you it is with tabs.
|
||||||
|
|
||||||
In Terminator you can rename three things:
|
In Terminator you can rename three things:
|
||||||
|
|
||||||
+----------+---------------------------+-------------------+
|
+----------------+---------------------------+--------------------+
|
||||||
| Edit | Mouse | Default Shortcut |
|
| Edit | Mouse | Default Shortcut |
|
||||||
+==========+===========================+===================+
|
+================+===========================+====================+
|
||||||
| Window | N/A | ``Alt``\ +\ ``T`` |
|
| Window title | N/A | ``Ctrl``\ +\ ``W`` |
|
||||||
+----------+---------------------------+-------------------+
|
+----------------+---------------------------+--------------------+
|
||||||
| Titlebar | ``double-click`` titlebar | N/A (TBD) |
|
| Tab title | ``double-click`` tab | ``Ctrl``\ +\ ``A`` |
|
||||||
+----------+---------------------------+-------------------+
|
+----------------+---------------------------+--------------------+
|
||||||
| Tab | ``double-click`` tab | N/A (TBD) |
|
| Terminal title | ``double-click`` titlebar | ``Ctrl``\ +\ ``X`` |
|
||||||
+----------+---------------------------+-------------------+
|
+----------------+---------------------------+--------------------+
|
||||||
|
|
||||||
Additionally all three can be saved/loaded from a :ref:`layout <layouts>`,
|
Additionally all three can be saved/loaded from a :ref:`layout <layouts>`,
|
||||||
or the window title can be set using a
|
or the window title can be set using a
|
||||||
|
|
|
@ -210,7 +210,17 @@
|
||||||
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#terminator-action-shots">Terminator action shots</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#terminator-action-shots">Terminator action shots</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#manual-updates">Manual updates</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#manual-updates">Manual updates</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#testing">Testing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#testing">Testing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#bugs">Bugs</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#bugs">Bugs</a><ul>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="gettinginvolved.html#bug-handling">Bug handling</a><ul>
|
||||||
|
<li class="toctree-l4"><a class="reference internal" href="gettinginvolved.html#initial-new">Initial/New</a></li>
|
||||||
|
<li class="toctree-l4"><a class="reference internal" href="gettinginvolved.html#investigation">Investigation</a></li>
|
||||||
|
<li class="toctree-l4"><a class="reference internal" href="gettinginvolved.html#acceptance">Acceptance</a></li>
|
||||||
|
<li class="toctree-l4"><a class="reference internal" href="gettinginvolved.html#resolved">Resolved</a></li>
|
||||||
|
<li class="toctree-l4"><a class="reference internal" href="gettinginvolved.html#available">Available</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#plugins">Plugins</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#plugins">Plugins</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#main-application-development">Main Application Development</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#main-application-development">Main Application Development</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#gtk3-port">GTK3 Port</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="gettinginvolved.html#gtk3-port">GTK3 Port</a></li>
|
||||||
|
@ -897,9 +907,9 @@ Or maybe for you it is with tabs.</p>
|
||||||
<p>In Terminator you can rename three things:</p>
|
<p>In Terminator you can rename three things:</p>
|
||||||
<table border="1" class="docutils">
|
<table border="1" class="docutils">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="18%" />
|
<col width="25%" />
|
||||||
<col width="48%" />
|
<col width="43%" />
|
||||||
<col width="34%" />
|
<col width="32%" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead valign="bottom">
|
<thead valign="bottom">
|
||||||
<tr class="row-odd"><th class="head">Edit</th>
|
<tr class="row-odd"><th class="head">Edit</th>
|
||||||
|
@ -908,17 +918,17 @@ Or maybe for you it is with tabs.</p>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody valign="top">
|
<tbody valign="top">
|
||||||
<tr class="row-even"><td>Window</td>
|
<tr class="row-even"><td>Window title</td>
|
||||||
<td>N/A</td>
|
<td>N/A</td>
|
||||||
<td><code class="docutils literal"><span class="pre">Alt</span></code>+<code class="docutils literal"><span class="pre">T</span></code></td>
|
<td><code class="docutils literal"><span class="pre">Ctrl</span></code>+<code class="docutils literal"><span class="pre">W</span></code></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="row-odd"><td>Titlebar</td>
|
<tr class="row-odd"><td>Tab title</td>
|
||||||
<td><code class="docutils literal"><span class="pre">double-click</span></code> titlebar</td>
|
|
||||||
<td>N/A (TBD)</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="row-even"><td>Tab</td>
|
|
||||||
<td><code class="docutils literal"><span class="pre">double-click</span></code> tab</td>
|
<td><code class="docutils literal"><span class="pre">double-click</span></code> tab</td>
|
||||||
<td>N/A (TBD)</td>
|
<td><code class="docutils literal"><span class="pre">Ctrl</span></code>+<code class="docutils literal"><span class="pre">A</span></code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row-even"><td>Terminal title</td>
|
||||||
|
<td><code class="docutils literal"><span class="pre">double-click</span></code> titlebar</td>
|
||||||
|
<td><code class="docutils literal"><span class="pre">Ctrl</span></code>+<code class="docutils literal"><span class="pre">X</span></code></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -501,15 +501,15 @@ Or maybe for you it is with tabs.
|
||||||
|
|
||||||
In Terminator you can rename three things:
|
In Terminator you can rename three things:
|
||||||
|
|
||||||
+----------+---------------------------+-------------------+
|
+----------------+---------------------------+--------------------+
|
||||||
| Edit | Mouse | Default Shortcut |
|
| Edit | Mouse | Default Shortcut |
|
||||||
+==========+===========================+===================+
|
+================+===========================+====================+
|
||||||
| Window | N/A | ``Alt``\ +\ ``T`` |
|
| Window title | N/A | ``Ctrl``\ +\ ``W`` |
|
||||||
+----------+---------------------------+-------------------+
|
+----------------+---------------------------+--------------------+
|
||||||
| Titlebar | ``double-click`` titlebar | N/A (TBD) |
|
| Tab title | ``double-click`` tab | ``Ctrl``\ +\ ``A`` |
|
||||||
+----------+---------------------------+-------------------+
|
+----------------+---------------------------+--------------------+
|
||||||
| Tab | ``double-click`` tab | N/A (TBD) |
|
| Terminal title | ``double-click`` titlebar | ``Ctrl``\ +\ ``X`` |
|
||||||
+----------+---------------------------+-------------------+
|
+----------------+---------------------------+--------------------+
|
||||||
|
|
||||||
Additionally all three can be saved/loaded from a :ref:`layout <layouts>`,
|
Additionally all three can be saved/loaded from a :ref:`layout <layouts>`,
|
||||||
or the window title can be set using a
|
or the window title can be set using a
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
|
@ -221,8 +221,14 @@ Decrease font size. \fBNote:\fP This may require you to press shift, depending o
|
||||||
.B Ctrl+Zero (0)
|
.B Ctrl+Zero (0)
|
||||||
Restore font size to original setting.
|
Restore font size to original setting.
|
||||||
.TP
|
.TP
|
||||||
.B Alt+T
|
.B Ctrl+W
|
||||||
Rename titlebar.
|
Rename window title.
|
||||||
|
.TP
|
||||||
|
.B Ctrl+A
|
||||||
|
Rename tab title.
|
||||||
|
.TP
|
||||||
|
.B Ctrl+X
|
||||||
|
Rename terminal title.
|
||||||
.TP
|
.TP
|
||||||
.B Super+1
|
.B Super+1
|
||||||
Insert terminal number, i.e. 1 to 12.
|
Insert terminal number, i.e. 1 to 12.
|
||||||
|
|
|
@ -286,6 +286,18 @@ Note that <Alt><Shift>1 may need to be provided as <Alt>! or similar,
|
||||||
depending on your keyboard layout.
|
depending on your keyboard layout.
|
||||||
Default value: \fBUnbound\fR
|
Default value: \fBUnbound\fR
|
||||||
.TP
|
.TP
|
||||||
|
.B edit_window_title
|
||||||
|
Edit the current active window's title
|
||||||
|
Default value: \fB<Ctrl>W\fR
|
||||||
|
.TP
|
||||||
|
.B edit_tab_title
|
||||||
|
Edit the currently active tab's title
|
||||||
|
Default value: \fB<Ctrl>A\fR
|
||||||
|
.TP
|
||||||
|
.B edit_terminal_title
|
||||||
|
Edit the currently active terminal's title
|
||||||
|
Default value: \fB<Ctrl>X\fR
|
||||||
|
.TP
|
||||||
.B full_screen
|
.B full_screen
|
||||||
Toggle the window to a fullscreen window.
|
Toggle the window to a fullscreen window.
|
||||||
Default value: \fBF11\fR
|
Default value: \fBF11\fR
|
||||||
|
|
|
@ -190,7 +190,9 @@ DEFAULTS = {
|
||||||
'broadcast_all' : '<Alt>a',
|
'broadcast_all' : '<Alt>a',
|
||||||
'insert_number' : '<Super>1',
|
'insert_number' : '<Super>1',
|
||||||
'insert_padded' : '<Super>0',
|
'insert_padded' : '<Super>0',
|
||||||
'edit_window_title': '<Alt>t',
|
'edit_window_title': '<Control>w',
|
||||||
|
'edit_tab_title' : '<Control>a',
|
||||||
|
'edit_terminal_title': '<Control>x',
|
||||||
'layout_launcher' : '<Alt>l',
|
'layout_launcher' : '<Alt>l',
|
||||||
'next_profile' : '',
|
'next_profile' : '',
|
||||||
'previous_profile' : '',
|
'previous_profile' : '',
|
||||||
|
|
|
@ -26,7 +26,8 @@ class EditableLabel(gtk.EventBox):
|
||||||
# pylint: disable-msg=R0904
|
# pylint: disable-msg=R0904
|
||||||
"""
|
"""
|
||||||
An eventbox that partialy emulate a gtk.Label
|
An eventbox that partialy emulate a gtk.Label
|
||||||
On double-click, the label is editable, entering an empty will revert back to automatic text
|
On double-click or key binding the label is editable, entering an empty
|
||||||
|
will revert back to automatic text
|
||||||
"""
|
"""
|
||||||
_label = None
|
_label = None
|
||||||
_ebox = None
|
_ebox = None
|
||||||
|
@ -69,30 +70,34 @@ class EditableLabel(gtk.EventBox):
|
||||||
"""get the text from the label"""
|
"""get the text from the label"""
|
||||||
return(self._label.get_text())
|
return(self._label.get_text())
|
||||||
|
|
||||||
|
def edit(self):
|
||||||
|
""" Start editing the widget text """
|
||||||
|
self.remove(self._label)
|
||||||
|
self._entry = gtk.Entry()
|
||||||
|
self._entry.set_text(self._label.get_text())
|
||||||
|
self._entry.show()
|
||||||
|
self.add(self._entry)
|
||||||
|
sig = self._entry.connect("focus-out-event", self._entry_to_label)
|
||||||
|
self._entry_handler_id.append(sig)
|
||||||
|
sig = self._entry.connect("activate", self._on_entry_activated)
|
||||||
|
self._entry_handler_id.append(sig)
|
||||||
|
sig = self._entry.connect("key-press-event",
|
||||||
|
self._on_entry_keypress)
|
||||||
|
self._entry_handler_id.append(sig)
|
||||||
|
sig = self._entry.connect("button-press-event",
|
||||||
|
self._on_entry_buttonpress)
|
||||||
|
self._entry_handler_id.append(sig)
|
||||||
|
self._entry.grab_focus()
|
||||||
|
|
||||||
def _on_click_text(self, widget, event):
|
def _on_click_text(self, widget, event):
|
||||||
# pylint: disable-msg=W0613
|
# pylint: disable-msg=W0613
|
||||||
"""event handling text edition"""
|
"""event handling text edition"""
|
||||||
if event.button != 1:
|
if event.button != 1:
|
||||||
return False
|
return False
|
||||||
if event.type == gtk.gdk._2BUTTON_PRESS:
|
if event.type == gtk.gdk._2BUTTON_PRESS:
|
||||||
self.remove (self._label)
|
self.edit()
|
||||||
self._entry = gtk.Entry ()
|
return True
|
||||||
self._entry.set_text (self._label.get_text ())
|
return False
|
||||||
self._entry.show ()
|
|
||||||
self.add (self._entry)
|
|
||||||
sig = self._entry.connect ("focus-out-event", self._entry_to_label)
|
|
||||||
self._entry_handler_id.append(sig)
|
|
||||||
sig = self._entry.connect ("activate", self._on_entry_activated)
|
|
||||||
self._entry_handler_id.append(sig)
|
|
||||||
sig = self._entry.connect ("key-press-event",
|
|
||||||
self._on_entry_keypress)
|
|
||||||
self._entry_handler_id.append(sig)
|
|
||||||
sig = self._entry.connect("button-press-event",
|
|
||||||
self._on_entry_buttonpress)
|
|
||||||
self._entry_handler_id.append(sig)
|
|
||||||
self._entry.grab_focus ()
|
|
||||||
return(True)
|
|
||||||
return(False)
|
|
||||||
|
|
||||||
def _entry_to_label (self, widget, event):
|
def _entry_to_label (self, widget, event):
|
||||||
# pylint: disable-msg=W0613
|
# pylint: disable-msg=W0613
|
||||||
|
|
|
@ -536,6 +536,9 @@ class TabLabel(gtk.HBox):
|
||||||
else:
|
else:
|
||||||
return(None)
|
return(None)
|
||||||
|
|
||||||
|
def edit(self):
|
||||||
|
self.label.edit()
|
||||||
|
|
||||||
def update_button(self):
|
def update_button(self):
|
||||||
"""Update the state of our close button"""
|
"""Update the state of our close button"""
|
||||||
if not self.config['close_button_on_tab']:
|
if not self.config['close_button_on_tab']:
|
||||||
|
|
|
@ -148,6 +148,8 @@ class PrefsEditor:
|
||||||
'insert_number' : _('Insert terminal number'),
|
'insert_number' : _('Insert terminal number'),
|
||||||
'insert_padded' : _('Insert padded terminal number'),
|
'insert_padded' : _('Insert padded terminal number'),
|
||||||
'edit_window_title': _('Edit window title'),
|
'edit_window_title': _('Edit window title'),
|
||||||
|
'edit_terminal_title': _('Edit terminal title'),
|
||||||
|
'edit_tab_title' : _('Edit tab title'),
|
||||||
'layout_launcher' : _('Open layout launcher window'),
|
'layout_launcher' : _('Open layout launcher window'),
|
||||||
'next_profile' : _('Switch to next profile'),
|
'next_profile' : _('Switch to next profile'),
|
||||||
'previous_profile' : _('Switch to previous profile'),
|
'previous_profile' : _('Switch to previous profile'),
|
||||||
|
|
|
@ -1838,6 +1838,20 @@ class Terminal(gtk.VBox):
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def key_edit_tab_title(self):
|
||||||
|
window = self.get_toplevel()
|
||||||
|
if not window.is_child_notebook():
|
||||||
|
return
|
||||||
|
|
||||||
|
notebook = window.get_children()[0]
|
||||||
|
n_page = notebook.get_current_page()
|
||||||
|
page = notebook.get_nth_page(n_page)
|
||||||
|
label = notebook.get_tab_label(page)
|
||||||
|
label.edit()
|
||||||
|
|
||||||
|
def key_edit_terminal_title(self):
|
||||||
|
self.titlebar.label.edit()
|
||||||
|
|
||||||
def key_layout_launcher(self):
|
def key_layout_launcher(self):
|
||||||
LAYOUTLAUNCHER=LayoutLauncher()
|
LAYOUTLAUNCHER=LayoutLauncher()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue