2006-11-15 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Wed, 15 Nov 2006 15:33:02 +0000 (15:33 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Wed, 15 Nov 2006 15:33:02 +0000 (15:33 +0000)
* src/hildon-caption.c:
* src/hildon-caption.h:
* src/hildon-note.c:
* src/hildon-note.h:
* src/hildon-window.h: Register all the unregistered enums as GEnums
to make it easier for the language bindings.

ChangeLog
src/hildon-caption.c
src/hildon-caption.h
src/hildon-note.c
src/hildon-note.h
src/hildon-window.h

index 18629cc..ace00ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2006-11-15  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
+       * src/hildon-caption.c:
+       * src/hildon-caption.h:
+       * src/hildon-note.c:
+       * src/hildon-note.h:
+       * src/hildon-window.h: Register all the unregistered enums as GEnums
+       to make it easier for the language bindings.
+
+2006-11-15  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
        * src/Makefile.am:
        * src/hildon-marshalers.c:
        * src/hildon-marshalers.h: Fixing the marshalers rebuilding etc.
index 5accf57..2875d93 100644 (file)
@@ -134,40 +134,6 @@ struct _HildonCaptionPrivate
   HildonCaptionIconPosition icon_position;
 };
 
-/* Register optional/mandatory type enumeration */
-/* FIXME: mandatory icon was removed. The mandatory/optional logic
-   remains, it should most probably be removed as well. This imply APi
-   change, especially hildon_caption_new() */
-GType
-hildon_caption_status_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { HILDON_CAPTION_OPTIONAL, "HILDON_CAPTION_OPTIONAL", "optional" },
-      { HILDON_CAPTION_MANDATORY, "HILDON_CAPTION_MANDATORY", "mandatory" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("HildonCaptionStatus", values);
-  }
-  return etype;
-}
-
-GType
-hildon_caption_icon_position_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { HILDON_CAPTION_POSITION_LEFT, "HILDON_CAPTION_POSITION_LEFT", "left" },
-      { HILDON_CAPTION_POSITION_RIGHT, "HILDON_CAPTION_POSITION_RIGHT", "right" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("HildonCaptionIconPosition", values);
-  }
-  return etype;
-}
-
 /**
  * hildon_caption_get_type:
  *
index 49d4244..e5bab3d 100644 (file)
@@ -29,6 +29,7 @@
 #include <glib-object.h>
 #include <gtk/gtkeventbox.h>
 #include <gtk/gtksizegroup.h>
+#include "hildon-enum-types.h"
 
 G_BEGIN_DECLS
 
@@ -51,7 +52,7 @@ G_BEGIN_DECLS
  *
  * Keys to set the #HildonCaption to be optional or mandatory.
  */
-typedef enum /*< skip >*/
+typedef enum
 {
     HILDON_CAPTION_OPTIONAL = 0,
     HILDON_CAPTION_MANDATORY
@@ -66,20 +67,12 @@ typedef enum /*< skip >*/
  *
  * Since: 0.14.5
  */
-typedef enum /*< skip >*/
+typedef enum
 {
     HILDON_CAPTION_POSITION_LEFT = 0,
     HILDON_CAPTION_POSITION_RIGHT
 } HildonCaptionIconPosition;
 
-#define HILDON_TYPE_CAPTION_STATUS (hildon_caption_status_get_type ())
-
-#define HILDON_TYPE_CAPTION_ICON_POSITION (hildon_caption_icon_position_get_type ())
-
-GType hildon_caption_status_get_type (void) G_GNUC_CONST;
-
-GType hildon_caption_icon_position_get_type (void) G_GNUC_CONST;
-
 /**
  * HildonCaption:
  *
index a58ca02..d25006b 100644 (file)
@@ -196,24 +196,6 @@ hildon_note_get_property(GObject * object,
     }
 }
 
-GType hildon_note_type_get_type (void)
-{
-  static GType notetype = 0;
-  if (notetype == 0) {
-    static const GEnumValue values[] = {
-      { HILDON_NOTE_CONFIRMATION_TYPE,        "HILDON_NOTE_CONFIRMATION_TYPE",        "confirmation" },
-      { HILDON_NOTE_CONFIRMATION_BUTTON_TYPE, "HILDON_NOTE_CONFIRMATION_BUTTON_TYPE", "confirmation-button" },
-      { HILDON_NOTE_INFORMATION_TYPE,         "HILDON_NOTE_INFORMATION_TYPE",         "note-information" },
-      { HILDON_NOTE_INFORMATION_THEME_TYPE,   "HILDON_NOTE_INFORMATION_THEME_TYPE",   "note-information-theme" },
-      { HILDON_NOTE_PROGRESSBAR_TYPE,         "HILDON_NOTE_PROGRESSBAR_TYPE",         "note-progressbar" },
-      { 0, NULL, NULL }
-    };
-    notetype = g_enum_register_static ("HildonNoteType", values);
-  }
-  return notetype;
-}
-
-
 GType hildon_note_get_type()
 {
     static GType dialog_type = 0;
index 359eb23..f7c8b20 100644 (file)
@@ -40,7 +40,7 @@ G_BEGIN_DECLS
 typedef struct _HildonNote      HildonNote;
 typedef struct _HildonNoteClass HildonNoteClass;
 
-typedef enum /*< skip >*/
+typedef enum
 {
     HILDON_NOTE_CONFIRMATION_TYPE = 0,
     HILDON_NOTE_CONFIRMATION_BUTTON_TYPE,
@@ -112,7 +112,6 @@ void hildon_note_set_button_texts(HildonNote * note, const gchar * textOk,
                                 const gchar * textCancel);
 
 GType hildon_note_get_type(void) G_GNUC_CONST;
-GType hildon_note_type_get_type(void) G_GNUC_CONST;
 
 G_END_DECLS
 #endif /* __HILDON_NOTE_H__ */
index 5a14220..be967b5 100644 (file)
@@ -68,12 +68,12 @@ struct _HildonWindow
     HildonWindowPrivate *priv;
 };
 
-enum
+typedef enum
 {
   HILDON_WINDOW_CO_COPY,
   HILDON_WINDOW_CO_CUT,
   HILDON_WINDOW_CO_PASTE
-};
+} HildonWindowClipboardOperation;
 
 struct _HildonWindowClass
 {