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
=== modified file 'doc/terminator_config.5'
--- doc/terminator_config.5 2013-02-16 00:10:45 +0000
+++ doc/terminator_config.5 2014-03-07 22:51:55 +0000
@@ -61,6 +61,10 @@
61If this is set to "hidden", the tab bar will not be shown. Note that hiding the tab bar is very confusing and not recommended.61If this is set to "hidden", the tab bar will not be shown. Note that hiding the tab bar is very confusing and not recommended.
62Default value: \fBtop\fR62Default value: \fBtop\fR
63.TP63.TP
64.B broadcast_group
65Defines broadcast behavior. Can be any of: all, group, off.
66Default value: \fBgroup\fR
67.TP
64.B close_button_on_tab \fR(boolean)68.B close_button_on_tab \fR(boolean)
65If set to True, tabs will have a close button on them.69If set to True, tabs will have a close button on them.
66Default value: \fBTrue\fR70Default value: \fBTrue\fR
6771
=== modified file 'terminatorlib/config.py'
--- terminatorlib/config.py 2014-01-24 22:29:07 +0000
+++ terminatorlib/config.py 2014-03-07 22:51:55 +0000
@@ -83,6 +83,7 @@
83 'window_state' : 'normal',83 'window_state' : 'normal',
84 'borderless' : False,84 'borderless' : False,
85 'tab_position' : 'top',85 'tab_position' : 'top',
86 'broadcast_group' : 'group',
86 'close_button_on_tab' : True,87 'close_button_on_tab' : True,
87 'hide_tabbar' : False,88 'hide_tabbar' : False,
88 'scroll_tabbar' : False,89 'scroll_tabbar' : False,
8990
=== modified file 'terminatorlib/preferences.glade'
--- terminatorlib/preferences.glade 2013-09-04 20:56:43 +0000
+++ terminatorlib/preferences.glade 2014-03-07 22:51:55 +0000
@@ -256,6 +256,23 @@
256 </row>256 </row>
257 </data>257 </data>
258 </object>258 </object>
259 <object class="GtkListStore" id="BroadcastGroupListStore">
260 <columns>
261 <!-- column-name position -->
262 <column type="gchararray"/>
263 </columns>
264 <data>
265 <row>
266 <col id="0" translatable="yes">All</col>
267 </row>
268 <row>
269 <col id="0" translatable="yes">Group</col>
270 </row>
271 <row>
272 <col id="0" translatable="yes">None</col>
273 </row>
274 </data>
275 </object>
259 <object class="GtkListStore" id="WindowStateListStore">276 <object class="GtkListStore" id="WindowStateListStore">
260 <columns>277 <columns>
261 <!-- column-name state -->278 <!-- column-name state -->
@@ -531,6 +548,42 @@
531 </packing>548 </packing>
532 </child>549 </child>
533 <child>550 <child>
551 <object class="GtkLabel" id="label41">
552 <property name="visible">True</property>
553 <property name="can_focus">False</property>
554 <property name="label" translatable="yes">Broadcast group</property>
555 </object>
556 <packing>
557 <property name="top_attach">18</property>
558 <property name="bottom_attach">19</property>
559 <property name="x_options"></property>
560 <property name="y_options"></property>
561 </packing>
562 </child>
563 <child>
564 <object class="GtkComboBox" id="broadcastgroup">
565 <property name="visible">True</property>
566 <property name="can_focus">False</property>
567 <property name="model">BroadcastGroupListStore</property>
568 <property name="active">0</property>
569 <signal name="changed" handler="on_broadcastgroup_changed" swapped="no"/>
570 <child>
571 <object class="GtkCellRendererText" id="cellrenderertext18"/>
572 <attributes>
573 <attribute name="text">0</attribute>
574 </attributes>
575 </child>
576 </object>
577 <packing>
578 <property name="left_attach">1</property>
579 <property name="right_attach">2</property>
580 <property name="top_attach">18</property>
581 <property name="bottom_attach">19</property>
582 <property name="x_options"></property>
583 <property name="y_options">GTK_EXPAND</property>
584 </packing>
585 </child>
586 <child>
534 <object class="GtkLabel" id="label6">587 <object class="GtkLabel" id="label6">
535 <property name="visible">True</property>588 <property name="visible">True</property>
536 <property name="can_focus">False</property>589 <property name="can_focus">False</property>
537590
=== modified file 'terminatorlib/prefseditor.py'
--- terminatorlib/prefseditor.py 2014-01-24 22:29:07 +0000
+++ terminatorlib/prefseditor.py 2014-03-07 22:51:55 +0000
@@ -248,6 +248,16 @@
248 else:248 else:
249 active = 0249 active = 0
250 widget.set_active(active)250 widget.set_active(active)
251 # Broadcast group
252 option = self.config['broadcast_group']
253 widget = guiget('broadcastgroup')
254 if option == 'all':
255 active = 0
256 elif option == 'off':
257 active = 2
258 else:
259 active = 1
260 widget.set_active(active)
251 # scroll_tabbar261 # scroll_tabbar
252 widget = guiget('scrolltabbarcheck')262 widget = guiget('scrolltabbarcheck')
253 widget.set_active(self.config['scroll_tabbar'])263 widget.set_active(self.config['scroll_tabbar'])
@@ -1007,6 +1017,18 @@
1007 self.config['tab_position'] = value1017 self.config['tab_position'] = value
1008 self.config.save()1018 self.config.save()
10091019
1020 def on_broadcastgroup_changed(self, widget):
1021 """Broadcast group changed"""
1022 selected = widget.get_active()
1023 if selected == 0:
1024 value = 'all'
1025 elif selected == 2:
1026 value = 'off'
1027 else:
1028 value = 'group'
1029 self.config['broadcast_group'] = value
1030 self.config.save()
1031
1010 def on_winstatecombo_changed(self, widget):1032 def on_winstatecombo_changed(self, widget):
1011 """Window state changed"""1033 """Window state changed"""
1012 selected = widget.get_active()1034 selected = widget.get_active()
10131035
=== modified file 'terminatorlib/terminator.py'
--- terminatorlib/terminator.py 2014-01-24 22:29:54 +0000
+++ terminatorlib/terminator.py 2014-03-07 22:51:55 +0000
@@ -56,10 +56,10 @@
56 self.terminals = []56 self.terminals = []
57 if not self.groups:57 if not self.groups:
58 self.groups = []58 self.groups = []
59 if self.groupsend == None:
60 self.groupsend = self.groupsend_type['group']
61 if not self.config:59 if not self.config:
62 self.config = Config()60 self.config = Config()
61 if self.groupsend == None:
62 self.groupsend = self.groupsend_type[self.config['broadcast_group']]
63 if not self.keybindings:63 if not self.keybindings:
64 self.keybindings = Keybindings()64 self.keybindings = Keybindings()
65 self.keybindings.configure(self.config['keybindings'])65 self.keybindings.configure(self.config['keybindings'])
@@ -370,6 +370,9 @@
370 if maker.isinstance(child, 'Notebook'):370 if maker.isinstance(child, 'Notebook'):
371 child.configure()371 child.configure()
372372
373 # Set broadcasting group
374 self.groupsend = self.groupsend_type[self.config['broadcast_group']]
375
373 def create_group(self, name):376 def create_group(self, name):
374 """Create a new group"""377 """Create a new group"""
375 if name not in self.groups:378 if name not in self.groups: