summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-10-27 04:51:45 +0200
committerJasmine Hassan <[email protected]>2012-11-16 09:45:50 +0200
commit6297e7ac4167b57e0e3076ae2648cdced4c2a5b8 (patch)
treea0d55f540678ce9e9fac645a372467182412eec0 /src
parent938724fe165f8d1be66121b7d22c42ea3e258dbf (diff)
downloadcaja-6297e7ac4167b57e0e3076ae2648cdced4c2a5b8.tar.bz2
caja-6297e7ac4167b57e0e3076ae2648cdced4c2a5b8.tar.xz
[connect-dialog] don't use EEL boilerplate
http://git.gnome.org/browse/nautilus/commit/?id=f233f2aeb78e5fd14c0b18f7a3c5e80b5e7c84c5
Diffstat (limited to 'src')
-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);