Merge lp:~ken-vandine/gwibber/gtk3_4_deprecations into lp:gwibber
- gtk3_4_deprecations
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 1242 |
Proposed branch: | lp:~ken-vandine/gwibber/gtk3_4_deprecations |
Merge into: | lp:gwibber |
Diff against target: |
1176 lines (+138/-171) 24 files modified
client/attachments-item.vala (+7/-7) client/gwibber-client.vala (+2/-27) client/gwibber-preferences.vala (+2/-2) client/home-item.vala (+2/-2) client/messages-item.vala (+2/-2) client/private-item.vala (+2/-2) client/public-item.vala (+2/-2) client/replies-item.vala (+2/-2) client/searches-item.vala (+9/-8) client/stream-entry.vala (+4/-4) client/tab-bar-item.vala (+6/-6) client/tab-bar-widgets.vala (+9/-8) client/tab-bar.vala (+16/-14) client/users-item.vala (+9/-8) libgwibber-gtk/action-box.vala (+3/-2) libgwibber-gtk/entry.vala (+10/-9) libgwibber-gtk/search-view-tile.vala (+5/-5) libgwibber-gtk/search-view.vala (+1/-1) libgwibber-gtk/stream-view-tile.vala (+14/-14) libgwibber-gtk/stream-view.vala (+6/-4) libgwibber-gtk/user-view-tile.vala (+14/-14) libgwibber-gtk/user-view.vala (+1/-1) libgwibber/searches.vala (+4/-10) libgwibber/streams.vala (+6/-17) |
To merge this branch: | bzr merge lp:~ken-vandine/gwibber/gtk3_4_deprecations |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Terry (community) | Approve | ||
Review via email: mp+89152@code.launchpad.net |
Commit message
Description of the change
Dropped deprecations from gtk, removed some unused code and cleaned up some compiler warnings.
- 1241. By Ken VanDine
-
merged valac-0.16 port
Ken VanDine (ken-vandine) wrote : | # |
> Pro tip: when filing a merge request you can set a 'prerequisite branch' and
> that branch's changes won't show up in the merge diff that LP shows (because
> those changes are taken care of in the separate merge for that branch). So
> you could've done that here for the valac-0.16 branch. No big deal, just
> saying for future more complicated merges.
Sorry, I meant to do that. That is merged into trunk now, so should be cleaner.
>
> + box.set_homogeneous (false);
>
>
> You've got this everywhere, but shouldn't need it. "homogeneous" defaults to
> false. Not bad to be explicit, but adds a lot of lines to the code. :)
Good point, I tend to be very explicit but it is a lot of noise. I removed those.
> - Object (stream:"search", icon_name:
> streams:streams);
> + Object (stream:"search", icon_name:
>
> Seems wrong? You do this for SearchesItem and UsersItem. With this change,
> you're dropping the incoming stream argument on the floor, which can't be
> right.
In TabBarItem I had renamed streams to streams_map to make it clearer, which isn't used at all in UsersItem or SearchesItem. Those are passed Gwibber.Streams instead of a HashMap like the others.
Michael Terry (mterry) wrote : | # |
> In TabBarItem I had renamed streams to streams_map to make it clearer, which isn't used at all in UsersItem or
> SearchesItem. Those are passed Gwibber.Streams instead of a HashMap like the others.
Right, but I guess I would expect either the argument is dropped from the constructor prototype or it is used in the constructor?
- 1242. By Ken VanDine
-
Merged latest changes
- 1243. By Ken VanDine
-
Don't drop the streams argument in UsersItem and SearchesItem
Ken VanDine (ken-vandine) wrote : | # |
I see your point, I added it back. Thanks!
Michael Terry (mterry) wrote : | # |
OK, then that's all the comments I had! Looks fine.
Preview Diff
1 | === modified file 'client/attachments-item.vala' |
2 | --- client/attachments-item.vala 2011-09-09 21:30:29 +0000 |
3 | +++ client/attachments-item.vala 2012-01-19 17:41:24 +0000 |
4 | @@ -19,11 +19,11 @@ |
5 | public class AttachmentsItem : TabBarStreamItem |
6 | { |
7 | private Gtk.Alignment _align; |
8 | - private Gtk.HBox box; |
9 | + private Gtk.Box box; |
10 | |
11 | - public AttachmentsItem (Gee.HashMap streams) |
12 | + public AttachmentsItem (Gee.HashMap streams_map) |
13 | { |
14 | - Object (stream:"images", icon_name:"mail-attachment", tooltip:_("Attachments"), streams:streams); |
15 | + Object (stream:"images", icon_name:"mail-attachment", tooltip:_("Attachments"), streams_map:streams_map); |
16 | } |
17 | |
18 | construct |
19 | @@ -31,7 +31,7 @@ |
20 | |
21 | _align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 1.0f); |
22 | |
23 | - box = new Gtk.HBox (false, 12); |
24 | + box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
25 | _align.add (box); |
26 | |
27 | var images_but = new TabWidgets.RadioButton (_("Images")); |
28 | @@ -39,7 +39,7 @@ |
29 | images_but.clicked.connect(() => { |
30 | if (images_but.active) |
31 | { |
32 | - view.model = streams["images"]; |
33 | + view.model = streams_map["images"]; |
34 | view.stream = "images"; |
35 | } |
36 | }); |
37 | @@ -50,7 +50,7 @@ |
38 | links_but.clicked.connect(() => { |
39 | if (links_but.active) |
40 | { |
41 | - view.model = streams["links"]; |
42 | + view.model = streams_map["links"]; |
43 | view.stream = "links"; |
44 | } |
45 | }); |
46 | @@ -61,7 +61,7 @@ |
47 | videos_but.clicked.connect(() => { |
48 | if (videos_but.active) |
49 | { |
50 | - view.model = streams["videos"]; |
51 | + view.model = streams_map["videos"]; |
52 | view.stream = "videos"; |
53 | } |
54 | }); |
55 | |
56 | === modified file 'client/gwibber-client.vala' |
57 | --- client/gwibber-client.vala 2011-11-01 15:38:27 +0000 |
58 | +++ client/gwibber-client.vala 2012-01-19 17:41:24 +0000 |
59 | @@ -19,8 +19,6 @@ |
60 | public class Client : Gtk.Window |
61 | { |
62 | private Gwibber.Streams streams_service; |
63 | - private Gtk.Spinner spinner; |
64 | - private Gtk.Alignment spinner_align; |
65 | private GLib.Settings state_settings; |
66 | public Gee.HashMap <string, Dee.Model?> streams_map; |
67 | public Gee.HashMap <string, TabBarItem?> items_map; |
68 | @@ -56,23 +54,9 @@ |
69 | state_settings = new GLib.Settings ("org.gwibber.state"); |
70 | streams_map = new Gee.HashMap<string?, Dee.Model?> (); |
71 | items_map = new Gee.HashMap<string?, TabBarItem?> (); |
72 | - spinner = new Gtk.Spinner (); |
73 | |
74 | (Gtk.Window)configure_event.connect(on_configure_event); |
75 | |
76 | - /* |
77 | - service.loading_started.connect((source) => { |
78 | - debug ("Loading started"); |
79 | - spinner_align.show_all (); |
80 | - spinner.show (); |
81 | - spinner.start (); |
82 | - }); |
83 | - service.loading_complete.connect((source) => { |
84 | - debug ("Loading completed"); |
85 | - spinner_align.hide (); |
86 | - spinner.stop (); |
87 | - }); |
88 | - */ |
89 | set_name(Config.PACKAGE); |
90 | set_icon_name("gwibber"); |
91 | set_title("Gwibber"); |
92 | @@ -87,8 +71,8 @@ |
93 | // Tab Bar |
94 | tabbar = new TabBar (); |
95 | |
96 | - var main_box = new Gtk.VBox(false, 0); |
97 | - main_box.pack_end(tabbar, true, true, 0); |
98 | + var main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
99 | + main_box.pack_end (tabbar, true, true, 0); |
100 | add (main_box); |
101 | |
102 | streams_service = new Gwibber.Streams (); |
103 | @@ -163,12 +147,6 @@ |
104 | return false; |
105 | }); |
106 | |
107 | - //spinner_align = new Gtk.Alignment(0.5f, 0.5f, 0, 0); |
108 | - //spinner_align.add(spinner); |
109 | - //spinner.set_size_request (40, 40); |
110 | - |
111 | - //main_box.add (spinner_align); |
112 | - //spinner_align.hide (); |
113 | } |
114 | |
115 | public Gtk.MenuBar create_menus () |
116 | @@ -281,9 +259,6 @@ |
117 | } |
118 | |
119 | |
120 | - static void on_close_stream() { |
121 | - } |
122 | - |
123 | static void on_about() { |
124 | |
125 | string license = _("Gwibber is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nGwibber is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with Gwibber; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130159 USA"); |
126 | |
127 | === modified file 'client/gwibber-preferences.vala' |
128 | --- client/gwibber-preferences.vala 2011-08-30 17:57:21 +0000 |
129 | +++ client/gwibber-preferences.vala 2012-01-19 17:41:24 +0000 |
130 | @@ -39,8 +39,8 @@ |
131 | error ("Could not load UI: %s", e.message); |
132 | } |
133 | |
134 | - var image_uploader_container = builder.get_object("image_uploader") as Gtk.VBox; |
135 | - var urlshortener_container = builder.get_object("urlshorter") as Gtk.VBox; |
136 | + var image_uploader_container = builder.get_object("image_uploader") as Gtk.Box; |
137 | + var urlshortener_container = builder.get_object("urlshorter") as Gtk.Box; |
138 | |
139 | var image_uploader_frame = builder.get_object("frame5") as Gtk.Widget; |
140 | image_uploader_frame.hide (); |
141 | |
142 | === modified file 'client/home-item.vala' |
143 | --- client/home-item.vala 2011-09-09 21:30:29 +0000 |
144 | +++ client/home-item.vala 2012-01-19 17:41:24 +0000 |
145 | @@ -17,9 +17,9 @@ |
146 | */ |
147 | public class HomeItem : TabBarStreamItem |
148 | { |
149 | - public HomeItem (Gee.HashMap streams) |
150 | + public HomeItem (Gee.HashMap streams_map) |
151 | { |
152 | - Object (stream:"home", icon_name:"gtk-home", tooltip:_("Home"), streams:streams); |
153 | + Object (stream:"home", icon_name:"gtk-home", tooltip:_("Home"), streams_map:streams_map); |
154 | } |
155 | |
156 | construct |
157 | |
158 | === modified file 'client/messages-item.vala' |
159 | --- client/messages-item.vala 2011-09-09 21:30:29 +0000 |
160 | +++ client/messages-item.vala 2012-01-19 17:41:24 +0000 |
161 | @@ -18,9 +18,9 @@ |
162 | |
163 | public class MessagesItem : TabBarStreamItem |
164 | { |
165 | - public MessagesItem (Gee.HashMap streams) |
166 | + public MessagesItem (Gee.HashMap streams_map) |
167 | { |
168 | - Object (stream:"messages", icon_name:"emblem-mail", tooltip:_("Messages"), streams:streams); |
169 | + Object (stream:"messages", icon_name:"emblem-mail", tooltip:_("Messages"), streams_map:streams_map); |
170 | } |
171 | |
172 | construct |
173 | |
174 | === modified file 'client/private-item.vala' |
175 | --- client/private-item.vala 2011-09-09 21:30:29 +0000 |
176 | +++ client/private-item.vala 2012-01-19 17:41:24 +0000 |
177 | @@ -18,9 +18,9 @@ |
178 | |
179 | public class PrivateItem : TabBarStreamItem |
180 | { |
181 | - public PrivateItem (Gee.HashMap streams) |
182 | + public PrivateItem (Gee.HashMap streams_map) |
183 | { |
184 | - Object (stream:"private", icon_name:"mail-send-receive", tooltip:_("Private Messages"), streams:streams); |
185 | + Object (stream:"private", icon_name:"mail-send-receive", tooltip:_("Private Messages"), streams_map:streams_map); |
186 | } |
187 | |
188 | construct |
189 | |
190 | === modified file 'client/public-item.vala' |
191 | --- client/public-item.vala 2011-09-09 21:30:29 +0000 |
192 | +++ client/public-item.vala 2012-01-19 17:41:24 +0000 |
193 | @@ -18,9 +18,9 @@ |
194 | |
195 | public class PublicItem : TabBarStreamItem |
196 | { |
197 | - public PublicItem (Gee.HashMap streams) |
198 | + public PublicItem (Gee.HashMap streams_map) |
199 | { |
200 | - Object (stream:"public", icon_name:"emblem-web", tooltip:_("Public"), streams:streams); |
201 | + Object (stream:"public", icon_name:"emblem-web", tooltip:_("Public"), streams_map:streams_map); |
202 | } |
203 | |
204 | construct |
205 | |
206 | === modified file 'client/replies-item.vala' |
207 | --- client/replies-item.vala 2011-09-09 21:30:29 +0000 |
208 | +++ client/replies-item.vala 2012-01-19 17:41:24 +0000 |
209 | @@ -18,9 +18,9 @@ |
210 | |
211 | public class RepliesItem : TabBarStreamItem |
212 | { |
213 | - public RepliesItem (Gee.HashMap streams) |
214 | + public RepliesItem (Gee.HashMap streams_map) |
215 | { |
216 | - Object (stream:"replies", icon_name:"mail_reply", tooltip:_("Replies"), streams:streams); |
217 | + Object (stream:"replies", icon_name:"mail_reply", tooltip:_("Replies"), streams_map:streams_map); |
218 | } |
219 | |
220 | construct |
221 | |
222 | === modified file 'client/searches-item.vala' |
223 | --- client/searches-item.vala 2011-10-21 16:46:31 +0000 |
224 | +++ client/searches-item.vala 2012-01-19 17:41:24 +0000 |
225 | @@ -19,8 +19,8 @@ |
226 | public class SearchesItem : TabBarItem |
227 | { |
228 | private Gtk.Alignment _align; |
229 | - private Gtk.HBox box; |
230 | - private Gtk.HBox _view; |
231 | + private Gtk.Box box; |
232 | + private Gtk.Box _view; |
233 | private GwibberGtk.SearchView _search_view; |
234 | private GwibberGtk.StreamView _stream_view; |
235 | public Gwibber.Streams streams { get; construct; } |
236 | @@ -37,9 +37,10 @@ |
237 | construct |
238 | { |
239 | // View |
240 | - _view = new Gtk.HBox(true, 0); |
241 | - _view.set_no_show_all(true); |
242 | - _view.show(); |
243 | + _view = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
244 | + _view.set_homogeneous (true); |
245 | + _view.set_no_show_all (true); |
246 | + _view.show (); |
247 | |
248 | _search_view = new GwibberGtk.SearchView (); |
249 | _search_view.show_all (); |
250 | @@ -53,14 +54,14 @@ |
251 | |
252 | _searches = new Gwibber.Searches (); |
253 | |
254 | - _view.pack_start(_search_view, true, true, 0); |
255 | - _view.pack_start(_stream_view, true, true, 0); |
256 | + _view.pack_start (_search_view, true, true, 0); |
257 | + _view.pack_start (_stream_view, true, true, 0); |
258 | |
259 | |
260 | // Toolbar |
261 | _align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 1.0f); |
262 | |
263 | - box = new Gtk.HBox (false, 12); |
264 | + box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
265 | _align.add (box); |
266 | |
267 | _entry = new Gtk.Entry (); |
268 | |
269 | === modified file 'client/stream-entry.vala' |
270 | --- client/stream-entry.vala 2011-11-10 20:17:06 +0000 |
271 | +++ client/stream-entry.vala 2012-01-19 17:41:24 +0000 |
272 | @@ -18,7 +18,7 @@ |
273 | |
274 | public class StreamEntry : Gtk.Alignment |
275 | { |
276 | - private Gtk.VBox _vbox; |
277 | + private Gtk.Box _vbox; |
278 | private Gtk.Alignment _align; |
279 | public GwibberGtk.InputTextView text_view; |
280 | private Gtk.Label _spacing; |
281 | @@ -61,14 +61,14 @@ |
282 | { |
283 | set_reallocate_redraws (true); |
284 | |
285 | - _vbox = new Gtk.VBox (false, 0); |
286 | + _vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
287 | add (_vbox); |
288 | |
289 | _align = new Gtk.Alignment (0.0f, 0.0f, 1.0f, 1.0f); |
290 | _align.set_padding (18, 18, 18, 18); |
291 | _vbox.pack_start (_align, false, false, 0); |
292 | |
293 | - var box = new Gtk.VBox (false, 4); |
294 | + var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 4); |
295 | _align.add (box); |
296 | _service = new Gwibber.Service (); |
297 | |
298 | @@ -121,7 +121,7 @@ |
299 | color.alpha = 1.0f; |
300 | text_view.override_color (Gtk.StateFlags.SELECTED, color); |
301 | |
302 | - var hbox = new Gtk.HBox (false, 12); |
303 | + var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
304 | box.pack_start (hbox, false, false, 0); |
305 | |
306 | private = new Gtk.Image.from_icon_name ("status_lock", Gtk.IconSize.MENU); |
307 | |
308 | === modified file 'client/tab-bar-item.vala' |
309 | --- client/tab-bar-item.vala 2011-08-30 19:41:57 +0000 |
310 | +++ client/tab-bar-item.vala 2012-01-19 17:41:24 +0000 |
311 | @@ -22,9 +22,9 @@ |
312 | { |
313 | public StreamView? view = null; |
314 | |
315 | - public TabBarStreamItem (string stream, string icon_name, string tooltip = "", Gee.HashMap streams) |
316 | + public TabBarStreamItem (string stream, string icon_name, string tooltip = "", Gee.HashMap streams_map) |
317 | { |
318 | - Object (stream:stream, tooltip:tooltip, icon_name:icon_name, streams:streams); |
319 | + Object (stream:stream, tooltip:tooltip, icon_name:icon_name, streams_map:streams_map); |
320 | } |
321 | |
322 | construct |
323 | @@ -36,7 +36,7 @@ |
324 | view.show_all (); |
325 | }); |
326 | |
327 | - view.model = streams[stream]; |
328 | + view.model = streams_map[stream]; |
329 | view.stream = stream; |
330 | view.reply.connect ((mid, account, sender) => { |
331 | entry.text_view.mid = mid; |
332 | @@ -63,7 +63,7 @@ |
333 | public string stream { get; construct set; } |
334 | public string tooltip { get; construct set; } |
335 | public string icon_name { get; construct set; } |
336 | - public Gee.HashMap<string, Dee.Model> streams { get; construct set; } |
337 | + public Gee.HashMap<string, Dee.Model> streams_map { get; construct set; } |
338 | public StreamEntry? entry = null; |
339 | |
340 | public bool active { |
341 | @@ -81,9 +81,9 @@ |
342 | private Gtk.Image _image; |
343 | private bool _active = false; |
344 | |
345 | - public TabBarItem (string stream, string icon_name, string tooltip = "", Gee.HashMap streams) |
346 | + public TabBarItem (string stream, string icon_name, string tooltip = "", Gee.HashMap streams_map) |
347 | { |
348 | - Object (stream:stream, tooltip:tooltip, icon_name:icon_name, streams:streams); |
349 | + Object (stream:stream, tooltip:tooltip, icon_name:icon_name, streams_map:streams_map); |
350 | } |
351 | |
352 | construct |
353 | |
354 | === modified file 'client/tab-bar-widgets.vala' |
355 | --- client/tab-bar-widgets.vala 2011-12-08 22:08:20 +0000 |
356 | +++ client/tab-bar-widgets.vala 2012-01-19 17:41:24 +0000 |
357 | @@ -208,7 +208,7 @@ |
358 | Gtk.Allocation a; |
359 | get_allocation (out a); |
360 | |
361 | - Gdk.RGBA c = new Gdk.RGBA (); |
362 | + Gdk.RGBA c = Gdk.RGBA (); |
363 | c.red = 1.0f; |
364 | c.green = 1.0f; |
365 | c.blue = 1.0f; |
366 | @@ -230,11 +230,11 @@ |
367 | } |
368 | } |
369 | |
370 | - public class AccountSelectorBar : Gtk.HBox |
371 | + public class AccountSelectorBar : Gtk.Box |
372 | { |
373 | public Gwibber.Accounts accounts_service; |
374 | public Gee.HashMap<string,AccountRadioButton> accounts_buttons_map; |
375 | - private Gtk.HBox abox; |
376 | + private Gtk.Box abox; |
377 | private string _selected = null; |
378 | private AccountRadioButton account_button; |
379 | |
380 | @@ -276,16 +276,17 @@ |
381 | |
382 | construct |
383 | { |
384 | - accounts_service = new Gwibber.Accounts(); |
385 | + accounts_service = new Gwibber.Accounts (); |
386 | // Add buttons to button area at the bottom |
387 | - var box = new Gtk.HBox(false, 12); |
388 | + var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
389 | |
390 | accounts_buttons_map = new Gee.HashMap<string,AccountRadioButton> (); |
391 | |
392 | var accounts_list = accounts_service.list (); |
393 | |
394 | - abox = new Gtk.HBox (true, 6); |
395 | - box.pack_start (abox, false, false, 0); |
396 | + abox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6); |
397 | + abox.set_homogeneous (true); |
398 | + box.add (abox); |
399 | |
400 | for (int i = 0; i < accounts_list.length(); i++) |
401 | { |
402 | @@ -382,7 +383,7 @@ |
403 | // account_button.set_active(!account_button.get_active ()); |
404 | //}); |
405 | |
406 | - abox.pack_start(account_button, false, false, 0); |
407 | + abox.add (account_button); |
408 | account_button.show_all (); |
409 | return account_button; |
410 | } |
411 | |
412 | === modified file 'client/tab-bar.vala' |
413 | --- client/tab-bar.vala 2011-11-10 20:17:06 +0000 |
414 | +++ client/tab-bar.vala 2012-01-19 17:41:24 +0000 |
415 | @@ -40,18 +40,18 @@ |
416 | } |
417 | } |
418 | |
419 | -public class TabBar : Gtk.VBox |
420 | +public class TabBar : Gtk.Box |
421 | { |
422 | private Gtk.Alignment _align; |
423 | - private Gtk.VBox _vbox; |
424 | - private Gtk.HBox _tab_box; |
425 | - private Gtk.HBox _toolbar_box; |
426 | + private Gtk.Box _vbox; |
427 | + private Gtk.Box _tab_box; |
428 | + private Gtk.Box _toolbar_box; |
429 | |
430 | private Gtk.Layout _layout; |
431 | private int _last_width; |
432 | private int _last_height; |
433 | |
434 | - private Gtk.HBox _view_box; |
435 | + private Gtk.Box _view_box; |
436 | private Gtk.SizeGroup _view_group; |
437 | |
438 | private WriteItem _write_item; |
439 | @@ -73,25 +73,27 @@ |
440 | |
441 | construct |
442 | { |
443 | + set_orientation (Gtk.Orientation.VERTICAL); |
444 | _align = new Gtk.Alignment (0.0f, 0.0f, 1.0f, 1.0f); |
445 | _align.get_style_context ().add_class ("primary-toolbar"); |
446 | _align.get_style_context ().add_class ("toolbar"); |
447 | _align.draw.connect (on_align_draw); |
448 | pack_start (_align, false, true, 0); |
449 | |
450 | - _vbox = new Gtk.VBox (false, 8); |
451 | + _vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 8); |
452 | _align.add (_vbox); |
453 | |
454 | - _tab_box = new Gtk.HBox (false, 0); |
455 | - _vbox.pack_start (_tab_box, false, false, 0); |
456 | + _tab_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
457 | + _vbox.add (_tab_box); |
458 | |
459 | - _toolbar_box = new Gtk.HBox (false, 0); |
460 | - _vbox.pack_start (_toolbar_box, false, true, 0); |
461 | + _toolbar_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
462 | + _vbox.add (_toolbar_box); |
463 | |
464 | _layout = new Gtk.Layout (null, null); |
465 | pack_start (_layout, true, true, 0); |
466 | |
467 | - _view_box = new Gtk.HBox (true, 0); |
468 | + _view_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
469 | + _view_box.set_homogeneous (true); |
470 | _layout.put (_view_box, 0, 0); |
471 | |
472 | _view_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.BOTH); |
473 | @@ -208,14 +210,14 @@ |
474 | public void add_item (TabBarItem item) |
475 | { |
476 | item.clicked.connect (on_tab_clicked); |
477 | - _tab_box.pack_start (item, false, false, 0); |
478 | + _tab_box.add (item); |
479 | |
480 | if (item.get_toolbar () is Gtk.Widget) |
481 | { |
482 | var toolbar = item.get_toolbar (); |
483 | toolbar.set_no_show_all (true); |
484 | toolbar.hide (); |
485 | - _toolbar_box.pack_start (toolbar); |
486 | + _toolbar_box.add (toolbar); |
487 | } |
488 | |
489 | if (item.get_view () is Gtk.Widget) |
490 | @@ -224,7 +226,7 @@ |
491 | item.entry = _entry; |
492 | view.show (); |
493 | |
494 | - _view_box.pack_start (view, false, false, 0); |
495 | + _view_box.add (view); |
496 | _view_group.add_widget (view); |
497 | |
498 | var children = _view_box.get_children (); |
499 | |
500 | === modified file 'client/users-item.vala' |
501 | --- client/users-item.vala 2011-10-21 16:46:31 +0000 |
502 | +++ client/users-item.vala 2012-01-19 17:41:24 +0000 |
503 | @@ -21,15 +21,15 @@ |
504 | public class UsersItem : TabBarItem |
505 | { |
506 | private Gtk.Alignment _align; |
507 | - private Gtk.HBox box; |
508 | - private Gtk.HBox _view; |
509 | + private Gtk.Box box; |
510 | + private Gtk.Box _view; |
511 | private GwibberGtk.UserView _user_view; |
512 | private GwibberGtk.StreamView _stream_view; |
513 | public Gwibber.Streams streams { get; construct; } |
514 | private ulong active_hander_id; |
515 | private Gtk.Entry _entry; |
516 | - private Gtk.HBox _profile_box; |
517 | - private Gtk.VBox _vbox; |
518 | + private Gtk.Box _profile_box; |
519 | + private Gtk.Box _vbox; |
520 | private GwibberGtk.UserProfileTile _user = null; |
521 | private uint user_profile_handler_id = 0; |
522 | private TabWidgets.AccountSelectorBar _acctbar; |
523 | @@ -42,7 +42,8 @@ |
524 | construct |
525 | { |
526 | // View |
527 | - _view = new Gtk.HBox (true, 0); |
528 | + _view = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
529 | + _view.set_homogeneous (true); |
530 | _view.set_no_show_all (true); |
531 | _view.show (); |
532 | _vbox.show (); |
533 | @@ -65,10 +66,10 @@ |
534 | _align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 1.0f); |
535 | |
536 | |
537 | - _vbox = new Gtk.VBox (false, 0); |
538 | - _profile_box = new Gtk.HBox (false, 0); |
539 | + _vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
540 | + _profile_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
541 | _profile_box.set_no_show_all (true); |
542 | - box = new Gtk.HBox (false, 12); |
543 | + box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
544 | _vbox.pack_start (box, false, false, 0); |
545 | _vbox.pack_start (_profile_box, false, false, 0); |
546 | |
547 | |
548 | === modified file 'libgwibber-gtk/action-box.vala' |
549 | --- libgwibber-gtk/action-box.vala 2011-11-16 16:43:28 +0000 |
550 | +++ libgwibber-gtk/action-box.vala 2012-01-19 17:41:24 +0000 |
551 | @@ -18,7 +18,7 @@ |
552 | |
553 | namespace GwibberGtk |
554 | { |
555 | -public class ActionBox : Gtk.HBox |
556 | +public class ActionBox : Gtk.Box |
557 | { |
558 | /* |
559 | private ActionBoxItem? _item = null; |
560 | @@ -43,11 +43,12 @@ |
561 | |
562 | public ActionBox () |
563 | { |
564 | - Object (); |
565 | + Object (homogeneous:false, spacing:0); |
566 | } |
567 | |
568 | construct |
569 | { |
570 | + set_orientation (Gtk.Orientation.HORIZONTAL); |
571 | } |
572 | } |
573 | |
574 | |
575 | === modified file 'libgwibber-gtk/entry.vala' |
576 | --- libgwibber-gtk/entry.vala 2012-01-18 14:41:59 +0000 |
577 | +++ libgwibber-gtk/entry.vala 2012-01-19 17:41:24 +0000 |
578 | @@ -23,7 +23,7 @@ |
579 | { |
580 | public static const int MAX_MESSAGE_LENGTH = 140; |
581 | |
582 | - public class Entry : Gtk.VBox |
583 | + public class Entry : Gtk.Box |
584 | { |
585 | public Gwibber.Service service; |
586 | |
587 | @@ -49,7 +49,7 @@ |
588 | text_view.submit ();}); |
589 | // Stick a couple pixels at the bottom to keep the buttons from |
590 | // hitting the edge |
591 | - var spacer = new Gtk.HBox(false, 0); |
592 | + var spacer = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
593 | add_with_properties (spacer, "padding", 2, "expand", false); |
594 | |
595 | text_view.get_buffer ().changed.connect (() => |
596 | @@ -59,7 +59,7 @@ |
597 | } |
598 | } |
599 | |
600 | - public class SimpleEntry : Gtk.VBox |
601 | + public class SimpleEntry : Gtk.Box |
602 | { |
603 | public Gwibber.Service service; |
604 | |
605 | @@ -282,14 +282,14 @@ |
606 | } |
607 | } |
608 | |
609 | - public class AccountTargetBar : Gtk.HBox |
610 | + public class AccountTargetBar : Gtk.Box |
611 | { |
612 | public Gwibber.Accounts accounts_service; |
613 | public Gwibber.Connection conn_service; |
614 | public Gtk.Button send; |
615 | public Gtk.Label count; |
616 | public Gee.HashMap<string,AccountToggleButton> accounts_buttons_map; |
617 | - private Gtk.HBox abox; |
618 | + private Gtk.Box abox; |
619 | private string _selected = null; |
620 | |
621 | public AccountTargetBar () |
622 | @@ -332,7 +332,7 @@ |
623 | accounts_service = new Gwibber.Accounts(); |
624 | conn_service = new Gwibber.Connection (); |
625 | // Add buttons to button area at the bottom |
626 | - var box = new Gtk.HBox(false, 12); |
627 | + var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
628 | |
629 | var send_with_label = new Gtk.Label(_("Send with:")); |
630 | //box.pack_start(send_with_label, false, false, 0); |
631 | @@ -341,7 +341,8 @@ |
632 | |
633 | var accounts_list = accounts_service.list (); |
634 | |
635 | - abox = new Gtk.HBox (true, 6); |
636 | + abox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6); |
637 | + abox.set_homogeneous (true); |
638 | box.pack_start (abox, false, false, 0); |
639 | |
640 | for (int i = 0; i < accounts_list.length(); i++) { |
641 | @@ -472,7 +473,7 @@ |
642 | } |
643 | } |
644 | |
645 | - public class SendBar : Gtk.HBox |
646 | + public class SendBar : Gtk.Box |
647 | { |
648 | public Gwibber.Service service { get; construct; } |
649 | public Gtk.Button send; |
650 | @@ -485,7 +486,7 @@ |
651 | construct |
652 | { |
653 | // Add buttons to button area at the bottom |
654 | - var box = new Gtk.HBox(false, 0); |
655 | + var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
656 | send = new Gtk.Button.with_label(_("Send")); |
657 | box.pack_end(send, false, false, 0); |
658 | add(box); |
659 | |
660 | === modified file 'libgwibber-gtk/search-view-tile.vala' |
661 | --- libgwibber-gtk/search-view-tile.vala 2011-10-21 16:46:31 +0000 |
662 | +++ libgwibber-gtk/search-view-tile.vala 2012-01-19 17:41:24 +0000 |
663 | @@ -26,12 +26,12 @@ |
664 | private const int our_padding = 6; |
665 | |
666 | private Gtk.Alignment align; |
667 | - private Gtk.HBox main_box; |
668 | + private Gtk.Box main_box; |
669 | private Gtk.Alignment lalignment; |
670 | private Gtk.Alignment ralignment; |
671 | private Gtk.EventBox close_box; |
672 | private Gtk.Image close_icon; |
673 | - private Gtk.VBox vbox; |
674 | + private Gtk.Box vbox; |
675 | private new Gtk.Label name; |
676 | public Gwibber.Searches searches { get; construct set; } |
677 | private ulong bp_handler_id; |
678 | @@ -52,7 +52,7 @@ |
679 | align.set_padding (our_padding, our_padding, our_padding, our_padding); |
680 | add (align); |
681 | |
682 | - main_box = new Gtk.HBox (false, 12); |
683 | + main_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
684 | align.add (main_box); |
685 | |
686 | lalignment = new Gtk.Alignment (0.5f, 0.0f, 0.0f, 0.0f); |
687 | @@ -60,10 +60,10 @@ |
688 | main_box.pack_start (lalignment, false, false, 0); |
689 | main_box.pack_end (ralignment, false, false, 0); |
690 | |
691 | - vbox = new Gtk.VBox (false, 0); |
692 | + vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
693 | main_box.pack_start (vbox, true, true, 0); |
694 | |
695 | - var hbox = new Gtk.HBox (false, 0); |
696 | + var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
697 | vbox.pack_start (hbox, false, false, 2); |
698 | |
699 | name = new Gtk.Label (""); |
700 | |
701 | === modified file 'libgwibber-gtk/search-view.vala' |
702 | --- libgwibber-gtk/search-view.vala 2011-10-04 18:39:11 +0000 |
703 | +++ libgwibber-gtk/search-view.vala 2012-01-19 17:41:24 +0000 |
704 | @@ -21,7 +21,7 @@ |
705 | |
706 | namespace GwibberGtk |
707 | { |
708 | - public class SearchView : Gtk.HBox |
709 | + public class SearchView : Gtk.Box |
710 | { |
711 | private Gtk.Adjustment adjustment; |
712 | private Gtk.VScrollbar scrollbar; |
713 | |
714 | === modified file 'libgwibber-gtk/stream-view-tile.vala' |
715 | --- libgwibber-gtk/stream-view-tile.vala 2012-01-05 21:15:37 +0000 |
716 | +++ libgwibber-gtk/stream-view-tile.vala 2012-01-19 17:41:24 +0000 |
717 | @@ -56,15 +56,15 @@ |
718 | private const int our_padding = 6; |
719 | |
720 | private Gtk.Alignment align; |
721 | - private Gtk.HBox main_box; |
722 | + private Gtk.Box main_box; |
723 | private Gtk.Alignment lalignment; |
724 | private Gtk.Alignment ralignment; |
725 | private Gtk.EventBox icon_box; |
726 | private StreamViewAvatar icon; |
727 | private Gtk.Image private; |
728 | - private Gtk.VBox vbox; |
729 | - private Gtk.VBox comments_box; |
730 | - private Gtk.HBox likes_hbox; |
731 | + private Gtk.Box vbox; |
732 | + private Gtk.Box comments_box; |
733 | + private Gtk.Box likes_hbox; |
734 | private Gtk.Label likes_count; |
735 | private new Gtk.Label name; |
736 | //private new Gtk.Label source; |
737 | @@ -109,7 +109,7 @@ |
738 | align.set_padding (our_padding, our_padding, our_padding, our_padding); |
739 | add (align); |
740 | |
741 | - main_box = new Gtk.HBox (false, 12); |
742 | + main_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
743 | align.add (main_box); |
744 | |
745 | lalignment = new Gtk.Alignment (0.5f, 0.0f, 0.0f, 0.0f); |
746 | @@ -123,10 +123,10 @@ |
747 | icon_box.add(icon); |
748 | lalignment.add (icon_box); |
749 | |
750 | - vbox = new Gtk.VBox (false, 0); |
751 | + vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
752 | main_box.pack_start (vbox, true, true, 0); |
753 | |
754 | - var hbox = new Gtk.HBox (false, 0); |
755 | + var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
756 | vbox.pack_start (hbox, false, false, 2); |
757 | |
758 | private = new Gtk.Image.from_icon_name ("status_lock", Gtk.IconSize.MENU); |
759 | @@ -213,7 +213,7 @@ |
760 | thumb_box = new Gtk.EventBox (); |
761 | thumb_box.set_visible_window (false); |
762 | thumb_box.set_no_show_all(true); |
763 | - var thumb_hbox = new Gtk.HBox (false, 2); |
764 | + var thumb_hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 2); |
765 | vbox.pack_start(thumb_hbox, false, false, 4); |
766 | thumb_hbox.pack_start(thumb_box, false, false, 4); |
767 | thumb_box.button_release_event.connect(() => |
768 | @@ -228,7 +228,7 @@ |
769 | thumb_box.add(thumbnail); |
770 | thumb_box.hide (); |
771 | |
772 | - comments_box = new Gtk.VBox (false, 0); |
773 | + comments_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
774 | comments_box.set_no_show_all (true); |
775 | vbox.pack_start (comments_box, false, false, 4); |
776 | |
777 | @@ -244,7 +244,7 @@ |
778 | retweeted_by.set_no_show_all(true); |
779 | vbox.pack_start (retweeted_by, false, false, 2); |
780 | |
781 | - likes_hbox = new Gtk.HBox (false, 0); |
782 | + likes_hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
783 | likes_hbox.set_no_show_all (true); |
784 | // FIXME: Find a theme icon |
785 | var likes_icon = new Gtk.Image.from_file ("/usr/share/gwibber/ui/icons/streams/16x16/favorite.png"); |
786 | @@ -473,8 +473,8 @@ |
787 | var obj = comments.get_element(i).get_object(); |
788 | if (obj != null) |
789 | { |
790 | - var cvbox = new Gtk.VBox (false, 2); |
791 | - var chbox = new Gtk.HBox (false, 2); |
792 | + var cvbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 2); |
793 | + var chbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 2); |
794 | var clalignment = new Gtk.Alignment (0.5f, 0.0f, 0.0f, 0.0f); |
795 | chbox.pack_start (clalignment, false, false, 0); |
796 | |
797 | @@ -507,7 +507,7 @@ |
798 | var cname = _sender_obj.get_string_member ("name"); |
799 | if (cname != null) |
800 | cname = GLib.Markup.escape_text (cname); |
801 | - var cname_box = new Gtk.HBox (false, 2); |
802 | + var cname_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 2); |
803 | var cname_label = new Gtk.Label (""); |
804 | cname_label.set_markup ("<b><span font_size='small'>" + cname + "</span></b>"); |
805 | cname_box.pack_start (cname_label, false, false, 2); |
806 | @@ -805,7 +805,7 @@ |
807 | } |
808 | message.set_markup (img_markup); |
809 | } catch (Error e) { |
810 | - debug("Error trying to load %s: %s", img_uri, e.message); |
811 | + //debug("Error trying to load %s: %s", img_uri, e.message); |
812 | thumbnail.hide (); |
813 | thumb_box.set_no_show_all (true); |
814 | thumb_box.hide (); |
815 | |
816 | === modified file 'libgwibber-gtk/stream-view.vala' |
817 | --- libgwibber-gtk/stream-view.vala 2012-01-10 16:34:32 +0000 |
818 | +++ libgwibber-gtk/stream-view.vala 2012-01-19 17:41:24 +0000 |
819 | @@ -21,7 +21,7 @@ |
820 | |
821 | namespace GwibberGtk |
822 | { |
823 | - public class TileBox : Gtk.VBox |
824 | + public class TileBox : Gtk.Box |
825 | { |
826 | public int last_height { get; set; } |
827 | public TileBox () |
828 | @@ -32,6 +32,7 @@ |
829 | construct |
830 | { |
831 | last_height = 200; |
832 | + set_orientation (Gtk.Orientation.VERTICAL); |
833 | } |
834 | |
835 | public override void get_preferred_height_for_width (int width, |
836 | @@ -47,7 +48,7 @@ |
837 | } |
838 | |
839 | } |
840 | - public class StreamView : Gtk.HBox |
841 | + public class StreamView : Gtk.Box |
842 | { |
843 | private Gtk.Adjustment adjustment; |
844 | private Gtk.VScrollbar scrollbar; |
845 | @@ -199,6 +200,7 @@ |
846 | |
847 | construct |
848 | { |
849 | + set_orientation (Gtk.Orientation.HORIZONTAL); |
850 | Intl.setlocale(LocaleCategory.COLLATE, "C"); |
851 | utils = new Gwibber.Utils (); |
852 | service = new Gwibber.Service (); |
853 | @@ -284,7 +286,7 @@ |
854 | { |
855 | var tile = new StreamViewTile (utils, service, show_fullname); |
856 | tile.show_all (); |
857 | - view_box.pack_start (tile, false, false, 0); |
858 | + view_box.add (tile); |
859 | tiles.append (tile); |
860 | tile.reply.connect((mid, account, sender) => { |
861 | reply (mid, account, sender); |
862 | @@ -440,7 +442,7 @@ |
863 | { |
864 | var tile = new StreamViewTile (utils, service, show_fullname); |
865 | tile.show_all (); |
866 | - view_box.pack_start (tile, false, false, 0); |
867 | + view_box.add (tile); |
868 | tiles.append (tile); |
869 | tile.reply.connect((mid, account, sender) => { |
870 | reply (mid, account, sender); |
871 | |
872 | === modified file 'libgwibber-gtk/user-view-tile.vala' |
873 | --- libgwibber-gtk/user-view-tile.vala 2011-10-21 16:46:31 +0000 |
874 | +++ libgwibber-gtk/user-view-tile.vala 2012-01-19 17:41:24 +0000 |
875 | @@ -26,12 +26,12 @@ |
876 | private const int our_padding = 6; |
877 | |
878 | private Gtk.Alignment align; |
879 | - private Gtk.HBox main_box; |
880 | + private Gtk.Box main_box; |
881 | private Gtk.Alignment lalignment; |
882 | private Gtk.Alignment ralignment; |
883 | private Gtk.EventBox close_box; |
884 | private Gtk.Image close_icon; |
885 | - private Gtk.VBox vbox; |
886 | + private Gtk.Box vbox; |
887 | private new Gtk.Label name; |
888 | public Gwibber.Streams streams { get; construct set; } |
889 | private ulong bp_handler_id; |
890 | @@ -52,7 +52,7 @@ |
891 | align.set_padding (our_padding, our_padding, our_padding, our_padding); |
892 | add (align); |
893 | |
894 | - main_box = new Gtk.HBox (false, 12); |
895 | + main_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
896 | align.add (main_box); |
897 | |
898 | lalignment = new Gtk.Alignment (0.5f, 0.0f, 0.0f, 0.0f); |
899 | @@ -60,10 +60,10 @@ |
900 | main_box.pack_start (lalignment, false, false, 0); |
901 | main_box.pack_end (ralignment, false, false, 0); |
902 | |
903 | - vbox = new Gtk.VBox (false, 0); |
904 | + vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
905 | main_box.pack_start (vbox, true, true, 0); |
906 | |
907 | - var hbox = new Gtk.HBox (false, 0); |
908 | + var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
909 | vbox.pack_start (hbox, false, false, 2); |
910 | |
911 | name = new Gtk.Label (""); |
912 | @@ -151,12 +151,12 @@ |
913 | private const int our_padding = 6; |
914 | |
915 | private Gtk.Alignment align; |
916 | - private Gtk.HBox main_box; |
917 | + private Gtk.Box main_box; |
918 | private Gtk.Alignment lalignment; |
919 | private Gtk.Alignment ralignment; |
920 | private Gtk.EventBox icon_box; |
921 | private Gtk.Image icon; |
922 | - private Gtk.VBox vbox; |
923 | + private Gtk.Box vbox; |
924 | private new Gtk.Label name; |
925 | private Gtk.Label description; |
926 | private Gtk.Label website; |
927 | @@ -166,8 +166,8 @@ |
928 | private Gtk.Image service; |
929 | private Gtk.Label statuses; |
930 | private Gwibber.Utils utils; |
931 | - private Gtk.HBox follower_box; |
932 | - private Gtk.HBox follow_box; |
933 | + private Gtk.Box follower_box; |
934 | + private Gtk.Box follow_box; |
935 | private Gtk.Label follow; |
936 | private Gtk.CheckButton follow_but; |
937 | private Gtk.Button _close; |
938 | @@ -198,7 +198,7 @@ |
939 | align.set_padding (our_padding, our_padding, our_padding, our_padding); |
940 | add (align); |
941 | |
942 | - main_box = new Gtk.HBox (false, 12); |
943 | + main_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); |
944 | align.add (main_box); |
945 | |
946 | lalignment = new Gtk.Alignment (0.5f, 0.0f, 0.0f, 0.0f); |
947 | @@ -220,10 +220,10 @@ |
948 | showing = false; |
949 | }); |
950 | |
951 | - vbox = new Gtk.VBox (false, 0); |
952 | + vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
953 | main_box.pack_start (vbox, true, true, 0); |
954 | |
955 | - var hbox = new Gtk.HBox (false, 0); |
956 | + var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
957 | vbox.pack_start (hbox, false, false, 2); |
958 | |
959 | service = new Gtk.Image.from_icon_name ("gwibber", Gtk.IconSize.MENU); |
960 | @@ -258,7 +258,7 @@ |
961 | website.set_alignment (0.0f, 0.0f); |
962 | vbox.pack_start (website, false, false, 2); |
963 | |
964 | - follower_box = new Gtk.HBox (false, 2); |
965 | + follower_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 2); |
966 | vbox.pack_start (follower_box, false, false, 2); |
967 | |
968 | followers = new Gtk.Label (""); |
969 | @@ -276,7 +276,7 @@ |
970 | statuses.set_alignment (0.0f, 0.5f); |
971 | follower_box.pack_start (statuses, false, false, 2); |
972 | |
973 | - follow_box = new Gtk.HBox (false, 0); |
974 | + follow_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
975 | follow_but = new Gtk.CheckButton (); |
976 | follow = new Gtk.Label (_("Following")); |
977 | follow.set_selectable (false); |
978 | |
979 | === modified file 'libgwibber-gtk/user-view.vala' |
980 | --- libgwibber-gtk/user-view.vala 2011-10-04 18:39:11 +0000 |
981 | +++ libgwibber-gtk/user-view.vala 2012-01-19 17:41:24 +0000 |
982 | @@ -21,7 +21,7 @@ |
983 | |
984 | namespace GwibberGtk |
985 | { |
986 | - public class UserView : Gtk.HBox |
987 | + public class UserView : Gtk.Box |
988 | { |
989 | private Gtk.Adjustment adjustment; |
990 | private Gtk.VScrollbar scrollbar; |
991 | |
992 | === modified file 'libgwibber/searches.vala' |
993 | --- libgwibber/searches.vala 2011-08-06 05:04:25 +0000 |
994 | +++ libgwibber/searches.vala 2012-01-19 17:41:24 +0000 |
995 | @@ -84,6 +84,7 @@ |
996 | **/ |
997 | public Gee.HashMap <string?, string?> lookup(string id) |
998 | { |
999 | + var searches_map = new Gee.HashMap <string?, string?> (); |
1000 | try |
1001 | { |
1002 | var result = searches.Get(id); |
1003 | @@ -91,21 +92,16 @@ |
1004 | parser.load_from_data(result, -1); |
1005 | Json.Object obj = parser.get_root().get_object(); |
1006 | var members = obj.get_members(); |
1007 | - var searches_map = new Gee.HashMap <string?, string?> (); |
1008 | foreach (string member in members) |
1009 | { |
1010 | searches_map[member] = obj.get_string_member(member); |
1011 | } |
1012 | - return searches_map; |
1013 | - |
1014 | - |
1015 | } |
1016 | catch (GLib.IOError e) |
1017 | { |
1018 | warning (e.message); |
1019 | - return null; |
1020 | } |
1021 | - |
1022 | + return searches_map; |
1023 | } |
1024 | |
1025 | /** |
1026 | @@ -158,9 +154,9 @@ |
1027 | **/ |
1028 | public List<Gee.HashMap?> list() |
1029 | { |
1030 | + var searches_list = new List<Gee.HashMap<string?, string?>> (); |
1031 | try |
1032 | { |
1033 | - var searches_list = new List<Gee.HashMap<string?, string?>> (); |
1034 | var result = searches.List(); |
1035 | var parser = new Json.Parser(); |
1036 | parser.load_from_data(result, -1); |
1037 | @@ -174,14 +170,12 @@ |
1038 | } |
1039 | searches_list.append(searches_map); |
1040 | } |
1041 | - return searches_list; |
1042 | } |
1043 | catch (GLib.IOError e) |
1044 | { |
1045 | warning (e.message); |
1046 | - return null; |
1047 | } |
1048 | - |
1049 | + return searches_list; |
1050 | } |
1051 | |
1052 | public void search_deleted(string data) |
1053 | |
1054 | === modified file 'libgwibber/streams.vala' |
1055 | --- libgwibber/streams.vala 2012-01-13 11:26:51 +0000 |
1056 | +++ libgwibber/streams.vala 2012-01-19 17:41:24 +0000 |
1057 | @@ -47,7 +47,6 @@ |
1058 | private Dee.Model? _transient_model = null; |
1059 | private unowned Dee.ResourceManager resources; |
1060 | private Gee.HashMap <string, unowned Dee.ModelIter?> seen; |
1061 | - private bool _service_loading = false; |
1062 | |
1063 | public Dee.Model stream_model { |
1064 | get { |
1065 | @@ -192,7 +191,6 @@ |
1066 | public Dee.Model? streams_model(bool transients) |
1067 | { |
1068 | uint schema_length = 35; |
1069 | - var timer = new Timer(); |
1070 | |
1071 | resources = Dee.ResourceManager.get_default (); |
1072 | |
1073 | @@ -209,15 +207,12 @@ |
1074 | debug ("Didn't get model from resource manager, creating a new one"); |
1075 | model = create_model (); |
1076 | } |
1077 | - var cols = model.get_n_columns (); |
1078 | if (model.get_n_columns () != schema_length) |
1079 | { |
1080 | debug ("SCHEMA isn't current, recreating"); |
1081 | model = null; |
1082 | model = create_model (); |
1083 | } |
1084 | - //unowned string schema = model.get_schema (cols); |
1085 | - //debug ("SCHEMA is %s", model.get_schema (cols)); |
1086 | Idle.add(() => { |
1087 | refresh_model_async.begin (); |
1088 | return false; |
1089 | @@ -236,7 +231,6 @@ |
1090 | debug ("Didn't get the transient model from resource manager, creating a new one"); |
1091 | model = create_model (); |
1092 | } |
1093 | - var cols = model.get_n_columns (); |
1094 | if (model.get_n_columns () != schema_length) |
1095 | { |
1096 | debug ("SCHEMA isn't current, recreating"); |
1097 | @@ -728,6 +722,7 @@ |
1098 | **/ |
1099 | public Gee.HashMap <string?, string?> lookup(string id) |
1100 | { |
1101 | + var stream_map = new Gee.HashMap <string?, string?> (); |
1102 | try |
1103 | { |
1104 | var result = streams_service.Get(id); |
1105 | @@ -735,19 +730,16 @@ |
1106 | parser.load_from_data(result, -1); |
1107 | Json.Object obj = parser.get_root().get_object(); |
1108 | var members = obj.get_members(); |
1109 | - var stream_map = new Gee.HashMap <string?, string?> (); |
1110 | foreach (string member in members) |
1111 | { |
1112 | stream_map[member] = obj.get_string_member(member); |
1113 | } |
1114 | - return stream_map; |
1115 | } |
1116 | catch (GLib.IOError e) |
1117 | { |
1118 | warning (e.message); |
1119 | - return null; |
1120 | } |
1121 | - |
1122 | + return stream_map; |
1123 | } |
1124 | |
1125 | |
1126 | @@ -807,9 +799,9 @@ |
1127 | **/ |
1128 | public List<Gee.HashMap?> list() |
1129 | { |
1130 | + var streams_list = new List<Gee.HashMap<string?, string?>> (); |
1131 | try |
1132 | { |
1133 | - var streams_list = new List<Gee.HashMap<string?, string?>> (); |
1134 | var result = streams_service.List(); |
1135 | var parser = new Json.Parser(); |
1136 | parser.load_from_data(result, -1); |
1137 | @@ -828,13 +820,12 @@ |
1138 | } |
1139 | streams_list.append(stream_map); |
1140 | } |
1141 | - return streams_list; |
1142 | } |
1143 | catch (GLib.IOError e) |
1144 | { |
1145 | warning (e.message); |
1146 | - return null; |
1147 | } |
1148 | + return streams_list; |
1149 | } |
1150 | |
1151 | |
1152 | @@ -880,10 +871,9 @@ |
1153 | |
1154 | public Gee.HashMap<string?, Value?> user_profile(string id) |
1155 | { |
1156 | + var profile = new Gee.HashMap<string?, Value?> (); |
1157 | try |
1158 | { |
1159 | - var profile = new Gee.HashMap<string?, Value?> (); |
1160 | - |
1161 | string name = ""; |
1162 | string nick = ""; |
1163 | string account = ""; |
1164 | @@ -931,13 +921,12 @@ |
1165 | profile["statuses"] = statuses; |
1166 | profile["following"] = following; |
1167 | profile["protected"] = protected; |
1168 | - return profile; |
1169 | } |
1170 | catch (GLib.IOError e) |
1171 | { |
1172 | warning (e.message); |
1173 | - return null; |
1174 | } |
1175 | + return profile; |
1176 | } |
1177 | |
1178 |
Pro tip: when filing a merge request you can set a 'prerequisite branch' and that branch's changes won't show up in the merge diff that LP shows (because those changes are taken care of in the separate merge for that branch). So you could've done that here for the valac-0.16 branch. No big deal, just saying for future more complicated merges.
+ box.set_homogeneous (false);
You've got this everywhere, but shouldn't need it. "homogeneous" defaults to false. Not bad to be explicit, but adds a lot of lines to the code. :)
- Object (stream:"search", icon_name: "stock_ search" , tooltip: _("Searches" ), streams:streams); "stock_ search" , tooltip: _("Searches" ));
+ Object (stream:"search", icon_name:
Seems wrong? You do this for SearchesItem and UsersItem. With this change, you're dropping the incoming stream argument on the floor, which can't be right.