[gnome-commander] GnomeCmdConList: initial migration to C++
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] GnomeCmdConList: initial migration to C++
- Date: Mon, 5 Sep 2011 18:21:55 +0000 (UTC)
commit 2ee5d35111381282f80d8352e625356b3ef5467a
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Mon Sep 5 20:18:38 2011 +0200
GnomeCmdConList: initial migration to C++
src/gnome-cmd-con-list.cc | 4 ++--
src/gnome-cmd-con-list.h | 12 +++++++-----
2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/gnome-cmd-con-list.cc b/src/gnome-cmd-con-list.cc
index d5f5034..af8bff3 100755
--- a/src/gnome-cmd-con-list.cc
+++ b/src/gnome-cmd-con-list.cc
@@ -28,7 +28,7 @@
using namespace std;
-struct GnomeCmdConListPrivate
+struct GnomeCmdConList::Private
{
gboolean update_lock;
gboolean changed;
@@ -140,7 +140,7 @@ static void class_init (GnomeCmdConListClass *klass)
static void init (GnomeCmdConList *con_list)
{
- con_list->priv = g_new0 (GnomeCmdConListPrivate, 1);
+ con_list->priv = g_new0 (GnomeCmdConList::Private, 1);
con_list->priv->update_lock = FALSE;
diff --git a/src/gnome-cmd-con-list.h b/src/gnome-cmd-con-list.h
index 65cf8ba..d8e35d2 100755
--- a/src/gnome-cmd-con-list.h
+++ b/src/gnome-cmd-con-list.h
@@ -34,16 +34,20 @@
#define GNOME_CMD_CON_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNOME_CMD_TYPE_CON_LIST, GnomeCmdConListClass))
-struct GnomeCmdConListPrivate;
+GtkType gnome_cmd_con_list_get_type ();
struct GnomeCmdConList
{
GtkObject parent;
- GnomeCmdConListPrivate *priv;
-};
+ class Private;
+
+ Private *priv;
+ operator GObject * () const { return G_OBJECT (this); }
+ operator GtkObject * () const { return GTK_OBJECT (this); }
+};
struct GnomeCmdConListClass
{
@@ -57,8 +61,6 @@ struct GnomeCmdConListClass
};
-GtkType gnome_cmd_con_list_get_type ();
-
inline GnomeCmdConList *gnome_cmd_con_list_new ()
{
return (GnomeCmdConList *) g_object_new (GNOME_CMD_TYPE_CON_LIST, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]