gtk+ r22377 - in trunk: . gtk
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22377 - in trunk: . gtk
- Date: Thu, 19 Feb 2009 15:15:49 +0000 (UTC)
Author: mitch
Date: Thu Feb 19 15:15:49 2009
New Revision: 22377
URL: http://svn.gnome.org/viewvc/gtk+?rev=22377&view=rev
Log:
2009-02-19 Michael Natterer <mitch imendio com>
* gtk/gtkmountoperation.c: sort functions so their order is more
"standard", some cosmetic cleanup (not changing any code).
Modified:
trunk/ChangeLog
trunk/gtk/gtkmountoperation.c
Modified: trunk/gtk/gtkmountoperation.c
==============================================================================
--- trunk/gtk/gtkmountoperation.c (original)
+++ trunk/gtk/gtkmountoperation.c Thu Feb 19 15:15:49 2009
@@ -68,8 +68,7 @@
* When necessary, #GtkMountOperation shows dialogs to ask for passwords.
*/
-/* GObject, GtkObject methods
- */
+static void gtk_mount_operation_finalize (GObject *object);
static void gtk_mount_operation_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -78,10 +77,7 @@
guint prop_id,
GValue *value,
GParamSpec *pspec);
-static void gtk_mount_operation_finalize (GObject *object);
-/* GMountOperation methods
- */
static void gtk_mount_operation_ask_password (GMountOperation *op,
const char *message,
const char *default_user,
@@ -122,29 +118,10 @@
};
static void
-gtk_mount_operation_finalize (GObject *object)
-{
- GtkMountOperation *operation;
- GtkMountOperationPrivate *priv;
-
- operation = GTK_MOUNT_OPERATION (object);
-
- priv = operation->priv;
-
- if (priv->parent_window)
- g_object_unref (priv->parent_window);
-
- if (priv->screen)
- g_object_unref (priv->screen);
-
- G_OBJECT_CLASS (gtk_mount_operation_parent_class)->finalize (object);
-}
-
-static void
gtk_mount_operation_class_init (GtkMountOperationClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GMountOperationClass *mount_op_class;
+ GMountOperationClass *mount_op_class = G_MOUNT_OPERATION_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtkMountOperationPrivate));
@@ -152,7 +129,6 @@
object_class->get_property = gtk_mount_operation_get_property;
object_class->set_property = gtk_mount_operation_set_property;
- mount_op_class = G_MOUNT_OPERATION_CLASS (klass);
mount_op_class->ask_password = gtk_mount_operation_ask_password;
mount_op_class->ask_question = gtk_mount_operation_ask_question;
mount_op_class->aborted = gtk_mount_operation_aborted;
@@ -180,9 +156,30 @@
P_("The screen where this window will be displayed."),
GDK_TYPE_SCREEN,
GTK_PARAM_READWRITE));
+}
+static void
+gtk_mount_operation_init (GtkMountOperation *operation)
+{
+ operation->priv = G_TYPE_INSTANCE_GET_PRIVATE (operation,
+ GTK_TYPE_MOUNT_OPERATION,
+ GtkMountOperationPrivate);
}
+static void
+gtk_mount_operation_finalize (GObject *object)
+{
+ GtkMountOperation *operation = GTK_MOUNT_OPERATION (object);
+ GtkMountOperationPrivate *priv = operation->priv;
+
+ if (priv->parent_window)
+ g_object_unref (priv->parent_window);
+
+ if (priv->screen)
+ g_object_unref (priv->screen);
+
+ G_OBJECT_CLASS (gtk_mount_operation_parent_class)->finalize (object);
+}
static void
gtk_mount_operation_set_property (GObject *object,
@@ -190,25 +187,20 @@
const GValue *value,
GParamSpec *pspec)
{
- GtkMountOperation *operation;
- gpointer tmp;
-
- operation = GTK_MOUNT_OPERATION (object);
+ GtkMountOperation *operation = GTK_MOUNT_OPERATION (object);
switch (prop_id)
{
- case PROP_PARENT:
- tmp = g_value_get_object (value);
- gtk_mount_operation_set_parent (operation, tmp);
- break;
-
- case PROP_SCREEN:
- tmp = g_value_get_object (value);
- gtk_mount_operation_set_screen (operation, tmp);
- break;
+ case PROP_PARENT:
+ gtk_mount_operation_set_parent (operation, g_value_get_object (value));
+ break;
- case PROP_IS_SHOWING:
- default:
+ case PROP_SCREEN:
+ gtk_mount_operation_set_screen (operation, g_value_get_object (value));
+ break;
+
+ case PROP_IS_SHOWING:
+ default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
@@ -220,11 +212,8 @@
GValue *value,
GParamSpec *pspec)
{
- GtkMountOperationPrivate *priv;
- GtkMountOperation *operation;
-
- operation = GTK_MOUNT_OPERATION (object);
- priv = operation->priv;
+ GtkMountOperation *operation = GTK_MOUNT_OPERATION (object);
+ GtkMountOperationPrivate *priv = operation->priv;
switch (prop_id)
{
@@ -247,14 +236,6 @@
}
static void
-gtk_mount_operation_init (GtkMountOperation *operation)
-{
- operation->priv = G_TYPE_INSTANCE_GET_PRIVATE (operation,
- GTK_TYPE_MOUNT_OPERATION,
- GtkMountOperationPrivate);
-}
-
-static void
remember_button_toggled (GtkToggleButton *button,
GtkMountOperation *operation)
{
@@ -274,11 +255,8 @@
gint response_id,
GtkMountOperation *mount_op)
{
- GtkMountOperationPrivate *priv;
- GMountOperation *op;
-
- priv = mount_op->priv;
- op = G_MOUNT_OPERATION (mount_op);
+ GtkMountOperationPrivate *priv = mount_op->priv;
+ GMountOperation *op = G_MOUNT_OPERATION (mount_op);
if (response_id == GTK_RESPONSE_OK)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]