Merge lp:~jeremywootten/pantheon-files/fix-debian-build into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Merged at revision: 2257
Proposed branch: lp:~jeremywootten/pantheon-files/fix-debian-build
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 207 lines (+58/-28)
4 files modified
libwidgets/Chrome/BasicBreadcrumbsEntry.vala (+3/-1)
libwidgets/Chrome/BreadcrumbElement.vala (+6/-3)
src/CMakeLists.txt (+42/-19)
src/View/Sidebar.vala (+7/-5)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-debian-build
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+300616@code.launchpad.net

Description of the change

This branch fixes some mistakes in ./src/CMakeLists.txt that prevented the package compiling if Unity and Plank were absent (e.g. under Debian Sid).

It also fixes an issue with the drawing of breadcrumbs under different themes causing the outline to be drawn inaccurately.

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

Looks good but I made some diff comments about indention.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libwidgets/Chrome/BasicBreadcrumbsEntry.vala'
2--- libwidgets/Chrome/BasicBreadcrumbsEntry.vala 2016-07-02 10:10:57 +0000
3+++ libwidgets/Chrome/BasicBreadcrumbsEntry.vala 2016-07-20 14:21:51 +0000
4@@ -584,8 +584,10 @@
5 double height = get_allocated_height ();
6 double width = get_allocated_width ();
7
8+ Gtk.Border border = this.get_style_context ().get_margin (Gtk.StateFlags.ACTIVE);
9+
10 if (!is_focus) {
11- double margin = YPAD;
12+ double margin = border.top;
13
14 /* Ensure there is an editable area to the right of the breadcrumbs */
15 double width_marged = width - 2 * margin - MINIMUM_LOCATION_BAR_ENTRY_WIDTH - ICON_WIDTH;
16
17=== modified file 'libwidgets/Chrome/BreadcrumbElement.vala'
18--- libwidgets/Chrome/BreadcrumbElement.vala 2016-06-11 12:06:50 +0000
19+++ libwidgets/Chrome/BreadcrumbElement.vala 2016-07-20 14:21:51 +0000
20@@ -89,8 +89,9 @@
21
22 public double draw (Cairo.Context cr, double x, double y, double height, Gtk.StyleContext button_context, bool is_RTL, Gtk.Widget widget) {
23 var state = button_context.get_state ();
24- if (pressed)
25+ if (pressed) {
26 state |= Gtk.StateFlags.ACTIVE;
27+ }
28
29 padding = button_context.get_padding (state);
30 double line_width = cr.get_line_width ();
31@@ -128,8 +129,8 @@
32 room_for_text = false;
33 }
34 }
35+
36 /* Erase area for drawing */
37-
38 if (offset > 0.0) {
39 double x_frame_width, x_half_height, x_frame_width_half_height;
40 if (is_RTL) {
41@@ -165,9 +166,11 @@
42 right_x = base_x + frame_width + line_width;
43 arrow_right_x = right_x + half_height;
44 }
45+
46 var top_y = y + padding.top - line_width;
47 var bottom_y = y_height - padding.bottom + line_width;
48 var arrow_y = y_half_height;
49+
50 cr.move_to (left_x, top_y);
51 cr.line_to (base_x, arrow_y);
52 cr.line_to (left_x, bottom_y);
53@@ -180,7 +183,7 @@
54 button_context.save ();
55 button_context.set_state (Gtk.StateFlags.ACTIVE);
56 button_context.render_background (cr, left_x, y, width + height + 2 * line_width, height);
57- button_context.render_frame (cr, 0, padding.top - line_width, widget.get_allocated_width (), height - line_width);
58+ button_context.render_frame (cr, 0, y, widget.get_allocated_width (), height);
59 button_context.restore ();
60 cr.restore ();
61 }
62
63=== modified file 'src/CMakeLists.txt'
64--- src/CMakeLists.txt 2016-06-29 18:56:26 +0000
65+++ src/CMakeLists.txt 2016-07-20 14:21:51 +0000
66@@ -13,22 +13,45 @@
67
68 find_package (PkgConfig)
69
70-pkg_check_modules (DEPS REQUIRED
71- granite>=0.3.0
72- glib-2.0>=2.29.0
73- gthread-2.0
74- gio-2.0
75- gio-unix-2.0
76- pango>=1.1.2
77- gtk+-3.0>=3.14
78- gmodule-2.0
79- gail-3.0
80- gee-0.8
81- sqlite3
82- dbus-glib-1
83- libcanberra>=0.30
84- plank
85+
86+
87+OPTION (WITH_UNITY "Add Unity launcher support" ON)
88+pkg_check_modules (UNITY unity>=4.0.0)
89+
90+if (WITH_UNITY AND UNITY_FOUND)
91+pkg_check_modules (DEPS REQUIRED
92+ granite>=0.3.0
93+ glib-2.0>=2.29.0
94+ gthread-2.0
95+ gio-2.0
96+ gio-unix-2.0
97+ pango>=1.1.2
98+ gtk+-3.0>=3.14
99+ gmodule-2.0
100+ gail-3.0
101+ gee-0.8
102+ sqlite3
103+ dbus-glib-1
104+ libcanberra>=0.30
105+ zeitgeist-2.0
106+ plank)
107+else (WITH_UNITY AND UNITY_FOUND)
108+pkg_check_modules (DEPS REQUIRED
109+ granite>=0.3.0
110+ glib-2.0>=2.29.0
111+ gthread-2.0
112+ gio-2.0
113+ gio-unix-2.0
114+ pango>=1.1.2
115+ gtk+-3.0>=3.14
116+ gmodule-2.0
117+ gail-3.0
118+ gee-0.8
119+ sqlite3
120+ dbus-glib-1
121+ libcanberra>=0.30
122 zeitgeist-2.0)
123+endif (WITH_UNITY AND UNITY_FOUND)
124
125 pkg_check_modules(PLANK011 QUIET plank>=0.10.9)
126 if (PLANK011_FOUND)
127@@ -46,8 +69,7 @@
128 link_directories (${LIB_PATHS})
129 add_definitions (${CFLAGS} -O2)
130
131-OPTION (WITH_UNITY "Add Unity launcher support" ON)
132-pkg_check_modules (UNITY unity>=4.0.0)
133+
134
135 IF (WITH_UNITY AND UNITY_FOUND)
136 vala_precompile (VALA_C ${CMAKE_PROJECT_NAME}
137@@ -88,12 +110,12 @@
138 gee-0.8
139 granite
140 unity
141+ plank
142 pantheon-files-core
143 pantheon-files-core-C
144 pantheon-files-widgets
145 marlin
146 zeitgeist-2.0
147- plank
148 GENERATE_HEADER
149 marlin-vala
150 OPTIONS
151@@ -117,6 +139,7 @@
152 ProgressInfoWidget.vala
153 ProgressUIHandler.vala
154 TextRenderer.vala
155+ View/AbstractPropertiesDialog.vala
156 View/ColumnView.vala
157 View/AbstractTreeView.vala
158 View/IconView.vala
159@@ -133,6 +156,7 @@
160 View/Sidebar.vala
161 View/Slot.vala
162 View/Miller.vala
163+ View/VolumePropertiesWindow.vala
164 PACKAGES
165 gtk+-3.0
166 gio-2.0
167@@ -145,7 +169,6 @@
168 pantheon-files-widgets
169 marlin
170 zeitgeist-2.0
171- plank
172 GENERATE_HEADER
173 marlin-vala
174 OPTIONS
175
176=== modified file 'src/View/Sidebar.vala'
177--- src/View/Sidebar.vala 2016-06-25 12:31:22 +0000
178+++ src/View/Sidebar.vala 2016-07-20 14:21:51 +0000
179@@ -858,21 +858,23 @@
180 private bool drag_failed_callback (Gdk.DragContext context, Gtk.DragResult result) {
181 int x, y;
182 Gdk.Device device;
183-#if HAVE_PLANK_0_11
184- Plank.PoofWindow poof_window;
185-#else
186- Plank.Widgets.PoofWindow poof_window;
187-#endif
188
189 if (internal_drag_started && dragged_out_of_window) {
190 device = context.get_device ();
191 device.get_position (null, out x, out y);
192+
193+#if HAVE_UNITY
194+
195 #if HAVE_PLANK_0_11
196+ Plank.PoofWindow poof_window;
197 poof_window = Plank.PoofWindow.get_default ();
198 #else
199+ Plank.Widgets.PoofWindow? poof_window = null;
200 poof_window = Plank.Widgets.PoofWindow.get_default ();
201 #endif
202 poof_window.show_at (x, y);
203+#endif
204+
205 if (drag_row_ref != null) {
206 Gtk.TreeIter iter;
207 store.get_iter (out iter, drag_row_ref.get_path ());

Subscribers

People subscribed via source and target branches

to all changes: