Merge lp:~elementary-apps/pantheon-photos/no-multiline-pmeta into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: Felipe Escoto
Approved revision: 3035
Merged at revision: 3035
Proposed branch: lp:~elementary-apps/pantheon-photos/no-multiline-pmeta
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 65 lines (+11/-31)
1 file modified
src/sidebar/metadata/Properties.vala (+11/-31)
To merge this branch: bzr merge lp:~elementary-apps/pantheon-photos/no-multiline-pmeta
Reviewer Review Type Date Requested Status
Photos Devs Pending
Review via email: mp+310109@code.launchpad.net

Commit message

Properties.vala: Remove unused bool multi_line

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/sidebar/metadata/Properties.vala'
2--- src/sidebar/metadata/Properties.vala 2016-11-04 21:53:48 +0000
3+++ src/sidebar/metadata/Properties.vala 2016-11-05 00:27:27 +0000
4@@ -27,7 +27,7 @@
5 column_spacing = 6;
6 }
7
8- protected void add_line (string label_text, string info_text, bool multi_line = false) {
9+ protected void add_line (string label_text, string info_text) {
10 if (info_text == null || info_text == "") {
11 return;
12 }
13@@ -40,31 +40,17 @@
14 label.wrap_mode = Pango.WrapMode.WORD_CHAR;
15 label.xalign = 1;
16
17+ var info_label = new Gtk.Label ("");
18+ info_label.ellipsize = Pango.EllipsizeMode.END;
19+ info_label.lines = 8;
20+ info_label.selectable = true;
21+ info_label.set_markup (is_string_empty (info_text) ? "" : info_text);
22+ info_label.wrap = true;
23+ info_label.wrap_mode = Pango.WrapMode.WORD_CHAR;
24+ info_label.xalign = 0;
25+
26 attach (label, 0, (int) line_count, 1, 1);
27-
28- if (multi_line) {
29- var view = new Gtk.TextView ();
30- view.buffer.text = is_string_empty (info_text) ? "" : info_text;
31- view.cursor_visible = false;
32- view.editable = false;
33- view.wrap_mode = Gtk.WrapMode.WORD;
34-
35- var info_scroll = new Gtk.ScrolledWindow (null, null);
36- info_scroll.add (view);
37-
38- attach (info_scroll, 1, (int) line_count, 1, 2);
39- } else {
40- var info_label = new Gtk.Label ("");
41- info_label.ellipsize = Pango.EllipsizeMode.END;
42- info_label.lines = 8;
43- info_label.selectable = true;
44- info_label.set_markup (is_string_empty (info_text) ? "" : info_text);
45- info_label.wrap = true;
46- info_label.wrap_mode = Pango.WrapMode.WORD_CHAR;
47- info_label.xalign = 0;
48-
49- attach (info_label, 1, (int) line_count, 1, 1);
50- }
51+ attach (info_label, 1, (int) line_count, 1, 1);
52
53 line_count++;
54 }
55@@ -163,10 +149,4 @@
56 }
57
58 public abstract string get_header_title ();
59-
60 }
61-
62-
63-
64-
65-

Subscribers

People subscribed via source and target branches