[gnome-control-center] info: Derive subpanels from CcPanel



commit 0e01c7d1a49a1833605574cc3abbd38d01583b42
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Sat Jun 10 17:30:15 2017 +0530

    info: Derive subpanels from CcPanel
    
    This is required for adding these subpanels as panels
    for the new g-c-c shell design.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779216

 panels/info/cc-info-default-apps-panel.c    |    4 ++--
 panels/info/cc-info-default-apps-panel.h    |    2 +-
 panels/info/cc-info-overview-panel.c        |    4 ++--
 panels/info/cc-info-overview-panel.h        |    2 +-
 panels/info/cc-info-removable-media-panel.c |    4 ++--
 panels/info/cc-info-removable-media-panel.h |    2 +-
 panels/info/info-default-apps.ui            |    9 ++++++++-
 panels/info/info-overview.ui                |    9 ++++++++-
 panels/info/info-removable-media.ui         |    9 ++++++++-
 9 files changed, 33 insertions(+), 12 deletions(-)
---
diff --git a/panels/info/cc-info-default-apps-panel.c b/panels/info/cc-info-default-apps-panel.c
index e417ff4..1aa7404 100644
--- a/panels/info/cc-info-default-apps-panel.c
+++ b/panels/info/cc-info-default-apps-panel.c
@@ -59,7 +59,7 @@ typedef struct
 
 struct _CcInfoDefaultAppsPanel
 {
-  GtkBox     parent_instance;
+  CcPanel    parent_instance;
 
   GtkWidget *default_apps_grid;
 
@@ -72,7 +72,7 @@ struct _CcInfoDefaultAppsPanel
 };
 
 
