[Xfce4-commits] <ristretto:ristretto-0.0> Fix cleanup of settings object inside the preferences-dialog code Fix some indenting

Stephan Arts noreply at xfce.org
Sun Oct 23 19:30:29 CEST 2011


Updating branch refs/heads/ristretto-0.0
         to af4fb7f3253e06ef884478cf454790ac876c612c (commit)
       from 8ffd71d67ae57e7b90c53725c648d21d91323cf2 (commit)

commit af4fb7f3253e06ef884478cf454790ac876c612c
Author: Stephan Arts <stephan at xfce.org>
Date:   Sun Nov 14 20:11:59 2010 +0100

    Fix cleanup of settings object inside the preferences-dialog code
    Fix some indenting

 src/preferences_dialog.c |   24 +++++++++++++++++++++---
 src/thumbnailer.c        |    5 ++---
 2 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/src/preferences_dialog.c b/src/preferences_dialog.c
index 8455e20..fde5635 100644
--- a/src/preferences_dialog.c
+++ b/src/preferences_dialog.c
@@ -35,7 +35,10 @@
 static void
 rstto_preferences_dialog_init(RsttoPreferencesDialog *);
 static void
-rstto_preferences_dialog_class_init(RsttoPreferencesDialogClass *);
+rstto_preferences_dialog_class_init(GObjectClass *);
+
+static void
+rstto_preferences_dialog_dispose (GObject *object);
 
 
 static void
@@ -465,9 +468,24 @@ rstto_preferences_dialog_init(RsttoPreferencesDialog *dialog)
 }
 
 static void
-rstto_preferences_dialog_class_init(RsttoPreferencesDialogClass *dialog_class)
+rstto_preferences_dialog_class_init(GObjectClass *object_class)
+{
+    parent_class = g_type_class_peek_parent (RSTTO_PREFERENCES_DIALOG_CLASS (object_class));
+
+    object_class->dispose = rstto_preferences_dialog_dispose;
+}
+
+static void
+rstto_preferences_dialog_dispose (GObject *object)
 {
-    parent_class = g_type_class_peek_parent (dialog_class);
+    RsttoPreferencesDialog *dialog = RSTTO_PREFERENCES_DIALOG (object);
+    if (dialog->priv->settings)
+    {
+        g_object_unref (dialog->priv->settings);
+        dialog->priv->settings = NULL;
+    }
+    
+    G_OBJECT_CLASS(parent_class)->dispose(object);
 }
 
 GtkWidget *
diff --git a/src/thumbnailer.c b/src/thumbnailer.c
index c742829..721e98f 100644
--- a/src/thumbnailer.c
+++ b/src/thumbnailer.c
@@ -96,8 +96,8 @@ struct _RsttoThumbnailerPriv
 {
     DBusGConnection   *connection;
     DBusGProxy        *proxy;
-    GSList *queue;
-    gint handle;
+    GSList            *queue;
+    gint               handle;
 
     gint request_timer_id;
 };
@@ -246,7 +246,6 @@ rstto_thumbnailer_queue_image (RsttoThumbnailer *thumbnailer, RsttoImage *image)
                  G_TYPE_INVALID) == FALSE);
             thumbnailer->priv->handle = 0;
         }
-
     }
 
     if (g_slist_find (thumbnailer->priv->queue, image) == NULL)


More information about the Xfce4-commits mailing list