Create a non-abstract enumeration type derived from GEnum.
2002-12-06 Hans Petter Jansson <hpj@ximian.com> * cal-client/cal-client.c (cal_client_open_status_enum_get_type): Create a non-abstract enumeration type derived from GEnum. (cal_client_set_mode_status_enum_get_type): Ditto. (cal_mode_enum_get_type): Ditto. (cal_client_class_init): Use our enumerations and not the abstract one. (cal_client_finalize): Don't destroy factories, since the CalClient doesn't own them anymore. They're shared between CalClients now. (get_factories): Implement. Move the factory setup code here from cal_client_construct (), and cache the factories. This is hopefully temporary, until wombat goes away or is fixed. (cal_client_construct): Most of the code moved to get_factories (). * cal-client/cal-client.h: Add enumeration type macros and protos. * gui/cal-search-bar.c (cal_search_bar_get_type): Removed in favour of E_MAKE_TYPE, which uses GObject calls. (cal_search_bar_class_init): Use g_type_class_peek_parent (). * gui/calendar-model.c (calendar_model_get_type): (calendar_model_class_init): Ditto, like above file. * gui/calendar-view.c (calendar_view_get_type): (calendar_view_class_init): Ditto. * gui/e-calendar-table.c (e_calendar_table_get_type): (e_calendar_table_class_init): Ditto. * gui/e-comp-editor-registry.c (e_comp_editor_registry_get_type): (class_init): Ditto. * gui/e-day-view-main-item.c (e_day_view_main_item_get_type): (e_day_view_main_item_class_init): Ditto. * gui/e-day-view-time-item.c (e_day_view_time_item_get_type): (e_day_view_time_item_class_init): Ditto. * gui/e-day-view-top-item.c (e_day_view_top_item_get_type): (e_day_view_top_item_class_init): Ditto. * gui/e-day-view.c (e_day_view_get_type): (e_day_view_class_init): Ditto. * gui/e-itip-control.c (e_itip_control_get_type): (class_init): Ditto. * gui/e-meeting-attendee.c (e_meeting_attendee_get_type): (class_init): Ditto. * gui/e-meeting-model.c (e_meeting_model_get_type): (class_init): Ditto. * gui/e-meeting-time-sel-item.c (e_meeting_time_selector_item_get_type): (e_meeting_time_selector_item_class_init): Ditto. * gui/e-meeting-time-sel.c (e_meeting_time_selector_get_type): (e_meeting_time_selector_class_init): Ditto. * gui/e-timezone-entry.c (e_timezone_entry_get_type): (e_timezone_entry_class_init): Ditto. * gui/e-week-view-event-item.c (e_week_view_event_item_get_type): (e_week_view_event_item_class_init): Ditto. * gui/e-week-view-main-item.c (e_week_view_main_item_get_type): (e_week_view_main_item_class_init): Ditto. * gui/e-week-view-titles-item.c (e_week_view_titles_item_get_type): (e_week_view_titles_item_class_init): Ditto. * gui/gnome-cal.c (gnome_calendar_get_type): (gnome_calendar_class_init): Ditto. * gui/weekday-picker.c (weekday_picker_get_type): (weekday_picker_class_init): Ditto. * gui/e-week-view.c (e_week_view_get_type): (e_week_view_class_init): Ditto, but parent_class init was moved from get_type() to class_init(). * gui/calendar-view-factory.c (calendar_view_factory_get_type): (calendar_view_factory_class_init): Ditto, and set up finalize callback instead of destroy. (calendar_view_factory_finalize): It's a GObject, so implement this. (celendar_view_factory_destroy): Move code to _finalize() and remove. * gui/main.c (init_bonobo): Remove extraneous bonobo_activation_init(). svn path=/trunk/; revision=19043
This commit is contained in:
committed by
Hans Petter
parent
4b1cfd51be
commit
7bb980e76d
@ -1,3 +1,77 @@
|
||||
2002-12-06 Hans Petter Jansson <hpj@ximian.com>
|
||||
|
||||
* cal-client/cal-client.c (cal_client_open_status_enum_get_type):
|
||||
Create a non-abstract enumeration type derived from GEnum.
|
||||
(cal_client_set_mode_status_enum_get_type): Ditto.
|
||||
(cal_mode_enum_get_type): Ditto.
|
||||
(cal_client_class_init): Use our enumerations and not the abstract
|
||||
one.
|
||||
(cal_client_finalize): Don't destroy factories, since the CalClient
|
||||
doesn't own them anymore. They're shared between CalClients now.
|
||||
(get_factories): Implement. Move the factory setup code here from
|
||||
cal_client_construct (), and cache the factories. This is hopefully
|
||||
temporary, until wombat goes away or is fixed.
|
||||
(cal_client_construct): Most of the code moved to get_factories ().
|
||||
|
||||
* cal-client/cal-client.h: Add enumeration type macros and protos.
|
||||
|
||||
* gui/cal-search-bar.c (cal_search_bar_get_type): Removed in favour
|
||||
of E_MAKE_TYPE, which uses GObject calls.
|
||||
(cal_search_bar_class_init): Use g_type_class_peek_parent ().
|
||||
|
||||
* gui/calendar-model.c (calendar_model_get_type):
|
||||
(calendar_model_class_init): Ditto, like above file.
|
||||
* gui/calendar-view.c (calendar_view_get_type):
|
||||
(calendar_view_class_init): Ditto.
|
||||
* gui/e-calendar-table.c (e_calendar_table_get_type):
|
||||
(e_calendar_table_class_init): Ditto.
|
||||
* gui/e-comp-editor-registry.c (e_comp_editor_registry_get_type):
|
||||
(class_init): Ditto.
|
||||
* gui/e-day-view-main-item.c (e_day_view_main_item_get_type):
|
||||
(e_day_view_main_item_class_init): Ditto.
|
||||
* gui/e-day-view-time-item.c (e_day_view_time_item_get_type):
|
||||
(e_day_view_time_item_class_init): Ditto.
|
||||
* gui/e-day-view-top-item.c (e_day_view_top_item_get_type):
|
||||
(e_day_view_top_item_class_init): Ditto.
|
||||
* gui/e-day-view.c (e_day_view_get_type):
|
||||
(e_day_view_class_init): Ditto.
|
||||
* gui/e-itip-control.c (e_itip_control_get_type):
|
||||
(class_init): Ditto.
|
||||
* gui/e-meeting-attendee.c (e_meeting_attendee_get_type):
|
||||
(class_init): Ditto.
|
||||
* gui/e-meeting-model.c (e_meeting_model_get_type):
|
||||
(class_init): Ditto.
|
||||
* gui/e-meeting-time-sel-item.c
|
||||
(e_meeting_time_selector_item_get_type):
|
||||
(e_meeting_time_selector_item_class_init): Ditto.
|
||||
* gui/e-meeting-time-sel.c
|
||||
(e_meeting_time_selector_get_type):
|
||||
(e_meeting_time_selector_class_init): Ditto.
|
||||
* gui/e-timezone-entry.c (e_timezone_entry_get_type):
|
||||
(e_timezone_entry_class_init): Ditto.
|
||||
* gui/e-week-view-event-item.c (e_week_view_event_item_get_type):
|
||||
(e_week_view_event_item_class_init): Ditto.
|
||||
* gui/e-week-view-main-item.c (e_week_view_main_item_get_type):
|
||||
(e_week_view_main_item_class_init): Ditto.
|
||||
* gui/e-week-view-titles-item.c (e_week_view_titles_item_get_type):
|
||||
(e_week_view_titles_item_class_init): Ditto.
|
||||
* gui/gnome-cal.c (gnome_calendar_get_type):
|
||||
(gnome_calendar_class_init): Ditto.
|
||||
* gui/weekday-picker.c (weekday_picker_get_type):
|
||||
(weekday_picker_class_init): Ditto.
|
||||
|
||||
* gui/e-week-view.c (e_week_view_get_type):
|
||||
(e_week_view_class_init): Ditto, but parent_class init was moved
|
||||
from get_type() to class_init().
|
||||
|
||||
* gui/calendar-view-factory.c (calendar_view_factory_get_type):
|
||||
(calendar_view_factory_class_init): Ditto, and set up finalize
|
||||
callback instead of destroy.
|
||||
(calendar_view_factory_finalize): It's a GObject, so implement this.
|
||||
(celendar_view_factory_destroy): Move code to _finalize() and remove.
|
||||
|
||||
* gui/main.c (init_bonobo): Remove extraneous bonobo_activation_init().
|
||||
|
||||
2002-11-27 Not Zed <NotZed@Ximian.com>
|
||||
|
||||
* gui/itip-utils.[ch]: run fix.sh over this.
|
||||
|
||||
@ -143,6 +143,67 @@ cal_client_get_type (void)
|
||||
return cal_client_type;
|
||||
}
|
||||
|
||||
GType
|
||||
cal_client_open_status_enum_get_type (void)
|
||||
{
|
||||
static GType cal_client_open_status_enum_type = 0;
|
||||
|
||||
if (!cal_client_open_status_enum_type) {
|
||||
static GEnumValue values [] = {
|
||||
{ CAL_CLIENT_OPEN_SUCCESS, "CalClientOpenSuccess", "success" },
|
||||
{ CAL_CLIENT_OPEN_ERROR, "CalClientOpenError", "error" },
|
||||
{ CAL_CLIENT_OPEN_NOT_FOUND, "CalClientOpenNotFound", "not-found" },
|
||||
{ CAL_CLIENT_OPEN_PERMISSION_DENIED, "CalClientOpenPermissionDenied", "denied" },
|
||||
{ CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED, "CalClientOpenMethodNotSupported", "unsupported" },
|
||||
{ -1, NULL, NULL }
|
||||
};
|
||||
|
||||
cal_client_open_status_enum_type = g_enum_register_static ("CalClientOpenStatusEnum", values);
|
||||
}
|
||||
|
||||
return cal_client_open_status_enum_type;
|
||||
}
|
||||
|
||||
GType
|
||||
cal_client_set_mode_status_enum_get_type (void)
|
||||
{
|
||||
static GType cal_client_set_mode_status_enum_type = 0;
|
||||
|
||||
if (!cal_client_set_mode_status_enum_type) {
|
||||
static GEnumValue values [] = {
|
||||
{ CAL_CLIENT_SET_MODE_SUCCESS, "CalClientSetModeSuccess", "success" },
|
||||
{ CAL_CLIENT_SET_MODE_ERROR, "CalClientSetModeError", "error" },
|
||||
{ CAL_CLIENT_SET_MODE_NOT_SUPPORTED, "CalClientSetModeNotSupported", "unsupported" },
|
||||
{ -1, NULL, NULL }
|
||||
};
|
||||
|
||||
cal_client_set_mode_status_enum_type =
|
||||
g_enum_register_static ("CalClientSetModeStatusEnum", values);
|
||||
}
|
||||
|
||||
return cal_client_set_mode_status_enum_type;
|
||||
}
|
||||
|
||||
GType
|
||||
cal_mode_enum_get_type (void)
|
||||
{
|
||||
static GType cal_mode_enum_type = 0;
|
||||
|
||||
if (!cal_mode_enum_type) {
|
||||
static GEnumValue values [] = {
|
||||
{ CAL_MODE_INVALID, "CalModeInvalid", "invalid" },
|
||||
{ CAL_MODE_LOCAL, "CalModeLocal", "local" },
|
||||
{ CAL_MODE_REMOTE, "CalModeRemote", "remote" },
|
||||
{ CAL_MODE_ANY, "CalModeAny", "any" },
|
||||
{ -1, NULL, NULL }
|
||||
};
|
||||
|
||||
cal_mode_enum_type = g_enum_register_static ("CalModeEnum", values);
|
||||
}
|
||||
|
||||
return cal_mode_enum_type;
|
||||
}
|
||||
|
||||
/* Class initialization function for the calendar client */
|
||||
static void
|
||||
cal_client_class_init (CalClientClass *klass)
|
||||
@ -161,7 +222,7 @@ cal_client_class_init (CalClientClass *klass)
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__ENUM,
|
||||
G_TYPE_NONE, 1,
|
||||
G_TYPE_ENUM);
|
||||
CAL_CLIENT_OPEN_STATUS_ENUM_TYPE);
|
||||
cal_client_signals[CAL_SET_MODE] =
|
||||
g_signal_new ("cal_set_mode",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -170,8 +231,8 @@ cal_client_class_init (CalClientClass *klass)
|
||||
NULL, NULL,
|
||||
cal_util_marshal_VOID__ENUM_ENUM,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_ENUM,
|
||||
G_TYPE_ENUM);
|
||||
CAL_CLIENT_SET_MODE_STATUS_ENUM_TYPE,
|
||||
CAL_MODE_ENUM_TYPE);
|
||||
cal_client_signals[OBJ_UPDATED] =
|
||||
g_signal_new ("obj_updated",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -372,7 +433,7 @@ cal_client_finalize (GObject *object)
|
||||
}
|
||||
|
||||
priv->w_client = NULL;
|
||||
destroy_factories (client);
|
||||
/* destroy_factories (client); */
|
||||
destroy_cal (client);
|
||||
|
||||
priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED;
|
||||
@ -645,6 +706,54 @@ client_forget_password_cb (WombatClient *w_client,
|
||||
|
||||
|
||||
|
||||
static GList *
|
||||
get_factories (void)
|
||||
{
|
||||
static GList *factories = NULL;
|
||||
GNOME_Evolution_Calendar_CalFactory factory;
|
||||
Bonobo_ServerInfoList *servers;
|
||||
CORBA_Environment ev;
|
||||
int i;
|
||||
|
||||
if (factories != NULL)
|
||||
return factories;
|
||||
|
||||
CORBA_exception_init (&ev);
|
||||
|
||||
servers = bonobo_activation_query ("repo_ids.has ('IDL:GNOME/Evolution/Calendar/CalFactory:1.0')", NULL, &ev);
|
||||
if (ev._major != CORBA_NO_EXCEPTION) {
|
||||
g_message ("Cannot perform OAF query for Calendar servers.");
|
||||
CORBA_exception_free (&ev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (servers->_length == 0)
|
||||
g_warning ("No Calendar servers installed.");
|
||||
|
||||
for (i = 0; i < servers->_length; i++) {
|
||||
const Bonobo_ServerInfo *info;
|
||||
|
||||
info = servers->_buffer + i;
|
||||
|
||||
factory = (GNOME_Evolution_Calendar_CalFactory)
|
||||
bonobo_activation_activate_from_id (info->iid, 0, NULL, &ev);
|
||||
if (BONOBO_EX (&ev)) {
|
||||
#if 0
|
||||
g_warning ("cal_client_construct: Could not activate calendar server %s", info->iid);
|
||||
CORBA_free (servers);
|
||||
CORBA_exception_free (&ev);
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
factories = g_list_prepend (factories, factory);
|
||||
}
|
||||
|
||||
CORBA_free (servers);
|
||||
CORBA_exception_free (&ev);
|
||||
return factories;
|
||||
}
|
||||
|
||||
/**
|
||||
* cal_client_construct:
|
||||
* @client: A calendar client.
|
||||
@ -668,39 +777,8 @@ cal_client_construct (CalClient *client)
|
||||
g_return_val_if_fail (IS_CAL_CLIENT (client), NULL);
|
||||
|
||||
priv = client->priv;
|
||||
priv->factories = get_factories ();
|
||||
|
||||
CORBA_exception_init (&ev);
|
||||
|
||||
servers = bonobo_activation_query ("repo_ids.has ('IDL:GNOME/Evolution/Calendar/CalFactory:1.0')", NULL, &ev);
|
||||
if (ev._major != CORBA_NO_EXCEPTION) {
|
||||
g_message ("Cannot perform OAF query for Calendar servers.");
|
||||
CORBA_exception_free (&ev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (servers->_length == 0)
|
||||
g_warning ("No Calendar servers installed.");
|
||||
|
||||
for (i = 0; i < servers->_length; i++) {
|
||||
const Bonobo_ServerInfo *info;
|
||||
|
||||
info = servers->_buffer + i;
|
||||
|
||||
factory = (GNOME_Evolution_Calendar_CalFactory)
|
||||
bonobo_activation_activate_from_id (info->iid, 0, NULL, &ev);
|
||||
if (BONOBO_EX (&ev)) {
|
||||
g_warning ("cal_client_construct: Could not activate calendar server %s", info->iid);
|
||||
CORBA_free (servers);
|
||||
CORBA_exception_free (&ev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
priv->factories = g_list_prepend (priv->factories, factory);
|
||||
}
|
||||
|
||||
CORBA_free (servers);
|
||||
|
||||
CORBA_exception_free (&ev);
|
||||
return client;
|
||||
}
|
||||
|
||||
|
||||
@ -36,6 +36,10 @@ G_BEGIN_DECLS
|
||||
#define IS_CAL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAL_CLIENT_TYPE))
|
||||
#define IS_CAL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAL_CLIENT_TYPE))
|
||||
|
||||
#define CAL_CLIENT_OPEN_STATUS_ENUM_TYPE (cal_client_open_status_enum_get_type ())
|
||||
#define CAL_CLIENT_SET_MODE_STATUS_ENUM_TYPE (cal_client_set_mode_status_enum_get_type ())
|
||||
#define CAL_MODE_ENUM_TYPE (cal_mode_enum_get_type ())
|
||||
|
||||
typedef struct _CalClient CalClient;
|
||||
typedef struct _CalClientClass CalClientClass;
|
||||
|
||||
@ -122,6 +126,10 @@ typedef gchar * (* CalClientAuthFunc) (CalClient *client,
|
||||
|
||||
GType cal_client_get_type (void);
|
||||
|
||||
GType cal_client_open_status_enum_get_type (void);
|
||||
GType cal_client_set_mode_status_enum_get_type (void);
|
||||
GType cal_mode_enum_get_type (void);
|
||||
|
||||
CalClient *cal_client_construct (CalClient *client);
|
||||
|
||||
CalClient *cal_client_new (void);
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
#include <gtk/gtksignal.h>
|
||||
#include <libgnome/gnome-i18n.h>
|
||||
#include <gal/widgets/e-unicode.h>
|
||||
#include <gal/util/e-util.h>
|
||||
#include "cal-search-bar.h"
|
||||
|
||||
|
||||
@ -85,36 +86,8 @@ static guint cal_search_bar_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* cal_search_bar_get_type:
|
||||
*
|
||||
* Registers the #CalSearchBar class if necessary and returns the type ID
|
||||
* associated to it.
|
||||
*
|
||||
* Return value: The type ID of the #CalSearchBar class.
|
||||
**/
|
||||
GtkType
|
||||
cal_search_bar_get_type (void)
|
||||
{
|
||||
static GtkType cal_search_bar_type = 0;
|
||||
|
||||
if (!cal_search_bar_type) {
|
||||
static const GtkTypeInfo cal_search_bar_info = {
|
||||
"CalSearchBar",
|
||||
sizeof (CalSearchBar),
|
||||
sizeof (CalSearchBarClass),
|
||||
(GtkClassInitFunc) cal_search_bar_class_init,
|
||||
(GtkObjectInitFunc) cal_search_bar_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
cal_search_bar_type = gtk_type_unique (E_SEARCH_BAR_TYPE, &cal_search_bar_info);
|
||||
}
|
||||
|
||||
return cal_search_bar_type;
|
||||
}
|
||||
E_MAKE_TYPE (cal_search_bar, "CalSearchBar", CalSearchBar, cal_search_bar_class_init,
|
||||
cal_search_bar_init, E_SEARCH_BAR_TYPE);
|
||||
|
||||
/* Class initialization function for the calendar search bar */
|
||||
static void
|
||||
@ -126,7 +99,7 @@ cal_search_bar_class_init (CalSearchBarClass *class)
|
||||
e_search_bar_class = (ESearchBarClass *) class;
|
||||
object_class = (GtkObjectClass *) class;
|
||||
|
||||
parent_class = gtk_type_class (E_SEARCH_BAR_TYPE);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
cal_search_bar_signals[SEXP_CHANGED] =
|
||||
gtk_signal_new ("sexp_changed",
|
||||
|
||||
@ -144,28 +144,9 @@ static ETableModelClass *parent_class;
|
||||
*
|
||||
* Return value: The type ID of the #CalendarModel class.
|
||||
**/
|
||||
GtkType
|
||||
calendar_model_get_type (void)
|
||||
{
|
||||
static GtkType calendar_model_type = 0;
|
||||
|
||||
if (!calendar_model_type) {
|
||||
static GtkTypeInfo calendar_model_info = {
|
||||
"CalendarModel",
|
||||
sizeof (CalendarModel),
|
||||
sizeof (CalendarModelClass),
|
||||
(GtkClassInitFunc) calendar_model_class_init,
|
||||
(GtkObjectInitFunc) calendar_model_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
calendar_model_type = gtk_type_unique (E_TABLE_MODEL_TYPE, &calendar_model_info);
|
||||
}
|
||||
|
||||
return calendar_model_type;
|
||||
}
|
||||
E_MAKE_TYPE (calendar_model, "CalendarModel", CalendarModel, calendar_model_class_init,
|
||||
calendar_model_init, E_TABLE_MODEL_TYPE);
|
||||
|
||||
/* Class initialization function for the calendar table model */
|
||||
static void
|
||||
@ -177,7 +158,7 @@ calendar_model_class_init (CalendarModelClass *class)
|
||||
object_class = (GtkObjectClass *) class;
|
||||
etm_class = (ETableModelClass *) class;
|
||||
|
||||
parent_class = gtk_type_class (E_TABLE_MODEL_TYPE);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class->destroy = calendar_model_destroy;
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ struct _CalendarViewFactoryPrivate {
|
||||
|
||||
static void calendar_view_factory_class_init (CalendarViewFactoryClass *class);
|
||||
static void calendar_view_factory_init (CalendarViewFactory *cal_view_factory);
|
||||
static void calendar_view_factory_destroy (GtkObject *object);
|
||||
static void calendar_view_factory_finalize (GObject *object);
|
||||
|
||||
static const char *calendar_view_factory_get_title (GalViewFactory *factory);
|
||||
static const char *calendar_view_factory_get_type_code (GalViewFactory *factory);
|
||||
@ -49,55 +49,26 @@ static GalViewFactoryClass *parent_class = NULL;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* calendar_view_factory_get_type:
|
||||
*
|
||||
* Registers the #CalendarViewFactory class if necessary, and returns the type
|
||||
* ID associated to it.
|
||||
*
|
||||
* Return value: The type ID of the #CalendarViewFactory class.
|
||||
**/
|
||||
GtkType
|
||||
calendar_view_factory_get_type (void)
|
||||
{
|
||||
static GtkType calendar_view_factory_type;
|
||||
|
||||
if (!calendar_view_factory_type) {
|
||||
static const GtkTypeInfo calendar_view_factory_info = {
|
||||
"CalendarViewFactory",
|
||||
sizeof (CalendarViewFactory),
|
||||
sizeof (CalendarViewFactoryClass),
|
||||
(GtkClassInitFunc) calendar_view_factory_class_init,
|
||||
(GtkObjectInitFunc) calendar_view_factory_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
calendar_view_factory_type = gtk_type_unique (GAL_VIEW_FACTORY_TYPE,
|
||||
&calendar_view_factory_info);
|
||||
}
|
||||
|
||||
return calendar_view_factory_type;
|
||||
}
|
||||
E_MAKE_TYPE (calendar_view_factory, "CalendarViewFactory", CalendarViewFactory,
|
||||
calendar_view_factory_class_init, calendar_view_factory_init, GAL_VIEW_FACTORY_TYPE);
|
||||
|
||||
/* Class initialization function for the calendar view factory */
|
||||
static void
|
||||
calendar_view_factory_class_init (CalendarViewFactoryClass *class)
|
||||
{
|
||||
GalViewFactoryClass *gal_view_factory_class;
|
||||
GtkObjectClass *object_class;
|
||||
GObjectClass *gobject_class;
|
||||
|
||||
parent_class = gtk_type_class (GAL_VIEW_FACTORY_TYPE);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
gal_view_factory_class = (GalViewFactoryClass *) class;
|
||||
object_class = (GtkObjectClass *) class;
|
||||
gobject_class = (GObjectClass *) class;
|
||||
|
||||
gal_view_factory_class->get_title = calendar_view_factory_get_title;
|
||||
gal_view_factory_class->get_type_code = calendar_view_factory_get_type_code;
|
||||
gal_view_factory_class->new_view = calendar_view_factory_new_view;
|
||||
|
||||
object_class->destroy = calendar_view_factory_destroy;
|
||||
gobject_class->finalize = calendar_view_factory_finalize;
|
||||
}
|
||||
|
||||
/* Object initialization class for the calendar view factory */
|
||||
@ -110,9 +81,9 @@ calendar_view_factory_init (CalendarViewFactory *cal_view_factory)
|
||||
cal_view_factory->priv = priv;
|
||||
}
|
||||
|
||||
/* Destroy method for the calendar view factory */
|
||||
/* Finalize method for the calendar view factory */
|
||||
static void
|
||||
calendar_view_factory_destroy (GtkObject *object)
|
||||
calendar_view_factory_finalize (GObject *object)
|
||||
{
|
||||
CalendarViewFactory *cal_view_factory;
|
||||
CalendarViewFactoryPrivate *priv;
|
||||
@ -126,8 +97,8 @@ calendar_view_factory_destroy (GtkObject *object)
|
||||
g_free (priv);
|
||||
cal_view_factory->priv = NULL;
|
||||
|
||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
||||
if (G_OBJECT_CLASS (parent_class)->finalize)
|
||||
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -53,36 +53,8 @@ static GalViewClass *parent_class = NULL;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* calendar_view_get_type:
|
||||
*
|
||||
* Registers the #CalendarView class if necessary, and returns the type ID
|
||||
* associated to it.
|
||||
*
|
||||
* Return value: The type ID of the #CalendarView class.
|
||||
**/
|
||||
GtkType
|
||||
calendar_view_get_type (void)
|
||||
{
|
||||
static GtkType calendar_view_type;
|
||||
|
||||
if (!calendar_view_type) {
|
||||
static const GtkTypeInfo calendar_view_info = {
|
||||
"CalendarView",
|
||||
sizeof (CalendarView),
|
||||
sizeof (CalendarViewClass),
|
||||
(GtkClassInitFunc) calendar_view_class_init,
|
||||
(GtkObjectInitFunc) calendar_view_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
calendar_view_type = gtk_type_unique (GAL_VIEW_TYPE, &calendar_view_info);
|
||||
}
|
||||
|
||||
return calendar_view_type;
|
||||
}
|
||||
E_MAKE_TYPE (calendar_view, "CalendarView", CalendarView, calendar_view_class_init,
|
||||
calendar_view_init, GAL_VIEW_TYPE);
|
||||
|
||||
/* Class initialization function for the calendar view */
|
||||
static void
|
||||
@ -91,7 +63,7 @@ calendar_view_class_init (CalendarViewClass *class)
|
||||
GalViewClass *gal_view_class;
|
||||
GtkObjectClass *object_class;
|
||||
|
||||
parent_class = gtk_type_class (GAL_VIEW_TYPE);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
gal_view_class = (GalViewClass *) class;
|
||||
object_class = (GtkObjectClass *) class;
|
||||
|
||||
@ -125,32 +125,8 @@ static GdkPixbuf* icon_pixbufs[E_CALENDAR_MODEL_NUM_ICONS] = { 0 };
|
||||
static GtkTableClass *parent_class;
|
||||
static GdkAtom clipboard_atom = GDK_NONE;
|
||||
|
||||
|
||||
GtkType
|
||||
e_calendar_table_get_type (void)
|
||||
{
|
||||
static GtkType e_calendar_table_type = 0;
|
||||
|
||||
if (!e_calendar_table_type){
|
||||
GtkTypeInfo e_calendar_table_info = {
|
||||
"ECalendarTable",
|
||||
sizeof (ECalendarTable),
|
||||
sizeof (ECalendarTableClass),
|
||||
(GtkClassInitFunc) e_calendar_table_class_init,
|
||||
(GtkObjectInitFunc) e_calendar_table_init,
|
||||
NULL, /* reserved 1 */
|
||||
NULL, /* reserved 2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
parent_class = gtk_type_class (GTK_TYPE_TABLE);
|
||||
e_calendar_table_type = gtk_type_unique (GTK_TYPE_TABLE,
|
||||
&e_calendar_table_info);
|
||||
}
|
||||
|
||||
return e_calendar_table_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_calendar_table, "ECalendarTable", ECalendarTable, e_calendar_table_class_init,
|
||||
e_calendar_table_init, GTK_TYPE_TABLE);
|
||||
|
||||
static void
|
||||
e_calendar_table_class_init (ECalendarTableClass *class)
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#endif
|
||||
|
||||
#include <gnome.h>
|
||||
#include <gal/util/e-util.h>
|
||||
#include "e-comp-editor-registry.h"
|
||||
|
||||
struct _ECompEditorRegistryPrivate {
|
||||
@ -65,7 +66,7 @@ class_init (ECompEditorRegistryClass *klass)
|
||||
|
||||
object_class = GTK_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = gtk_type_class (gtk_object_get_type ());
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->destroy = destroy;
|
||||
}
|
||||
@ -84,28 +85,8 @@ init (ECompEditorRegistry *reg)
|
||||
|
||||
|
||||
|
||||
GtkType
|
||||
e_comp_editor_registry_get_type (void)
|
||||
{
|
||||
static GtkType type = 0;
|
||||
|
||||
if (type == 0) {
|
||||
static const GtkTypeInfo info = {
|
||||
"ECompEditorRegistry",
|
||||
sizeof (ECompEditorRegistry),
|
||||
sizeof (ECompEditorRegistryClass),
|
||||
(GtkClassInitFunc) class_init,
|
||||
(GtkObjectInitFunc) init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
type = gtk_type_unique (gtk_object_get_type (), &info);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
E_MAKE_TYPE (e_comp_editor_registry, "ECompEditorRegistry", ECompEditorRegistry,
|
||||
class_init, init, gtk_object_get_type ());
|
||||
|
||||
GtkObject *
|
||||
e_comp_editor_registry_new (void)
|
||||
|
||||
@ -81,30 +81,8 @@ enum {
|
||||
ARG_DAY_VIEW
|
||||
};
|
||||
|
||||
|
||||
GtkType
|
||||
e_day_view_main_item_get_type (void)
|
||||
{
|
||||
static GtkType e_day_view_main_item_type = 0;
|
||||
|
||||
if (!e_day_view_main_item_type) {
|
||||
GtkTypeInfo e_day_view_main_item_info = {
|
||||
"EDayViewMainItem",
|
||||
sizeof (EDayViewMainItem),
|
||||
sizeof (EDayViewMainItemClass),
|
||||
(GtkClassInitFunc) e_day_view_main_item_class_init,
|
||||
(GtkObjectInitFunc) e_day_view_main_item_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
e_day_view_main_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_day_view_main_item_info);
|
||||
}
|
||||
|
||||
return e_day_view_main_item_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_day_view_main_item, "EDayViewMainItem", EDayViewMainItem,
|
||||
e_day_view_main_item_class_init, e_day_view_main_item_init, GNOME_TYPE_CANVAS_ITEM);
|
||||
|
||||
static void
|
||||
e_day_view_main_item_class_init (EDayViewMainItemClass *class)
|
||||
@ -112,7 +90,7 @@ e_day_view_main_item_class_init (EDayViewMainItemClass *class)
|
||||
GtkObjectClass *object_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type());
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
@ -103,30 +103,8 @@ enum {
|
||||
ARG_DAY_VIEW
|
||||
};
|
||||
|
||||
|
||||
GtkType
|
||||
e_day_view_time_item_get_type (void)
|
||||
{
|
||||
static GtkType e_day_view_time_item_type = 0;
|
||||
|
||||
if (!e_day_view_time_item_type) {
|
||||
GtkTypeInfo e_day_view_time_item_info = {
|
||||
"EDayViewTimeItem",
|
||||
sizeof (EDayViewTimeItem),
|
||||
sizeof (EDayViewTimeItemClass),
|
||||
(GtkClassInitFunc) e_day_view_time_item_class_init,
|
||||
(GtkObjectInitFunc) e_day_view_time_item_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
e_day_view_time_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_day_view_time_item_info);
|
||||
}
|
||||
|
||||
return e_day_view_time_item_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_day_view_time_item, "EDayViewTimeItem", EDayViewTimeItem,
|
||||
e_day_view_time_item_class_init, e_day_view_time_item_init, GNOME_TYPE_CANVAS_ITEM);
|
||||
|
||||
static void
|
||||
e_day_view_time_item_class_init (EDayViewTimeItemClass *class)
|
||||
@ -134,7 +112,7 @@ e_day_view_time_item_class_init (EDayViewTimeItemClass *class)
|
||||
GtkObjectClass *object_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type());
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
@ -79,30 +79,8 @@ enum {
|
||||
ARG_DAY_VIEW
|
||||
};
|
||||
|
||||
|
||||
GtkType
|
||||
e_day_view_top_item_get_type (void)
|
||||
{
|
||||
static GtkType e_day_view_top_item_type = 0;
|
||||
|
||||
if (!e_day_view_top_item_type) {
|
||||
GtkTypeInfo e_day_view_top_item_info = {
|
||||
"EDayViewTopItem",
|
||||
sizeof (EDayViewTopItem),
|
||||
sizeof (EDayViewTopItemClass),
|
||||
(GtkClassInitFunc) e_day_view_top_item_class_init,
|
||||
(GtkObjectInitFunc) e_day_view_top_item_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
e_day_view_top_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_day_view_top_item_info);
|
||||
}
|
||||
|
||||
return e_day_view_top_item_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_day_view_top_item, "EDayViewTopItem", EDayViewTopItem, e_day_view_top_item_class_init,
|
||||
e_day_view_top_item_init, GNOME_TYPE_CANVAS_ITEM);
|
||||
|
||||
static void
|
||||
e_day_view_top_item_class_init (EDayViewTopItemClass *class)
|
||||
@ -110,7 +88,7 @@ e_day_view_top_item_class_init (EDayViewTopItemClass *class)
|
||||
GtkObjectClass *object_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type());
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
@ -476,32 +476,8 @@ static gboolean e_day_view_layout_timeout_cb (gpointer data);
|
||||
static GtkTableClass *parent_class;
|
||||
static GdkAtom clipboard_atom = GDK_NONE;
|
||||
|
||||
|
||||
GtkType
|
||||
e_day_view_get_type (void)
|
||||
{
|
||||
static GtkType e_day_view_type = 0;
|
||||
|
||||
if (!e_day_view_type){
|
||||
GtkTypeInfo e_day_view_info = {
|
||||
"EDayView",
|
||||
sizeof (EDayView),
|
||||
sizeof (EDayViewClass),
|
||||
(GtkClassInitFunc) e_day_view_class_init,
|
||||
(GtkObjectInitFunc) e_day_view_init,
|
||||
NULL, /* reserved 1 */
|
||||
NULL, /* reserved 2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
parent_class = gtk_type_class (GTK_TYPE_TABLE);
|
||||
e_day_view_type = gtk_type_unique (GTK_TYPE_TABLE,
|
||||
&e_day_view_info);
|
||||
}
|
||||
|
||||
return e_day_view_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_day_view, "EDayView", EDayView, e_day_view_class_init,
|
||||
e_day_view_init, GTK_TYPE_TABLE);
|
||||
|
||||
static void
|
||||
e_day_view_class_init (EDayViewClass *class)
|
||||
@ -509,6 +485,7 @@ e_day_view_class_init (EDayViewClass *class)
|
||||
GtkObjectClass *object_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
object_class = (GtkObjectClass *) class;
|
||||
widget_class = (GtkWidgetClass *) class;
|
||||
|
||||
|
||||
@ -106,30 +106,8 @@ static void ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url,
|
||||
|
||||
static GtkVBoxClass *parent_class = NULL;
|
||||
|
||||
|
||||
GtkType
|
||||
e_itip_control_get_type (void)
|
||||
{
|
||||
static GtkType type = 0;
|
||||
|
||||
if (type == 0) {
|
||||
static const GtkTypeInfo info =
|
||||
{
|
||||
"EItipControl",
|
||||
sizeof (EItipControl),
|
||||
sizeof (EItipControlClass),
|
||||
(GtkClassInitFunc) class_init,
|
||||
(GtkObjectInitFunc) init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
type = gtk_type_unique (gtk_vbox_get_type (), &info);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
E_MAKE_TYPE (e_itip_control, "EItipControl", EItipControl, class_init, init,
|
||||
GTK_TYPE_VBOX);
|
||||
|
||||
static void
|
||||
class_init (EItipControlClass *klass)
|
||||
@ -138,7 +116,7 @@ class_init (EItipControlClass *klass)
|
||||
|
||||
object_class = GTK_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = gtk_type_class (gtk_vbox_get_type ());
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->destroy = destroy;
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gal/util/e-util.h>
|
||||
#include "e-meeting-attendee.h"
|
||||
|
||||
struct _EMeetingAttendeePrivate {
|
||||
@ -72,31 +73,8 @@ static void destroy (GtkObject *obj);
|
||||
|
||||
static GtkObjectClass *parent_class = NULL;
|
||||
|
||||
|
||||
GtkType
|
||||
e_meeting_attendee_get_type (void)
|
||||
{
|
||||
static GtkType type = 0;
|
||||
|
||||
if (type == 0)
|
||||
{
|
||||
static const GtkTypeInfo info =
|
||||
{
|
||||
"EMeetingAttendee",
|
||||
sizeof (EMeetingAttendee),
|
||||
sizeof (EMeetingAttendeeClass),
|
||||
(GtkClassInitFunc) class_init,
|
||||
(GtkObjectInitFunc) init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
type = gtk_type_unique (gtk_object_get_type (), &info);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
E_MAKE_TYPE (e_meeting_attendee, "EMeetingAttendee", EMeetingAttendee,
|
||||
class_init, init, GTK_TYPE_OBJECT);
|
||||
|
||||
static void
|
||||
class_init (EMeetingAttendeeClass *klass)
|
||||
@ -105,7 +83,7 @@ class_init (EMeetingAttendeeClass *klass)
|
||||
|
||||
object_class = GTK_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = gtk_type_class (gtk_object_get_type ());
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
signals[CHANGED] =
|
||||
gtk_signal_new ("changed",
|
||||
|
||||
@ -132,30 +132,8 @@ static void table_destroy_list_cb (ETableScrolled *etable, gpointer data);
|
||||
|
||||
static ETableModelClass *parent_class = NULL;
|
||||
|
||||
GtkType
|
||||
e_meeting_model_get_type (void)
|
||||
{
|
||||
static GtkType type = 0;
|
||||
|
||||
if (type == 0)
|
||||
{
|
||||
static const GtkTypeInfo info =
|
||||
{
|
||||
"EMeetingModel",
|
||||
sizeof (EMeetingModel),
|
||||
sizeof (EMeetingModelClass),
|
||||
(GtkClassInitFunc) class_init,
|
||||
(GtkObjectInitFunc) init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
type = gtk_type_unique (e_table_model_get_type (), &info);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
E_MAKE_TYPE (e_meeting_model, "EMeetingModel", EMeetingModel,
|
||||
class_init, init, E_TABLE_MODEL_TYPE);
|
||||
|
||||
static void
|
||||
book_open_cb (EBook *book, EBookStatus status, gpointer data)
|
||||
@ -649,7 +627,7 @@ class_init (EMeetingModelClass *klass)
|
||||
object_class = GTK_OBJECT_CLASS (klass);
|
||||
etm_class = E_TABLE_MODEL_CLASS (klass);
|
||||
|
||||
parent_class = gtk_type_class (E_TABLE_MODEL_TYPE);
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->destroy = destroy;
|
||||
|
||||
|
||||
@ -104,30 +104,9 @@ enum {
|
||||
ARG_MEETING_TIME_SELECTOR
|
||||
};
|
||||
|
||||
|
||||
GtkType
|
||||
e_meeting_time_selector_item_get_type (void)
|
||||
{
|
||||
static GtkType e_meeting_time_selector_item_type = 0;
|
||||
|
||||
if (!e_meeting_time_selector_item_type) {
|
||||
GtkTypeInfo e_meeting_time_selector_item_info = {
|
||||
"EMeetingTimeSelectorItem",
|
||||
sizeof (EMeetingTimeSelectorItem),
|
||||
sizeof (EMeetingTimeSelectorItemClass),
|
||||
(GtkClassInitFunc) e_meeting_time_selector_item_class_init,
|
||||
(GtkObjectInitFunc) e_meeting_time_selector_item_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
e_meeting_time_selector_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_meeting_time_selector_item_info);
|
||||
}
|
||||
|
||||
return e_meeting_time_selector_item_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_meeting_time_selector_item, "EMeetingTimeSelectorItem", EMeetingTimeSelectorItem,
|
||||
e_meeting_time_selector_item_class_init, e_meeting_time_selector_item_init,
|
||||
GNOME_TYPE_CANVAS_ITEM);
|
||||
|
||||
static void
|
||||
e_meeting_time_selector_item_class_init (EMeetingTimeSelectorItemClass *mts_item_class)
|
||||
@ -135,7 +114,7 @@ e_meeting_time_selector_item_class_init (EMeetingTimeSelectorItemClass *mts_item
|
||||
GtkObjectClass *object_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type());
|
||||
parent_class = g_type_class_peek_parent (mts_item_class);
|
||||
|
||||
object_class = (GtkObjectClass *) mts_item_class;
|
||||
item_class = (GnomeCanvasItemClass *) mts_item_class;
|
||||
|
||||
@ -218,31 +218,9 @@ static void sort_info_changed_cb (ETableSortInfo *info, gpointer data);
|
||||
|
||||
static GtkTableClass *parent_class;
|
||||
|
||||
|
||||
GtkType
|
||||
e_meeting_time_selector_get_type (void)
|
||||
{
|
||||
static guint e_meeting_time_selector_type = 0;
|
||||
|
||||
if (!e_meeting_time_selector_type) {
|
||||
GtkTypeInfo e_meeting_time_selector_info =
|
||||
{
|
||||
"EMeetingTimeSelector",
|
||||
sizeof (EMeetingTimeSelector),
|
||||
sizeof (EMeetingTimeSelectorClass),
|
||||
(GtkClassInitFunc) e_meeting_time_selector_class_init,
|
||||
(GtkObjectInitFunc) e_meeting_time_selector_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
e_meeting_time_selector_type = gtk_type_unique (GTK_TYPE_TABLE,
|
||||
&e_meeting_time_selector_info);
|
||||
}
|
||||
return e_meeting_time_selector_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_meeting_time_selector, "EMeetingTimeSelector", EMeetingTimeSelector,
|
||||
e_meeting_time_selector_class_init, e_meeting_time_selector_init,
|
||||
GTK_TYPE_TABLE);
|
||||
|
||||
static void
|
||||
e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * klass)
|
||||
@ -250,7 +228,7 @@ e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * klass)
|
||||
GtkObjectClass *object_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_table_get_type());
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
object_class = (GtkObjectClass *) klass;
|
||||
widget_class = (GtkWidgetClass *) klass;
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
#include <gtk/gtkentry.h>
|
||||
#include <gtk/gtksignal.h>
|
||||
#include <gnome.h>
|
||||
#include <gal/util/e-util.h>
|
||||
#include <gal/widgets/e-unicode.h>
|
||||
#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
|
||||
#include "e-timezone-entry.h"
|
||||
@ -87,34 +88,8 @@ static void e_timezone_entry_set_entry_visibility (ETimezoneEntry *tentry);
|
||||
static GtkHBoxClass *parent_class;
|
||||
static guint timezone_entry_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
||||
/**
|
||||
* e_timezone_entry_get_type:
|
||||
*
|
||||
* Returns the GtkType for the ETimezoneEntry widget
|
||||
*/
|
||||
guint
|
||||
e_timezone_entry_get_type (void)
|
||||
{
|
||||
static guint timezone_entry_type = 0;
|
||||
|
||||
if (!timezone_entry_type){
|
||||
GtkTypeInfo timezone_entry_info = {
|
||||
"ETimezoneEntry",
|
||||
sizeof (ETimezoneEntry),
|
||||
sizeof (ETimezoneEntryClass),
|
||||
(GtkClassInitFunc) e_timezone_entry_class_init,
|
||||
(GtkObjectInitFunc) e_timezone_entry_init,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
timezone_entry_type = gtk_type_unique (gtk_hbox_get_type (), &timezone_entry_info);
|
||||
}
|
||||
|
||||
return timezone_entry_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_timezone_entry, "ETimezoneEntry", ETimezoneEntry,
|
||||
e_timezone_entry_class_init, e_timezone_entry_init, GTK_TYPE_HBOX);
|
||||
|
||||
static void
|
||||
e_timezone_entry_class_init (ETimezoneEntryClass *class)
|
||||
@ -123,7 +98,7 @@ e_timezone_entry_class_init (ETimezoneEntryClass *class)
|
||||
|
||||
object_class = (GtkObjectClass*) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_hbox_get_type ());
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
timezone_entry_signals[CHANGED] =
|
||||
gtk_signal_new ("changed",
|
||||
|
||||
@ -62,7 +62,7 @@ struct _ETimezoneEntryClass {
|
||||
void (* changed) (ETimezoneEntry *tentry);
|
||||
};
|
||||
|
||||
guint e_timezone_entry_get_type (void);
|
||||
GType e_timezone_entry_get_type (void);
|
||||
GtkWidget* e_timezone_entry_new (void);
|
||||
|
||||
icaltimezone* e_timezone_entry_get_timezone (ETimezoneEntry *tentry);
|
||||
|
||||
@ -98,30 +98,9 @@ enum {
|
||||
ARG_SPAN_NUM
|
||||
};
|
||||
|
||||
|
||||
GtkType
|
||||
e_week_view_event_item_get_type (void)
|
||||
{
|
||||
static GtkType e_week_view_event_item_type = 0;
|
||||
|
||||
if (!e_week_view_event_item_type) {
|
||||
GtkTypeInfo e_week_view_event_item_info = {
|
||||
"EWeekViewEventItem",
|
||||
sizeof (EWeekViewEventItem),
|
||||
sizeof (EWeekViewEventItemClass),
|
||||
(GtkClassInitFunc) e_week_view_event_item_class_init,
|
||||
(GtkObjectInitFunc) e_week_view_event_item_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
e_week_view_event_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_week_view_event_item_info);
|
||||
}
|
||||
|
||||
return e_week_view_event_item_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_week_view_event_item, "EWeekViewEventItem", EWeekViewEventItem,
|
||||
e_week_view_event_item_class_init, e_week_view_event_item_init,
|
||||
GNOME_TYPE_CANVAS_ITEM);
|
||||
|
||||
static void
|
||||
e_week_view_event_item_class_init (EWeekViewEventItemClass *class)
|
||||
@ -129,7 +108,7 @@ e_week_view_event_item_class_init (EWeekViewEventItemClass *class)
|
||||
GtkObjectClass *object_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type());
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
@ -72,30 +72,9 @@ enum {
|
||||
ARG_WEEK_VIEW
|
||||
};
|
||||
|
||||
|
||||
GtkType
|
||||
e_week_view_main_item_get_type (void)
|
||||
{
|
||||
static GtkType e_week_view_main_item_type = 0;
|
||||
|
||||
if (!e_week_view_main_item_type) {
|
||||
GtkTypeInfo e_week_view_main_item_info = {
|
||||
"EWeekViewMainItem",
|
||||
sizeof (EWeekViewMainItem),
|
||||
sizeof (EWeekViewMainItemClass),
|
||||
(GtkClassInitFunc) e_week_view_main_item_class_init,
|
||||
(GtkObjectInitFunc) e_week_view_main_item_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
e_week_view_main_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_week_view_main_item_info);
|
||||
}
|
||||
|
||||
return e_week_view_main_item_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_week_view_main_item, "EWeekViewMainItem", EWeekViewMainItem,
|
||||
e_week_view_main_item_class_init, e_week_view_main_item_init,
|
||||
GNOME_TYPE_CANVAS_ITEM);
|
||||
|
||||
static void
|
||||
e_week_view_main_item_class_init (EWeekViewMainItemClass *class)
|
||||
@ -103,7 +82,7 @@ e_week_view_main_item_class_init (EWeekViewMainItemClass *class)
|
||||
GtkObjectClass *object_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type());
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
@ -61,30 +61,9 @@ enum {
|
||||
ARG_WEEK_VIEW
|
||||
};
|
||||
|
||||
|
||||
GtkType
|
||||
e_week_view_titles_item_get_type (void)
|
||||
{
|
||||
static GtkType e_week_view_titles_item_type = 0;
|
||||
|
||||
if (!e_week_view_titles_item_type) {
|
||||
GtkTypeInfo e_week_view_titles_item_info = {
|
||||
"EWeekViewTitlesItem",
|
||||
sizeof (EWeekViewTitlesItem),
|
||||
sizeof (EWeekViewTitlesItemClass),
|
||||
(GtkClassInitFunc) e_week_view_titles_item_class_init,
|
||||
(GtkObjectInitFunc) e_week_view_titles_item_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
e_week_view_titles_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_week_view_titles_item_info);
|
||||
}
|
||||
|
||||
return e_week_view_titles_item_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_week_view_titles_item, "EWeekViewTitlesItem", EWeekViewTitlesItem,
|
||||
e_week_view_titles_item_class_init, e_week_view_titles_item_init,
|
||||
GNOME_TYPE_CANVAS_ITEM);
|
||||
|
||||
static void
|
||||
e_week_view_titles_item_class_init (EWeekViewTitlesItemClass *class)
|
||||
@ -92,7 +71,7 @@ e_week_view_titles_item_class_init (EWeekViewTitlesItemClass *class)
|
||||
GtkObjectClass *object_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type());
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
@ -243,32 +243,8 @@ static gboolean e_week_view_layout_timeout_cb (gpointer data);
|
||||
static GtkTableClass *parent_class;
|
||||
static GdkAtom clipboard_atom = GDK_NONE;
|
||||
|
||||
|
||||
GtkType
|
||||
e_week_view_get_type (void)
|
||||
{
|
||||
static GtkType e_week_view_type = 0;
|
||||
|
||||
if (!e_week_view_type){
|
||||
GtkTypeInfo e_week_view_info = {
|
||||
"EWeekView",
|
||||
sizeof (EWeekView),
|
||||
sizeof (EWeekViewClass),
|
||||
(GtkClassInitFunc) e_week_view_class_init,
|
||||
(GtkObjectInitFunc) e_week_view_init,
|
||||
NULL, /* reserved 1 */
|
||||
NULL, /* reserved 2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
parent_class = gtk_type_class (GTK_TYPE_TABLE);
|
||||
e_week_view_type = gtk_type_unique (GTK_TYPE_TABLE,
|
||||
&e_week_view_info);
|
||||
}
|
||||
|
||||
return e_week_view_type;
|
||||
}
|
||||
|
||||
E_MAKE_TYPE (e_week_view, "EWeekView", EWeekView, e_week_view_class_init,
|
||||
e_week_view_init, GTK_TYPE_TABLE);
|
||||
|
||||
static void
|
||||
e_week_view_class_init (EWeekViewClass *class)
|
||||
@ -276,6 +252,7 @@ e_week_view_class_init (EWeekViewClass *class)
|
||||
GtkObjectClass *object_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
object_class = (GtkObjectClass *) class;
|
||||
widget_class = (GtkWidgetClass *) class;
|
||||
|
||||
|
||||
@ -195,28 +195,8 @@ static GtkVBoxClass *parent_class;
|
||||
|
||||
|
||||
|
||||
GtkType
|
||||
gnome_calendar_get_type (void)
|
||||
{
|
||||
static GtkType gnome_calendar_type = 0;
|
||||
|
||||
if (!gnome_calendar_type) {
|
||||
static const GtkTypeInfo gnome_calendar_info = {
|
||||
"GnomeCalendar",
|
||||
sizeof (GnomeCalendar),
|
||||
sizeof (GnomeCalendarClass),
|
||||
(GtkClassInitFunc) gnome_calendar_class_init,
|
||||
(GtkObjectInitFunc) gnome_calendar_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
gnome_calendar_type = gtk_type_unique (GTK_TYPE_VBOX, &gnome_calendar_info);
|
||||
}
|
||||
|
||||
return gnome_calendar_type;
|
||||
}
|
||||
E_MAKE_TYPE (gnome_calendar, "GnomeCalendar", GnomeCalendar, gnome_calendar_class_init,
|
||||
gnome_calendar_init, GTK_TYPE_VBOX);
|
||||
|
||||
/* Class initialization function for the gnome calendar */
|
||||
static void
|
||||
@ -226,7 +206,7 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
|
||||
parent_class = gtk_type_class (GTK_TYPE_VBOX);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
gnome_calendar_signals[DATES_SHOWN_CHANGED] =
|
||||
gtk_signal_new ("dates_shown_changed",
|
||||
@ -1385,6 +1365,7 @@ gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic)
|
||||
gal_view_collection_load (collection);
|
||||
}
|
||||
|
||||
g_print ("Making GAL view instance.\n");
|
||||
priv->view_instance = gal_view_instance_new (collection, cal_client_get_uri (priv->client));
|
||||
|
||||
priv->view_menus = gal_view_menus_new (priv->view_instance);
|
||||
|
||||
@ -59,8 +59,6 @@ init_bonobo (int argc, char **argv)
|
||||
bonobo_activation_popt_options, 0, NULL) != 0)
|
||||
g_error (_("Could not initialize GNOME"));
|
||||
|
||||
bonobo_activation_init (argc, argv);
|
||||
|
||||
if (bonobo_init (&argc, argv) == FALSE)
|
||||
g_error (_("Could not initialize Bonobo"));
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
#include <libgnome/gnome-i18n.h>
|
||||
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
|
||||
#include <libgnomecanvas/gnome-canvas-text.h>
|
||||
#include <gal/util/e-util.h>
|
||||
#include "weekday-picker.h"
|
||||
|
||||
|
||||
@ -76,36 +77,8 @@ static guint wp_signals[LAST_SIGNAL];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* weekday_picker_get_type:
|
||||
*
|
||||
* Registers the #WeekdayPicker class if necessary, and returns the type ID
|
||||
* associated to it.
|
||||
*
|
||||
* Return value: The type ID of the #WeekdayPicker class.
|
||||
**/
|
||||
GtkType
|
||||
weekday_picker_get_type (void)
|
||||
{
|
||||
static GtkType weekday_picker_type = 0;
|
||||
|
||||
if (!weekday_picker_type) {
|
||||
static const GtkTypeInfo weekday_picker_info = {
|
||||
"WeekdayPicker",
|
||||
sizeof (WeekdayPicker),
|
||||
sizeof (WeekdayPickerClass),
|
||||
(GtkClassInitFunc) weekday_picker_class_init,
|
||||
(GtkObjectInitFunc) weekday_picker_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
weekday_picker_type = gtk_type_unique (GNOME_TYPE_CANVAS, &weekday_picker_info);
|
||||
}
|
||||
|
||||
return weekday_picker_type;
|
||||
}
|
||||
E_MAKE_TYPE (weekday_picker, "WeekdayPicker", WeekdayPicker,
|
||||
weekday_picker_class_init, weekday_picker_init, GNOME_TYPE_CANVAS);
|
||||
|
||||
/* Class initialization function for the weekday picker */
|
||||
static void
|
||||
@ -117,7 +90,7 @@ weekday_picker_class_init (WeekdayPickerClass *class)
|
||||
object_class = (GtkObjectClass *) class;
|
||||
widget_class = (GtkWidgetClass *) class;
|
||||
|
||||
parent_class = gtk_type_class (GNOME_TYPE_CANVAS);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
wp_signals[CHANGED] =
|
||||
gtk_signal_new ("changed",
|
||||
|
||||
Reference in New Issue
Block a user