summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/caja-connect-server-dialog.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c
index 3737a15b..fc0ebac2 100644
--- a/src/caja-connect-server-dialog.c
+++ b/src/caja-connect-server-dialog.c
@@ -25,9 +25,7 @@
#include "caja-connect-server-dialog.h"
#include <string.h>
-#include <eel/eel-gtk-macros.h>
#include <eel/eel-stock-dialogs.h>
-#include <eel/eel-vfs-extensions.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
@@ -66,12 +64,9 @@ struct _CajaConnectServerDialogDetails
GtkWidget *name_entry;
};
-static void caja_connect_server_dialog_class_init (CajaConnectServerDialogClass *class);
-static void caja_connect_server_dialog_init (CajaConnectServerDialog *dialog);
+G_DEFINE_TYPE (CajaConnectServerDialog, caja_connect_server_dialog,
+ GTK_TYPE_DIALOG)
-EEL_CLASS_BOILERPLATE (CajaConnectServerDialog,
- caja_connect_server_dialog,
- GTK_TYPE_DIALOG)
enum
{
RESPONSE_CONNECT
@@ -171,19 +166,7 @@ caja_connect_server_dialog_finalize (GObject *object)
g_object_unref (dialog->details->bookmark_check);
g_object_unref (dialog->details->name_entry);
- g_free (dialog->details);
-
- EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
-}
-
-static void
-caja_connect_server_dialog_destroy (GtkObject *object)
-{
- CajaConnectServerDialog *dialog;
-
- dialog = CAJA_CONNECT_SERVER_DIALOG (object);
-
- EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
+ G_OBJECT_CLASS (caja_connect_server_dialog_parent_class)->finalize (object);
}
static void
@@ -404,13 +387,11 @@ static void
caja_connect_server_dialog_class_init (CajaConnectServerDialogClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
+
+ g_type_class_add_private (class, sizeof (CajaConnectServerDialogDetails));
gobject_class = G_OBJECT_CLASS (class);
gobject_class->finalize = caja_connect_server_dialog_finalize;
-
- object_class = GTK_OBJECT_CLASS (class);
- object_class->destroy = caja_connect_server_dialog_destroy;
}
static void
@@ -874,7 +855,8 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
GtkCellRenderer *renderer;
int i;
- dialog->details = g_new0 (CajaConnectServerDialogDetails, 1);
+ dialog->details = G_TYPE_INSTANCE_GET_PRIVATE (dialog, CAJA_TYPE_CONNECT_SERVER_DIALOG,
+ CajaConnectServerDialogDetails);
gtk_window_set_title (GTK_WINDOW (dialog), _("Connect to Server"));
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);