[dconf-editor] Set detailed action in BrowserInfobar.



commit fba5f009026c50392d42e717f647bd7dba6e7d77
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Jan 16 07:49:46 2018 +0100

    Set detailed action in BrowserInfobar.

 editor/browser-infobar.vala |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/editor/browser-infobar.vala b/editor/browser-infobar.vala
index f3b5b6b..8bd774b 100644
--- a/editor/browser-infobar.vala
+++ b/editor/browser-infobar.vala
@@ -22,12 +22,8 @@ class BrowserInfoBar : Revealer
 {
     [GtkChild] Stack content;
 
-    public void add_label (string name, string text_label, string? button_label = null, string 
button_action_name = "")
+    public void add_label (string name, string text_label, string? button_label = null, string button_action 
= "")
     {
-        bool has_button = button_label != null;
-        if (has_button && button_action_name == "")
-            assert_not_reached ();
-
         RegistryWarning grid = new RegistryWarning ();
 
         Label label = new Label (text_label);
@@ -35,11 +31,14 @@ class BrowserInfoBar : Revealer
         label.max_width_chars = 40;
         label.wrap = true;
 
-        if (has_button)
+        if (button_label != null)
         {
+            if (button_action == "")
+                assert_not_reached ();
+
             Button button = new Button ();
             button.label = (!) button_label;
-            button.action_name = (!) button_action_name;
+            button.set_detailed_action_name (button_action);
 
             label.set_xalign ((float) 0.0);
             grid.add (label);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]