[Kazehakase-cvs] CVS update: kazehakase/src/sidebar

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
Sat Dec 2 21:07:31 JST 2006


Index: kazehakase/src/sidebar/kz-bookmarks-sidebar.c
diff -u kazehakase/src/sidebar/kz-bookmarks-sidebar.c:1.12 kazehakase/src/sidebar/kz-bookmarks-sidebar.c:1.13
--- kazehakase/src/sidebar/kz-bookmarks-sidebar.c:1.12	Sat Aug 26 00:06:38 2006
+++ kazehakase/src/sidebar/kz-bookmarks-sidebar.c	Sat Dec  2 21:07:31 2006
@@ -17,14 +17,13 @@
  *  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-bookmarks-sidebar.c,v 1.12 2006/08/25 15:06:38 kous Exp $
+ *  $Id: kz-bookmarks-sidebar.c,v 1.13 2006/12/02 12:07:31 ikezoe Exp $
  */
 
 #include "kz-bookmarks-sidebar.h"
 
 #include <glib/gi18n.h>
 #include "kazehakase.h"
-#include "gobject-utils.h"
 #include "kz-actions.h"
 #include "kz-bookmarks-view.h"
 
@@ -36,17 +35,15 @@
 
 
 /* Object class methods */
-static void     kz_bookmarks_sidebar_class_init   (KzBookmarksSidebarClass *klass);
-static void     kz_bookmarks_sidebar_init         (KzBookmarksSidebar      *sidebar);
-static void     kz_bookmarks_sidebar_dispose      (GObject      *obj);
-static void     kz_bookmarks_sidebar_set_property (GObject      *object,
-						   guint         prop_id,
-						   const GValue *value,
-						   GParamSpec   *pspec);
-static void     kz_bookmarks_sidebar_get_property (GObject      *object,
-						   guint         prop_id,
-						   GValue       *value,
-						   GParamSpec   *pspec);
+static void     dispose      (GObject      *obj);
+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 GtkWidget *kz_bookmarks_sidebar_new_with_entry (KzSidebarEntry *entry,
 						       KzSidebar   *sidebar);
@@ -64,8 +61,6 @@
 	create:        kz_bookmarks_sidebar_new_with_entry,
 };
 
-static GtkVBoxClass *parent_class = NULL;
-
 
 KzSidebarEntry *
 kz_bookmarks_sidebar_get_entry (gint idx)
@@ -76,23 +71,18 @@
 		return NULL;
 }
 
