Hiroyuki Ikezoe
ikezo****@users*****
Sat Dec 2 16:30:49 JST 2006
Index: kazehakase/src/bookmarks/kz-bookmark-bar.c diff -u kazehakase/src/bookmarks/kz-bookmark-bar.c:1.11 kazehakase/src/bookmarks/kz-bookmark-bar.c:1.12 --- kazehakase/src/bookmarks/kz-bookmark-bar.c:1.11 Wed Jul 13 11:00:00 2005 +++ kazehakase/src/bookmarks/kz-bookmark-bar.c Sat Dec 2 16:30:49 2006 @@ -30,7 +30,6 @@ #include <glib/gi18n.h> #include "kazehakase.h" -#include "gobject-utils.h" #include "kz-root-bookmark.h" #include "kz-bookmark-bar.h" #include "kz-bookmark-menu.h" @@ -69,37 +68,35 @@ static const guint n_url_drag_types = G_N_ELEMENTS (url_drag_types); -static void kz_bookmark_bar_class_init (KzBookmarkBarClass *klass); -static void kz_bookmark_bar_init (KzBookmarkBar *bar); -static GObject* kz_bookmark_bar_constructor (GType type, - guint n_props, - GObjectConstructParam *props); -static void kz_bookmark_bar_dispose (GObject *object); -static void kz_bookmark_bar_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void kz_bookmark_bar_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); - -static gboolean kz_bookmark_bar_button_release (GtkWidget *widget, - GdkEventButton *event); -static void kz_bookmark_bar_drag_data_received - (GtkWidget *widget, - GdkDragContext *context, - gint x, gint y, - GtkSelectionData *data, - guint info, - guint time); -static void kz_bookmark_bar_drag_leave (GtkWidget *widget, - GdkDragContext *context, - guint time); -static gboolean kz_bookmark_bar_drag_motion (GtkWidget *widget, - GdkDragContext *context, - gint x, gint y, - guint time); +static GObject* constructor (GType type, + guint n_props, + GObjectConstructParam *props); +static void dispose (GObject *object); +static void set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); + +static gboolean button_release (GtkWidget *widget, + GdkEventButton *event); +static void drag_data_received + (GtkWidget *widget, + GdkDragContext *context, + gint x, gint y, + GtkSelectionData *data, + guint info, + guint time); +static void drag_leave (GtkWidget *widget, + GdkDragContext *context, + guint time); +static gboolean drag_motion (GtkWidget *widget, + GdkDragContext *context, + gint x, gint y, + guint time); static void kz_bookmark_bar_refresh_all (KzBookmarkBar *bar); @@ -120,13 +117,7 @@ static GtkToolItem *create_tool_item (KzBookmarkBar *bar, KzBookmark *child); -static GtkEventBoxClass *parent_class = NULL; - - -KZ_OBJECT_GET_TYPE(kz_bookmark_bar, "KzBookmarkBar", KzBookmarkBar, - kz_bookmark_bar_class_init, kz_bookmark_bar_init, - GTK_TYPE_EVENT_BOX) - +G_DEFINE_TYPE(KzBookmarkBar, kz_bookmark_bar, GTK_TYPE_EVENT_BOX) static void kz_bookmark_bar_class_init (KzBookmarkBarClass *klass) @@ -134,21 +125,19 @@ GObjectClass *gobject_class; GtkWidgetClass *widget_class; - parent_class = g_type_class_peek_parent (klass); - gobject_class = (GObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; /* GObject class */ - gobject_class->constructor = kz_bookmark_bar_constructor; - gobject_class->dispose = kz_bookmark_bar_dispose; - gobject_class->set_property = kz_bookmark_bar_set_property; - gobject_class->get_property = kz_bookmark_bar_get_property; - - widget_class->button_release_event = kz_bookmark_bar_button_release; - widget_class->drag_data_received = kz_bookmark_bar_drag_data_received; - widget_class->drag_leave = kz_bookmark_bar_drag_leave; - widget_class->drag_motion = kz_bookmark_bar_drag_motion; + gobject_class->constructor = constructor; + gobject_class->dispose = dispose; + gobject_class->set_property = set_property; + gobject_class->get_property = get_property; + + widget_class->button_release_event = button_release; + widget_class->drag_data_received = drag_data_received; + widget_class->drag_leave = drag_leave; + widget_class->drag_motion = drag_motion; g_object_class_install_property (gobject_class, @@ -195,7 +184,7 @@ static void -kz_bookmark_bar_dispose (GObject *object) +dispose (GObject *object) { KzBookmarkBar *bar = KZ_BOOKMARK_BAR(object); KzBookmarkBarPrivate *priv = KZ_BOOKMARK_BAR_GET_PRIVATE (bar); @@ -220,20 +209,20 @@ priv->dragged_item = NULL; } - if (G_OBJECT_CLASS (parent_class)->dispose) - G_OBJECT_CLASS (parent_class)->dispose(object); + if (G_OBJECT_CLASS (kz_bookmark_bar_parent_class)->dispose) + G_OBJECT_CLASS (kz_bookmark_bar_parent_class)->dispose(object); } static GObject* -kz_bookmark_bar_constructor (GType type, - guint n_props, - GObjectConstructParam *props) +constructor (GType type, + guint n_props, + GObjectConstructParam *props) { KzBookmarkBar *bar; GObject *object; - GObjectClass *klass = G_OBJECT_CLASS(parent_class); + GObjectClass *klass = G_OBJECT_CLASS(kz_bookmark_bar_parent_class); object = klass->constructor(type, n_props, props); @@ -245,10 +234,10 @@ static void -kz_bookmark_bar_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) +set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { KzBookmarkBar *bar = KZ_BOOKMARK_BAR(object); @@ -269,10 +258,10 @@ static void -kz_bookmark_bar_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) { KzBookmarkBar *bar = KZ_BOOKMARK_BAR(object); @@ -292,7 +281,7 @@ static gboolean -kz_bookmark_bar_button_release (GtkWidget *widget, GdkEventButton *event) +button_release (GtkWidget *widget, GdkEventButton *event) { KzBookmarkBar *bar; @@ -397,12 +386,12 @@ static void -kz_bookmark_bar_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, gint y, - GtkSelectionData *data, - guint info, - guint time) +drag_data_received (GtkWidget *widget, + GdkDragContext *context, + gint x, gint y, + GtkSelectionData *data, + guint info, + guint time) { KzBookmarkBar *bar; KzBookmark *bookmark, *sibling, *parent; @@ -509,9 +498,9 @@ } static void -kz_bookmark_bar_drag_leave (GtkWidget *widget, - GdkDragContext *context, - guint time) +drag_leave (GtkWidget *widget, + GdkDragContext *context, + guint time) { KzBookmarkBar *bar; @@ -522,10 +511,10 @@ static gboolean -kz_bookmark_bar_drag_motion (GtkWidget *widget, - GdkDragContext *context, - gint x, gint y, - guint time) +drag_motion (GtkWidget *widget, + GdkDragContext *context, + gint x, gint y, + guint time) { KzBookmarkBar *bar; KzBookmarkBarPrivate *priv = KZ_BOOKMARK_BAR_GET_PRIVATE (widget); Index: kazehakase/src/bookmarks/kz-bookmark-base-menu-item.c diff -u kazehakase/src/bookmarks/kz-bookmark-base-menu-item.c:1.2 kazehakase/src/bookmarks/kz-bookmark-base-menu-item.c:1.3 --- kazehakase/src/bookmarks/kz-bookmark-base-menu-item.c:1.2 Tue Jul 19 08:18:34 2005 +++ kazehakase/src/bookmarks/kz-bookmark-base-menu-item.c Sat Dec 2 16:30:49 2006 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: kz-bookmark-base-menu-item.c,v 1.2 2005/07/18 23:18:34 ikezoe Exp $ + * $Id: kz-bookmark-base-menu-item.c,v 1.3 2006/12/02 07:30:49 ikezoe Exp $ */ #include "kz-bookmark-base-menu-item.h" @@ -26,7 +26,6 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> -#include "gobject-utils.h" #include "utils.h" enum { @@ -55,49 +54,38 @@ static const gint dnd_types_num = G_N_ELEMENTS(dnd_types); static const gint n_url_drag_types = G_N_ELEMENTS(url_drag_types); -static void kz_bookmark_base_menu_item_class_init (KzBookmarkBaseMenuItemClass *klass); -static void kz_bookmark_base_menu_item_init (KzBookmarkBaseMenuItem *menu); - /* object class methods */ -static GObject* kz_bookmark_base_menu_item_constructor (GType type, - guint n_props, - GObjectConstructParam *props); -static void kz_bookmark_base_menu_item_dispose (GObject *object); -static void kz_bookmark_base_menu_item_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void kz_bookmark_base_menu_item_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); +static GObject* constructor (GType type, + guint n_props, + GObjectConstructParam *props); +static void dispose (GObject *object); +static void set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); static void connect_bookmark_signals (KzBookmarkBaseMenuItem *item, KzBookmark *bookmark); static void disconnect_bookmark_signals (KzBookmarkBaseMenuItem *item, KzBookmark *bookmark); - -static GtkImageMenuItemClass *parent_class = NULL; - - -KZ_OBJECT_GET_TYPE(kz_bookmark_base_menu_item, "KzBookmarkBaseMenuItem", KzBookmarkBaseMenuItem, - kz_bookmark_base_menu_item_class_init, kz_bookmark_base_menu_item_init, - GTK_TYPE_IMAGE_MENU_ITEM) +G_DEFINE_TYPE(KzBookmarkBaseMenuItem, kz_bookmark_base_menu_item, GTK_TYPE_IMAGE_MENU_ITEM) static void kz_bookmark_base_menu_item_class_init (KzBookmarkBaseMenuItemClass *klass) { GObjectClass *gobject_class; - parent_class = g_type_class_peek_parent (klass); - gobject_class = (GObjectClass *) klass; /* GObject signals */ - gobject_class->dispose = kz_bookmark_base_menu_item_dispose; - gobject_class->set_property = kz_bookmark_base_menu_item_set_property; - gobject_class->get_property = kz_bookmark_base_menu_item_get_property; - gobject_class->constructor = kz_bookmark_base_menu_item_constructor; + gobject_class->dispose = dispose; + gobject_class->set_property = set_property; + gobject_class->get_property = get_property; + gobject_class->constructor = constructor; g_object_class_install_property (gobject_class, @@ -130,16 +118,16 @@ static GObject* -kz_bookmark_base_menu_item_constructor (GType type, - guint n_props, - GObjectConstructParam *props) +constructor (GType type, + guint n_props, + GObjectConstructParam *props) { KzBookmarkBaseMenuItem *item; GObject *object; const gchar *desc; gchar *tooltip_text = NULL; KzBookmark *bookmark; - GObjectClass *klass = G_OBJECT_CLASS(parent_class); + GObjectClass *klass = G_OBJECT_CLASS(kz_bookmark_base_menu_item_parent_class); object = klass->constructor(type, n_props, props); item = KZ_BOOKMARK_BASE_MENU_ITEM(object); @@ -163,12 +151,12 @@ } static void -kz_bookmark_base_menu_item_dispose (GObject *object) +dispose (GObject *object) { KzBookmarkBaseMenuItem *menu; - if (G_OBJECT_CLASS (parent_class)->dispose) - G_OBJECT_CLASS (parent_class)->dispose(object); + if (G_OBJECT_CLASS (kz_bookmark_base_menu_item_parent_class)->dispose) + G_OBJECT_CLASS (kz_bookmark_base_menu_item_parent_class)->dispose(object); menu = KZ_BOOKMARK_BASE_MENU_ITEM(object); @@ -193,10 +181,10 @@ static void -kz_bookmark_base_menu_item_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) +set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { KzBookmarkBaseMenuItem *menu = KZ_BOOKMARK_BASE_MENU_ITEM(object); @@ -216,10 +204,10 @@ static void -kz_bookmark_base_menu_item_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) { KzBookmarkBaseMenuItem *item = KZ_BOOKMARK_BASE_MENU_ITEM(object); Index: kazehakase/src/bookmarks/kz-bookmark-edit-win.c diff -u kazehakase/src/bookmarks/kz-bookmark-edit-win.c:1.4 kazehakase/src/bookmarks/kz-bookmark-edit-win.c:1.5 --- kazehakase/src/bookmarks/kz-bookmark-edit-win.c:1.4 Mon May 9 10:20:12 2005 +++ kazehakase/src/bookmarks/kz-bookmark-edit-win.c Sat Dec 2 16:30:49 2006 @@ -23,23 +23,14 @@ #include "kz-bookmark-edit-win.h" #include <glib/gi18n.h> -#include "gobject-utils.h" #include "kz-icons.h" #include "kz-bookmark-edit.h" -static void kz_bookmark_edit_win_class_init (KzBookmarkEditWinClass *klass); -static void kz_bookmark_edit_win_init (KzBookmarkEditWin *win); -static void kz_bookmark_edit_win_dispose (GObject *object); -static void kz_bookmark_edit_win_response (GtkDialog *dialog, - gint arg); - -static GtkDialogClass *parent_class = NULL; - - -KZ_OBJECT_GET_TYPE(kz_bookmark_edit_win, "KzBookmarkEditWin", KzBookmarkEditWin, - kz_bookmark_edit_win_class_init, kz_bookmark_edit_win_init, - GTK_TYPE_DIALOG) +static void dispose (GObject *object); +static void response (GtkDialog *dialog, + gint arg); +G_DEFINE_TYPE(KzBookmarkEditWin, kz_bookmark_edit_win, GTK_TYPE_DIALOG) static void kz_bookmark_edit_win_class_init (KzBookmarkEditWinClass *klass) @@ -47,13 +38,12 @@ GObjectClass *object_class; GtkDialogClass *dialog_class; - parent_class = g_type_class_peek_parent(klass); object_class = (GObjectClass *) klass; dialog_class = (GtkDialogClass *) klass; - object_class->dispose = kz_bookmark_edit_win_dispose; + object_class->dispose = dispose; - dialog_class->response = kz_bookmark_edit_win_response; + dialog_class->response = response; } @@ -81,19 +71,19 @@ static void -kz_bookmark_edit_win_dispose (GObject *object) +dispose (GObject *object) { KzBookmarkEditWin *win = KZ_BOOKMARK_EDIT_WIN(object); win->bookmark_edit = NULL; - if (G_OBJECT_CLASS(parent_class)->dispose) - G_OBJECT_CLASS(parent_class)->dispose(object); + if (G_OBJECT_CLASS(kz_bookmark_edit_win_parent_class)->dispose) + G_OBJECT_CLASS(kz_bookmark_edit_win_parent_class)->dispose(object); } static void -kz_bookmark_edit_win_response (GtkDialog *dialog, gint arg) +response (GtkDialog *dialog, gint arg) { switch (arg) { Index: kazehakase/src/bookmarks/kz-bookmark-edit.c diff -u kazehakase/src/bookmarks/kz-bookmark-edit.c:1.35 kazehakase/src/bookmarks/kz-bookmark-edit.c:1.36 --- kazehakase/src/bookmarks/kz-bookmark-edit.c:1.35 Thu Apr 28 22:40:55 2005 +++ kazehakase/src/bookmarks/kz-bookmark-edit.c Sat Dec 2 16:30:49 2006 @@ -18,13 +18,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: kz-bookmark-edit.c,v 1.35 2005/04/28 13:40:55 ikezoe Exp $ + * $Id: kz-bookmark-edit.c,v 1.36 2006/12/02 07:30:49 ikezoe Exp $ */ #include <glib/gi18n.h> #include "kz-bookmark-edit.h" #include "kz-smart-bookmark.h" -#include "gobject-utils.h" #include "gtk-utils.h" #include "kz-thumbnail.h" #include "kz-bookmark-file.h" @@ -51,12 +50,8 @@ GtkListStore *store; }; -static GtkVBoxClass *parent_class = NULL; - -static void kz_bookmark_edit_class_init (KzBookmarkEditClass *klass); -static void kz_bookmark_edit_init (KzBookmarkEdit *edit); -static void kz_bookmark_edit_dispose (GObject *object); +static void dispose (GObject *object); static void kz_bookmark_edit_set_sensitive (KzBookmarkEdit *edit); static void kz_bookmark_edit_sync_properties (KzBookmarkEdit *edit, @@ -86,24 +81,16 @@ static GtkWidget *create_widget_for_smart_property (KzBookmarkEdit *edit); -KZ_OBJECT_GET_TYPE(kz_bookmark_edit, "KzBookmarkEdit", KzBookmarkEdit, - kz_bookmark_edit_class_init, kz_bookmark_edit_init, - GTK_TYPE_VBOX) +G_DEFINE_TYPE(KzBookmarkEdit, kz_bookmark_edit, GTK_TYPE_VBOX) static void kz_bookmark_edit_class_init (KzBookmarkEditClass *klass) { GObjectClass *gobject_class; - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - parent_class = g_type_class_peek_parent (klass); gobject_class = (GObjectClass *) klass; - object_class = (GtkObjectClass *) klass; - widget_class = (GtkWidgetClass *) klass; - gobject_class->dispose = kz_bookmark_edit_dispose; + gobject_class->dispose = dispose; } @@ -340,7 +327,7 @@ static void -kz_bookmark_edit_dispose (GObject *object) +dispose (GObject *object) { KzBookmarkEdit *edit = KZ_BOOKMARK_EDIT(object); @@ -365,8 +352,8 @@ g_free(edit->smart); edit->smart = NULL; } - if (G_OBJECT_CLASS (parent_class)->dispose) - G_OBJECT_CLASS (parent_class)->dispose(object); + if (G_OBJECT_CLASS (kz_bookmark_edit_parent_class)->dispose) + G_OBJECT_CLASS (kz_bookmark_edit_parent_class)->dispose(object); } Index: kazehakase/src/bookmarks/kz-bookmark-editor.c diff -u kazehakase/src/bookmarks/kz-bookmark-editor.c:1.42 kazehakase/src/bookmarks/kz-bookmark-editor.c:1.43 --- kazehakase/src/bookmarks/kz-bookmark-editor.c:1.42 Fri Jun 2 11:23:41 2006 +++ kazehakase/src/bookmarks/kz-bookmark-editor.c Sat Dec 2 16:30:49 2006 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: kz-bookmark-editor.c,v 1.42 2006/06/02 02:23:41 ikezoe Exp $ + * $Id: kz-bookmark-editor.c,v 1.43 2006/12/02 07:30:49 ikezoe Exp $ */ #include "kz-bookmark-editor.h" @@ -26,7 +26,6 @@ #include <glib/gi18n.h> #include "kazehakase.h" -#include "gobject-utils.h" #include "kz-window.h" #include "kz-bookmark-edit.h" #include "kz-actions-bookmark.h" @@ -42,21 +41,19 @@ /* object class */ -static void kz_bookmark_editor_class_init (KzBookmarkEditorClass *klass); -static void kz_bookmark_editor_init (KzBookmarkEditor *editor); -static void kz_bookmark_editor_dispose (GObject *object); -static void kz_bookmark_editor_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void kz_bookmark_editor_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); +static void dispose (GObject *object); +static void set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); /* widget event */ -static gboolean kz_bookmark_editor_delete_event (GtkWidget *widget, - GdkEventAny *event); +static gboolean delete_event (GtkWidget *widget, + GdkEventAny *event); /* private methods */ static void kz_bookmark_editor_set_folder_tree (KzBookmarkEditor *editor); @@ -77,13 +74,7 @@ GdkEventButton *button, KzBookmarkEditor *editor); -static GtkWindowClass *parent_class = NULL; - - -KZ_OBJECT_GET_TYPE(kz_bookmark_editor, "KzBookmarkEditor", KzBookmarkEditor, - kz_bookmark_editor_class_init, kz_bookmark_editor_init, - GTK_TYPE_WINDOW) - +G_DEFINE_TYPE(KzBookmarkEditor, kz_bookmark_editor, GTK_TYPE_WINDOW) static void kz_bookmark_editor_class_init (KzBookmarkEditorClass *klass) @@ -91,17 +82,15 @@ GObjectClass *gobject_class; GtkWidgetClass *widget_class; - parent_class = g_type_class_peek_parent (klass); - gobject_class = (GObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; - gobject_class->dispose = kz_bookmark_editor_dispose; - gobject_class->set_property = kz_bookmark_editor_set_property; - gobject_class->get_property = kz_bookmark_editor_get_property; + gobject_class->dispose = dispose; + gobject_class->set_property = set_property; + gobject_class->get_property = get_property; /* GtkWidget signals */ - widget_class->delete_event = kz_bookmark_editor_delete_event; + widget_class->delete_event = delete_event; g_object_class_install_property (gobject_class, @@ -261,7 +250,7 @@ static void -kz_bookmark_editor_dispose (GObject *object) +dispose (GObject *object) { KzBookmarkEditor *editor = KZ_BOOKMARK_EDITOR(object); @@ -279,16 +268,16 @@ g_object_unref(editor->action_group); editor->action_group = NULL; - if (G_OBJECT_CLASS (parent_class)->dispose) - G_OBJECT_CLASS (parent_class)->dispose(object); + if (G_OBJECT_CLASS (kz_bookmark_editor_parent_class)->dispose) + G_OBJECT_CLASS (kz_bookmark_editor_parent_class)->dispose(object); } static void -kz_bookmark_editor_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) +set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { KzBookmarkEditor *editor = KZ_BOOKMARK_EDITOR(object); @@ -312,10 +301,10 @@ static void -kz_bookmark_editor_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) { KzBookmarkEditor *editor = KZ_BOOKMARK_EDITOR(object); @@ -332,7 +321,7 @@ static gboolean -kz_bookmark_editor_delete_event (GtkWidget *widget, GdkEventAny *event) +delete_event (GtkWidget *widget, GdkEventAny *event) { KzBookmarkEditor *editor; Index: kazehakase/src/bookmarks/kz-bookmark-file.c diff -u kazehakase/src/bookmarks/kz-bookmark-file.c:1.19 kazehakase/src/bookmarks/kz-bookmark-file.c:1.20 --- kazehakase/src/bookmarks/kz-bookmark-file.c:1.19 Wed Jul 20 13:50:48 2005 +++ kazehakase/src/bookmarks/kz-bookmark-file.c Sat Dec 2 16:30:49 2006 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: kz-bookmark-file.c,v 1.19 2005/07/20 04:50:48 ikezoe Exp $ + * $Id: kz-bookmark-file.c,v 1.20 2006/12/02 07:30:49 ikezoe Exp $ */ #include "kz-bookmark-file.h" @@ -72,17 +72,15 @@ file_types = g_list_append(file_types, type); \ } -static void kz_bookmark_file_class_init (KzBookmarkFileClass *klass); -static void kz_bookmark_file_init (KzBookmarkFile *bookmark_file); -static void kz_bookmark_file_dispose (GObject *object); -static void kz_bookmark_file_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void kz_bookmark_file_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); +static void dispose (GObject *object); +static void set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); static void kz_bookmark_file_set_state (KzBookmarkFile *bookmark_file, KzBookmarkFileState state); @@ -100,7 +98,6 @@ kz_bookmark_file_detect_file_type (KzBookmarkFile *bookmark_file, gchar *buf); -static KzBookmarkClass *parent_class = NULL; static gint kz_bookmark_file_signals[LAST_SIGNAL] = {0}; static GList *file_types = NULL; @@ -117,10 +114,7 @@ static GQuark io_signal_id_quark = 0; static GQuark p_last_modified_quark = 0; - -KZ_OBJECT_GET_TYPE(kz_bookmark_file, "KzBookmarkFile", KzBookmarkFile, - kz_bookmark_file_class_init, kz_bookmark_file_init, - KZ_TYPE_BOOKMARK) +G_DEFINE_TYPE(KzBookmarkFile, kz_bookmark_file, KZ_TYPE_BOOKMARK) static void kz_bookmark_file_class_init (KzBookmarkFileClass *klass) @@ -137,12 +131,11 @@ ADD_BOOKMARK_FILE_TYPE(kz_hinadi_get_file_types); } - parent_class = g_type_class_peek_parent (klass); object_class = (GObjectClass *) klass; - object_class->dispose = kz_bookmark_file_dispose; - object_class->set_property = kz_bookmark_file_set_property; - object_class->get_property = kz_bookmark_file_get_property; + object_class->dispose = dispose; + object_class->set_property = set_property; + object_class->get_property = get_property; klass->load_start = NULL; klass->load_completed = NULL; @@ -302,7 +295,7 @@ static void -kz_bookmark_file_dispose (GObject *object) +dispose (GObject *object) { guint timer_id, io_id; KzIO *io; @@ -334,8 +327,8 @@ g_object_set_qdata(object, io_signal_id_quark, GUINT_TO_POINTER(io_id)); - if (G_OBJECT_CLASS (parent_class)->dispose) - G_OBJECT_CLASS (parent_class)->dispose(object); + if (G_OBJECT_CLASS (kz_bookmark_file_parent_class)->dispose) + G_OBJECT_CLASS (kz_bookmark_file_parent_class)->dispose(object); } @@ -346,10 +339,10 @@ } static void -kz_bookmark_file_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) +set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { KzBookmarkFile *bookmark_file = KZ_BOOKMARK_FILE(object); @@ -440,10 +433,10 @@ static void -kz_bookmark_file_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) { KzBookmarkFile *bookmark_file = KZ_BOOKMARK_FILE(object); gchar *str; Index: kazehakase/src/bookmarks/kz-bookmark-folder-menu-item.c diff -u kazehakase/src/bookmarks/kz-bookmark-folder-menu-item.c:1.1 kazehakase/src/bookmarks/kz-bookmark-folder-menu-item.c:1.2 --- kazehakase/src/bookmarks/kz-bookmark-folder-menu-item.c:1.1 Wed Jul 20 12:47:43 2005 +++ kazehakase/src/bookmarks/kz-bookmark-folder-menu-item.c Sat Dec 2 16:30:49 2006 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: kz-bookmark-folder-menu-item.c,v 1.1 2005/07/20 03:47:43 ikezoe Exp $ + * $Id: kz-bookmark-folder-menu-item.c,v 1.2 2006/12/02 07:30:49 ikezoe Exp $ */ #include "kz-bookmark-folder-menu-item.h" @@ -26,7 +26,6 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> -#include "gobject-utils.h" #include "kazehakase.h" #include "kz-bookmark-file.h" #include "kz-bookmark-menu-item.h" @@ -37,44 +36,22 @@ #include "utils.h" -static void kz_bookmark_folder_menu_item_class_init (KzBookmarkFolderMenuItemClass *klass); -static void kz_bookmark_folder_menu_item_init (KzBookmarkFolderMenuItem *menu); - /* object class methods */ -static GObject* kz_bookmark_folder_menu_item_constructor (GType type, - guint n_props, - GObjectConstructParam *props); -static void kz_bookmark_folder_menu_item_dispose (GObject *object); -static void kz_bookmark_folder_menu_item_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void kz_bookmark_folder_menu_item_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); - -static KzBookmarkMenuItemClass *parent_class = NULL; - - -KZ_OBJECT_GET_TYPE(kz_bookmark_folder_menu_item, "KzBookmarkFolderMenuItem", KzBookmarkFolderMenuItem, - kz_bookmark_folder_menu_item_class_init, kz_bookmark_folder_menu_item_init, - KZ_TYPE_BOOKMARK_BASE_MENU_ITEM) +static GObject* constructor (GType type, + guint n_props, + GObjectConstructParam *props); + +G_DEFINE_TYPE(KzBookmarkFolderMenuItem, kz_bookmark_folder_menu_item, KZ_TYPE_BOOKMARK_BASE_MENU_ITEM) static void kz_bookmark_folder_menu_item_class_init (KzBookmarkFolderMenuItemClass *klass) { GObjectClass *gobject_class; - parent_class = g_type_class_peek_parent (klass); - gobject_class = (GObjectClass *) klass; /* GObject signals */ - gobject_class->dispose = kz_bookmark_folder_menu_item_dispose; - gobject_class->constructor = kz_bookmark_folder_menu_item_constructor; - gobject_class->set_property = kz_bookmark_folder_menu_item_set_property; - gobject_class->get_property = kz_bookmark_folder_menu_item_get_property; + gobject_class->constructor = constructor; } @@ -84,10 +61,10 @@ } -static GObject* -kz_bookmark_folder_menu_item_constructor (GType type, - guint n_props, - GObjectConstructParam *props) +static GObject * +constructor (GType type, + guint n_props, + GObjectConstructParam *props) { KzBookmarkFolderMenuItem *item; KzBookmarkBaseMenuItem *parent; @@ -99,7 +76,7 @@ const gchar *title = NULL; KzBookmark *bookmark; KzWindow *kz; - GObjectClass *klass = G_OBJECT_CLASS(parent_class); + GObjectClass *klass = G_OBJECT_CLASS(kz_bookmark_folder_menu_item_parent_class); object = klass->constructor(type, n_props, props); parent = KZ_BOOKMARK_BASE_MENU_ITEM(object); @@ -152,44 +129,6 @@ } -static void -kz_bookmark_folder_menu_item_dispose (GObject *object) -{ - if (G_OBJECT_CLASS (parent_class)->dispose) - G_OBJECT_CLASS (parent_class)->dispose(object); -} - - -static void -kz_bookmark_folder_menu_item_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - switch (prop_id) - { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - -static void -kz_bookmark_folder_menu_item_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - switch (prop_id) - { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - GtkWidget * kz_bookmark_folder_menu_item_new (KzWindow *kz, KzBookmark *bookmark) {