diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-07-16 02:34:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-07-16 02:34:59 +0800 |
commit | ac0c655f3f2a8e47b0cca877aabae66421c58187 (patch) | |
tree | dd86bd195dff93b54184840e7beca7ffa5a11e99 /calendar/gui/dialogs/comp-editor-page.h | |
parent | c049cedd6969d77649db15b71f4ba112d4a2c065 (diff) | |
download | gsoc2013-evolution-ac0c655f3f2a8e47b0cca877aabae66421c58187.tar gsoc2013-evolution-ac0c655f3f2a8e47b0cca877aabae66421c58187.tar.gz gsoc2013-evolution-ac0c655f3f2a8e47b0cca877aabae66421c58187.tar.bz2 gsoc2013-evolution-ac0c655f3f2a8e47b0cca877aabae66421c58187.tar.lz gsoc2013-evolution-ac0c655f3f2a8e47b0cca877aabae66421c58187.tar.xz gsoc2013-evolution-ac0c655f3f2a8e47b0cca877aabae66421c58187.tar.zst gsoc2013-evolution-ac0c655f3f2a8e47b0cca877aabae66421c58187.zip |
Migrate CompEditor, CompEditorPage, and the various subclasses from
BonoboUI to GtkUIManager. See bug #542125.
svn path=/branches/kill-bonobo/; revision=35746
Diffstat (limited to 'calendar/gui/dialogs/comp-editor-page.h')
-rw-r--r-- | calendar/gui/dialogs/comp-editor-page.h | 123 |
1 files changed, 57 insertions, 66 deletions
diff --git a/calendar/gui/dialogs/comp-editor-page.h b/calendar/gui/dialogs/comp-editor-page.h index 950b38fd6a..736ca1c8dc 100644 --- a/calendar/gui/dialogs/comp-editor-page.h +++ b/calendar/gui/dialogs/comp-editor-page.h @@ -26,15 +26,33 @@ #include <libecal/e-cal-component.h> #include <libecal/e-cal.h> +/* Standard GObject macros */ +#define TYPE_COMP_EDITOR_PAGE \ + (comp_editor_page_get_type ()) +#define COMP_EDITOR_PAGE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST \ + ((obj), TYPE_COMP_EDITOR_PAGE, CompEditorPage)) +#define COMP_EDITOR_PAGE_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_CAST \ + ((cls), TYPE_COMP_EDITOR_PAGE, CompEditorPageClass)) +#define IS_COMP_EDITOR_PAGE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE \ + ((obj), TYPE_COMP_EDITOR_PAGE)) +#define IS_COMP_EDITOR_PAGE_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_TYPE \ + ((obj), TYPE_COMP_EDITOR_PAGE)) +#define COMP_EDITOR_PAGE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS \ + ((obj), TYPE_COMP_EDITOR_PAGE, CompEditorPageClass)) + G_BEGIN_DECLS - +/* Use a forward declaration to avoid a circular reference. */ +struct _CompEditor; -#define TYPE_COMP_EDITOR_PAGE (comp_editor_page_get_type ()) -#define COMP_EDITOR_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMP_EDITOR_PAGE, CompEditorPage)) -#define COMP_EDITOR_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMP_EDITOR_PAGE, CompEditorPageClass)) -#define IS_COMP_EDITOR_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMP_EDITOR_PAGE)) -#define IS_COMP_EDITOR_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TYPE_COMP_EDITOR_PAGE)) +typedef struct _CompEditorPage CompEditorPage; +typedef struct _CompEditorPageClass CompEditorPageClass; +typedef struct _CompEditorPagePrivate CompEditorPagePrivate; typedef struct { ECalComponentDateTime *start; @@ -43,45 +61,25 @@ typedef struct { struct icaltimetype *complete; } CompEditorPageDates; -typedef enum { - COMP_EDITOR_PAGE_NEW_ITEM = 1<<0, - COMP_EDITOR_PAGE_MEETING = 1<<1, - COMP_EDITOR_PAGE_DELEGATE = 1<<2, - COMP_EDITOR_PAGE_USER_ORG = 1<<3, - COMP_EDITOR_PAGE_IS_ASSIGNED = 1<<4, - COMP_EDITOR_PAGE_IS_SHARED = 1<<5 -} CompEditorPageFlags; - -typedef struct { +struct _CompEditorPage { GObject object; - /* Some of the pages need the ECal to access timezone data. Also, - * the event page needs to know it to fill the source option menu. */ - ECal *client; - /* The GtkAccelGroup for the page. We install this when the page is mapped, and uninstall when it is unmapped. libglade would do this normally, but we create our pages individually so have to do it ourselves. */ GtkAccelGroup *accel_group; - CompEditorPageFlags flags; + CompEditorPagePrivate *priv; +}; -} CompEditorPage; - -typedef struct { +struct _CompEditorPageClass { GObjectClass parent_class; /* Notification signals */ - void (* changed) (CompEditorPage *page); - void (* needs_send) (CompEditorPage *page); - - void (* summary_changed) (CompEditorPage *page, const char *summary); void (* dates_changed) (CompEditorPage *page, const char *dates); - void (* client_changed) (CompEditorPage *page, ECal *client); - void (* focus_in) (CompEditorPage *page, GtkWidget *widget); - void (* focus_out) (CompEditorPage *page, GtkWidget *widget); + /* Virtual methods */ GtkWidget *(* get_widget) (CompEditorPage *page); @@ -91,42 +89,35 @@ typedef struct { gboolean (* fill_component) (CompEditorPage *page, ECalComponent *comp); gboolean (* fill_timezones) (CompEditorPage *page, GHashTable *timezones); - void (* set_summary) (CompEditorPage *page, const char *summary); void (* set_dates) (CompEditorPage *page, CompEditorPageDates *dates); -} CompEditorPageClass; - -GType comp_editor_page_get_type (void); -GtkWidget *comp_editor_page_get_widget (CompEditorPage *page); -void comp_editor_page_focus_main_widget (CompEditorPage *page); -void comp_editor_page_unset_focused_widget (CompEditorPage *page, GtkWidget *widget); -void comp_editor_page_set_focused_widget (CompEditorPage *page, GtkWidget *widget); -gboolean comp_editor_page_fill_widgets (CompEditorPage *page, - ECalComponent *comp); -gboolean comp_editor_page_fill_component (CompEditorPage *page, - ECalComponent *comp); -gboolean comp_editor_page_fill_timezones (CompEditorPage *page, - GHashTable *timezones); -void comp_editor_page_set_e_cal (CompEditorPage *page, - ECal *client); -void comp_editor_page_set_summary (CompEditorPage *page, - const char *summary); -void comp_editor_page_set_dates (CompEditorPage *page, - CompEditorPageDates *dates); -void comp_editor_page_notify_changed (CompEditorPage *page); -void comp_editor_page_notify_needs_send (CompEditorPage *page); -void comp_editor_page_notify_summary_changed (CompEditorPage *page, - const char *summary); -void comp_editor_page_notify_dates_changed (CompEditorPage *page, - CompEditorPageDates *dates); -void comp_editor_page_notify_client_changed (CompEditorPage *page, - ECal *client); -void comp_editor_page_display_validation_error (CompEditorPage *page, - const char *msg, - GtkWidget *field); - - - +}; + +GType comp_editor_page_get_type (void); +struct _CompEditor * + comp_editor_page_get_editor (CompEditorPage *page); +GtkWidget * comp_editor_page_get_widget (CompEditorPage *page); +gboolean comp_editor_page_get_updating (CompEditorPage *page); +void comp_editor_page_set_updating (CompEditorPage *page, + gboolean updating); +void comp_editor_page_changed (CompEditorPage *page); +void comp_editor_page_focus_main_widget + (CompEditorPage *page); +gboolean comp_editor_page_fill_widgets (CompEditorPage *page, + ECalComponent *comp); +gboolean comp_editor_page_fill_component (CompEditorPage *page, + ECalComponent *comp); +gboolean comp_editor_page_fill_timezones (CompEditorPage *page, + GHashTable *timezones); +void comp_editor_page_set_dates (CompEditorPage *page, + CompEditorPageDates *dates); +void comp_editor_page_notify_dates_changed + (CompEditorPage *page, + CompEditorPageDates *dates); +void comp_editor_page_display_validation_error + (CompEditorPage *page, + const char *msg, + GtkWidget *field); G_END_DECLS -#endif +#endif /* COMP_EDITOR_PAGE_H */ |