Merge lp:~elementary-apps/pantheon-photos/no-flag-sidebar into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: Felipe Escoto
Approved revision: 3037
Merged at revision: 3039
Proposed branch: lp:~elementary-apps/pantheon-photos/no-flag-sidebar
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 66 lines (+0/-35)
1 file modified
src/sidebar/metadata/LibraryProperties.vala (+0/-35)
To merge this branch: bzr merge lp:~elementary-apps/pantheon-photos/no-flag-sidebar
Reviewer Review Type Date Requested Status
Photos Devs Pending
Review via email: mp+310126@code.launchpad.net

Commit message

Remove Flag action from the sidebar

Description of the change

This action is currently available in the right click menu, but honestly it should just be in the toolbar. I don't think it makes sense to have it in the sidebar

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/LibraryProperties.vala'
2--- src/sidebar/metadata/LibraryProperties.vala 2016-09-19 21:18:06 +0000
3+++ src/sidebar/metadata/LibraryProperties.vala 2016-11-06 02:29:29 +0000
4@@ -13,8 +13,6 @@
5 private bool is_media;
6 private string title;
7 private string tags;
8- private bool is_flagged = false;
9- private Gtk.ToggleButton toolbtn_flag = null;
10
11 public LibraryProperties () {
12 set_column_homogeneous (true);
13@@ -56,8 +54,6 @@
14 tags = get_initial_tag_text (media_source);
15 title = media_source.get_name ();
16 comment = media_source.get_comment ();
17- if (flaggable != null)
18- is_flagged = flaggable.is_flagged ();
19 is_media = true;
20 }
21 }
22@@ -83,17 +79,6 @@
23 spacerrate.set_size_request (50, -1);
24 spacerrate.hexpand = true;
25
26- toolbtn_flag = new Gtk.ToggleButton ();
27- toolbtn_flag.image = new Gtk.Image.from_icon_name (Resources.EDIT_FLAG, Gtk.IconSize.MENU);
28- toolbtn_flag.halign = Gtk.Align.END;
29- toolbtn_flag.valign = Gtk.Align.END;
30- toolbtn_flag.set_active (is_flagged);
31- toolbtn_flag.clicked.connect (flag_btn_clicked);
32- update_flag_action ();
33-
34- attach (toolbtn_flag, 0, (int) line_count, 1, 1);
35- line_count++;
36-
37 tags_entry = new Gtk.Entry ();
38 if (tags != null)
39 tags_entry.text = tags;
40@@ -103,26 +88,6 @@
41 }
42 }
43
44- private void flag_btn_clicked () {
45- save_changes_to_source ();
46- Flaggable? flaggable = media_source as Flaggable;
47-
48- if (flaggable != null) {
49- if (flaggable.is_flagged ())
50- flaggable.mark_unflagged ();
51- else
52- flaggable.mark_flagged ();
53- }
54- update_flag_action ();
55- }
56-
57- private void update_flag_action () {
58- if (toolbtn_flag.active)
59- toolbtn_flag.tooltip_text = Resources.UNFLAG_LABEL;
60- else
61- toolbtn_flag.tooltip_text = Resources.FLAG_LABEL;
62- }
63-
64 private void title_entry_changed () {
65 title = title_entry.get_text ();
66 }

Subscribers

People subscribed via source and target branches