[gnome-control-center/gbsneto/gtk4: 12/38] notifications: Port to GTK4




commit 1b1a88d2858fdcd223713f69bf24a7f5e9887fcf
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Oct 19 23:10:34 2021 -0300

    notifications: Port to GTK4
    
    This one was relatively easy, since most of the brokenness came
    from using deprecated properties that can just be dropped, and
    packaging that can also just be dropped.

 panels/meson.build                                 |   2 +-
 panels/notifications/cc-app-notifications-dialog.c |   5 -
 .../notifications/cc-app-notifications-dialog.ui   | 153 +--------------------
 panels/notifications/cc-notifications-panel.c      |  39 +++---
 panels/notifications/cc-notifications-panel.ui     |  39 +-----
 shell/cc-panel-loader.c                            |   4 +-
 6 files changed, 27 insertions(+), 215 deletions(-)
---
diff --git a/panels/meson.build b/panels/meson.build
index 029f5aa4d..518207ddd 100644
--- a/panels/meson.build
+++ b/panels/meson.build
@@ -16,7 +16,7 @@ panels = [
 #  'microphone',
 #  'mouse',
 #  'multitasking',
-#  'notifications',
+  'notifications',
 #  'online-accounts',
 #  'power',
 #  'printers',
diff --git a/panels/notifications/cc-app-notifications-dialog.c 
b/panels/notifications/cc-app-notifications-dialog.c
index 4d8ffddb9..7a3db6578 100644
--- a/panels/notifications/cc-app-notifications-dialog.c
+++ b/panels/notifications/cc-app-notifications-dialog.c
@@ -26,7 +26,6 @@
 #include <gio/gio.h>
 #include <gio/gdesktopappinfo.h>
 
-#include "list-box-helper.h"
 #include "cc-notifications-panel.h"
 #include "cc-app-notifications-dialog.h"
 
@@ -375,10 +374,6 @@ void
 cc_app_notifications_dialog_init (CcAppNotificationsDialog *dialog)
 {
   gtk_widget_init_template (GTK_WIDGET (dialog));
-
-  gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->main_listbox),
-                                cc_list_box_update_header_func,
-                                NULL, NULL);
 }
 
 CcAppNotificationsDialog *
diff --git a/panels/notifications/cc-app-notifications-dialog.ui 
b/panels/notifications/cc-app-notifications-dialog.ui
index 1bb2909c4..9af4a3a63 100644
--- a/panels/notifications/cc-app-notifications-dialog.ui
+++ b/panels/notifications/cc-app-notifications-dialog.ui
@@ -2,58 +2,29 @@
 <interface>
   <template class="CcAppNotificationsDialog" parent="GtkDialog">
     <property name="width_request">360</property>
-    <property name="can_focus">False</property>
     <property name="modal">True</property>
-    <property name="type_hint">dialog</property>
-    <signal name="response" handler="gtk_widget_destroy" swapped="no"/>
-    <child internal-child="vbox">
+    <child>
       <object class="GtkBox">
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <property name="border_width">0</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox">
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
         <child>
           <object class="GtkListBox" id="main_listbox">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="selection_mode">none</property>
+            <property name="show-separators">True</property>
             <property name="activate_on_single_click">False</property>
             <child>
               <object class="GtkListBoxRow">
                 <property name="width_request">100</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="activatable">False</property>
                 <property name="selectable">False</property>
                 <child>
                   <object class="GtkBox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="margin_start">15</property>
                     <property name="margin_end">15</property>
                     <property name="margin_top">12</property>
                     <property name="margin_bottom">12</property>
                     <child>
                       <object class="GtkLabel">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
                         <property name="hexpand">True</property>
                         <property name="vexpand">True</property>
                         <property name="xalign">0</property>
@@ -61,26 +32,14 @@
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">notifications_switch</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                     <child>
                       <object class="GtkSwitch" id="notifications_switch">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
                         <property name="halign">end</property>
                         <property name="valign">center</property>
                         <property name="active">True</property>
                         <signal name="notify::active" handler="notifications_switch_state_set_cb" 
swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
@@ -89,22 +48,16 @@
             <child>
               <object class="GtkListBoxRow">
                 <property name="width_request">100</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="activatable">False</property>
                 <property name="selectable">False</property>
                 <child>
                   <object class="GtkBox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="margin_start">15</property>
                     <property name="margin_end">15</property>
                     <property name="margin_top">12</property>
                     <property name="margin_bottom">12</property>
                     <child>
                       <object class="GtkLabel">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
                         <property name="hexpand">True</property>
                         <property name="vexpand">True</property>
                         <property name="xalign">0</property>
