[gnome-control-center/wip/jsparber/background: 28/28] background: clean up files and code and remove build warnings



commit 2a9a1d5d06bfb842030cca0b8cada62e82bf00c3
Author: Julian Sparber <julian sparber net>
Date:   Tue Feb 6 22:43:26 2018 +0100

    background: clean up files and code and remove build warnings
    
    - remove bg-source and bg-wallpapers-source files
    - remove build warnings
    - add Julian Sparber as author to cc-background-panel.c
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788515

 panels/background/bg-source.c               | 202 ----------------------------
 panels/background/bg-source.h               |  46 -------
 panels/background/bg-wallpapers-source.c    | 173 ------------------------
 panels/background/bg-wallpapers-source.h    |  38 ------
 panels/background/cc-background-grid-item.c |  13 +-
 panels/background/cc-background-item.c      |   8 +-
 panels/background/cc-background-panel.c     |  11 +-
 panels/background/cc-background-store.c     |  21 ++-
 panels/background/cc-background-xml.h       |  22 +--
 panels/background/meson.build               |   2 -
 10 files changed, 39 insertions(+), 497 deletions(-)
---
diff --git a/panels/background/cc-background-grid-item.c b/panels/background/cc-background-grid-item.c
index 33ea52d35..e6c10000f 100644
--- a/panels/background/cc-background-grid-item.c
+++ b/panels/background/cc-background-grid-item.c
@@ -46,9 +46,10 @@ G_DEFINE_TYPE (CcBackgroundGridItem, cc_background_grid_item, GTK_TYPE_DRAWING_A
     };
 
 static GdkPixbuf *
