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
=== modified file 'libwidgets/Chrome/BasicBreadcrumbsEntry.vala'
--- libwidgets/Chrome/BasicBreadcrumbsEntry.vala 2016-07-02 10:10:57 +0000
+++ libwidgets/Chrome/BasicBreadcrumbsEntry.vala 2016-07-20 14:21:51 +0000
@@ -584,8 +584,10 @@
584 double height = get_allocated_height ();584 double height = get_allocated_height ();
585 double width = get_allocated_width ();585 double width = get_allocated_width ();
586586
587 Gtk.Border border = this.get_style_context ().get_margin (Gtk.StateFlags.ACTIVE);
588
587 if (!is_focus) {589 if (!is_focus) {
588 double margin = YPAD;590 double margin = border.top;
589591
590 /* Ensure there is an editable area to the right of the breadcrumbs */592 /* Ensure there is an editable area to the right of the breadcrumbs */
591 double width_marged = width - 2 * margin - MINIMUM_LOCATION_BAR_ENTRY_WIDTH - ICON_WIDTH;593 double width_marged = width - 2 * margin - MINIMUM_LOCATION_BAR_ENTRY_WIDTH - ICON_WIDTH;
592594
=== modified file 'libwidgets/Chrome/BreadcrumbElement.vala'
--- libwidgets/Chrome/BreadcrumbElement.vala 2016-06-11 12:06:50 +0000
+++ libwidgets/Chrome/BreadcrumbElement.vala 2016-07-20 14:21:51 +0000
@@ -89,8 +89,9 @@
8989
90 public double draw (Cairo.Context cr, double x, double y, double height, Gtk.StyleContext button_context, bool is_RTL, Gtk.Widget widget) {90 public double draw (Cairo.Context cr, double x, double y, double height, Gtk.StyleContext button_context, bool is_RTL, Gtk.Widget widget) {
91 var state = button_context.get_state ();91 var state = button_context.get_state ();
92 if (pressed)92 if (pressed) {
93 state |= Gtk.StateFlags.ACTIVE;93 state |= Gtk.StateFlags.ACTIVE;
94 }
9495
95 padding = button_context.get_padding (state);96 padding = button_context.get_padding (state);
96 double line_width = cr.get_line_width ();97 double line_width = cr.get_line_width ();
@@ -128,8 +129,8 @@
128 room_for_text = false;129 room_for_text = false;
129 }130 }
130 }131 }
132
131 /* Erase area for drawing */133 /* Erase area for drawing */
132
133 if (offset > 0.0) {134 if (offset > 0.0) {
134 double x_frame_width, x_half_height, x_frame_width_half_height;135 double x_frame_width, x_half_height, x_frame_width_half_height;
135 if (is_RTL) {136 if (is_RTL) {
@@ -165,9 +166,11 @@
165 right_x = base_x + frame_width + line_width;166 right_x = base_x + frame_width + line_width;
166 arrow_right_x = right_x + half_height;167 arrow_right_x = right_x + half_height;
167 }168 }
169
168 var top_y = y + padding.top - line_width;170 var top_y = y + padding.top - line_width;
169 var bottom_y = y_height - padding.bottom + line_width;171 var bottom_y = y_height - padding.bottom + line_width;
170 var arrow_y = y_half_height;172 var arrow_y = y_half_height;
173
171 cr.move_to (left_x, top_y);174 cr.move_to (left_x, top_y);
172 cr.line_to (base_x, arrow_y);175 cr.line_to (base_x, arrow_y);
173 cr.line_to (left_x, bottom_y);176 cr.line_to (left_x, bottom_y);
@@ -180,7 +183,7 @@
180 button_context.save ();183 button_context.save ();
181 button_context.set_state (Gtk.StateFlags.ACTIVE);184 button_context.set_state (Gtk.StateFlags.ACTIVE);
182 button_context.render_background (cr, left_x, y, width + height + 2 * line_width, height);185 button_context.render_background (cr, left_x, y, width + height + 2 * line_width, height);
183 button_context.render_frame (cr, 0, padding.top - line_width, widget.get_allocated_width (), height - line_width);186 button_context.render_frame (cr, 0, y, widget.get_allocated_width (), height);
184 button_context.restore ();187 button_context.restore ();
185 cr.restore ();188 cr.restore ();
186 }189 }
187190
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2016-06-29 18:56:26 +0000
+++ src/CMakeLists.txt 2016-07-20 14:21:51 +0000
@@ -13,22 +13,45 @@
1313
14find_package (PkgConfig)14find_package (PkgConfig)
1515
16pkg_check_modules (DEPS REQUIRED16
17 granite>=0.3.017
18 glib-2.0>=2.29.018OPTION (WITH_UNITY "Add Unity launcher support" ON)
19 gthread-2.019pkg_check_modules (UNITY unity>=4.0.0)
20 gio-2.020
21 gio-unix-2.021if (WITH_UNITY AND UNITY_FOUND)
22 pango>=1.1.222pkg_check_modules (DEPS REQUIRED
23 gtk+-3.0>=3.1423 granite>=0.3.0
24 gmodule-2.024 glib-2.0>=2.29.0
25 gail-3.025 gthread-2.0
26 gee-0.826 gio-2.0
27 sqlite327 gio-unix-2.0
28 dbus-glib-128 pango>=1.1.2
29 libcanberra>=0.3029 gtk+-3.0>=3.14
30 plank30 gmodule-2.0
31 gail-3.0
32 gee-0.8
33 sqlite3
34 dbus-glib-1
35 libcanberra>=0.30
36 zeitgeist-2.0
37 plank)
38else (WITH_UNITY AND UNITY_FOUND)
39pkg_check_modules (DEPS REQUIRED
40 granite>=0.3.0
41 glib-2.0>=2.29.0
42 gthread-2.0
43 gio-2.0
44 gio-unix-2.0
45 pango>=1.1.2
46 gtk+-3.0>=3.14
47 gmodule-2.0
48 gail-3.0
49 gee-0.8
50 sqlite3
51 dbus-glib-1
52 libcanberra>=0.30
31 zeitgeist-2.0)53 zeitgeist-2.0)
54endif (WITH_UNITY AND UNITY_FOUND)
3255
33pkg_check_modules(PLANK011 QUIET plank>=0.10.9)56pkg_check_modules(PLANK011 QUIET plank>=0.10.9)
34if (PLANK011_FOUND)57if (PLANK011_FOUND)
@@ -46,8 +69,7 @@
46link_directories (${LIB_PATHS})69link_directories (${LIB_PATHS})
47add_definitions (${CFLAGS} -O2)70add_definitions (${CFLAGS} -O2)
4871
49OPTION (WITH_UNITY "Add Unity launcher support" ON)72
50pkg_check_modules (UNITY unity>=4.0.0)
5173
52IF (WITH_UNITY AND UNITY_FOUND)74IF (WITH_UNITY AND UNITY_FOUND)
53 vala_precompile (VALA_C ${CMAKE_PROJECT_NAME}75 vala_precompile (VALA_C ${CMAKE_PROJECT_NAME}
@@ -88,12 +110,12 @@
88 gee-0.8110 gee-0.8
89 granite111 granite
90 unity112 unity
113 plank
91 pantheon-files-core114 pantheon-files-core
92 pantheon-files-core-C115 pantheon-files-core-C
93 pantheon-files-widgets116 pantheon-files-widgets
94 marlin117 marlin
95 zeitgeist-2.0118 zeitgeist-2.0
96 plank
97 GENERATE_HEADER119 GENERATE_HEADER
98 marlin-vala120 marlin-vala
99 OPTIONS121 OPTIONS
@@ -117,6 +139,7 @@
117 ProgressInfoWidget.vala139 ProgressInfoWidget.vala
118 ProgressUIHandler.vala140 ProgressUIHandler.vala
119 TextRenderer.vala141 TextRenderer.vala
142 View/AbstractPropertiesDialog.vala
120 View/ColumnView.vala143 View/ColumnView.vala
121 View/AbstractTreeView.vala144 View/AbstractTreeView.vala
122 View/IconView.vala145 View/IconView.vala
@@ -133,6 +156,7 @@
133 View/Sidebar.vala156 View/Sidebar.vala
134 View/Slot.vala157 View/Slot.vala
135 View/Miller.vala158 View/Miller.vala
159 View/VolumePropertiesWindow.vala
136 PACKAGES160 PACKAGES
137 gtk+-3.0161 gtk+-3.0
138 gio-2.0162 gio-2.0
@@ -145,7 +169,6 @@
145 pantheon-files-widgets169 pantheon-files-widgets
146 marlin170 marlin
147 zeitgeist-2.0171 zeitgeist-2.0
148 plank
149 GENERATE_HEADER172 GENERATE_HEADER
150 marlin-vala173 marlin-vala
151 OPTIONS174 OPTIONS
152175
=== modified file 'src/View/Sidebar.vala'
--- src/View/Sidebar.vala 2016-06-25 12:31:22 +0000
+++ src/View/Sidebar.vala 2016-07-20 14:21:51 +0000
@@ -858,21 +858,23 @@
858 private bool drag_failed_callback (Gdk.DragContext context, Gtk.DragResult result) {858 private bool drag_failed_callback (Gdk.DragContext context, Gtk.DragResult result) {
859 int x, y;859 int x, y;
860 Gdk.Device device;860 Gdk.Device device;
861#if HAVE_PLANK_0_11
862 Plank.PoofWindow poof_window;
863#else
864 Plank.Widgets.PoofWindow poof_window;
865#endif
866861
867 if (internal_drag_started && dragged_out_of_window) {862 if (internal_drag_started && dragged_out_of_window) {
868 device = context.get_device ();863 device = context.get_device ();
869 device.get_position (null, out x, out y);864 device.get_position (null, out x, out y);
865
866#if HAVE_UNITY
867
870#if HAVE_PLANK_0_11868#if HAVE_PLANK_0_11
869 Plank.PoofWindow poof_window;
871 poof_window = Plank.PoofWindow.get_default ();870 poof_window = Plank.PoofWindow.get_default ();
872#else871#else
872 Plank.Widgets.PoofWindow? poof_window = null;
873 poof_window = Plank.Widgets.PoofWindow.get_default ();873 poof_window = Plank.Widgets.PoofWindow.get_default ();
874#endif874#endif
875 poof_window.show_at (x, y);875 poof_window.show_at (x, y);
876#endif
877
876 if (drag_row_ref != null) {878 if (drag_row_ref != null) {
877 Gtk.TreeIter iter;879 Gtk.TreeIter iter;
878 store.get_iter (out iter, drag_row_ref.get_path ());880 store.get_iter (out iter, drag_row_ref.get_path ());

Subscribers

People subscribed via source and target branches

to all changes: