summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-open-with-dialog.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@pluto>2009-02-02 16:47:17 +0000
committerCosimo Cecchi <cosimoc@src.gnome.org>2009-02-02 16:47:17 +0000
commit0fa45e385b3c9e093e133a84afcd15543ab8c1c4 (patch)
tree3d6873ccb8fcf5c92aa225c18cff83b91f0c15bf /libnautilus-private/nautilus-open-with-dialog.c
parentd24d8800964bad8dac7a0fb0548c7fcd32a2586c (diff)
downloadnautilus-0fa45e385b3c9e093e133a84afcd15543ab8c1c4.tar.gz
Use G_DEFINE_TYPE_* instead of hand-written nautilus_foo_get_type()
2009-02-02 Cosimo Cecchi <cosimoc@pluto> * libnautilus-extension/nautilus-column.c: (nautilus_column_finalize), (nautilus_column_init), (nautilus_column_class_init): * libnautilus-extension/nautilus-menu.c: (nautilus_menu_finalize): * libnautilus-private/nautilus-cell-renderer-pixbuf-emblem.c: (nautilus_cell_renderer_pixbuf_emblem_class_init), (nautilus_cell_renderer_pixbuf_emblem_finalize): * libnautilus-private/nautilus-cell-renderer-text-ellipsized.c: (nautilus_cell_renderer_text_ellipsized_init), (nautilus_cell_renderer_text_ellipsized_class_init), (nautilus_cell_renderer_text_ellipsized_get_size): * libnautilus-private/nautilus-entry.c: (nautilus_entry_finalize), (nautilus_entry_key_press), (nautilus_entry_motion_notify), (nautilus_entry_button_press), (nautilus_entry_button_release), (nautilus_entry_selection_clear), (nautilus_entry_class_init): * libnautilus-private/nautilus-file.c: (nautilus_file_init), (nautilus_file_constructor), (finalize), (nautilus_file_class_init): * libnautilus-private/nautilus-icon-canvas-item.c: (nautilus_icon_canvas_item_finalize), (nautilus_icon_canvas_item_update), (nautilus_icon_canvas_item_class_init): * libnautilus-private/nautilus-icon-container.c: (nautilus_icon_container_new): * libnautilus-private/nautilus-icon-container.h: * libnautilus-private/nautilus-mime-application-chooser.c: (nautilus_mime_application_chooser_finalize), (nautilus_mime_application_chooser_destroy), (nautilus_mime_application_chooser_class_init), (nautilus_mime_application_chooser_init): * libnautilus-private/nautilus-open-with-dialog.c: (nautilus_open_with_dialog_finalize), (nautilus_open_with_dialog_destroy), (nautilus_open_with_dialog_class_init), (nautilus_open_with_dialog_init): * src/file-manager/fm-icon-container.c: * src/file-manager/fm-list-model.c: (fm_list_model_dispose), (fm_list_model_finalize), (fm_list_model_class_init): * src/file-manager/fm-tree-model.c: (fm_tree_model_finalize), (fm_tree_model_class_init): Use G_DEFINE_TYPE_* instead of hand-written nautilus_foo_get_type() functions where possible. svn path=/trunk/; revision=14911
Diffstat (limited to 'libnautilus-private/nautilus-open-with-dialog.c')
-rw-r--r--libnautilus-private/nautilus-open-with-dialog.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/libnautilus-private/nautilus-open-with-dialog.c b/libnautilus-private/nautilus-open-with-dialog.c
index d7f198402..a2274fccf 100644
--- a/libnautilus-private/nautilus-open-with-dialog.c
+++ b/libnautilus-private/nautilus-open-with-dialog.c
@@ -81,8 +81,8 @@ enum {
LAST_SIGNAL
};
-static gpointer parent_class;
static guint signals[LAST_SIGNAL] = { 0 };
+G_DEFINE_TYPE (NautilusOpenWithDialog, nautilus_open_with_dialog, GTK_TYPE_DIALOG);
static void
nautilus_open_with_dialog_finalize (GObject *object)
@@ -108,13 +108,13 @@ nautilus_open_with_dialog_finalize (GObject *object)
g_free (dialog->details);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (nautilus_open_with_dialog_parent_class)->finalize (object);
}
static void
nautilus_open_with_dialog_destroy (GtkObject *object)
{
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ GTK_OBJECT_CLASS (nautilus_open_with_dialog_parent_class)->destroy (object);
}
/* An application is valid if:
@@ -341,8 +341,6 @@ nautilus_open_with_dialog_class_init (NautilusOpenWithDialogClass *class)
GObjectClass *gobject_class;
GtkObjectClass *object_class;
- parent_class = g_type_class_peek_parent (class);
-
gobject_class = G_OBJECT_CLASS (class);
gobject_class->finalize = nautilus_open_with_dialog_finalize;
@@ -745,7 +743,7 @@ expander_toggled (GtkWidget *expander, NautilusOpenWithDialog *dialog)
}
static void
-nautilus_open_with_dialog_instance_init (NautilusOpenWithDialog *dialog)
+nautilus_open_with_dialog_init (NautilusOpenWithDialog *dialog)
{
GtkWidget *hbox;
GtkWidget *vbox;
@@ -1013,28 +1011,3 @@ nautilus_add_application_dialog_new_for_multiple_files (const char *extension,
return GTK_WIDGET (dialog);
}
-GType
-nautilus_open_with_dialog_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- const GTypeInfo info = {
- sizeof (NautilusOpenWithDialogClass),
- NULL,
- NULL,
- (GClassInitFunc)nautilus_open_with_dialog_class_init,
- NULL,
- NULL,
- sizeof (NautilusOpenWithDialog),
- 0,
- (GInstanceInitFunc)nautilus_open_with_dialog_instance_init,
- };
-
- type = g_type_register_static (GTK_TYPE_DIALOG,
- "NautilusOpenWithDialog",
- &info, 0);
- }
-
- return type;
-}