-load_slideshow_emblem (CcBackgroundGridItem *item, gint scale_factor)
+load_slideshow_emblem (CcBackgroundGridItem *item,
+                       gint                  scale_factor)
 {
-  GdkPixbuf *slideshow_emblem;
+  GdkPixbuf *slideshow_emblem = NULL;
   GIcon *icon = NULL;
   GtkIconInfo *icon_info = NULL;
   GError *error = NULL;
@@ -113,9 +114,9 @@ add_slideshow_emblem (CcBackgroundGridItem *item,
 }
 
 static void
-on_gallery_item_size_allocate (GtkWidget *widget,
+on_gallery_item_size_allocate (GtkWidget    *widget,
                                GdkRectangle *allocation,
-                               gpointer  *pointer)
+                               gpointer      pointer)
 {
   CcBackgroundGridItem *item = (CcBackgroundGridItem *) widget;
   GdkPixbuf *resized_pixbuf;
@@ -206,7 +207,7 @@ cc_background_grid_item_dispose (GObject *object)
 
 static void
 cc_background_grid_item_set_property (GObject      *object,
-                                      guint        prop_id,
+                                      guint         prop_id,
                                       const GValue *value,
                                       GParamSpec   *pspec)
 {
@@ -228,7 +229,7 @@ cc_background_grid_item_set_property (GObject      *object,
 
 static void
 cc_background_grid_item_get_property (GObject    *object,
-                                      guint      prop_id,
+                                      guint       prop_id,
                                       GValue     *value,
                                       GParamSpec *pspec)
 {
diff --git a/panels/background/cc-background-item.c b/panels/background/cc-background-item.c
index c547cb150..db1d4691a 100644
--- a/panels/background/cc-background-item.c
+++ b/panels/background/cc-background-item.c
@@ -83,7 +83,9 @@ G_DEFINE_TYPE (CcBackgroundItem, cc_background_item, G_TYPE_OBJECT)
 static GdkPixbuf *slideshow_emblem = NULL;
 
 static GdkPixbuf *
-get_emblemed_pixbuf (CcBackgroundItem *item, GdkPixbuf *pixbuf, gint scale_factor)
+get_emblemed_pixbuf (CcBackgroundItem *item,
+                     GdkPixbuf        *pixbuf,
+                     gint              scale_factor)
 {
         int eh;
         int ew;
@@ -201,8 +203,8 @@ update_size (CcBackgroundItem *item)
 
 static GdkPixbuf *
 render_at_size (GnomeBG *bg,
-                gint width,
-                gint height)
+                gint     width,
+                gint     height)
 {
         GdkPixbuf *pixbuf;
 
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 2d6978358..1e2512a54 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -14,7 +14,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  *
- * Author: Thomas Wood <thomas wood intel com>
+ * Authors: Thomas Wood <thomas wood intel com>
+ *          Julian Sparber <julian sparber net>
  *
  */
 
@@ -208,7 +209,7 @@ on_preview_draw (GtkWidget         *widget,
 }
 
 static void
-on_panel_resize (GtkWidget *widget,
+on_panel_resize (GtkWidget    *widget,
                  GdkRectangle *allocation,
                  gpointer      user_data)
 {
@@ -226,7 +227,7 @@ on_panel_resize (GtkWidget *widget,
 
 static void
 reload_current_bg (CcBackgroundPanel *panel,
-                   GSettings *settings)
+                   GSettings         *settings)
 {
   g_autoptr(CcBackgroundItem) saved = NULL;
   CcBackgroundItem *configured;
@@ -390,7 +391,7 @@ on_background_select (GtkFlowBox      *box,
 
 static void
 on_open_gnome_photos (GtkWidget *widget,
-                      gpointer  user_data)
+                      gpointer   user_data)
 {
   g_autoptr(GAppLaunchContext) context = NULL;
   g_autoptr(GDesktopAppInfo) appInfo = NULL;
@@ -410,7 +411,7 @@ on_open_gnome_photos (GtkWidget *widget,
 
 static void
 on_open_picture_folder (GtkWidget *widget,
-                        gpointer  user_data)
+                        gpointer   user_data)
 {
   g_autoptr(GDBusProxy) proxy = NULL;
   g_autoptr(GVariant) retval = NULL;
diff --git a/panels/background/cc-background-store.c b/panels/background/cc-background-store.c
index 1d11d89d6..a9dfeb9d1 100644
--- a/panels/background/cc-background-store.c
+++ b/panels/background/cc-background-store.c
@@ -54,19 +54,18 @@ cc_background_store_finalize (GObject *gobject)
   G_OBJECT_CLASS (cc_background_store_parent_class)->finalize (gobject);
 }
 
-
 static void
 item_added (CcBackgroundXml    *xml,
             CcBackgroundItem   *item,
-            CcBackgroundStore *self)
+            CcBackgroundStore  *self)
 {
   g_list_store_append (self->model, item);
 }
 
 static void
-list_load_cb (GObject *source_object,
-              GAsyncResult *res,
-              gpointer user_data)
+list_load_cb (GObject           *source_object,
+              GAsyncResult      *res,
+              gpointer           user_data)
 {
   cc_background_xml_load_list_finish (res);
 }
@@ -96,18 +95,18 @@ cc_background_store_init (CcBackgroundStore *self)
 }
 
 void 
-cc_background_store_bind_flow_box (CcBackgroundStore *self,
-                                   gpointer panel,
-                                   GtkWidget *widget,
-                                   GtkFlowBoxCreateWidgetFunc create_widget_fun) {
+cc_background_store_bind_flow_box (CcBackgroundStore            *self,
+                                   gpointer                      panel,
+                                   GtkWidget                    *widget,
+                                   GtkFlowBoxCreateWidgetFunc    create_widget_fun)
+{
   gtk_flow_box_bind_model (GTK_FLOW_BOX (widget),
-                           G_LIST_MODEL(self->model),
+                           G_LIST_MODEL (self->model),
                            create_widget_fun,
                            panel,
                            NULL);
 }
 
-
 CcBackgroundStore *
 cc_background_store_new ()
 {
diff --git a/panels/background/cc-background-xml.h b/panels/background/cc-background-xml.h
index bf0687f78..ccaada496 100644
--- a/panels/background/cc-background-xml.h
+++ b/panels/background/cc-background-xml.h
@@ -31,17 +31,17 @@ G_DECLARE_FINAL_TYPE (CcBackgroundXml, cc_background_xml, CC, BACKGROUND_XML, GO
 
 CcBackgroundXml *cc_background_xml_new (void);
 
-void cc_background_xml_save                          (CcBackgroundItem *item,
-                                                     const char       *filename);
-
-CcBackgroundItem *cc_background_xml_get_item         (const char      *filename);
-gboolean cc_background_xml_load_xml                  (CcBackgroundXml *data,
-                                                     const char      *filename);
-void cc_background_xml_load_list_async               (CcBackgroundXml *data,
-                                                     GCancellable *cancellable,
-                                                     GAsyncReadyCallback callback,
-                                                     gpointer user_data);
-const GHashTable *cc_background_xml_load_list_finish (GAsyncResult  *async_result);
+void cc_background_xml_save                          (CcBackgroundItem    *item,
+                                                     const char          *filename);
+
+CcBackgroundItem *cc_background_xml_get_item         (const char          *filename);
+gboolean cc_background_xml_load_xml                  (CcBackgroundXml     *data,
+                                                     const char          *filename);
+void cc_background_xml_load_list_async               (CcBackgroundXml     *data,
+                                                     GCancellable        *cancellable,
+                                                     GAsyncReadyCallback  callback,
+                                                     gpointer             user_data);
+const GHashTable *cc_background_xml_load_list_finish (GAsyncResult        *async_result);
 
 G_END_DECLS
 
diff --git a/panels/background/meson.build b/panels/background/meson.build
index faa44830f..64f55f988 100644
--- a/panels/background/meson.build
+++ b/panels/background/meson.build
@@ -58,8 +58,6 @@ common_sources += gnome.compile_resources(
 )
 
 sources = common_sources + files(
-  'bg-source.c',
-  'bg-wallpapers-source.c',
   'cc-background-item.c',
   'cc-background-grid-item.c',
   'cc-background-store.c',


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