Merge lp:~voldyman/granite/fixed-934803 into lp:~elementary-pantheon/granite/granite

Proposed by Akshay Shekher
Status: Merged
Merged at revision: 329
Proposed branch: lp:~voldyman/granite/fixed-934803
Merge into: lp:~elementary-pantheon/granite/granite
Diff against target: 64 lines (+11/-10)
1 file modified
lib/GtkPatch/AboutDialog.vala (+11/-10)
To merge this branch: bzr merge lp:~voldyman/granite/fixed-934803
Reviewer Review Type Date Requested Status
Cody Garver (community) Approve
Review via email: mp+117200@code.launchpad.net

Description of the change

Hovering over a persons name shows their email in a tooltip

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/GtkPatch/AboutDialog.vala'
2--- lib/GtkPatch/AboutDialog.vala 2012-07-13 09:04:27 +0000
3+++ lib/GtkPatch/AboutDialog.vala 2012-07-29 21:14:19 +0000
4@@ -239,7 +239,7 @@
5 private const string BIG_TEXT_CSS = """
6 .h2 { font: open sans light 18; }
7 """;
8-
9+
10 private const string STYLESHEET = """
11 * {
12 -GtkDialog-action-area-border: 12px;
13@@ -354,7 +354,7 @@
14 content_scrolled.add_with_viewport(content_scrolled_vbox);
15
16 title_vbox.pack_start(name_label, false, false, 12); //FIXME
17-
18+
19 content_right_box.pack_start(title_vbox, false, false, 0);
20 content_right_box.pack_start(content_scrolled, true, true, 0);
21 // Extra padding between the scrolled window and the action area
22@@ -378,14 +378,16 @@
23 close_button.grab_focus();
24 }
25
26- private string set_string_from_string_array(string title, string[] peoples)
27+ private string set_string_from_string_array(string title, string[] peoples,bool tooltip=false)
28 {
29+ if (tooltip)
30+ return string.joinv ("\n",peoples);
31+
32 string text = "";
33 string name = "";
34 string email = "" ;
35 string _person_data;
36- bool email_started= false;
37- //text += add_credits_section (title, peoples);
38+ bool email_started= false;
39 text += title + "<span size=\"small\">";
40 for (int i= 0;i<peoples.length;i++){
41 if (peoples[i] == null)
42@@ -400,19 +402,18 @@
43 if (!email_started)
44 name += _person_data[j].to_string ();
45
46- else
47- if ( _person_data[j] != '<' && _person_data[j] != '>')
48+ else
49+ if (_person_data.get (j) != '>' && _person_data.get (j) != '<')
50 email +=_person_data[j].to_string ();
51
52- }
53+ }
54 if (email == "")
55 text += "<u>%s</u>\n".printf (name);
56 else
57- text += "<a href=\"%s\">%s</a>\n".printf (email,name);
58+ text += "<a href=\"%s\" title=\"%s\">%s</a>\n".printf (email,email,name);
59 email = ""; name =""; email_started=false;
60 }
61 text += "</span>";
62-
63 return text;
64 }
65

Subscribers

People subscribed via source and target branches