Merge lp:~victored/granite/welcome-append-rv into lp:~elementary-pantheon/granite/granite

Proposed by Victor Martinez
Status: Merged
Merged at revision: 172
Proposed branch: lp:~victored/granite/welcome-append-rv
Merge into: lp:~elementary-pantheon/granite/granite
Diff against target: 46 lines (+7/-10)
1 file modified
lib/Widgets/Welcome.vala (+7/-10)
To merge this branch: bzr merge lp:~victored/granite/welcome-append-rv
Reviewer Review Type Date Requested Status
xapantu (community) Approve
Review via email: mp+90194@code.launchpad.net

Description of the change

[API]

Granite.Widgets.Welcome:
* Modified return values for append functions (void -> int)

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

It looks good :) Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/Widgets/Welcome.vala'
2--- lib/Widgets/Welcome.vala 2012-01-22 17:11:10 +0000
3+++ lib/Widgets/Welcome.vala 2012-01-25 19:27:26 +0000
4@@ -29,11 +29,6 @@
5 protected new GLib.List<Gtk.Button> children = new GLib.List<Gtk.Button> ();
6 protected Gtk.Box options;
7
8- private enum CaseConversionMode {
9- TITLE,
10- SENTENCE
11- }
12-
13 public Welcome (string title_text, string subtitle_text) {
14 string _title_text = title_text;
15 string _subtitle_text = subtitle_text;
16@@ -101,17 +96,17 @@
17 children.nth_data (index).set_sensitive (val);
18 }
19
20- public void append (string icon_name, string option_text, string description_text) {
21+ public int append (string icon_name, string option_text, string description_text) {
22 Gtk.Image? image = new Gtk.Image.from_icon_name (icon_name, Gtk.IconSize.DIALOG);
23- append_with_image (image, option_text, description_text);
24+ return append_with_image (image, option_text, description_text);
25 }
26
27- public void append_with_pixbuf (Gdk.Pixbuf? pixbuf, string option_text, string description_text) {
28+ public int append_with_pixbuf (Gdk.Pixbuf? pixbuf, string option_text, string description_text) {
29 var image = new Gtk.Image.from_pixbuf (pixbuf);
30- append_with_image (image, option_text, description_text);
31+ return append_with_image (image, option_text, description_text);
32 }
33
34- public void append_with_image (Gtk.Image? image, string option_text, string description_text) {
35+ public int append_with_image (Gtk.Image? image, string option_text, string description_text) {
36 string _option_text = option_text;
37 string _description_text = description_text;
38 _option_text = _option_text.replace ("&", "&amp;");
39@@ -165,6 +160,8 @@
40 activated (index); // send signal
41 return false;
42 } );
43+
44+ return this.children.index (button);
45 }
46 }
47

Subscribers

People subscribed via source and target branches