elementaryart team mailing list archive
-
elementaryart team
-
Mailing list archive
-
Message #00652
[Merge] lp:~ricotz/marlin/fixes into lp:marlin
Rico Tzschichholz has proposed merging lp:~ricotz/marlin/fixes into lp:marlin.
Requested reviews:
The elementary Project (elementaryproject)
For more details, see:
https://code.launchpad.net/~ricotz/marlin/fixes/+merge/66691
some conditional syntax fixes to make it compile with vala 0.13+
--
https://code.launchpad.net/~ricotz/marlin/fixes/+merge/66691
Your team The elementary Project is requested to review the proposed merge of lp:~ricotz/marlin/fixes into lp:marlin.
=== modified file 'libwidgets/LocationBar.vala'
--- libwidgets/LocationBar.vala 2011-07-02 11:50:30 +0000
+++ libwidgets/LocationBar.vala 2011-07-02 12:07:30 +0000
@@ -260,8 +260,12 @@
button_context = new Gtk.Button().get_style_context();
entry_context = new Gtk.Entry().get_style_context();
button_context.add_class("marlin-pathbar");
+#if VALA_0_14
+ Gtk.Border border = button_context.get_padding(Gtk.StateFlags.NORMAL);
+#else
Gtk.Border border = new Gtk.Border();
button_context.get_padding(Gtk.StateFlags.NORMAL, border);
+#endif
left_padding = border.left;
right_padding = border.right;
@@ -910,8 +914,12 @@
cr.line_to(second_stop,
y + 1);
cr.close_path();
+#if VALA_0_14
+ Gdk.RGBA color = button_context.get_background_color(Gtk.StateFlags.SELECTED);
+#else
Gdk.RGBA color = Gdk.RGBA();
button_context.get_background_color(Gtk.StateFlags.SELECTED, color);
+#endif
Cairo.Pattern pat = new Cairo.Pattern.linear(first_stop, y, second_stop, y);
pat.add_color_stop_rgba(0.7, color.red, color.green, color.blue, 0);
@@ -1709,8 +1717,12 @@
/* draw completion */
cr.move_to(x + text_width, height/2 - text_height/2);
layout.set_text(completion, -1);
+#if VALA_0_14
+ Gdk.RGBA color = button_context.get_color(Gtk.StateFlags.NORMAL);
+#else
Gdk.RGBA color = Gdk.RGBA();
button_context.get_color(Gtk.StateFlags.NORMAL, color);
+#endif
cr.set_source_rgba(color.red, color.green, color.blue, color.alpha - 0.3);
Pango.cairo_show_layout(cr, layout);
@@ -1718,12 +1730,20 @@
if(focus && selected_start >= 0 && selected_end >= 0)
{
cr.rectangle(x + selection_start, height/4, selection_end - selection_start, height/2);
+#if VALA_0_14
+ color = button_context.get_background_color(Gtk.StateFlags.SELECTED);
+#else
button_context.get_background_color(Gtk.StateFlags.SELECTED, color);
+#endif
cr.set_source_rgba(color.red, color.green, color.blue, color.alpha);
cr.fill();
layout.set_text(get_selection(), -1);
+#if VALA_0_14
+ color = button_context.get_color(Gtk.StateFlags.SELECTED);
+#else
button_context.get_color(Gtk.StateFlags.SELECTED, color);
+#endif
cr.set_source_rgba(color.red, color.green, color.blue, color.alpha);
cr.move_to(x + Math.fmin(selection_start, selection_end), height/4);
Pango.cairo_show_layout(cr, layout);
=== modified file 'src/View/ContextView.vala'
--- src/View/ContextView.vala 2011-06-13 09:45:40 +0000
+++ src/View/ContextView.vala 2011-07-02 12:07:30 +0000
@@ -171,7 +171,11 @@
window.main_box.reset_style ();
}
+#if VALA_0_14
+ private void size_allocate_changed (Gtk.Allocation s)
+#else
private void size_allocate_changed (Widget w, Gdk.Rectangle s)
+#endif
{
/* first allocations can be tricky ignore all allocations different
than the panel requested size at first */
=== modified file 'src/View/Window.vala'
--- src/View/Window.vala 2011-05-07 18:41:52 +0000
+++ src/View/Window.vala 2011-07-02 12:07:30 +0000
@@ -365,7 +365,11 @@
tabs.remove(view_container);
}
+#if VALA_0_14
+ private void resized(Gtk.Allocation allocation){
+#else
private void resized(Gdk.Rectangle allocation){
+#endif
Orientation current_state = main_box.orientation;
Orientation future_state = Orientation.VERTICAL; // Becouse how Paned class works, this is inverted
Follow ups