-G_DEFINE_TYPE (CcInfoDefaultAppsPanel, cc_info_default_apps_panel, GTK_TYPE_BOX)
+G_DEFINE_TYPE (CcInfoDefaultAppsPanel, cc_info_default_apps_panel, CC_TYPE_PANEL)
 
 static void
 default_app_changed (GtkAppChooserButton    *button,
diff --git a/panels/info/cc-info-default-apps-panel.h b/panels/info/cc-info-default-apps-panel.h
index cafdbe4..22fccd8 100644
--- a/panels/info/cc-info-default-apps-panel.h
+++ b/panels/info/cc-info-default-apps-panel.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
 
 #define CC_TYPE_INFO_DEFAULT_APPS_PANEL (cc_info_default_apps_panel_get_type ())
 
-G_DECLARE_FINAL_TYPE (CcInfoDefaultAppsPanel, cc_info_default_apps_panel, CC, INFO_DEFAULT_APPS_PANEL, 
GtkBox)
+G_DECLARE_FINAL_TYPE (CcInfoDefaultAppsPanel, cc_info_default_apps_panel, CC, INFO_DEFAULT_APPS_PANEL, 
CcPanel)
 
 GtkWidget *cc_info_default_apps_panel_new (void);
 
diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c
index be38d53..7a5879c 100644
--- a/panels/info/cc-info-overview-panel.c
+++ b/panels/info/cc-info-overview-panel.c
@@ -87,7 +87,7 @@ typedef struct
 
 struct _CcInfoOverviewPanel
 {
- GtkBox                 parent_instance;
+ CcPanel parent_instance;
 
   /*< private >*/
  CcInfoOverviewPanelPrivate *priv;
@@ -106,7 +106,7 @@ typedef struct
 } VersionData;
 
 
-G_DEFINE_TYPE_WITH_PRIVATE (CcInfoOverviewPanel, cc_info_overview_panel, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (CcInfoOverviewPanel, cc_info_overview_panel, CC_TYPE_PANEL)
 
 static void
 version_start_element_handler (GMarkupParseContext      *ctx,
diff --git a/panels/info/cc-info-overview-panel.h b/panels/info/cc-info-overview-panel.h
index 7747cf9..d9e4ff8 100644
--- a/panels/info/cc-info-overview-panel.h
+++ b/panels/info/cc-info-overview-panel.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
 
 #define CC_TYPE_INFO_OVERVIEW_PANEL (cc_info_overview_panel_get_type ())
 
-G_DECLARE_FINAL_TYPE (CcInfoOverviewPanel, cc_info_overview_panel, CC, INFO_OVERVIEW_PANEL, GtkBox);
+G_DECLARE_FINAL_TYPE (CcInfoOverviewPanel, cc_info_overview_panel, CC, INFO_OVERVIEW_PANEL, CcPanel)
 
 GtkWidget *cc_info_overview_panel_new (void);
 
diff --git a/panels/info/cc-info-removable-media-panel.c b/panels/info/cc-info-removable-media-panel.c
index 5c6c3d3..f6a3b52 100644
--- a/panels/info/cc-info-removable-media-panel.c
+++ b/panels/info/cc-info-removable-media-panel.c
@@ -62,7 +62,7 @@
 
 struct _CcInfoRemovableMediaPanel
 {
-  GtkBox     parent_instance;
+  CcPanel    parent_instance;
 
   /* Media */
   GSettings *media_settings;
@@ -85,7 +85,7 @@ struct _CcInfoRemovableMediaPanel
 };
 
 
-G_DEFINE_TYPE (CcInfoRemovableMediaPanel, cc_info_removable_media_panel, GTK_TYPE_BOX)
+G_DEFINE_TYPE (CcInfoRemovableMediaPanel, cc_info_removable_media_panel, CC_TYPE_PANEL)
 
 static char **
 remove_elem_from_str_array (char       **v,
diff --git a/panels/info/cc-info-removable-media-panel.h b/panels/info/cc-info-removable-media-panel.h
index f126336..dccecde 100644
--- a/panels/info/cc-info-removable-media-panel.h
+++ b/panels/info/cc-info-removable-media-panel.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
 
 #define CC_TYPE_INFO_REMOVABLE_MEDIA_PANEL (cc_info_removable_media_panel_get_type ())
 
-G_DECLARE_FINAL_TYPE (CcInfoRemovableMediaPanel, cc_info_removable_media_panel, CC, 
INFO_REMOVABLE_MEDIA_PANEL, GtkBox)
+G_DECLARE_FINAL_TYPE (CcInfoRemovableMediaPanel, cc_info_removable_media_panel, CC, 
INFO_REMOVABLE_MEDIA_PANEL, CcPanel)
 
 
 G_END_DECLS
diff --git a/panels/info/info-default-apps.ui b/panels/info/info-default-apps.ui
index c8f91a1..b3b3bc3 100644
--- a/panels/info/info-default-apps.ui
+++ b/panels/info/info-default-apps.ui
@@ -1,7 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <template class="CcInfoDefaultAppsPanel" parent="GtkBox">
+  <template class="CcInfoDefaultAppsPanel" parent="CcPanel">
+    <property name="visible">True</property>
+    <property name="can-focus">False</property>
+    <property name="expand">True</property>
+    <child>
+    <object class="GtkBox">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="halign">center</property>
@@ -198,5 +203,7 @@
         <property name="position">0</property>
       </packing>
     </child>
+    </object>
+    </child>
   </template>
 </interface>
diff --git a/panels/info/info-overview.ui b/panels/info/info-overview.ui
index 9f2bcee..5efe402 100644
--- a/panels/info/info-overview.ui
+++ b/panels/info/info-overview.ui
@@ -1,7 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <template class="CcInfoOverviewPanel" parent="GtkBox">
+  <template class="CcInfoOverviewPanel" parent="CcPanel">
+    <property name="visible">True</property>
+    <property name="can-focus">False</property>
+    <property name="expand">True</property>
+    <child>
+    <object class="GtkBox" id="">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="spacing">18</property>
@@ -322,6 +327,8 @@
         <property name="pack_type">end</property>
         <property name="position">3</property>
       </packing>
+        </child>
+    </object>
     </child>
   </template>
 </interface>
diff --git a/panels/info/info-removable-media.ui b/panels/info/info-removable-media.ui
index 7bbb393..0d60833 100644
--- a/panels/info/info-removable-media.ui
+++ b/panels/info/info-removable-media.ui
@@ -1,7 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <template class="CcInfoRemovableMediaPanel" parent="GtkBox">
+  <template class="CcInfoRemovableMediaPanel" parent="CcPanel">
+    <property name="visible">True</property>
+    <property name="can-focus">False</property>
+    <property name="expand">True</property>
+    <child>
+    <object class="GtkBox">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="orientation">horizontal</property>
@@ -283,6 +288,8 @@
         <property name="position">0</property>
       </packing>
     </child>
+    </object>
+    </child>
   </template>
 
   <object class="GtkDialog" id="media_dialog">


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