-
-KZ_OBJECT_GET_TYPE(kz_bookmarks_sidebar, "KzBookmarksSidebar", KzBookmarksSidebar,
-		   kz_bookmarks_sidebar_class_init, kz_bookmarks_sidebar_init,
-		   GTK_TYPE_VBOX)
-
+G_DEFINE_TYPE(KzBookmarksSidebar, kz_bookmarks_sidebar, GTK_TYPE_VBOX)
 
 static void
 kz_bookmarks_sidebar_class_init (KzBookmarksSidebarClass *klass)
 {
 	GObjectClass *gobject_class;
 
-	parent_class = g_type_class_peek_parent(klass);
 	gobject_class = (GObjectClass *) klass;
 
-	gobject_class->dispose      = kz_bookmarks_sidebar_dispose;
-	gobject_class->set_property = kz_bookmarks_sidebar_set_property;
-	gobject_class->get_property = kz_bookmarks_sidebar_get_property;
+	gobject_class->dispose      = dispose;
+	gobject_class->set_property = set_property;
+	gobject_class->get_property = get_property;
 
 	g_object_class_install_property
 		(gobject_class,
@@ -134,7 +124,7 @@
 
 
 static void
-kz_bookmarks_sidebar_dispose (GObject *obj)
+dispose (GObject *obj)
 {
 	KzBookmarksSidebar *sidebar = KZ_BOOKMARKS_SIDEBAR(obj);
 
@@ -142,16 +132,16 @@
 		g_object_unref(sidebar->sidebar);
 	sidebar->sidebar = NULL;
 
-	if (G_OBJECT_CLASS (parent_class)->dispose)
-		G_OBJECT_CLASS (parent_class)->dispose(obj);
+	if (G_OBJECT_CLASS (kz_bookmarks_sidebar_parent_class)->dispose)
+		G_OBJECT_CLASS (kz_bookmarks_sidebar_parent_class)->dispose(obj);
 }
 
 
 static void
-kz_bookmarks_sidebar_set_property (GObject         *object,
-				   guint            prop_id,
-				   const GValue    *value,
-				   GParamSpec      *pspec)
+set_property (GObject         *object,
+              guint            prop_id,
+              const GValue    *value,
+              GParamSpec      *pspec)
 {
 	KzBookmarksSidebar *sidebar = KZ_BOOKMARKS_SIDEBAR(object);
   
@@ -168,10 +158,10 @@
 
 
 static void
-kz_bookmarks_sidebar_get_property (GObject         *object,
-				   guint            prop_id,
-				   GValue          *value,
-				   GParamSpec      *pspec)
+get_property (GObject         *object,
+              guint            prop_id,
+              GValue          *value,
+              GParamSpec      *pspec)
 {
 	KzBookmarksSidebar *sidebar = KZ_BOOKMARKS_SIDEBAR(object);
 
Index: kazehakase/src/sidebar/kz-downloader-sidebar.c
diff -u kazehakase/src/sidebar/kz-downloader-sidebar.c:1.12 kazehakase/src/sidebar/kz-downloader-sidebar.c:1.13
--- kazehakase/src/sidebar/kz-downloader-sidebar.c:1.12	Sat Aug 26 00:06:38 2006
+++ kazehakase/src/sidebar/kz-downloader-sidebar.c	Sat Dec  2 21:07:31 2006
@@ -17,14 +17,13 @@
  *  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-downloader-sidebar.c,v 1.12 2006/08/25 15:06:38 kous Exp $
+ *  $Id: kz-downloader-sidebar.c,v 1.13 2006/12/02 12:07:31 ikezoe Exp $
  */
 
 #include "kz-downloader-sidebar.h"
 
 #include <glib/gi18n.h>
 #include "kazehakase.h"
-#include "gobject-utils.h"
 
 enum {
 	PROP_0,
@@ -43,17 +42,15 @@
 
 
 /* Object class methods */
-static void     kz_downloader_sidebar_class_init   (KzDownloaderSidebarClass *klass);
-static void     kz_downloader_sidebar_init         (KzDownloaderSidebar      *sidebar);
-static void     kz_downloader_sidebar_dispose      (GObject      *obj);
-static void     kz_downloader_sidebar_set_property (GObject      *object,
-						   guint         prop_id,
-						   const GValue *value,
-						   GParamSpec   *pspec);
-static void     kz_downloader_sidebar_get_property (GObject      *object,
-						   guint         prop_id,
-						   GValue       *value,
-						   GParamSpec   *pspec);
+static void     dispose      (GObject      *obj);
+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 GtkWidget *kz_downloader_sidebar_new_with_entry (KzSidebarEntry *entry,
 							KzSidebar   *sidebar);
@@ -67,8 +64,6 @@
 	create:        kz_downloader_sidebar_new_with_entry,
 };
 
-static GtkVBoxClass *parent_class = NULL;
-
 
 KzSidebarEntry *
 kz_downloader_sidebar_get_entry (gint idx)
@@ -79,23 +74,18 @@
 		return NULL;
 }
 
-
-KZ_OBJECT_GET_TYPE(kz_downloader_sidebar, "KzDownloaderSidebar", KzDownloaderSidebar,
-		   kz_downloader_sidebar_class_init, kz_downloader_sidebar_init,
-		   GTK_TYPE_VBOX)
-
+G_DEFINE_TYPE(KzDownloaderSidebar, kz_downloader_sidebar, GTK_TYPE_VBOX)
 
 static void
 kz_downloader_sidebar_class_init (KzDownloaderSidebarClass *klass)
 {
 	GObjectClass *gobject_class;
 
-	parent_class = g_type_class_peek_parent(klass);
 	gobject_class = (GObjectClass *) klass;
 
-	gobject_class->dispose      = kz_downloader_sidebar_dispose;
-	gobject_class->set_property = kz_downloader_sidebar_set_property;
-	gobject_class->get_property = kz_downloader_sidebar_get_property;
+	gobject_class->dispose      = dispose;
+	gobject_class->set_property = set_property;
+	gobject_class->get_property = get_property;
 
 	g_object_class_install_property
 		(gobject_class,
@@ -309,7 +299,7 @@
 
 
 static void
-kz_downloader_sidebar_dispose (GObject *obj)
+dispose (GObject *obj)
 {
 	KzDownloaderSidebar *sidebar = KZ_DOWNLOADER_SIDEBAR(obj);
 
@@ -332,16 +322,16 @@
 	}
 	sidebar->downloader_group = NULL;
 
-	if (G_OBJECT_CLASS (parent_class)->dispose)
-		G_OBJECT_CLASS (parent_class)->dispose(obj);
+	if (G_OBJECT_CLASS (kz_downloader_sidebar_parent_class)->dispose)
+		G_OBJECT_CLASS (kz_downloader_sidebar_parent_class)->dispose(obj);
 }
 
 
 static void
-kz_downloader_sidebar_set_property (GObject         *object,
-				    guint            prop_id,
-				    const GValue    *value,
-				    GParamSpec      *pspec)
+set_property (GObject         *object,
+              guint            prop_id,
+              const GValue    *value,
+              GParamSpec      *pspec)
 {
 	KzDownloaderSidebar *sidebar = KZ_DOWNLOADER_SIDEBAR(object);
   
@@ -358,10 +348,10 @@
 
 
 static void
-kz_downloader_sidebar_get_property (GObject         *object,
-				    guint            prop_id,
-				    GValue          *value,
-				    GParamSpec      *pspec)
+get_property (GObject         *object,
+              guint            prop_id,
+              GValue          *value,
+              GParamSpec      *pspec)
 {
 	KzDownloaderSidebar *sidebar = KZ_DOWNLOADER_SIDEBAR(object);
 
Index: kazehakase/src/sidebar/kz-tabtree.c
diff -u kazehakase/src/sidebar/kz-tabtree.c:1.22 kazehakase/src/sidebar/kz-tabtree.c:1.23
--- kazehakase/src/sidebar/kz-tabtree.c:1.22	Sat Aug 26 00:06:38 2006
+++ kazehakase/src/sidebar/kz-tabtree.c	Sat Dec  2 21:07:31 2006
@@ -21,7 +21,6 @@
 #include "kz-tabtree.h"
 
 #include <glib/gi18n.h>
-#include "gobject-utils.h"
 #include "gtk-utils.h"
 #include "kz-tab-label.h"
 #include "kz-actions-tab.h"
@@ -51,20 +50,18 @@
 
 
 /* Object class methods */
-static void     kz_tab_tree_class_init   (KzTabTreeClass *klass);
-static void     kz_tab_tree_init         (KzTabTree      *tabtree);
-static GObject *kz_tab_tree_constructor  (GType           type,
-					  guint           n_props,
-					  GObjectConstructParam *props);
-static void     kz_tab_tree_dispose      (GObject        *obj);
-static void     kz_tab_tree_set_property (GObject        *object,
-					  guint           prop_id,
-					  const GValue   *value,
-					  GParamSpec     *pspec);
-static void     kz_tab_tree_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        *obj);
+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);
 
 /* KzTabTree private methods */
 static void         build_tab_tree         (KzTabTree    *tabtree,
@@ -156,9 +153,6 @@
 #endif
 
 
-static GtkVBoxClass *parent_class = NULL;
-
-
 KzSidebarEntry *
 kz_tab_tree_get_entry (gint idx)
 {
@@ -175,24 +169,19 @@
 	return NULL;
 }
 
-
-KZ_OBJECT_GET_TYPE(kz_tab_tree, "KzTabTree", KzTabTree,
-		   kz_tab_tree_class_init, kz_tab_tree_init,
-		   GTK_TYPE_VBOX)
-
+G_DEFINE_TYPE(KzTabTree, kz_tab_tree, GTK_TYPE_VBOX)
 
 static void
 kz_tab_tree_class_init (KzTabTreeClass *klass)
 {
 	GObjectClass *gobject_class;
 
-	parent_class = g_type_class_peek_parent(klass);
 	gobject_class = (GObjectClass *) klass;
 
-	gobject_class->constructor  = kz_tab_tree_constructor;
-	gobject_class->dispose      = kz_tab_tree_dispose;
-	gobject_class->set_property = kz_tab_tree_set_property;
-	gobject_class->get_property = kz_tab_tree_get_property;
+	gobject_class->constructor  = constructor;
+	gobject_class->dispose      = dispose;
+	gobject_class->set_property = set_property;
+	gobject_class->get_property = get_property;
 
 	g_object_class_install_property
 		(gobject_class,
@@ -321,14 +310,14 @@
 
 
 static GObject*
-kz_tab_tree_constructor (GType                  type,
-			 guint                  n_props,
-			 GObjectConstructParam *props)
+constructor (GType                  type,
+             guint                  n_props,
+             GObjectConstructParam *props)
 {
 	KzTabTree *tabtree;
 
 	GObject *object;
-	GObjectClass *klass = G_OBJECT_CLASS(parent_class);
+	GObjectClass *klass = G_OBJECT_CLASS(kz_tab_tree_parent_class);
 
 	object = klass->constructor(type, n_props, props);
 
@@ -361,7 +350,7 @@
 
 
 static void
-kz_tab_tree_dispose (GObject *obj)
+dispose (GObject *obj)
 {
 	KzTabTree *tabtree = KZ_TAB_TREE(obj);
 
@@ -399,16 +388,16 @@
 		g_object_unref(tabtree->store);
 		tabtree->store = NULL;
 	}
-	if (G_OBJECT_CLASS (parent_class)->dispose)
-		G_OBJECT_CLASS (parent_class)->dispose(obj);
+	if (G_OBJECT_CLASS (kz_tab_tree_parent_class)->dispose)
+		G_OBJECT_CLASS (kz_tab_tree_parent_class)->dispose(obj);
 }
 
 
 static void
-kz_tab_tree_set_property (GObject         *object,
-			  guint            prop_id,
-			  const GValue    *value,
-			  GParamSpec      *pspec)
+set_property (GObject         *object,
+              guint            prop_id,
+              const GValue    *value,
+              GParamSpec      *pspec)
 {
 	KzTabTree *tabtree = KZ_TAB_TREE(object);
   
@@ -428,10 +417,10 @@
 
 
 static void
-kz_tab_tree_get_property (GObject         *object,
-			  guint            prop_id,
-			  GValue          *value,
-			  GParamSpec      *pspec)
+get_property (GObject         *object,
+              guint            prop_id,
+              GValue          *value,
+              GParamSpec      *pspec)
 {
 	KzTabTree *tabtree = KZ_TAB_TREE(object);
 
Index: kazehakase/src/sidebar/kz-thumbnails-sidebar.c
diff -u kazehakase/src/sidebar/kz-thumbnails-sidebar.c:1.20 kazehakase/src/sidebar/kz-thumbnails-sidebar.c:1.21
--- kazehakase/src/sidebar/kz-thumbnails-sidebar.c:1.20	Sat Aug 26 00:06:38 2006
+++ kazehakase/src/sidebar/kz-thumbnails-sidebar.c	Sat Dec  2 21:07:31 2006
@@ -24,7 +24,6 @@
 
 #include <glib/gi18n.h>
 #include "kazehakase.h"
-#include "gobject-utils.h"
 #include "kz-thumbnails-view.h"
 #include "kz-paned.h"
 #include "kz-tab-label.h"
@@ -37,20 +36,18 @@
 
 
 /* Object class methods */
-static void     kz_thumbnails_sidebar_class_init   (KzThumbnailsSidebarClass *klass);
-static void     kz_thumbnails_sidebar_init         (KzThumbnailsSidebar *sidebar);
-static GObject *kz_thumbnails_sidebar_constructor  (GType type,
-						    guint n_props,
-						    GObjectConstructParam *props);
-static void     kz_thumbnails_sidebar_dispose      (GObject      *obj);
-static void     kz_thumbnails_sidebar_set_property (GObject      *object,
-						    guint         prop_id,
-						    const GValue *value,
-						    GParamSpec   *pspec);
-static void     kz_thumbnails_sidebar_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      *obj);
+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     cb_paned_changed_position          (KzPaned *pane,
 						    GtkPositionType position,
 						    KzThumbnailsView *view);
@@ -85,8 +82,6 @@
 */
 };
 
-static GtkVBoxClass *parent_class = NULL;
-
 
 KzSidebarEntry *
 kz_thumbnails_sidebar_get_entry (gint idx)
@@ -96,24 +91,19 @@
 	return &kz_sidebar_thumbnails[idx];
 }
 
-
-KZ_OBJECT_GET_TYPE(kz_thumbnails_sidebar, "KzThumbnailsSidebar", KzThumbnailsSidebar,
-		   kz_thumbnails_sidebar_class_init, kz_thumbnails_sidebar_init,
-		   GTK_TYPE_VBOX)
-
+G_DEFINE_TYPE(KzThumbnailsSidebar, kz_thumbnails_sidebar, GTK_TYPE_VBOX)
 
 static void
 kz_thumbnails_sidebar_class_init (KzThumbnailsSidebarClass *klass)
 {
 	GObjectClass *gobject_class;
 
-	parent_class = g_type_class_peek_parent(klass);
 	gobject_class = (GObjectClass *) klass;
 
-	gobject_class->constructor  = kz_thumbnails_sidebar_constructor;
-	gobject_class->dispose      = kz_thumbnails_sidebar_dispose;
-	gobject_class->set_property = kz_thumbnails_sidebar_set_property;
-	gobject_class->get_property = kz_thumbnails_sidebar_get_property;
+	gobject_class->constructor  = constructor;
+	gobject_class->dispose      = dispose;
+	gobject_class->set_property = set_property;
+	gobject_class->get_property = get_property;
 
 	g_object_class_install_property
 		(gobject_class,
@@ -153,13 +143,13 @@
 
 
 static GObject *
-kz_thumbnails_sidebar_constructor (GType                  type,
-			  	   guint                  n_props,
-			  	   GObjectConstructParam *props)
+constructor (GType                  type,
+             guint                  n_props,
+             GObjectConstructParam *props)
 {
 	KzThumbnailsSidebar *sidebar;
 	GObject *object;
-	GObjectClass *klass = G_OBJECT_CLASS(parent_class);
+	GObjectClass *klass = G_OBJECT_CLASS(kz_thumbnails_sidebar_parent_class);
 
 	object = klass->constructor(type, n_props, props);
 
@@ -176,7 +166,7 @@
 	return object;
 }
 static void
-kz_thumbnails_sidebar_dispose (GObject *obj)
+dispose (GObject *obj)
 {
 	KzThumbnailsSidebar *sidebar = KZ_THUMBNAILS_SIDEBAR(obj);
 
@@ -185,16 +175,16 @@
 
 	sidebar->sidebar = NULL;
 
-	if (G_OBJECT_CLASS (parent_class)->dispose)
-		G_OBJECT_CLASS (parent_class)->dispose(obj);
+	if (G_OBJECT_CLASS (kz_thumbnails_sidebar_parent_class)->dispose)
+		G_OBJECT_CLASS (kz_thumbnails_sidebar_parent_class)->dispose(obj);
 }
 
 
 static void
-kz_thumbnails_sidebar_set_property (GObject         *object,
-				    guint            prop_id,
-				    const GValue    *value,
-				    GParamSpec      *pspec)
+set_property (GObject         *object,
+              guint            prop_id,
+              const GValue    *value,
+              GParamSpec      *pspec)
 {
 	KzThumbnailsSidebar *sidebar = KZ_THUMBNAILS_SIDEBAR(object);
   
@@ -211,10 +201,10 @@
 
 
 static void
-kz_thumbnails_sidebar_get_property (GObject         *object,
-				    guint            prop_id,
-				    GValue          *value,
-				    GParamSpec      *pspec)
+get_property (GObject         *object,
+              guint            prop_id,
+              GValue          *value,
+              GParamSpec      *pspec)
 {
 	KzThumbnailsSidebar *sidebar = KZ_THUMBNAILS_SIDEBAR(object);
 


More information about the Kazehakase-cvs mailing list
Back to archive index