aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-picture-gallery.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-16 23:25:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-09-04 19:34:32 +0800
commitfcbbdfbd18e15b4ee8322a0217cf03a689a5e033 (patch)
treee16cd2a2279558c6a2bfb6ca39fcbaac4c85ba59 /widgets/misc/e-picture-gallery.c
parentf78417c48861759d7b0c4535ecd3febe4638a7d3 (diff)
downloadgsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.gz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.bz2
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.lz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.xz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.zst
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'widgets/misc/e-picture-gallery.c')
-rw-r--r--widgets/misc/e-picture-gallery.c42
1 files changed, 25 insertions, 17 deletions
diff --git a/widgets/misc/e-picture-gallery.c b/widgets/misc/e-picture-gallery.c
index a657dbf373..a742a5e37c 100644
--- a/widgets/misc/e-picture-gallery.c
+++ b/widgets/misc/e-picture-gallery.c
@@ -47,7 +47,10 @@ enum {
G_DEFINE_TYPE (EPictureGallery, e_picture_gallery, GTK_TYPE_ICON_VIEW)
static gboolean
-update_file_iter (GtkListStore *list_store, GtkTreeIter *iter, GFile *file, gboolean force_thumbnail_update)
+update_file_iter (GtkListStore *list_store,
+ GtkTreeIter *iter,
+ GFile *file,
+ gboolean force_thumbnail_update)
{
GFileInfo *file_info;
gchar *uri;
@@ -85,7 +88,7 @@ update_file_iter (GtkListStore *list_store, GtkTreeIter *iter, GFile *file, gboo
}
if (existing_thumb && !g_file_info_get_attribute_boolean (file_info, G_FILE_ATTRIBUTE_THUMBNAILING_FAILED)) {
- GdkPixbuf* pixbuf;
+ GdkPixbuf * pixbuf;
pixbuf = gdk_pixbuf_new_from_file (existing_thumb, NULL);
@@ -125,7 +128,8 @@ update_file_iter (GtkListStore *list_store, GtkTreeIter *iter, GFile *file, gboo
}
static void
-add_file (GtkListStore *list_store, GFile *file)
+add_file (GtkListStore *list_store,
+ GFile *file)
{
GtkTreeIter iter;
@@ -138,7 +142,9 @@ add_file (GtkListStore *list_store, GFile *file)
}
static gboolean
-find_file_uri (GtkListStore *list_store, const gchar *uri, GtkTreeIter *iter)
+find_file_uri (GtkListStore *list_store,
+ const gchar *uri,
+ GtkTreeIter *iter)
{
GtkTreeModel *model;
@@ -171,14 +177,16 @@ find_file_uri (GtkListStore *list_store, const gchar *uri, GtkTreeIter *iter)
}
static void
-picture_gallery_dir_changed_cb (GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type, EPictureGallery *gallery)
+picture_gallery_dir_changed_cb (GFileMonitor *monitor,
+ GFile *file,
+ GFile *other_file,
+ GFileMonitorEvent event_type,
+ EPictureGallery *gallery)
{
gchar *uri;
GtkListStore *list_store;
GtkTreeIter iter;
- g_return_if_fail (gallery != NULL);
- g_return_if_fail (gallery->priv != NULL);
g_return_if_fail (file != NULL);
list_store = GTK_LIST_STORE (gtk_icon_view_get_model (GTK_ICON_VIEW (gallery)));
@@ -273,9 +281,9 @@ e_picture_gallery_get_path (EPictureGallery *gallery)
}
static void
-picture_gallery_set_path (EPictureGallery *gallery, const gchar *path)
+picture_gallery_set_path (EPictureGallery *gallery,
+ const gchar *path)
{
- g_return_if_fail (gallery != NULL);
g_return_if_fail (E_IS_PICTURE_GALLERY (gallery));
g_return_if_fail (gallery->priv != NULL);
@@ -288,7 +296,10 @@ picture_gallery_set_path (EPictureGallery *gallery, const gchar *path)
}
static void
-picture_gallery_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+picture_gallery_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
switch (property_id) {
case PROP_PATH:
@@ -300,7 +311,10 @@ picture_gallery_get_property (GObject *object, guint property_id, GValue *value,
}
static void
-picture_gallery_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+picture_gallery_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
switch (property_id) {
case PROP_PATH:
@@ -314,9 +328,6 @@ picture_gallery_set_property (GObject *object, guint property_id, const GValue *
static void
visible_cb (EPictureGallery *gallery)
{
- g_return_if_fail (gallery != NULL);
- g_return_if_fail (gallery->priv != NULL);
-
if (!gallery->priv->initialized && gtk_widget_get_visible (GTK_WIDGET (gallery))) {
gallery->priv->initialized = TRUE;
@@ -367,9 +378,6 @@ picture_gallery_dispose (GObject *object)
gallery = E_PICTURE_GALLERY (object);
- g_return_if_fail (gallery != NULL);
- g_return_if_fail (gallery->priv != NULL);
-
if (gallery->priv->monitor) {
g_object_unref (gallery->priv->monitor);
gallery->priv->monitor = NULL;