[gnome-control-center/wip/applications] Cosmetics



commit c4204415ec6d1bff0112b71a19b43561d1767063
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jan 5 17:04:51 2019 -0500

    Cosmetics

 panels/applications/cc-action-row.c  | 9 +++------
 panels/applications/cc-action-row.ui | 2 ++
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/panels/applications/cc-action-row.c b/panels/applications/cc-action-row.c
index ea653fd0f..efc113d31 100644
--- a/panels/applications/cc-action-row.c
+++ b/panels/applications/cc-action-row.c
@@ -48,8 +48,7 @@ enum
 };
 
 static void
-clicked_cb (GtkButton   *button,
-            CcActionRow *row)
+clicked_cb (CcActionRow *row)
 {
   g_signal_emit (row, activated_signal, 0);
 }
@@ -167,7 +166,6 @@ cc_action_row_class_init (CcActionRowClass *klass)
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/control-center/applications/cc-action-row.ui");
 
-
   activated_signal = g_signal_new ("activated",
                                    G_OBJECT_CLASS_TYPE (object_class),
                                    G_SIGNAL_RUN_FIRST,
@@ -179,15 +177,14 @@ cc_action_row_class_init (CcActionRowClass *klass)
   gtk_widget_class_bind_template_child (widget_class, CcActionRow, title);
   gtk_widget_class_bind_template_child (widget_class, CcActionRow, subtitle);
   gtk_widget_class_bind_template_child (widget_class, CcActionRow, button);
+
+  gtk_widget_class_bind_template_callback (widget_class, clicked_cb);
 }
 
 static void
 cc_action_row_init (CcActionRow *self)
 {
   gtk_widget_init_template (GTK_WIDGET (self));
-
-  gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (self), FALSE);
-  g_signal_connect (self->button, "clicked", G_CALLBACK (clicked_cb), self);
 }
 
 CcActionRow *
diff --git a/panels/applications/cc-action-row.ui b/panels/applications/cc-action-row.ui
index 0649357d4..54385a325 100644
--- a/panels/applications/cc-action-row.ui
+++ b/panels/applications/cc-action-row.ui
@@ -3,6 +3,7 @@
   <template class="CcActionRow" parent="GtkListBoxRow">
     <property name="visible">True</property>
     <property name="can-focus">True</property>
+    <property name="activatable">False</property>
     <child>
       <object class="GtkBox">
         <property name="visible">1</property>
@@ -39,6 +40,7 @@
           <object class="GtkButton" id="button">
             <property name="visible">1</property>
             <property name="valign">center</property>
+            <signal name="clicked" handler="clicked_cb" swapped="yes"/>
           </object>
         </child>
       </object>


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