@@ -113,25 +66,13 @@
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">sound_alerts_switch</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                     <child>
                       <object class="GtkSwitch" id="sound_alerts_switch">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
                         <property name="halign">end</property>
                         <property name="valign">center</property>
                         <signal name="notify::active" handler="sound_alerts_switch_state_set_cb" 
swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
@@ -140,27 +81,19 @@
             <child>
               <object class="GtkListBoxRow">
                 <property name="width_request">100</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="activatable">False</property>
                 <property name="selectable">False</property>
                 <child>
                   <object class="GtkBox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="margin_start">15</property>
                     <property name="margin_end">15</property>
                     <property name="margin_top">12</property>
                     <property name="margin_bottom">12</property>
                     <child>
                       <object class="GtkBox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
                         <property name="orientation">vertical</property>
                         <child>
                           <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
                             <property name="hexpand">True</property>
                             <property name="vexpand">True</property>
                             <property name="xalign">0</property>
@@ -169,16 +102,9 @@
                             <property name="use_underline">True</property>
                             <property name="mnemonic_widget">notification_banners_switch</property>
                           </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
                         </child>
                         <child>
                           <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
                             <property name="max-width-chars">42</property>
                             <property name="wrap-mode">word</property>
                             <property name="label" translatable="yes">Notifications will continue to appear 
in the notification list when popups are disabled.</property>
@@ -192,32 +118,15 @@
                               <attribute name="scale" value="0.83"/>
                             </attributes>
                           </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
                         </child>
                       </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                     <child>
                       <object class="GtkSwitch" id="notification_banners_switch">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
                         <property name="halign">end</property>
                         <property name="valign">center</property>
                         <signal name="notify::active" handler="notification_banners_switch_state_set_cb" 
swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">2</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
@@ -226,14 +135,10 @@
             <child>
               <object class="GtkListBoxRow">
                 <property name="width_request">100</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="activatable">False</property>
                 <property name="selectable">False</property>
                 <child>
                   <object class="GtkBox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="margin_start">15</property>
                     <property name="margin_end">15</property>
                     <property name="margin_top">12</property>
@@ -241,7 +146,6 @@
                     <child>
                       <object class="GtkLabel">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
                         <property name="hexpand">True</property>
                         <property name="vexpand">True</property>
                         <property name="xalign">0</property>
@@ -250,25 +154,13 @@
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">notification_banners_content_switch</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                     <child>
                       <object class="GtkSwitch" id="notification_banners_content_switch">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
                         <property name="halign">end</property>
                         <property name="valign">center</property>
                         <signal name="notify::active" 
handler="notification_banners_content_switch_state_set_cb" swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
@@ -277,22 +169,16 @@
             <child>
               <object class="GtkListBoxRow">
                 <property name="width_request">100</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="activatable">False</property>
                 <property name="selectable">False</property>
                 <child>
                   <object class="GtkBox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="margin_start">15</property>
                     <property name="margin_end">15</property>
                     <property name="margin_top">12</property>
                     <property name="margin_bottom">12</property>
                     <child>
                       <object class="GtkLabel">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
                         <property name="hexpand">True</property>
                         <property name="vexpand">True</property>
                         <property name="xalign">0</property>
@@ -301,25 +187,13 @@
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">lock_screen_notifications_switch</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                     <child>
                       <object class="GtkSwitch" id="lock_screen_notifications_switch">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
                         <property name="halign">end</property>
                         <property name="valign">center</property>
                         <signal name="notify::active" 
handler="lock_screen_notifications_switch_state_set_cb" swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
@@ -328,22 +202,16 @@
             <child>
               <object class="GtkListBoxRow">
                 <property name="width_request">100</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="activatable">False</property>
                 <property name="selectable">False</property>
                 <child>
                   <object class="GtkBox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="margin_start">15</property>
                     <property name="margin_end">15</property>
                     <property name="margin_top">12</property>
                     <property name="margin_bottom">12</property>
                     <child>
                       <object class="GtkLabel">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
                         <property name="hexpand">True</property>
                         <property name="vexpand">True</property>
                         <property name="xalign">0</property>
@@ -352,36 +220,19 @@
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">lock_screen_content_switch</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                     <child>
                       <object class="GtkSwitch" id="lock_screen_content_switch">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
                         <property name="halign">end</property>
                         <property name="valign">center</property>
                         <signal name="notify::active" handler="lock_screen_content_switch_state_set_cb" 
swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
               </object>
             </child>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index 4273feeca..25e69fb9e 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -26,7 +26,6 @@
 #include <gio/gdesktopappinfo.h>
 
 #include "cc-list-row.h"
-#include "list-box-helper.h"
 #include "cc-notifications-panel.h"
 #include "cc-notifications-resources.h"
 #include "cc-app-notifications-dialog.h"
@@ -183,8 +182,6 @@ cc_notifications_panel_init (CcNotificationsPanel *panel)
                    panel->lock_screen_row,
                    "active", G_SETTINGS_BIND_DEFAULT);
 
-  gtk_container_set_focus_vadjustment (GTK_CONTAINER (panel->main_box), panel->focus_adjustment);
-
   panel->sections = g_list_append (panel->sections, panel->options_listbox);
   panel->sections_reverse = g_list_prepend (panel->sections_reverse, panel->options_listbox);
 
@@ -226,6 +223,8 @@ cc_notifications_panel_class_init (CcNotificationsPanelClass *klass)
   object_class->dispose = cc_notifications_panel_dispose;
   object_class->finalize = cc_notifications_panel_finalize;
 
+  g_type_ensure (CC_TYPE_LIST_ROW);
+
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/control-center/notifications/cc-notifications-panel.ui");
 
   gtk_widget_class_bind_template_child (widget_class, CcNotificationsPanel, app_listbox);
@@ -281,7 +280,6 @@ add_application (CcNotificationsPanel *panel,
   GtkWidget *box, *w, *row;
   g_autoptr(GIcon) icon = NULL;
   const gchar *app_name;
-  int size;
 
   app_name = g_app_info_get_name (app->app_info);
   if (app_name == NULL || *app_name == '\0')
@@ -294,33 +292,31 @@ add_application (CcNotificationsPanel *panel,
     g_object_ref (icon);
 
   box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
-  gtk_widget_show (box);
-  gtk_container_set_border_width (GTK_CONTAINER (box), 10);
+  gtk_widget_set_margin_top (box, 10);
+  gtk_widget_set_margin_bottom (box, 10);
+  gtk_widget_set_margin_start (box, 10);
+  gtk_widget_set_margin_end (box, 10);
 
   row = gtk_list_box_row_new ();
-  gtk_widget_show (row);
   g_object_set_qdata_full (G_OBJECT (row), application_quark (),
                            app, (GDestroyNotify) application_free);
 
-  gtk_container_add (GTK_CONTAINER (panel->app_listbox), row);
-  gtk_container_add (GTK_CONTAINER (row), box);
+  gtk_list_box_append (panel->app_listbox, row);
+  gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (row), box);
 
-  w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
+  w = gtk_image_new_from_gicon (icon);
   gtk_style_context_add_class (gtk_widget_get_style_context (w), "lowres-icon");
-  gtk_widget_show (w);
-  gtk_icon_size_lookup (GTK_ICON_SIZE_DND, &size, NULL);
-  gtk_image_set_pixel_size (GTK_IMAGE (w), size);
+  gtk_image_set_icon_size (GTK_IMAGE (w), GTK_ICON_SIZE_LARGE);
   gtk_size_group_add_widget (panel->sizegroup1, w);
-  gtk_container_add (GTK_CONTAINER (box), w);
+  gtk_box_append (GTK_BOX (box), w);
 
   w = gtk_label_new (app_name);
-  gtk_widget_show (w);
+  gtk_widget_set_hexpand (w, TRUE);
   gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_END);
   gtk_label_set_xalign (GTK_LABEL (w), 0.0f);
-  gtk_container_add (GTK_CONTAINER (box), w);
+  gtk_box_append (GTK_BOX (box), w);
 
   w = gtk_label_new ("");
-  gtk_widget_show (w);
   g_settings_bind_with_mapping (app->settings, "enable",
                                 w, "label",
                                 G_SETTINGS_BIND_GET |
@@ -331,7 +327,7 @@ add_application (CcNotificationsPanel *panel,
                                 NULL);
   gtk_widget_set_margin_end (w, 12);
   gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
-  gtk_box_pack_end (GTK_BOX (box), w, FALSE, FALSE, 0);
+  gtk_box_append (GTK_BOX (box), w);
 
   g_hash_table_add (panel->known_applications, g_strdup (app->canonical_app_id));
 }
@@ -499,6 +495,11 @@ select_app (CcNotificationsPanel *panel,
   Application *app;
   g_autofree gchar *app_id = NULL;
   CcAppNotificationsDialog *dialog;
+  GtkWidget *toplevel;
+  CcShell *shell;
+
+  shell = cc_panel_get_shell (CC_PANEL (panel));
+  toplevel = cc_shell_get_toplevel (shell);
 
   app = g_object_get_qdata (G_OBJECT (row), application_quark ());
 
@@ -507,7 +508,7 @@ select_app (CcNotificationsPanel *panel,
     app_id[strlen (app_id) - strlen (".desktop")] = '\0';
 
   dialog = cc_app_notifications_dialog_new (app_id, g_app_info_get_name (app->app_info), app->settings, 
panel->master_settings, panel->perm_store);
-  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET 
(panel))));
+  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (toplevel));
   gtk_widget_show (GTK_WIDGET (dialog));
 }
 
diff --git a/panels/notifications/cc-notifications-panel.ui b/panels/notifications/cc-notifications-panel.ui
index dac894c5f..3e1b988ce 100644
--- a/panels/notifications/cc-notifications-panel.ui
+++ b/panels/notifications/cc-notifications-panel.ui
@@ -2,35 +2,24 @@
 <interface>
   <requires lib="gtk+" version="3.12"/>
   <template class="CcNotificationsPanel" parent="CcPanel">
-    <property name="visible">True</property>
     <child>
       <object class="GtkScrolledWindow" id="main_scrolled_window">
-        <property name="visible">True</property>
-        <property name="can_focus">True</property>
         <property name="hscrollbar_policy">never</property>
-        <property name="shadow_type">none</property>
         <property name="vadjustment">focus_adjustment</property>
         <child>
           <object class="GtkViewport">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <child>
-              <object class="HdyClamp">
-                <property name="visible">True</property>
+              <object class="AdwClamp">
                 <property name="margin_top">32</property>
                 <property name="margin_bottom">32</property>
                 <property name="margin_start">12</property>
                 <property name="margin_end">12</property>
                 <child>
                   <object class="GtkBox" id="main_box">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="orientation">vertical</property>
                     <property name="hexpand">True</property>
                     <child>
                       <object class="GtkListBox" id="options_listbox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
                         <property name="hexpand">True</property>
                         <property name="selection_mode">none</property>
                         <property name="margin_bottom">32</property>
@@ -40,7 +29,6 @@
                         </style>
                         <child>
                           <object class="CcListRow" id="dnd_row">
-                            <property name="visible">True</property>
                             <property name="title" translatable="yes">_Do Not Disturb</property>
                             <property name="use-underline">True</property>
                             <property name="show-switch">True</property>
@@ -48,43 +36,25 @@
                         </child>
                         <child>
                           <object class="CcListRow" id="lock_screen_row">
-                            <property name="visible">True</property>
                             <property name="title" translatable="yes">_Lock Screen Notifications</property>
                             <property name="use-underline">True</property>
                             <property name="show-switch">True</property>
                           </object>
                         </child>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                     <child>
                       <object class="GtkLabel" id="app_list_heading_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="margin_bottom">12</property>
                         <property name="label" translatable="yes" comments="List of 
applications.">Applications</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
                         </attributes>
-                        <accessibility>
-                          <relation type="label-for" target="app_listbox"/>
-                        </accessibility>
                         </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
                     <child>
                       <object class="GtkListBox" id="app_listbox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
                         <property name="hexpand">True</property>
                         <property name="selection_mode">none</property>
                         <signal name="keynav-failed" handler="keynav_failed" object="CcNotificationsPanel" 
swapped="yes" />
@@ -93,14 +63,9 @@
                           <class name="content"/>
                         </style>
                         <accessibility>
-                          <relation type="labelled-by" target="app_list_heading_label"/>
+                          <relation name="labelled-by">app_list_heading_label</relation>
                         </accessibility>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">2</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
index fefabca7e..8c5647668 100644
--- a/shell/cc-panel-loader.c
+++ b/shell/cc-panel-loader.c
@@ -48,7 +48,7 @@ extern GType cc_info_overview_panel_get_type (void);
 //extern GType cc_network_panel_get_type (void);
 //extern GType cc_wifi_panel_get_type (void);
 #endif /* BUILD_NETWORK */
-//extern GType cc_notifications_panel_get_type (void);
+extern GType cc_notifications_panel_get_type (void);
 //extern GType cc_goa_panel_get_type (void);
 //extern GType cc_power_panel_get_type (void);
 //extern GType cc_printers_panel_get_type (void);
@@ -119,7 +119,7 @@ static CcPanelLoaderVtable default_panels[] =
   //PANEL_TYPE("network",          cc_network_panel_get_type,              NULL),
   //PANEL_TYPE("wifi",             cc_wifi_panel_get_type,                 cc_wifi_panel_static_init_func),
 #endif
-  //PANEL_TYPE("notifications",    cc_notifications_panel_get_type,        NULL),
+  PANEL_TYPE("notifications",    cc_notifications_panel_get_type,        NULL),
   //PANEL_TYPE("online-accounts",  cc_goa_panel_get_type,                  NULL),
   //PANEL_TYPE("power",            cc_power_panel_get_type,                NULL),
   //PANEL_TYPE("printers",         cc_printers_panel_get_type,             NULL),


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