aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2016-09-15 08:53:16 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-09-15 08:53:16 +0000
commitfabfbff17ffca9ffbec69640469b728f5e149325 (patch)
tree747962fd1d96897d29a9bf5b626c267d00f99ec9
parentb20befface6bc648db012aa56352a1ab7789ff0c (diff)
downloadarctica-greeter-fabfbff17ffca9ffbec69640469b728f5e149325.tar.gz
arctica-greeter-fabfbff17ffca9ffbec69640469b728f5e149325.tar.bz2
arctica-greeter-fabfbff17ffca9ffbec69640469b728f5e149325.zip
Work around Vala trying to use a new GTK 3.20 function.
-rw-r--r--src/fixes.vapi2
-rw-r--r--src/main-window.vala2
-rw-r--r--src/prompt-box.vala2
-rw-r--r--src/shutdown-dialog.vala2
4 files changed, 5 insertions, 3 deletions
diff --git a/src/fixes.vapi b/src/fixes.vapi
index 3cbae7a..3834690 100644
--- a/src/fixes.vapi
+++ b/src/fixes.vapi
@@ -32,6 +32,8 @@ namespace Gtk
// Fixed in Vala 0.24
public void to_hsv (double r, double g, double b, out double h, out double s, out double v);
}
+
+ public void button_set_focus_on_click (Gtk.Button button, bool focus_on_click);
}
// Note, fixed in 1.10.0
diff --git a/src/main-window.vala b/src/main-window.vala
index 74e2c5b..6dfd168 100644
--- a/src/main-window.vala
+++ b/src/main-window.vala
@@ -114,7 +114,7 @@ public class MainWindow : Gtk.Window
back_button = new FlatButton ();
back_button.get_accessible ().set_name (_("Back"));
- back_button.focus_on_click = false;
+ Gtk.button_set_focus_on_click (back_button, false);
var image = new Gtk.Image.from_file (Path.build_filename (Config.PKGDATADIR, "arrow_left.png", null));
image.show ();
back_button.set_size_request (grid_size - GreeterList.BORDER * 2, grid_size - GreeterList.BORDER * 2);
diff --git a/src/prompt-box.vala b/src/prompt-box.vala
index e77e0d6..419f56d 100644
--- a/src/prompt-box.vala
+++ b/src/prompt-box.vala
@@ -207,7 +207,7 @@ public class PromptBox : FadableBox
option_button.valign = Gtk.Align.START;
// Keep as much space on top as on the right
option_button.margin_top = ActiveIndicator.WIDTH + box_grid.column_spacing;
- option_button.focus_on_click = false;
+ Gtk.button_set_focus_on_click (option_button, false);
option_button.relief = Gtk.ReliefStyle.NONE;
option_button.get_accessible ().set_name (_("Session Options"));
option_button.clicked.connect (option_button_clicked_cb);
diff --git a/src/shutdown-dialog.vala b/src/shutdown-dialog.vala
index bf0a2b4..79e102d 100644
--- a/src/shutdown-dialog.vala
+++ b/src/shutdown-dialog.vala
@@ -548,7 +548,7 @@ private class DialogButton : Gtk.Button
this.focused_filename = focused_filename;
this.active_filename = active_filename;
relief = Gtk.ReliefStyle.NONE;
- focus_on_click = false;
+ Gtk.button_set_focus_on_click (this, false);
i = new Gtk.Image.from_file (inactive_filename);
i.visible = true;
add (i);