Merge lp:~elementary-apps/pantheon-photos/editing-tools-cleanup into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: Danielle Foré
Approved revision: 2792
Merged at revision: 2789
Proposed branch: lp:~elementary-apps/pantheon-photos/editing-tools-cleanup
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 116 lines (+7/-24)
1 file modified
src/editing_tools/EditingTools.vala (+7/-24)
To merge this branch: bzr merge lp:~elementary-apps/pantheon-photos/editing-tools-cleanup
Reviewer Review Type Date Requested Status
Adam Bieńkowski (community) Approve
Photos Devs Pending
Review via email: mp+267441@code.launchpad.net

Commit message

Clean up EditingTools.vala
* Don't set shadow type on 0 width frame
* Don't unset resize grip (they're not used anymore)
* Don't set window opacity (deprecated method)
* Don't set button image positon (button images are not used anymore)
* set_halign, set_alignment is deprecated
* Don't set end margin to 0 when already 0

Description of the change

This branch seeks to clean up some old junk code in EditingTools.vala

To post a comment you must log in.
Revision history for this message
Adam Bieńkowski (donadigo) wrote :

Everything works & looks greate here.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/editing_tools/EditingTools.vala'
2--- src/editing_tools/EditingTools.vala 2014-09-27 23:06:48 +0000
3+++ src/editing_tools/EditingTools.vala 2015-08-08 21:10:38 +0000
4@@ -40,7 +40,6 @@
5
6 Gtk.Frame outer_frame = new Gtk.Frame (null);
7 outer_frame.set_border_width (0);
8- outer_frame.set_shadow_type (Gtk.ShadowType.OUT);
9
10 layout_frame.set_border_width (FRAME_BORDER);
11 layout_frame.set_shadow_type (Gtk.ShadowType.NONE);
12@@ -52,7 +51,6 @@
13 focus_on_map = true;
14 set_accept_focus (true);
15 set_can_focus (true);
16- set_has_resize_grip (false);
17
18 // Needed to prevent the (spurious) 'This event was synthesised outside of GDK'
19 // warnings after a keypress.
20@@ -88,12 +86,6 @@
21
22 return true;
23 }
24-
25- public override void realize () {
26- set_opacity (Resources.TRANSIENT_WINDOW_OPACITY);
27-
28- base.realize ();
29- }
30 }
31
32 // The PhotoCanvas is an interface object between an EditingTool and its host. It provides objects
33@@ -663,10 +655,8 @@
34 base (container);
35
36 cancel_button.set_tooltip_text (_ ("Return to current photo dimensions"));
37- cancel_button.set_image_position (Gtk.PositionType.LEFT);
38
39 ok_button.set_tooltip_text (_ ("Set the crop for this photo"));
40- ok_button.set_image_position (Gtk.PositionType.LEFT);
41
42 constraint_combo = new Gtk.ComboBox ();
43 Gtk.CellRendererText combo_text_renderer = new Gtk.CellRendererText ();
44@@ -1875,10 +1865,8 @@
45 slider.set_draw_value (false);
46
47 close_button.set_tooltip_text (_ ("Close the red-eye tool"));
48- close_button.set_image_position (Gtk.PositionType.LEFT);
49
50 apply_button.set_tooltip_text (_ ("Remove any red-eye effects in the selected region"));
51- apply_button.set_image_position (Gtk.PositionType.LEFT);
52
53 Gtk.Box layout = new Gtk.Box (Gtk.Orientation.HORIZONTAL, CONTROL_SPACING);
54 layout.add (slider_label);
55@@ -2228,48 +2216,43 @@
56 slider_organizer.set_margin_bottom (12);
57
58 Gtk.Label exposure_label = new Gtk.Label.with_mnemonic (_ ("Exposure:"));
59- exposure_label.set_alignment (0.0f, 0.5f);
60+ exposure_label.set_halign (Gtk.Align.END);
61 slider_organizer.attach (exposure_label, 0, 0, 1, 1);
62 slider_organizer.attach (exposure_slider, 1, 0, 1, 1);
63 exposure_slider.set_size_request (SLIDER_WIDTH, -1);
64 exposure_slider.set_draw_value (false);
65- exposure_slider.set_margin_end (0);
66
67 Gtk.Label saturation_label = new Gtk.Label.with_mnemonic (_ ("Saturation:"));
68- saturation_label.set_alignment (0.0f, 0.5f);
69+ saturation_label.set_halign (Gtk.Align.END);
70 slider_organizer.attach (saturation_label, 0, 1, 1, 1);
71 slider_organizer.attach (saturation_slider, 1, 1, 1, 1);
72 saturation_slider.set_size_request (SLIDER_WIDTH, -1);
73 saturation_slider.set_draw_value (false);
74- saturation_slider.set_margin_end (0);
75
76 Gtk.Label tint_label = new Gtk.Label.with_mnemonic (_ ("Tint:"));
77- tint_label.set_alignment (0.0f, 0.5f);
78+ tint_label.set_halign (Gtk.Align.END);
79 slider_organizer.attach (tint_label, 0, 2, 1, 1);
80 slider_organizer.attach (tint_slider, 1, 2, 1, 1);
81 tint_slider.set_size_request (SLIDER_WIDTH, -1);
82 tint_slider.set_draw_value (false);
83- tint_slider.set_margin_end (0);
84
85 Gtk.Label temperature_label =
86 new Gtk.Label.with_mnemonic (_ ("Temperature:"));
87- temperature_label.set_alignment (0.0f, 0.5f);
88+ temperature_label.set_halign (Gtk.Align.END);
89 slider_organizer.attach (temperature_label, 0, 3, 1, 1);
90 slider_organizer.attach (temperature_slider, 1, 3, 1, 1);
91 temperature_slider.set_size_request (SLIDER_WIDTH, -1);
92 temperature_slider.set_draw_value (false);
93- temperature_slider.set_margin_end (0);
94
95 Gtk.Label shadows_label = new Gtk.Label.with_mnemonic (_ ("Shadows:"));
96- shadows_label.set_alignment (0.0f, 0.5f);
97+ shadows_label.set_halign (Gtk.Align.END);
98 slider_organizer.attach (shadows_label, 0, 4, 1, 1);
99 slider_organizer.attach (shadows_slider, 1, 4, 1, 1);
100 shadows_slider.set_size_request (SLIDER_WIDTH, -1);
101 shadows_slider.set_draw_value (false);
102- shadows_slider.set_margin_end (0);
103
104 Gtk.Label highlights_label = new Gtk.Label.with_mnemonic (_ ("Highlights:"));
105- highlights_label.set_alignment (0.0f, 0.5f);
106+ highlights_label.set_halign (Gtk.Align.END);
107 slider_organizer.attach (highlights_label, 0, 5, 1, 1);
108 slider_organizer.attach (highlights_slider, 1, 5, 1, 1);
109 highlights_slider.set_size_request (SLIDER_WIDTH, -1);
110@@ -2931,4 +2914,4 @@
111 }
112
113
114-}
115\ No newline at end of file
116+}

Subscribers

People subscribed via source and target branches