Merge lp:~seb128/software-properties/newtab-enable-proposed into lp:software-properties

Proposed by Sebastien Bacher
Status: Merged
Merged at revision: 953
Proposed branch: lp:~seb128/software-properties/newtab-enable-proposed
Merge into: lp:software-properties
Diff against target: 123 lines (+77/-1)
2 files modified
data/gtkbuilder/main.ui (+63/-0)
softwareproperties/gtk/SoftwarePropertiesGtk.py (+14/-1)
To merge this branch: bzr merge lp:~seb128/software-properties/newtab-enable-proposed
Reviewer Review Type Date Requested Status
Brian Murray Approve
Iain Lane Pending
Review via email: mp+286626@code.launchpad.net

Commit message

Create a new tab for developer options and move the proposed source to it.
Since those updates can create issues they shouldn't be too easy to enable
nor listed with the standard recommended sources.

Description of the change

Create a new tab for developer options and move the proposed source to it.
Since those updates can create issues they shouldn't be too easy to enable
nor listed with the standard recommended sources.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

the box/frame/alignement combo in the .ui is just a copy of what other tabs are using for consistency

Revision history for this message
Brian Murray (brian-murray) wrote :

Ideally, the ability to enable proposed would not appear if the release being used is the development one. Regardless, this is an improvement and this looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/gtkbuilder/main.ui'
2--- data/gtkbuilder/main.ui 2014-02-10 15:10:12 +0000
3+++ data/gtkbuilder/main.ui 2016-02-19 10:27:13 +0000
4@@ -1052,6 +1052,69 @@
5 <property name="tab_fill">False</property>
6 </packing>
7 </child>
8+ <child>
9+ <object class="GtkBox" id="dev_options">
10+ <property name="visible">True</property>
11+ <property name="can_focus">False</property>
12+ <property name="border_width">12</property>
13+ <property name="orientation">vertical</property>
14+ <property name="spacing">6</property>
15+ <child>
16+ <object class="GtkFrame" id="frame_children1">
17+ <property name="visible">True</property>
18+ <property name="can_focus">False</property>
19+ <property name="label_xalign">0</property>
20+ <property name="shadow_type">none</property>
21+ <child>
22+ <object class="GtkAlignment" id="alignment1">
23+ <property name="visible">True</property>
24+ <property name="can_focus">False</property>
25+ <property name="top_padding">6</property>
26+ <property name="left_padding">12</property>
27+ <child>
28+ <object class="GtkBox" id="dev_box">
29+ <property name="visible">True</property>
30+ <property name="can_focus">False</property>
31+ <property name="orientation">vertical</property>
32+ <child>
33+ <placeholder/>
34+ </child>
35+ </object>
36+ </child>
37+ </object>
38+ </child>
39+ <child type="label">
40+ <object class="GtkLabel" id="label_updates1">
41+ <property name="visible">True</property>
42+ <property name="can_focus">False</property>
43+ <property name="label" translatable="yes">Proposed updates are only for testing updates and providing development feedback. Enabling this may introduce instability.</property>
44+ <property name="use_markup">True</property>
45+ <property name="wrap">True</property>
46+ </object>
47+ </child>
48+ </object>
49+ <packing>
50+ <property name="expand">False</property>
51+ <property name="fill">True</property>
52+ <property name="position">0</property>
53+ </packing>
54+ </child>
55+ </object>
56+ <packing>
57+ <property name="position">5</property>
58+ </packing>
59+ </child>
60+ <child type="tab">
61+ <object class="GtkLabel" id="label7">
62+ <property name="visible">True</property>
63+ <property name="can_focus">False</property>
64+ <property name="label" translatable="yes">Developer Options</property>
65+ </object>
66+ <packing>
67+ <property name="position">5</property>
68+ <property name="tab_fill">False</property>
69+ </packing>
70+ </child>
71 </object>
72 <packing>
73 <property name="expand">True</property>
74
75=== modified file 'softwareproperties/gtk/SoftwarePropertiesGtk.py'
76--- softwareproperties/gtk/SoftwarePropertiesGtk.py 2015-11-01 12:39:02 +0000
77+++ softwareproperties/gtk/SoftwarePropertiesGtk.py 2016-02-19 10:27:13 +0000
78@@ -328,6 +328,8 @@
79 # Setup the checkbuttons for the child repos / updates
80 for checkbutton in self.vbox_updates.get_children():
81 self.vbox_updates.remove(checkbutton)
82+ for checkbutton in self.dev_box.get_children():
83+ self.dev_box.remove(checkbutton)
84 if len(self.distro.source_template.children) < 1:
85 self.frame_children.hide()
86 for template in self.distro.source_template.children:
87@@ -341,7 +343,10 @@
88 self.handlers[checkbox] = checkbox.connect("toggled",
89 self.on_checkbutton_child_toggled,
90 template)
91- self.vbox_updates.add(checkbox)
92+ if "proposed" in template.name:
93+ self.dev_box.add(checkbox)
94+ else:
95+ self.vbox_updates.add(checkbox)
96 checkbox.show()
97
98 # setup the server chooser
99@@ -376,6 +381,12 @@
100 checkbox.set_active(active)
101 checkbox.set_inconsistent(inconsistent)
102
103+ # Enable or disable the child source checkbuttons
104+ for checkbox in self.dev_box.get_children():
105+ (active, inconsistent) = self.get_comp_child_state(checkbox.template)
106+ checkbox.set_active(active)
107+ checkbox.set_inconsistent(inconsistent)
108+
109 # Enable or disable the component checkbuttons
110 for checkbox in self.vbox_dist_comps.get_children():
111 # check if the comp is enabled
112@@ -387,9 +398,11 @@
113 # and source code
114 if len(self.distro.enabled_comps) < 1:
115 self.vbox_updates.set_sensitive(False)
116+ self.dev_box.set_sensitive(False)
117 self.checkbutton_source_code.set_sensitive(False)
118 else:
119 self.vbox_updates.set_sensitive(True)
120+ self.dev_box.set_sensitive(True)
121 self.checkbutton_source_code.set_sensitive(True)
122
123 # Check for source code sources

Subscribers

People subscribed via source and target branches

to status/vote changes: