Merge lp:~jbicha/indicator-datetime/replace-deprecated-ui into lp:indicator-datetime/0.3

Proposed by Jeremy Bícha
Status: Work in progress
Proposed branch: lp:~jbicha/indicator-datetime/replace-deprecated-ui
Merge into: lp:indicator-datetime/0.3
Diff against target: 328 lines (+50/-51)
2 files modified
data/datetime-dialog.ui (+39/-40)
src/indicator-datetime.c (+11/-11)
To merge this branch: bzr merge lp:~jbicha/indicator-datetime/replace-deprecated-ui
Reviewer Review Type Date Requested Status
Michael Terry Needs Fixing
Review via email: mp+72997@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

To make the list button look right, you should also set the "inline-toolbar" style class for the toolbar. See gnome-control-center panels for example .ui xml for it. I don't know whether glade exposes it or not.

- <!-- column-name Visible Name -->
+ <!-- column-name Visible -->

Why this change?

- <object class="GtkVBox" id="vbox4">
+ <object class="GtkBox" id="box9">

This is missing its vertical orientation setting.

- GtkWidget * hbox = gtk_hbox_new(FALSE, 4);
+ GtkWidget * box = gtk_box_new(FALSE, 4);

FALSE here should be GTK_ORIENTATION_HORIZONTAL. Same for similar changes.

review: Needs Fixing

Unmerged revisions

125. By Jeremy Bícha

Use GNOME 3-style +/-
Replace GtkHBox & GtkVBox with GtkBox

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/datetime-dialog.ui'
2--- data/datetime-dialog.ui 2011-08-17 19:30:53 +0000
3+++ data/datetime-dialog.ui 2011-08-26 06:11:23 +0000
4@@ -1,7 +1,6 @@
5 <?xml version="1.0" encoding="UTF-8"?>
6 <interface>
7 <requires lib="gtk+" version="2.24"/>
8- <!-- interface-naming-policy project-wide -->
9 <object class="GtkAdjustment" id="dateAdjustment">
10 <property name="upper">1.8446744073709552e+19</property>
11 <property name="step_increment">86400</property>
12@@ -15,15 +14,14 @@
13 <property name="destroy_with_parent">True</property>
14 <property name="icon_name">time-admin</property>
15 <child>
16- <object class="GtkVBox" id="vbox1">
17+ <object class="GtkBox" id="box10">
18 <property name="visible">True</property>
19 <property name="can_focus">False</property>
20+ <property name="orientation">vertical</property>
21 <child>
22 <object class="GtkScrolledWindow" id="scrolledwindow1">
23 <property name="visible">True</property>
24 <property name="can_focus">True</property>
25- <property name="hscrollbar_policy">automatic</property>
26- <property name="vscrollbar_policy">automatic</property>
27 <child>
28 <object class="GtkTreeView" id="locationsView">
29 <property name="visible">True</property>
30@@ -31,6 +29,9 @@
31 <property name="model">locationsStore</property>
32 <property name="reorderable">True</property>
33 <property name="search_column">0</property>
34+ <child internal-child="selection">
35+ <object class="GtkTreeSelection" id="treeview-selection1"/>
36+ </child>
37 </object>
38 </child>
39 </object>
40@@ -52,57 +53,48 @@
41 </packing>
42 </child>
43 <child>
44- <object class="GtkHBox" id="hbox10">
45+ <object class="GtkToolbar" id="toolbar1">
46 <property name="visible">True</property>
47 <property name="can_focus">False</property>
48+ <property name="icon_size">1</property>
49 <child>
50- <object class="GtkButton" id="addButton">
51+ <object class="GtkToolButton" id="addButton">
52 <property name="visible">True</property>
53 <property name="can_focus">True</property>
54 <property name="receives_default">True</property>
55 <property name="use_action_appearance">False</property>
56+ <property name="label" translatable="yes">Add</property>
57+ <property name="use_underline">True</property>
58+ <property name="icon_name">list-add-symbolic</property>
59 <child internal-child="accessible">
60 <object class="AtkObject" id="addButton-atkobject">
61 <property name="AtkObject::accessible-description" translatable="yes">Add a Location…</property>
62 </object>
63 </child>
64- <child>
65- <object class="GtkImage" id="addImage">
66- <property name="visible">True</property>
67- <property name="can_focus">False</property>
68- <property name="stock">gtk-add</property>
69- </object>
70- </child>
71 </object>
72 <packing>
73 <property name="expand">False</property>
74- <property name="fill">True</property>
75- <property name="position">0</property>
76+ <property name="homogeneous">True</property>
77 </packing>
78 </child>
79 <child>
80- <object class="GtkButton" id="removeButton">
81+ <object class="GtkToolButton" id="removeButton">
82 <property name="visible">True</property>
83 <property name="can_focus">True</property>
84 <property name="receives_default">True</property>
85 <property name="use_action_appearance">False</property>
86+ <property name="label" translatable="yes">Remove</property>
87+ <property name="use_underline">True</property>
88+ <property name="icon_name">list-remove-symbolic</property>
89 <child internal-child="accessible">
90 <object class="AtkObject" id="removeButton-atkobject">
91 <property name="AtkObject::accessible-description" translatable="yes">Remove This Location</property>
92 </object>
93 </child>
94- <child>
95- <object class="GtkImage" id="removeImage">
96- <property name="visible">True</property>
97- <property name="can_focus">False</property>
98- <property name="stock">gtk-remove</property>
99- </object>
100- </child>
101 </object>
102 <packing>
103 <property name="expand">False</property>
104- <property name="fill">True</property>
105- <property name="position">1</property>
106+ <property name="homogeneous">True</property>
107 </packing>
108 </child>
109 </object>
110@@ -123,7 +115,7 @@
111 <column type="gchararray"/>
112 <!-- column-name Zone -->
113 <column type="gchararray"/>
114- <!-- column-name Visible Name -->
115+ <!-- column-name Visible -->
116 <column type="gchararray"/>
117 <!-- column-name Icon -->
118 <column type="gchararray"/>
119@@ -142,20 +134,23 @@
120 <property name="visible">True</property>
121 <property name="can_focus">True</property>
122 <child>
123- <object class="GtkVBox" id="timeDateBox">
124+ <object class="GtkBox" id="timeDateBox">
125 <property name="visible">True</property>
126 <property name="can_focus">False</property>
127 <property name="border_width">12</property>
128+ <property name="orientation">vertical</property>
129 <property name="spacing">6</property>
130 <child>
131- <object class="GtkVBox" id="timeDateOptions">
132+ <object class="GtkBox" id="timeDateOptions">
133 <property name="visible">True</property>
134 <property name="can_focus">False</property>
135+ <property name="orientation">vertical</property>
136 <property name="spacing">12</property>
137 <child>
138- <object class="GtkVBox" id="vbox6">
139+ <object class="GtkBox" id="box1">
140 <property name="visible">True</property>
141 <property name="can_focus">False</property>
142+ <property name="orientation">vertical</property>
143 <property name="spacing">6</property>
144 <child>
145 <object class="GtkAspectFrame" id="mapBox">
146@@ -175,7 +170,7 @@
147 </packing>
148 </child>
149 <child>
150- <object class="GtkHBox" id="hbox1">
151+ <object class="GtkBox" id="box2">
152 <property name="visible">True</property>
153 <property name="can_focus">False</property>
154 <property name="spacing">6</property>
155@@ -230,7 +225,7 @@
156 <property name="column_spacing">6</property>
157 <property name="row_spacing">6</property>
158 <child>
159- <object class="GtkHBox" id="hbox2">
160+ <object class="GtkBox" id="box3">
161 <property name="visible">True</property>
162 <property name="can_focus">False</property>
163 <property name="spacing">6</property>
164@@ -290,12 +285,12 @@
165 </packing>
166 </child>
167 <child>
168- <object class="GtkHBox" id="manualOptions">
169+ <object class="GtkBox" id="manualOptions">
170 <property name="visible">True</property>
171 <property name="can_focus">False</property>
172 <property name="spacing">12</property>
173 <child>
174- <object class="GtkHBox" id="hbox8">
175+ <object class="GtkBox" id="box4">
176 <property name="visible">True</property>
177 <property name="can_focus">False</property>
178 <property name="spacing">6</property>
179@@ -323,7 +318,7 @@
180 </packing>
181 </child>
182 <child>
183- <object class="GtkHBox" id="hbox9">
184+ <object class="GtkBox" id="box5">
185 <property name="visible">True</property>
186 <property name="can_focus">False</property>
187 <property name="spacing">6</property>
188@@ -428,10 +423,11 @@
189 <property name="yalign">0</property>
190 <property name="yscale">0</property>
191 <child>
192- <object class="GtkVBox" id="clockBox">
193+ <object class="GtkBox" id="clockBox">
194 <property name="visible">True</property>
195 <property name="can_focus">False</property>
196 <property name="border_width">12</property>
197+ <property name="orientation">vertical</property>
198 <property name="spacing">12</property>
199 <child>
200 <object class="GtkCheckButton" id="showClockCheck">
201@@ -451,14 +447,15 @@
202 </packing>
203 </child>
204 <child>
205- <object class="GtkHBox" id="clockOptions">
206+ <object class="GtkBox" id="clockOptions">
207 <property name="visible">True</property>
208 <property name="can_focus">False</property>
209 <property name="homogeneous">True</property>
210 <child>
211- <object class="GtkVBox" id="vbox2">
212+ <object class="GtkBox" id="box6">
213 <property name="visible">True</property>
214 <property name="can_focus">False</property>
215+ <property name="orientation">vertical</property>
216 <property name="spacing">6</property>
217 <child>
218 <object class="GtkLabel" id="label3">
219@@ -508,9 +505,10 @@
220 </packing>
221 </child>
222 <child>
223- <object class="GtkVBox" id="vbox5">
224+ <object class="GtkBox" id="box7">
225 <property name="visible">True</property>
226 <property name="can_focus">False</property>
227+ <property name="orientation">vertical</property>
228 <child>
229 <object class="GtkRadioButton" id="show12HourRadio">
230 <property name="label" translatable="yes">_12-hour time</property>
231@@ -579,9 +577,10 @@
232 </packing>
233 </child>
234 <child>
235- <object class="GtkVBox" id="vbox3">
236+ <object class="GtkBox" id="box8">
237 <property name="visible">True</property>
238 <property name="can_focus">False</property>
239+ <property name="orientation">vertical</property>
240 <property name="spacing">6</property>
241 <child>
242 <object class="GtkLabel" id="label4">
243@@ -622,7 +621,7 @@
244 <property name="yscale">0</property>
245 <property name="left_padding">24</property>
246 <child>
247- <object class="GtkVBox" id="vbox4">
248+ <object class="GtkBox" id="box9">
249 <property name="visible">True</property>
250 <property name="can_focus">False</property>
251 <property name="spacing">6</property>
252
253=== modified file 'src/indicator-datetime.c'
254--- src/indicator-datetime.c 2011-08-17 15:50:43 +0000
255+++ src/indicator-datetime.c 2011-08-26 06:11:23 +0000
256@@ -1260,7 +1260,7 @@
257
258 mi_data->gmi = gtk_menu_item_new();
259
260- GtkWidget * hbox = gtk_hbox_new(FALSE, 4);
261+ GtkWidget * box = gtk_box_new(FALSE, 4);
262
263 /* Icon, probably someone's face or avatar on an IM */
264 mi_data->icon = gtk_image_new();
265@@ -1292,7 +1292,7 @@
266 }
267 }
268 gtk_misc_set_alignment(GTK_MISC(mi_data->icon), 0.0, 0.5);
269- gtk_box_pack_start(GTK_BOX(hbox), mi_data->icon, FALSE, FALSE, 0);
270+ gtk_box_pack_start(GTK_BOX(box), mi_data->icon, FALSE, FALSE, 0);
271 gtk_widget_show(mi_data->icon);
272
273 /* Label, probably a username, chat room or mailbox name */
274@@ -1305,7 +1305,7 @@
275 gtk_widget_set_size_request(GTK_WIDGET(mi_data->label), length, -1); // Set the min size in pixels
276
277 gtk_label_set_ellipsize(GTK_LABEL(mi_data->label), PANGO_ELLIPSIZE_END);
278- gtk_box_pack_start(GTK_BOX(hbox), mi_data->label, TRUE, TRUE, 0);
279+ gtk_box_pack_start(GTK_BOX(box), mi_data->label, TRUE, TRUE, 0);
280 gtk_widget_show(mi_data->label);
281
282 /* Usually either the time or the count on the individual
283@@ -1313,11 +1313,11 @@
284 mi_data->right = gtk_label_new(dbusmenu_menuitem_property_get(newitem, APPOINTMENT_MENUITEM_PROP_RIGHT));
285 gtk_size_group_add_widget(self->priv->indicator_right_group, mi_data->right);
286 gtk_misc_set_alignment(GTK_MISC(mi_data->right), 1.0, 0.5);
287- gtk_box_pack_start(GTK_BOX(hbox), mi_data->right, FALSE, FALSE, 0);
288+ gtk_box_pack_start(GTK_BOX(box), mi_data->right, FALSE, FALSE, 0);
289 gtk_widget_show(mi_data->right);
290
291- gtk_container_add(GTK_CONTAINER(mi_data->gmi), hbox);
292- gtk_widget_show(hbox);
293+ gtk_container_add(GTK_CONTAINER(mi_data->gmi), box);
294+ gtk_widget_show(box);
295
296 dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(mi_data->gmi), parent);
297
298@@ -1470,12 +1470,12 @@
299 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mi_data->gmi),
300 dbusmenu_menuitem_property_get_bool(newitem, TIMEZONE_MENUITEM_PROP_RADIO));
301
302- GtkWidget * hbox = gtk_hbox_new(FALSE, 4);
303+ GtkWidget * box = gtk_box_new(FALSE, 4);
304
305 /* Label, probably a username, chat room or mailbox name */
306 mi_data->label = gtk_label_new("");
307 gtk_misc_set_alignment(GTK_MISC(mi_data->label), 0.0, 0.5);
308- gtk_box_pack_start(GTK_BOX(hbox), mi_data->label, TRUE, TRUE, 0);
309+ gtk_box_pack_start(GTK_BOX(box), mi_data->label, TRUE, TRUE, 0);
310 gtk_widget_show(mi_data->label);
311
312 /* Usually either the time or the count on the individual
313@@ -1483,13 +1483,13 @@
314 mi_data->right = gtk_label_new("");
315 gtk_size_group_add_widget(self->priv->indicator_right_group, mi_data->right);
316 gtk_misc_set_alignment(GTK_MISC(mi_data->right), 1.0, 0.5);
317- gtk_box_pack_start(GTK_BOX(hbox), mi_data->right, FALSE, FALSE, 0);
318+ gtk_box_pack_start(GTK_BOX(box), mi_data->right, FALSE, FALSE, 0);
319 gtk_widget_show(mi_data->right);
320
321 timezone_update_labels(mi_data);
322
323- gtk_container_add(GTK_CONTAINER(mi_data->gmi), hbox);
324- gtk_widget_show(hbox);
325+ gtk_container_add(GTK_CONTAINER(mi_data->gmi), box);
326+ gtk_widget_show(box);
327
328 dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(mi_data->gmi), parent);
329

Subscribers

People subscribed via source and target branches