Merge lp:~jtyr/terminator/terminator into lp:terminator/trunk

Proposed by Jiri Tyr
Status: Merged
Merged at revision: 1564
Proposed branch: lp:~jtyr/terminator/terminator
Merge into: lp:terminator/trunk
Diff against target: 164 lines (+85/-2)
5 files modified
doc/terminator_config.5 (+4/-0)
terminatorlib/config.py (+1/-0)
terminatorlib/preferences.glade (+53/-0)
terminatorlib/prefseditor.py (+22/-0)
terminatorlib/terminator.py (+5/-2)
To merge this branch: bzr merge lp:~jtyr/terminator/terminator
Reviewer Review Type Date Requested Status
Stephen Boddy Approve
Jiri Tyr (community) Needs Resubmitting
Review via email: mp+209719@code.launchpad.net

Description of the change

I have noticed that the Broadcast is set to "group" by default. I believe that this is wrong and it should be set to "off" by default.

To post a comment you must log in.
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hi Jiri, as the current maintainer and original contributor of that area of code I disagree that the current behaviour is wrong. The groups are there to facilitate flexible broadcast modes. If you don't need to broadcast there's not much (if any) need to use groups. By default new terminals do not get a new group, so there should be no negative use case.

It would take a convincing counter-argument to make me consider changing the current default behaviour. A patch making this configurable (including GUI and man pages changes too) is more likely to be accepted than a change in the default behaviour.

review: Disapprove
lp:~jtyr/terminator/terminator updated
1495. By Jiri Tyr

Configurable broadcast group

Revision history for this message
Jiri Tyr (jtyr) wrote :

Thanks for your comments. I have implemented the configurable broadcast group in the revision 1495. Please let me know if it looks fine or if I need to change something.

Revision history for this message
Jiri Tyr (jtyr) wrote :

Please could you review this change again? It's been one month since the commit and still no comment.

review: Needs Resubmitting
Revision history for this message
Jiri Tyr (jtyr) wrote :

Please can I get any feedback on this?

review: Needs Resubmitting
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

After all this time I finally merged this. Two minor differences,
1) I changed it from broadcast_group to broadcast_defaut.
2) I removed the line that causes the current mode to change. It felt unexpected when it happened, and I prefer the principle of least surprise. Change is picked up on next run.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/terminator_config.5'
2--- doc/terminator_config.5 2013-02-16 00:10:45 +0000
3+++ doc/terminator_config.5 2014-03-07 22:51:55 +0000
4@@ -61,6 +61,10 @@
5 If this is set to "hidden", the tab bar will not be shown. Note that hiding the tab bar is very confusing and not recommended.
6 Default value: \fBtop\fR
7 .TP
8+.B broadcast_group
9+Defines broadcast behavior. Can be any of: all, group, off.
10+Default value: \fBgroup\fR
11+.TP
12 .B close_button_on_tab \fR(boolean)
13 If set to True, tabs will have a close button on them.
14 Default value: \fBTrue\fR
15
16=== modified file 'terminatorlib/config.py'
17--- terminatorlib/config.py 2014-01-24 22:29:07 +0000
18+++ terminatorlib/config.py 2014-03-07 22:51:55 +0000
19@@ -83,6 +83,7 @@
20 'window_state' : 'normal',
21 'borderless' : False,
22 'tab_position' : 'top',
23+ 'broadcast_group' : 'group',
24 'close_button_on_tab' : True,
25 'hide_tabbar' : False,
26 'scroll_tabbar' : False,
27
28=== modified file 'terminatorlib/preferences.glade'
29--- terminatorlib/preferences.glade 2013-09-04 20:56:43 +0000
30+++ terminatorlib/preferences.glade 2014-03-07 22:51:55 +0000
31@@ -256,6 +256,23 @@
32 </row>
33 </data>
34 </object>
35+ <object class="GtkListStore" id="BroadcastGroupListStore">
36+ <columns>
37+ <!-- column-name position -->
38+ <column type="gchararray"/>
39+ </columns>
40+ <data>
41+ <row>
42+ <col id="0" translatable="yes">All</col>
43+ </row>
44+ <row>
45+ <col id="0" translatable="yes">Group</col>
46+ </row>
47+ <row>
48+ <col id="0" translatable="yes">None</col>
49+ </row>
50+ </data>
51+ </object>
52 <object class="GtkListStore" id="WindowStateListStore">
53 <columns>
54 <!-- column-name state -->
55@@ -531,6 +548,42 @@
56 </packing>
57 </child>
58 <child>
59+ <object class="GtkLabel" id="label41">
60+ <property name="visible">True</property>
61+ <property name="can_focus">False</property>
62+ <property name="label" translatable="yes">Broadcast group</property>
63+ </object>
64+ <packing>
65+ <property name="top_attach">18</property>
66+ <property name="bottom_attach">19</property>
67+ <property name="x_options"></property>
68+ <property name="y_options"></property>
69+ </packing>
70+ </child>
71+ <child>
72+ <object class="GtkComboBox" id="broadcastgroup">
73+ <property name="visible">True</property>
74+ <property name="can_focus">False</property>
75+ <property name="model">BroadcastGroupListStore</property>
76+ <property name="active">0</property>
77+ <signal name="changed" handler="on_broadcastgroup_changed" swapped="no"/>
78+ <child>
79+ <object class="GtkCellRendererText" id="cellrenderertext18"/>
80+ <attributes>
81+ <attribute name="text">0</attribute>
82+ </attributes>
83+ </child>
84+ </object>
85+ <packing>
86+ <property name="left_attach">1</property>
87+ <property name="right_attach">2</property>
88+ <property name="top_attach">18</property>
89+ <property name="bottom_attach">19</property>
90+ <property name="x_options"></property>
91+ <property name="y_options">GTK_EXPAND</property>
92+ </packing>
93+ </child>
94+ <child>
95 <object class="GtkLabel" id="label6">
96 <property name="visible">True</property>
97 <property name="can_focus">False</property>
98
99=== modified file 'terminatorlib/prefseditor.py'
100--- terminatorlib/prefseditor.py 2014-01-24 22:29:07 +0000
101+++ terminatorlib/prefseditor.py 2014-03-07 22:51:55 +0000
102@@ -248,6 +248,16 @@
103 else:
104 active = 0
105 widget.set_active(active)
106+ # Broadcast group
107+ option = self.config['broadcast_group']
108+ widget = guiget('broadcastgroup')
109+ if option == 'all':
110+ active = 0
111+ elif option == 'off':
112+ active = 2
113+ else:
114+ active = 1
115+ widget.set_active(active)
116 # scroll_tabbar
117 widget = guiget('scrolltabbarcheck')
118 widget.set_active(self.config['scroll_tabbar'])
119@@ -1007,6 +1017,18 @@
120 self.config['tab_position'] = value
121 self.config.save()
122
123+ def on_broadcastgroup_changed(self, widget):
124+ """Broadcast group changed"""
125+ selected = widget.get_active()
126+ if selected == 0:
127+ value = 'all'
128+ elif selected == 2:
129+ value = 'off'
130+ else:
131+ value = 'group'
132+ self.config['broadcast_group'] = value
133+ self.config.save()
134+
135 def on_winstatecombo_changed(self, widget):
136 """Window state changed"""
137 selected = widget.get_active()
138
139=== modified file 'terminatorlib/terminator.py'
140--- terminatorlib/terminator.py 2014-01-24 22:29:54 +0000
141+++ terminatorlib/terminator.py 2014-03-07 22:51:55 +0000
142@@ -56,10 +56,10 @@
143 self.terminals = []
144 if not self.groups:
145 self.groups = []
146- if self.groupsend == None:
147- self.groupsend = self.groupsend_type['group']
148 if not self.config:
149 self.config = Config()
150+ if self.groupsend == None:
151+ self.groupsend = self.groupsend_type[self.config['broadcast_group']]
152 if not self.keybindings:
153 self.keybindings = Keybindings()
154 self.keybindings.configure(self.config['keybindings'])
155@@ -370,6 +370,9 @@
156 if maker.isinstance(child, 'Notebook'):
157 child.configure()
158
159+ # Set broadcasting group
160+ self.groupsend = self.groupsend_type[self.config['broadcast_group']]
161+
162 def create_group(self, name):
163 """Create a new group"""
164 if name not in self.groups: