aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog52
-rw-r--r--calendar/gui/cal-search-bar.c2
-rw-r--r--calendar/gui/calendar-commands.c2
-rw-r--r--calendar/gui/calendar-component.c2
-rw-r--r--calendar/gui/calendar-config.c6
-rw-r--r--calendar/gui/calendar-model.c26
-rw-r--r--calendar/gui/calendar-view-factory.c2
-rw-r--r--calendar/gui/calendar-view.c4
-rw-r--r--calendar/gui/comp-editor-factory.c8
-rw-r--r--calendar/gui/comp-util.c2
-rw-r--r--calendar/gui/component-factory.c2
-rw-r--r--calendar/gui/e-calendar-table.c22
-rw-r--r--calendar/gui/e-cell-date-edit-text.c2
-rw-r--r--calendar/gui/e-comp-editor-registry.c2
-rw-r--r--calendar/gui/e-day-view.c52
-rw-r--r--calendar/gui/e-itip-control.c38
-rw-r--r--calendar/gui/e-meeting-attendee.c4
-rw-r--r--calendar/gui/e-meeting-model.c32
-rw-r--r--calendar/gui/e-meeting-time-sel.c4
-rw-r--r--calendar/gui/e-tasks.c20
-rw-r--r--calendar/gui/e-timezone-entry.c4
-rw-r--r--calendar/gui/e-week-view.c44
-rw-r--r--calendar/gui/gnome-cal.c34
-rw-r--r--calendar/gui/goto.c2
-rw-r--r--calendar/gui/itip-utils.c8
-rw-r--r--calendar/gui/print.c44
-rw-r--r--calendar/gui/tasks-control.c6
-rw-r--r--calendar/gui/tasks-migrate.c12
-rw-r--r--calendar/gui/weekday-picker.c2
29 files changed, 246 insertions, 194 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f9e42b9bf3..729ac4530d 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,57 @@
2002-11-08 Ettore Perazzoli <ettore@ximian.com>
+ * calendar-commands.c: Use g_object_ref()/g_object_unref() instead
+ of gtk_object_ref/gtk_object_unref().
+ * calendar-config.c: Likewise.
+ * calendar-model.c: Likewise.
+ * comp-editor-factory.c: Likewise.
+ * comp-util.c: Likewise.
+ * e-calendar-table.c: Likewise.
+ * e-day-view.c: Likewise.
+ * e-itip-control.c: Likewise.
+ * e-meeting-model.c: Likewise.
+ * e-meeting-time-sel.c: Likewise.
+ * e-tasks.c: Likewise.
+ * e-timezone-entry.c: Likewise.
+ * e-week-view.c: Likewise.
+ * gnome-cal.c: Likewise.
+ * goto.c: Likewise.
+ * itip-utils.c: Likewise.
+ * print.c: Likewise.
+ * tasks-control.c: Likewise.
+ * tasks-migrate.c: Likewise.
+
+ * gui/cal-search-bar.c: Use g_object_new() instead of
+ gtk_type_new().
+ * gui/calendar-model.c: Likewise.
+ * gui/calendar-view-factory.c: Likewise.
+ * gui/calendar-view.c: Likewise.
+ * gui/calendar-view.c: Likewise.
+ * gui/comp-editor-factory.c: Likewise.
+ * gui/e-calendar-table.c: Likewise.
+ * gui/e-cell-date-edit-text.c: Likewise.
+ * gui/e-comp-editor-registry.c: Likewise.
+ * gui/e-day-view.c: Likewise.
+ * gui/e-itip-control.c: Likewise.
+ * gui/e-meeting-attendee.c: Likewise.
+ * gui/e-meeting-attendee.c: Likewise.
+ * gui/e-meeting-model.c: Likewise.
+ * gui/e-meeting-time-sel.c: Likewise.
+ * gui/e-tasks.c: Likewise.
+ * gui/e-timezone-entry.c: Likewise.
+ * gui/e-week-view.c: Likewise.
+ * gui/gnome-cal.c: Likewise.
+ * gui/weekday-picker.c: Likewise.
+
+ * gui/e-itip-control.c (get_servers): g_object_unref the
+ shell_client instead of using bonobo_object_unref().
+
+ * gui/component-factory.c (owner_set_cb): Use
+ evolution_shell_client_corba_objref() instead of
+ bonobo_object_corba_objref().
+
+2002-11-08 Ettore Perazzoli <ettore@ximian.com>
+
* gui/calendar-commands.c: Use g_signal_connect() instead of
gtk_signal_connect().
* calendar-commands.c: Likewise.
diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c
index f0e473ec1d..e19c99e78f 100644
--- a/calendar/gui/cal-search-bar.c
+++ b/calendar/gui/cal-search-bar.c
@@ -452,7 +452,7 @@ cal_search_bar_new (void)
{
CalSearchBar *cal_search;
- cal_search = gtk_type_new (TYPE_CAL_SEARCH_BAR);
+ cal_search = g_object_new (TYPE_CAL_SEARCH_BAR, NULL);
return GTK_WIDGET (cal_search_bar_construct (cal_search));
}
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 90fbb796a2..6888fad5a4 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -316,7 +316,7 @@ publish_freebusy_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
CalComponent *comp = CAL_COMPONENT (l->data);
itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp, client, NULL);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
g_list_free (comp_list);
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 27fdbc7ee1..5b782fa3d6 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -523,7 +523,7 @@ owner_set_cb (EvolutionShellComponent *shell_component,
global_shell_client = shell_client;
- config_control_factory_register (bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)));
+ config_control_factory_register (evolution_shell_client_corba_objref (shell_client));
}
static void
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 648959c838..b60788b20f 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -54,7 +54,7 @@ static gboolean on_timezone_dialog_delete_event (GnomeDialog *dialog,
static void
do_cleanup (void)
{
- gtk_object_unref (GTK_OBJECT (config));
+ g_object_unref (config);
config = NULL;
}
@@ -689,7 +689,7 @@ on_timezone_set (GnomeDialog *dialog,
e_tasks_update_all_config_settings ();
}
- gtk_object_unref (GTK_OBJECT (etd));
+ g_object_unref (etd);
}
@@ -698,7 +698,7 @@ on_timezone_dialog_delete_event (GnomeDialog *dialog,
GdkEvent *event,
ETimezoneDialog *etd)
{
- gtk_object_unref (GTK_OBJECT (etd));
+ g_object_unref (etd);
return TRUE;
}
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c
index deb23e1cc3..01fa60784c 100644
--- a/calendar/gui/calendar-model.c
+++ b/calendar/gui/calendar-model.c
@@ -295,7 +295,7 @@ free_objects (CalendarModel *model)
comp = g_array_index (priv->objects, CalComponent *, i);
g_assert (comp != NULL);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
object_data = &g_array_index (priv->objects_data,
CalendarModelObjectData, i);
@@ -328,7 +328,7 @@ calendar_model_destroy (GtkObject *object)
if (priv->client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), model);
- gtk_object_unref (GTK_OBJECT (priv->client));
+ g_object_unref (priv->client);
priv->client = NULL;
}
@@ -339,7 +339,7 @@ calendar_model_destroy (GtkObject *object)
if (priv->query) {
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->query), model);
- gtk_object_unref (GTK_OBJECT (priv->query));
+ g_object_unref (priv->query);
priv->query = NULL;
}
@@ -361,7 +361,7 @@ calendar_model_destroy (GtkObject *object)
itip_addresses_free (priv->addresses);
if (priv->activity) {
- gtk_object_unref (GTK_OBJECT (priv->activity));
+ g_object_unref (priv->activity);
priv->activity = NULL;
}
@@ -1414,7 +1414,7 @@ calendar_model_append_row (ETableModel *etm, ETableModel *source, gint row)
g_message ("calendar_model_append_row(): Could not add new object!");
}
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
/* Duplicates a string value */
@@ -1480,7 +1480,7 @@ calendar_model_duplicate_value (ETableModel *etm, int col, const void *value)
CalComponent *comp;
comp = CAL_COMPONENT (value);
- gtk_object_ref (GTK_OBJECT (comp));
+ g_object_ref (comp);
return comp;
}
@@ -1536,7 +1536,7 @@ calendar_model_free_value (ETableModel *etm, int col, void *value)
case CAL_COMPONENT_FIELD_COMPONENT:
if (value)
- gtk_object_unref (GTK_OBJECT (value));
+ g_object_unref (value);
break;
default:
@@ -1761,7 +1761,7 @@ calendar_model_value_to_string (ETableModel *etm, int col, const void *value)
CalendarModel *
calendar_model_new (void)
{
- return CALENDAR_MODEL (gtk_type_new (TYPE_CALENDAR_MODEL));
+ return CALENDAR_MODEL (g_object_new (TYPE_CALENDAR_MODEL, NULL));
}
@@ -1985,7 +1985,7 @@ update_query (CalendarModel *model)
if (old_query) {
gtk_signal_disconnect_by_data (GTK_OBJECT (old_query), model);
- gtk_object_unref (GTK_OBJECT (old_query));
+ g_object_unref (old_query);
}
g_assert (priv->sexp != NULL);
@@ -2080,7 +2080,7 @@ remove_object (CalendarModel *model, const char *uid)
calendar_model_free_object_data (model, object_data);
g_array_remove_index (priv->objects_data, *idx);
- gtk_object_unref (GTK_OBJECT (orig_comp));
+ g_object_unref (orig_comp);
n = *idx;
g_free (idx);
@@ -2104,7 +2104,7 @@ calendar_model_set_status_message (CalendarModel *model, const char *message)
if (!message || !*message) {
if (priv->activity) {
- gtk_object_unref (GTK_OBJECT (priv->activity));
+ g_object_unref (priv->activity);
priv->activity = NULL;
}
}
@@ -2172,11 +2172,11 @@ calendar_model_set_cal_client (CalendarModel *model, CalClient *client, CalObjTy
return;
if (client)
- gtk_object_ref (GTK_OBJECT (client));
+ g_object_ref (client);
if (priv->client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), model);
- gtk_object_unref (GTK_OBJECT (priv->client));
+ g_object_unref (priv->client);
}
priv->client = client;
diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c
index e0e223d8df..e4521e4436 100644
--- a/calendar/gui/calendar-view-factory.c
+++ b/calendar/gui/calendar-view-factory.c
@@ -246,6 +246,6 @@ calendar_view_factory_new (GnomeCalendarViewType view_type)
{
CalendarViewFactory *cal_view_factory;
- cal_view_factory = gtk_type_new (TYPE_CALENDAR_VIEW_FACTORY);
+ cal_view_factory = g_object_new (TYPE_CALENDAR_VIEW_FACTORY, NULL);
return calendar_view_factory_construct (cal_view_factory, view_type);
}
diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c
index 7ab5e9f13c..ebaf1ee9c5 100644
--- a/calendar/gui/calendar-view.c
+++ b/calendar/gui/calendar-view.c
@@ -237,7 +237,7 @@ calendar_view_clone (GalView *view)
cal_view = CALENDAR_VIEW (view);
priv = cal_view->priv;
- new_view = gtk_type_new (TYPE_CALENDAR_VIEW);
+ new_view = g_object_new (TYPE_CALENDAR_VIEW, NULL);
new_priv = new_view->priv;
new_priv->view_type = priv->view_type;
@@ -291,7 +291,7 @@ calendar_view_new (GnomeCalendarViewType view_type, const char *title)
{
CalendarView *cal_view;
- cal_view = gtk_type_new (TYPE_CALENDAR_VIEW);
+ cal_view = g_object_new (TYPE_CALENDAR_VIEW, NULL);
return calendar_view_construct (cal_view, view_type, title);
}
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
index eaccb722c5..eea785df33 100644
--- a/calendar/gui/comp-editor-factory.c
+++ b/calendar/gui/comp-editor-factory.c
@@ -158,7 +158,7 @@ free_client (OpenClient *oc)
g_free (oc->uri);
oc->uri = NULL;
- gtk_object_unref (GTK_OBJECT (oc->client));
+ g_object_unref (oc->client);
oc->client = NULL;
for (l = oc->pending; l; l = l->next) {
@@ -281,7 +281,7 @@ edit_existing (OpenClient *oc, const char *uid)
default:
g_message ("edit_exiting(): Unsupported object type %d", (int) vtype);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
return;
}
@@ -501,7 +501,7 @@ open_client (CompEditorFactory *factory, const char *uristr)
if (!cal_client_open_calendar (oc->client, uristr, FALSE)) {
g_free (oc->uri);
- gtk_object_unref (GTK_OBJECT (oc->client));
+ g_object_unref (oc->client);
g_free (oc);
return NULL;
@@ -644,7 +644,7 @@ impl_editNew (PortableServer_Servant servant,
CompEditorFactory *
comp_editor_factory_new (void)
{
- return gtk_type_new (TYPE_COMP_EDITOR_FACTORY);
+ return g_object_new (TYPE_COMP_EDITOR_FACTORY, NULL);
}
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 46331fa265..5e1b5799d2 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -229,7 +229,7 @@ cal_comp_is_on_server (CalComponent *comp, CalClient *client)
switch (status) {
case CAL_CLIENT_GET_SUCCESS:
- gtk_object_unref (GTK_OBJECT (server_comp));
+ g_object_unref (server_comp);
return TRUE;
case CAL_CLIENT_GET_SYNTAX_ERROR:
diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c
index 27fdbc7ee1..5b782fa3d6 100644
--- a/calendar/gui/component-factory.c
+++ b/calendar/gui/component-factory.c
@@ -523,7 +523,7 @@ owner_set_cb (EvolutionShellComponent *shell_component,
global_shell_client = shell_client;
- config_control_factory_register (bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)));
+ config_control_factory_register (evolution_shell_client_corba_objref (shell_client));
}
static void
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index 06a876ae1c..cf24e19700 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -365,7 +365,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
popup_cell = e_cell_date_edit_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
e_table_extras_add_cell (extras, "dateedit", popup_cell);
cal_table->dates_cell = E_CELL_DATE_EDIT (popup_cell);
@@ -389,7 +389,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
popup_cell = e_cell_combo_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
strings = NULL;
strings = g_list_append (strings, (char*) _("Public"));
@@ -411,7 +411,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
popup_cell = e_cell_combo_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
strings = NULL;
strings = g_list_append (strings, (char*) _("High"));
@@ -433,7 +433,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
popup_cell = e_cell_combo_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
strings = NULL;
strings = g_list_append (strings, (char*) _("0%"));
@@ -463,7 +463,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
popup_cell = e_cell_combo_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
strings = NULL;
strings = g_list_append (strings, (char*) _("Free"));
@@ -484,7 +484,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
popup_cell = e_cell_combo_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
strings = NULL;
strings = g_list_append (strings, (char*) _("Not Started"));
@@ -531,7 +531,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
extras,
EVOLUTION_ETSPECDIR "/e-calendar-table.etspec",
NULL);
- gtk_object_unref (GTK_OBJECT (extras));
+ g_object_unref (extras);
cal_table->etable = table;
gtk_table_attach (GTK_TABLE (cal_table), table, 0, 1, 0, 1,
@@ -574,7 +574,7 @@ e_calendar_table_new (void)
{
GtkWidget *cal_table;
- cal_table = GTK_WIDGET (gtk_type_new (e_calendar_table_get_type ()));
+ cal_table = GTK_WIDGET (g_object_new (e_calendar_table_get_type (), NULL));
return cal_table;
}
@@ -605,7 +605,7 @@ e_calendar_table_destroy (GtkObject *object)
cal_table = E_CALENDAR_TABLE (object);
- gtk_object_unref (GTK_OBJECT (cal_table->model));
+ g_object_unref (cal_table->model);
cal_table->model = NULL;
if (cal_table->invisible)
@@ -1287,7 +1287,7 @@ selection_received (GtkWidget *invisible,
calendar_model_get_cal_client (cal_table->model),
tmp_comp);
free (uid);
- gtk_object_unref (GTK_OBJECT (tmp_comp));
+ g_object_unref (tmp_comp);
}
subcomp = icalcomponent_get_next_component (
vcal_comp, ICAL_ANY_COMPONENT);
@@ -1303,7 +1303,7 @@ selection_received (GtkWidget *invisible,
cal_client_update_object (
calendar_model_get_cal_client (cal_table->model),
comp);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
calendar_model_set_status_message (e_calendar_table_get_model (cal_table), NULL);
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
index e63db929ac..94f90c1c2a 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -222,7 +222,7 @@ ECell *
e_cell_date_edit_text_new (const char *fontname,
GtkJustification justify)
{
- ECellDateEditText *ecd = gtk_type_new (e_cell_date_edit_text_get_type ());
+ ECellDateEditText *ecd = g_object_new (e_cell_date_edit_text_get_type (), NULL);
e_cell_text_construct (E_CELL_TEXT (ecd), fontname, justify);
diff --git a/calendar/gui/e-comp-editor-registry.c b/calendar/gui/e-comp-editor-registry.c
index e03c977735..ba02d3271e 100644
--- a/calendar/gui/e-comp-editor-registry.c
+++ b/calendar/gui/e-comp-editor-registry.c
@@ -110,7 +110,7 @@ e_comp_editor_registry_get_type (void)
GtkObject *
e_comp_editor_registry_new (void)
{
- return gtk_type_new (E_TYPE_COMP_EDITOR_REGISTRY);
+ return g_object_new (E_TYPE_COMP_EDITOR_REGISTRY, NULL);
}
void
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index c0c7e730c7..31f210e17e 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -895,7 +895,7 @@ e_day_view_new (void)
{
GtkWidget *day_view;
- day_view = GTK_WIDGET (gtk_type_new (e_day_view_get_type ()));
+ day_view = GTK_WIDGET (g_object_new (e_day_view_get_type (), NULL));
return day_view;
}
@@ -915,7 +915,7 @@ e_day_view_destroy (GtkObject *object)
if (day_view->client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->client), day_view);
- gtk_object_unref (GTK_OBJECT (day_view->client));
+ g_object_unref (day_view->client);
day_view->client = NULL;
}
@@ -926,7 +926,7 @@ e_day_view_destroy (GtkObject *object)
if (day_view->query) {
gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->query), day_view);
- gtk_object_unref (GTK_OBJECT (day_view->query));
+ g_object_unref (day_view->query);
day_view->query = NULL;
}
@@ -961,7 +961,7 @@ e_day_view_destroy (GtkObject *object)
}
if (day_view->activity) {
- gtk_object_unref (GTK_OBJECT (day_view->activity));
+ g_object_unref (day_view->activity);
day_view->activity = NULL;
}
@@ -1544,7 +1544,7 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
g_print ("updated object's dates unchanged\n");
#endif
e_day_view_foreach_event_with_uid (day_view, uid, e_day_view_update_event_cb, comp);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
gtk_widget_queue_draw (day_view->top_canvas);
gtk_widget_queue_draw (day_view->main_canvas);
return;
@@ -1566,7 +1566,7 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
e_day_view_add_event, day_view,
cal_client_resolve_tzid_cb, day_view->client,
day_view->zone);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
e_day_view_queue_layout (day_view);
}
@@ -1672,7 +1672,7 @@ update_query (EDayView *day_view)
if (old_query) {
gtk_signal_disconnect_by_data (GTK_OBJECT (old_query), day_view);
- gtk_object_unref (GTK_OBJECT (old_query));
+ g_object_unref (old_query);
}
g_assert (day_view->sexp != NULL);
@@ -1735,11 +1735,11 @@ e_day_view_set_cal_client (EDayView *day_view,
g_return_if_fail (IS_CAL_CLIENT (client));
if (client)
- gtk_object_ref (GTK_OBJECT (client));
+ g_object_ref (client);
if (day_view->client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->client), day_view);
- gtk_object_unref (GTK_OBJECT (day_view->client));
+ g_object_unref (day_view->client);
}
day_view->client = client;
@@ -1819,9 +1819,9 @@ e_day_view_update_event_cb (EDayView *day_view,
event_num);
}
- gtk_object_unref (GTK_OBJECT (event->comp));
+ g_object_unref (event->comp);
event->comp = comp;
- gtk_object_ref (GTK_OBJECT (comp));
+ g_object_ref (comp);
if (day == E_DAY_VIEW_LONG_EVENT) {
e_day_view_update_long_event_label (day_view, event_num);
@@ -1945,7 +1945,7 @@ e_day_view_remove_event_cb (EDayView *day_view,
if (event->canvas_item)
gtk_object_destroy (GTK_OBJECT (event->canvas_item));
- gtk_object_unref (GTK_OBJECT (event->comp));
+ g_object_unref (event->comp);
if (day == E_DAY_VIEW_LONG_EVENT) {
g_array_remove_index (day_view->long_events, event_num);
@@ -4075,7 +4075,7 @@ e_day_view_on_publish (GtkWidget *widget, gpointer data)
itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp,
day_view->client, NULL);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
g_list_free (comp_list);
@@ -4113,7 +4113,7 @@ e_day_view_on_delete_occurrence (GtkWidget *widget, gpointer data)
if (cal_client_update_object (day_view->client, comp) != CAL_CLIENT_RESULT_SUCCESS)
g_message ("e_day_view_on_delete_occurrence(): Could not update the object!");
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
static void
@@ -4308,12 +4308,12 @@ e_day_view_on_unrecur_appointment (GtkWidget *widget, gpointer data)
if (cal_client_update_object (day_view->client, comp) != CAL_CLIENT_RESULT_SUCCESS)
g_message ("e_day_view_on_unrecur_appointment(): Could not update the object!");
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
if (cal_client_update_object (day_view->client, new_comp) != CAL_CLIENT_RESULT_SUCCESS)
g_message ("e_day_view_on_unrecur_appointment(): Could not update the object!");
- gtk_object_unref (GTK_OBJECT (new_comp));
+ g_object_unref (new_comp);
}
@@ -4851,7 +4851,7 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
g_message ("e_day_view_finish_long_event_resize(): Could not update the object!");
}
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
@@ -4912,7 +4912,7 @@ e_day_view_finish_resize (EDayView *day_view)
g_message ("e_day_view_finish_resize(): Could not update the object!");
}
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
@@ -4984,7 +4984,7 @@ e_day_view_free_event_array (EDayView *day_view,
event = &g_array_index (array, EDayViewEvent, event_num);
if (event->canvas_item)
gtk_object_destroy (GTK_OBJECT (event->canvas_item));
- gtk_object_unref (GTK_OBJECT (event->comp));
+ g_object_unref (event->comp);
}
g_array_set_size (array, 0);
@@ -5024,7 +5024,7 @@ e_day_view_add_event (CalComponent *comp,
day_view->zone);
event.comp = comp;
- gtk_object_ref (GTK_OBJECT (comp));
+ g_object_ref (comp);
event.start = start;
event.end = end;
event.canvas_item = NULL;
@@ -5679,7 +5679,7 @@ e_day_view_key_press (GtkWidget *widget, GdkEventKey *event)
if (initial_text)
g_free (initial_text);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
return TRUE;
}
@@ -7313,7 +7313,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
"not update the object!");
}
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
return;
}
@@ -7427,7 +7427,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
"Could not update the object!");
}
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
return;
}
@@ -7585,7 +7585,7 @@ selection_received (GtkWidget *invisible,
cal_client_update_object (day_view->client, comp);
free (uid);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
subcomp = icalcomponent_get_next_component (
@@ -7614,7 +7614,7 @@ selection_received (GtkWidget *invisible,
if (itip_organizer_is_user (comp) && send_component_dialog (comp, TRUE))
itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, day_view->client, NULL);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
e_day_view_set_status_message (day_view, NULL);
@@ -7692,7 +7692,7 @@ e_day_view_set_status_message (EDayView *day_view, const char *message)
if (!message || !*message) {
if (day_view->activity) {
- gtk_object_unref (GTK_OBJECT (day_view->activity));
+ g_object_unref (day_view->activity);
day_view->activity = NULL;
}
}
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 455d9212f6..03e4c476a7 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -179,7 +179,7 @@ start_calendar_server (char *uri)
if (success)
return client;
- gtk_object_unref (GTK_OBJECT (client));
+ g_object_unref (client);
return NULL;
}
@@ -210,7 +210,7 @@ start_default_server (gboolean tasks)
return client;
error:
- gtk_object_unref (GTK_OBJECT (client));
+ g_object_unref (client);
return NULL;
}
@@ -267,7 +267,7 @@ get_servers (EvolutionShellClient *shell_client, const char *possible_types[], g
CORBA_free (folder_list);
}
- bonobo_object_unref (BONOBO_OBJECT (shell_client));
+ g_object_unref (shell_client);
return servers;
}
@@ -287,8 +287,8 @@ find_server (GPtrArray *servers, CalComponent *comp)
client = g_ptr_array_index (servers, i);
status = cal_client_get_object (client, uid, &found_comp);
if (status == CAL_CLIENT_GET_SUCCESS) {
- gtk_object_unref (GTK_OBJECT (found_comp));
- gtk_object_ref (GTK_OBJECT (client));
+ g_object_unref (found_comp);
+ g_object_ref (client);
return client;
}
@@ -355,7 +355,7 @@ clean_up (EItipControl *itip)
priv->vcalendar = NULL;
if (priv->comp)
- gtk_object_unref (GTK_OBJECT (priv->comp));
+ g_object_unref (priv->comp);
priv->comp = NULL;
icalcomponent_free (priv->top_level);
@@ -396,12 +396,12 @@ destroy (GtkObject *obj)
if (priv->event_clients) {
for (i = 0; i < priv->event_clients->len; i++)
- gtk_object_unref (GTK_OBJECT (g_ptr_array_index (priv->event_clients, i)));
+ g_object_unref (g_ptr_array_index (priv->event_clients, i));
g_ptr_array_free (priv->event_clients, TRUE);
}
if (priv->task_clients) {
for (i = 0; i < priv->task_clients->len; i++)
- gtk_object_unref (GTK_OBJECT (g_ptr_array_index (priv->task_clients, i)));
+ g_object_unref (g_ptr_array_index (priv->task_clients, i));
g_ptr_array_free (priv->task_clients, TRUE);
}
@@ -414,7 +414,7 @@ destroy (GtkObject *obj)
GtkWidget *
e_itip_control_new (void)
{
- return gtk_type_new (E_TYPE_ITIP_CONTROL);
+ return g_object_new (E_TYPE_ITIP_CONTROL, NULL);
}
static void
@@ -1066,7 +1066,7 @@ adjust_item (EItipControl *itip, CalComponent *comp)
cal_component_set_description_list (comp, l);
cal_component_free_text_list (l);
- gtk_object_unref (GTK_OBJECT (real_comp));
+ g_object_unref (real_comp);
} else {
CalComponentText text = {_("Unknown"), NULL};
@@ -1273,12 +1273,12 @@ show_current (EItipControl *itip)
priv = itip->priv;
if (priv->comp)
- gtk_object_unref (GTK_OBJECT (priv->comp));
+ g_object_unref (priv->comp);
if (priv->event_client != NULL)
- gtk_object_unref (GTK_OBJECT (priv->event_client));
+ g_object_unref (priv->event_client);
priv->event_client = NULL;
if (priv->task_client != NULL)
- gtk_object_unref (GTK_OBJECT (priv->task_client));
+ g_object_unref (priv->task_client);
priv->task_client = NULL;
/* Determine any delegate sections */
@@ -1310,7 +1310,7 @@ show_current (EItipControl *itip)
priv->comp = cal_component_new ();
if (!cal_component_set_icalcomponent (priv->comp, priv->ical_comp)) {
write_error_html (itip, _("The message does not appear to be properly formed"));
- gtk_object_unref (GTK_OBJECT (priv->comp));
+ g_object_unref (priv->comp);
priv->comp = NULL;
return;
};
@@ -1767,7 +1767,7 @@ update_attendee_status (EItipControl *itip)
cleanup:
if (comp != NULL)
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
}
@@ -1822,7 +1822,7 @@ send_item (EItipControl *itip)
default:
itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, NULL, NULL);
}
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
dialog = gnome_ok_dialog (_("Item sent!\n"));
} else {
dialog = gnome_warning_dialog (_("The item could not be sent!\n"));
@@ -1871,7 +1871,7 @@ send_freebusy (EItipControl *itip)
CalComponent *comp = CAL_COMPONENT (l->data);
itip_send_comp (CAL_COMPONENT_METHOD_REPLY, comp, priv->event_client, NULL);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
dialog = gnome_ok_dialog (_("Item sent!\n"));
@@ -1898,7 +1898,7 @@ button_selected_cb (EvolutionFolderSelectorButton *button, GNOME_Evolution_Folde
else
uri = cal_util_expand_uri (folder->physicalUri, FALSE);
- gtk_object_unref (GTK_OBJECT (priv->event_client));
+ g_object_unref (priv->event_client);
priv->event_client = start_calendar_server (uri);
g_free (uri);
@@ -2106,6 +2106,6 @@ ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar
default:
itip_send_comp (CAL_COMPONENT_METHOD_REPLY, comp, NULL, NULL);
}
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
}
diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c
index 0f469f7f23..cfc4a25805 100644
--- a/calendar/gui/e-meeting-attendee.c
+++ b/calendar/gui/e-meeting-attendee.c
@@ -211,7 +211,7 @@ destroy (GtkObject *obj)
GtkObject *
e_meeting_attendee_new (void)
{
- return gtk_type_new (E_TYPE_MEETING_ATTENDEE);
+ return g_object_new (E_TYPE_MEETING_ATTENDEE, NULL);
}
GtkObject *
@@ -219,7 +219,7 @@ e_meeting_attendee_new_from_cal_component_attendee (CalComponentAttendee *ca)
{
EMeetingAttendee *ia;
- ia = E_MEETING_ATTENDEE (gtk_type_new (E_TYPE_MEETING_ATTENDEE));
+ ia = E_MEETING_ATTENDEE (g_object_new (E_TYPE_MEETING_ATTENDEE, NULL));
e_meeting_attendee_set_address (ia, g_strdup (ca->value));
e_meeting_attendee_set_member (ia, g_strdup (ca->member));
diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c
index 649a17049a..ecd3988995 100644
--- a/calendar/gui/e-meeting-model.c
+++ b/calendar/gui/e-meeting-model.c
@@ -717,7 +717,7 @@ destroy (GtkObject *obj)
priv = im->priv;
for (i = 0; i < priv->attendees->len; i++)
- gtk_object_unref (GTK_OBJECT (g_ptr_array_index (priv->attendees, i)));
+ g_object_unref (g_ptr_array_index (priv->attendees, i));
g_ptr_array_free (priv->attendees, TRUE);
for (l = priv->tables; l != NULL; l = l->next)
@@ -725,10 +725,10 @@ destroy (GtkObject *obj)
g_list_free (priv->tables);
if (priv->client != NULL)
- gtk_object_unref (GTK_OBJECT (priv->client));
+ g_object_unref (priv->client);
if (priv->ebook != NULL)
- gtk_object_unref (GTK_OBJECT (priv->ebook));
+ g_object_unref (priv->ebook);
if (priv->corba_select_names != CORBA_OBJECT_NIL) {
CORBA_Environment ev;
@@ -751,7 +751,7 @@ destroy (GtkObject *obj)
GtkObject *
e_meeting_model_new (void)
{
- return gtk_type_new (E_TYPE_MEETING_MODEL);
+ return g_object_new (E_TYPE_MEETING_MODEL, NULL);
}
@@ -773,10 +773,10 @@ e_meeting_model_set_cal_client (EMeetingModel *im, CalClient *client)
priv = im->priv;
if (priv->client != NULL)
- gtk_object_unref (GTK_OBJECT (priv->client));
+ g_object_unref (priv->client);
if (client != NULL)
- gtk_object_ref (GTK_OBJECT (client));
+ g_object_ref (client);
priv->client = client;
}
@@ -821,7 +821,7 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
popup_cell = e_cell_combo_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
strings = NULL;
strings = g_list_append (strings, (char*) _("Individual"));
@@ -837,7 +837,7 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
popup_cell = e_cell_combo_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
strings = NULL;
strings = g_list_append (strings, (char*) _("Chair"));
@@ -853,7 +853,7 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
popup_cell = e_cell_combo_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
strings = NULL;
strings = g_list_append (strings, (char*) _("Yes"));
@@ -866,7 +866,7 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
popup_cell = e_cell_combo_new ();
e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
+ g_object_unref (cell);
strings = NULL;
strings = g_list_append (strings, (char*) _("Needs Action"));
@@ -889,7 +889,7 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil
g_signal_connect (etable, "destroy", G_CALLBACK (table_destroy_state_cb), g_strdup (state_file));
- gtk_object_unref (GTK_OBJECT (extras));
+ g_object_unref (extras);
return E_TABLE_SCROLLED (etable);
}
@@ -903,7 +903,7 @@ e_meeting_model_add_attendee (EMeetingModel *im, EMeetingAttendee *ia)
e_table_model_pre_change (E_TABLE_MODEL (im));
- gtk_object_ref (GTK_OBJECT (ia));
+ g_object_ref (ia);
g_ptr_array_add (priv->attendees, ia);
g_signal_connect (ia, "changed", G_CALLBACK (attendee_changed_cb), im);
@@ -966,7 +966,7 @@ e_meeting_model_remove_attendee (EMeetingModel *im, EMeetingAttendee *ia)
e_table_model_pre_change (E_TABLE_MODEL (im));
g_ptr_array_remove_index (priv->attendees, row);
- gtk_object_unref (GTK_OBJECT (ia));
+ g_object_unref (ia);
e_table_model_row_deleted (E_TABLE_MODEL (im), row);
}
@@ -986,7 +986,7 @@ e_meeting_model_remove_all_attendees (EMeetingModel *im)
for (i = 0; i < len; i++) {
EMeetingAttendee *ia = g_ptr_array_index (priv->attendees, i);
- gtk_object_unref (GTK_OBJECT (ia));
+ g_object_unref (ia);
}
g_ptr_array_set_size (priv->attendees, 0);
@@ -1181,7 +1181,7 @@ refresh_queue_add (EMeetingModel *im, int row,
g_ptr_array_add (qdata->data, data);
}
- gtk_object_ref (GTK_OBJECT (ia));
+ g_object_ref (ia);
g_ptr_array_add (priv->refresh_queue, ia);
if (priv->refresh_idle_id == -1)
@@ -1207,7 +1207,7 @@ refresh_queue_remove (EMeetingModel *im, EMeetingAttendee *ia)
/* Unref the attendee */
g_ptr_array_remove (priv->refresh_queue, ia);
- gtk_object_unref (GTK_OBJECT (ia));
+ g_object_unref (ia);
}
static void
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 1242da6b71..058be4b1fc 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -844,7 +844,7 @@ e_meeting_time_selector_new (EMeetingModel *emm)
{
GtkWidget *mts;
- mts = GTK_WIDGET (gtk_type_new (e_meeting_time_selector_get_type ()));
+ mts = GTK_WIDGET (g_object_new (e_meeting_time_selector_get_type (), NULL));
e_meeting_time_selector_construct (E_MEETING_TIME_SELECTOR (mts), emm);
@@ -864,7 +864,7 @@ e_meeting_time_selector_destroy (GtkObject *object)
gdk_bitmap_unref (mts->stipple);
if (mts->model)
- gtk_object_unref (GTK_OBJECT (mts->model));
+ g_object_unref (mts->model);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(*GTK_OBJECT_CLASS (parent_class)->destroy)(object);
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 94bd638a80..6675a1e298 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -265,11 +265,11 @@ e_tasks_new (void)
{
ETasks *tasks;
- tasks = gtk_type_new (e_tasks_get_type ());
+ tasks = g_object_new (e_tasks_get_type (), NULL);
if (!e_tasks_construct (tasks)) {
g_message ("e_tasks_new(): Could not construct the tasks GUI");
- gtk_object_unref (GTK_OBJECT (tasks));
+ g_object_unref (tasks);
return NULL;
}
@@ -303,7 +303,7 @@ e_tasks_destroy (GtkObject *object)
priv = tasks->priv;
if (priv->client) {
- gtk_object_unref (GTK_OBJECT (priv->client));
+ g_object_unref (priv->client);
priv->client = NULL;
}
@@ -510,7 +510,7 @@ e_tasks_new_task (ETasks *tasks)
cal_component_set_categories (comp, category);
comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
comp_editor_focus (COMP_EDITOR (tedit));
}
@@ -605,7 +605,7 @@ query_eval_error_cb (CalQuery *query, const char *error_str, gpointer data)
set_status_message (tasks, NULL);
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->query), tasks);
- gtk_object_unref (GTK_OBJECT (priv->query));
+ g_object_unref (priv->query);
priv->query = NULL;
}
@@ -624,7 +624,7 @@ query_query_done_cb (CalQuery *query, CalQueryDoneStatus status, const char *err
set_status_message (tasks, NULL);
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->query), tasks);
- gtk_object_unref (GTK_OBJECT (priv->query));
+ g_object_unref (priv->query);
priv->query = NULL;
}
/**
@@ -728,9 +728,9 @@ e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic)
EVOLUTION_ETSPECDIR "/e-calendar-table.etspec");
factory = gal_view_factory_etable_new (spec);
- gtk_object_unref (GTK_OBJECT (spec));
+ g_object_unref (spec);
gal_view_collection_add_factory (collection, factory);
- gtk_object_unref (GTK_OBJECT (factory));
+ g_object_unref (factory);
/* Load the collection and create the menus */
@@ -768,10 +768,10 @@ e_tasks_discard_view_menus (ETasks *tasks)
g_assert (priv->view_instance != NULL);
g_assert (priv->view_menus != NULL);
- gtk_object_unref (GTK_OBJECT (priv->view_instance));
+ g_object_unref (priv->view_instance);
priv->view_instance = NULL;
- gtk_object_unref (GTK_OBJECT (priv->view_menus));
+ g_object_unref (priv->view_menus);
priv->view_menus = NULL;
}
diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c
index 294fb18dde..95c81b2e84 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -190,7 +190,7 @@ e_timezone_entry_new (void)
{
ETimezoneEntry *tentry;
- tentry = gtk_type_new (e_timezone_entry_get_type ());
+ tentry = g_object_new (e_timezone_entry_get_type (), NULL);
return GTK_WIDGET (tentry);
}
@@ -254,7 +254,7 @@ on_button_clicked (GtkWidget *widget,
e_timezone_entry_set_entry_visibility (tentry);
}
- gtk_object_unref (GTK_OBJECT (timezone_dialog));
+ g_object_unref (timezone_dialog);
}
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 80d29ec8d4..413f2ef0de 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -480,7 +480,7 @@ e_week_view_new (void)
{
GtkWidget *week_view;
- week_view = GTK_WIDGET (gtk_type_new (e_week_view_get_type ()));
+ week_view = GTK_WIDGET (g_object_new (e_week_view_get_type (), NULL));
return week_view;
}
@@ -501,7 +501,7 @@ e_week_view_destroy (GtkObject *object)
if (week_view->client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->client), week_view);
- gtk_object_unref (GTK_OBJECT (week_view->client));
+ g_object_unref (week_view->client);
week_view->client = NULL;
}
@@ -512,7 +512,7 @@ e_week_view_destroy (GtkObject *object)
if (week_view->query) {
gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->query), week_view);
- gtk_object_unref (GTK_OBJECT (week_view->query));
+ g_object_unref (week_view->query);
week_view->query = NULL;
}
@@ -538,7 +538,7 @@ e_week_view_destroy (GtkObject *object)
}
if (week_view->activity) {
- gtk_object_unref (GTK_OBJECT (week_view->activity));
+ g_object_unref (week_view->activity);
week_view->activity = NULL;
}
@@ -1062,7 +1062,7 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
g_print ("updated object's dates unchanged\n");
#endif
e_week_view_foreach_event_with_uid (week_view, uid, e_week_view_update_event_cb, comp);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
gtk_widget_queue_draw (week_view->main_canvas);
return;
}
@@ -1087,7 +1087,7 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
cal_client_resolve_tzid_cb, week_view->client,
week_view->zone);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
e_week_view_queue_layout (week_view);
}
@@ -1194,7 +1194,7 @@ update_query (EWeekView *week_view)
if (old_query) {
gtk_signal_disconnect_by_data (GTK_OBJECT (old_query), week_view);
- gtk_object_unref (GTK_OBJECT (old_query));
+ g_object_unref (old_query);
}
g_assert (week_view->sexp != NULL);
@@ -1258,11 +1258,11 @@ e_week_view_set_cal_client (EWeekView *week_view,
g_return_if_fail (IS_CAL_CLIENT (client));
if (client)
- gtk_object_ref (GTK_OBJECT (client));
+ g_object_ref (client);
if (week_view->client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->client), week_view);
- gtk_object_unref (GTK_OBJECT (week_view->client));
+ g_object_unref (week_view->client);
}
week_view->client = client;
@@ -1972,9 +1972,9 @@ e_week_view_update_event_cb (EWeekView *week_view,
event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
- gtk_object_unref (GTK_OBJECT (event->comp));
+ g_object_unref (event->comp);
event->comp = comp;
- gtk_object_ref (GTK_OBJECT (comp));
+ g_object_ref (comp);
for (span_num = 0; span_num < event->num_spans; span_num++) {
span = &g_array_index (week_view->spans, EWeekViewEventSpan,
@@ -2059,7 +2059,7 @@ e_week_view_remove_event_cb (EWeekView *week_view,
}
}
- gtk_object_unref (GTK_OBJECT (event->comp));
+ g_object_unref (event->comp);
g_array_remove_index (week_view->events, event_num);
week_view->events_need_layout = TRUE;
@@ -2404,7 +2404,7 @@ e_week_view_free_events (EWeekView *week_view)
for (event_num = 0; event_num < week_view->events->len; event_num++) {
event = &g_array_index (week_view->events, EWeekViewEvent,
event_num);
- gtk_object_unref (GTK_OBJECT (event->comp));
+ g_object_unref (event->comp);
}
g_array_set_size (week_view->events, 0);
@@ -2471,7 +2471,7 @@ e_week_view_add_event (CalComponent *comp,
week_view->zone);
event.comp = comp;
- gtk_object_ref (GTK_OBJECT (event.comp));
+ g_object_ref (event.comp);
event.start = start;
event.end = end;
event.spans_index = 0;
@@ -3435,7 +3435,7 @@ e_week_view_key_press (GtkWidget *widget, GdkEventKey *event)
if (initial_text)
g_free (initial_text);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
return TRUE;
}
@@ -3824,7 +3824,7 @@ e_week_view_on_publish (GtkWidget *widget, gpointer data)
itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp,
week_view->client, NULL);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
g_list_free (comp_list);
@@ -3865,7 +3865,7 @@ e_week_view_on_delete_occurrence (GtkWidget *widget, gpointer data)
if (cal_client_update_object (week_view->client, comp) != CAL_CLIENT_RESULT_SUCCESS)
g_message ("e_week_view_on_delete_occurrence(): Could not update the object!");
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
@@ -4045,12 +4045,12 @@ e_week_view_on_unrecur_appointment (GtkWidget *widget, gpointer data)
if (cal_client_update_object (week_view->client, comp) != CAL_CLIENT_RESULT_SUCCESS)
g_message ("e_week_view_on_unrecur_appointment(): Could not update the object!");
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
if (cal_client_update_object (week_view->client, new_comp) != CAL_CLIENT_RESULT_SUCCESS)
g_message ("e_week_view_on_unrecur_appointment(): Could not update the object!");
- gtk_object_unref (GTK_OBJECT (new_comp));
+ g_object_unref (new_comp);
}
@@ -4251,7 +4251,7 @@ selection_received (GtkWidget *invisible,
cal_client_update_object (week_view->client, comp);
g_free (uid);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
subcomp = icalcomponent_get_next_component (
icalcomp, ICAL_ANY_COMPONENT);
@@ -4293,7 +4293,7 @@ selection_received (GtkWidget *invisible,
itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, week_view->client, NULL);
g_free (uid);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
e_week_view_set_status_message (week_view, NULL);
@@ -4373,7 +4373,7 @@ e_week_view_set_status_message (EWeekView *week_view, const char *message)
if (!message || !*message) {
if (week_view->activity) {
- gtk_object_unref (GTK_OBJECT (week_view->activity));
+ g_object_unref (week_view->activity);
week_view->activity = NULL;
}
}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 64304c64bc..b095217b34 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -326,7 +326,7 @@ dn_query_obj_updated_cb (CalQuery *query, const char *uid,
tag_calendar_by_comp (priv->date_navigator, comp, priv->client, FALSE,
TRUE);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
/* Callback used when the calendar query reports of a removed object */
@@ -533,7 +533,7 @@ update_query (GnomeCalendar *gcal)
if (old_query) {
gtk_signal_disconnect_by_data (GTK_OBJECT (old_query), gcal);
- gtk_object_unref (GTK_OBJECT (old_query));
+ g_object_unref (old_query);
}
g_assert (priv->sexp != NULL);
@@ -946,7 +946,7 @@ gnome_calendar_destroy (GtkObject *object)
if (priv->dn_query) {
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->dn_query), gcal);
- gtk_object_unref (GTK_OBJECT (priv->dn_query));
+ g_object_unref (priv->dn_query);
priv->dn_query = NULL;
}
@@ -957,23 +957,23 @@ gnome_calendar_destroy (GtkObject *object)
if (priv->client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), gcal);
- gtk_object_unref (GTK_OBJECT (priv->client));
+ g_object_unref (priv->client);
priv->client = NULL;
}
if (priv->task_pad_client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->task_pad_client), gcal);
- gtk_object_unref (GTK_OBJECT (priv->task_pad_client));
+ g_object_unref (priv->task_pad_client);
priv->task_pad_client = NULL;
}
if (priv->view_instance) {
- gtk_object_unref (GTK_OBJECT (priv->view_instance));
+ g_object_unref (priv->view_instance);
priv->view_instance = NULL;
}
if (priv->view_menus) {
- gtk_object_unref (GTK_OBJECT (priv->view_menus));
+ g_object_unref (priv->view_menus);
priv->view_menus = NULL;
}
@@ -1366,19 +1366,19 @@ gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic)
factory = calendar_view_factory_new (GNOME_CAL_DAY_VIEW);
gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (factory));
- gtk_object_unref (GTK_OBJECT (factory));
+ g_object_unref (factory);
factory = calendar_view_factory_new (GNOME_CAL_WORK_WEEK_VIEW);
gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (factory));
- gtk_object_unref (GTK_OBJECT (factory));
+ g_object_unref (factory);
factory = calendar_view_factory_new (GNOME_CAL_WEEK_VIEW);
gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (factory));
- gtk_object_unref (GTK_OBJECT (factory));
+ g_object_unref (factory);
factory = calendar_view_factory_new (GNOME_CAL_MONTH_VIEW);
gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (factory));
- gtk_object_unref (GTK_OBJECT (factory));
+ g_object_unref (factory);
/* Load the collection and create the menus */
@@ -1419,10 +1419,10 @@ gnome_calendar_discard_view_menus (GnomeCalendar *gcal)
g_assert (priv->view_instance != NULL);
g_assert (priv->view_menus != NULL);
- gtk_object_unref (GTK_OBJECT (priv->view_instance));
+ g_object_unref (priv->view_instance);
priv->view_instance = NULL;
- gtk_object_unref (GTK_OBJECT (priv->view_menus));
+ g_object_unref (priv->view_menus);
priv->view_menus = NULL;
}
@@ -1845,11 +1845,11 @@ gnome_calendar_new (void)
{
GnomeCalendar *gcal;
- gcal = gtk_type_new (gnome_calendar_get_type ());
+ gcal = g_object_new (gnome_calendar_get_type (), NULL);
if (!gnome_calendar_construct (gcal)) {
g_message ("gnome_calendar_new(): Could not construct the calendar GUI");
- gtk_object_unref (GTK_OBJECT (gcal));
+ g_object_unref (gcal);
return NULL;
}
@@ -2316,7 +2316,7 @@ gnome_calendar_new_appointment_for (GnomeCalendar *cal,
cal_component_commit_sequence (comp);
gnome_calendar_edit_object (cal, comp, meeting);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
}
/**
@@ -2367,7 +2367,7 @@ gnome_calendar_new_task (GnomeCalendar *gcal)
cal_component_set_categories (comp, category);
comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
comp_editor_focus (COMP_EDITOR (tedit));
}
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
index 9a8fcb260d..32aa48a37e 100644
--- a/calendar/gui/goto.c
+++ b/calendar/gui/goto.c
@@ -243,7 +243,7 @@ goto_dialog (GnomeCalendar *gcal)
if (b == 0)
goto_today (dlg);
- gtk_object_unref (GTK_OBJECT (dlg->xml));
+ g_object_unref (dlg->xml);
g_free (dlg);
dlg = NULL;
}
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 8a1816d499..ea45c813e3 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -799,7 +799,7 @@ comp_minimal (CalComponent *comp, gboolean attendee)
return clone;
error:
- gtk_object_unref (GTK_OBJECT (clone));
+ g_object_unref (clone);
return NULL;
}
@@ -884,7 +884,7 @@ comp_compliant (CalComponentItipMethod method, CalComponent *comp, CalClient *cl
case CAL_COMPONENT_METHOD_REFRESH:
/* Need to remove almost everything */
temp_clone = comp_minimal (clone, TRUE);
- gtk_object_unref (GTK_OBJECT (clone));
+ g_object_unref (clone);
clone = temp_clone;
break;
case CAL_COMPONENT_METHOD_COUNTER:
@@ -892,7 +892,7 @@ comp_compliant (CalComponentItipMethod method, CalComponent *comp, CalClient *cl
case CAL_COMPONENT_METHOD_DECLINECOUNTER:
/* Need to remove almost everything */
temp_clone = comp_minimal (clone, FALSE);
- gtk_object_unref (GTK_OBJECT (clone));
+ g_object_unref (clone);
clone = temp_clone;
break;
default:
@@ -1027,7 +1027,7 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp,
CORBA_exception_free (&ev);
if (comp != NULL)
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
if (top_level != NULL)
icalcomponent_free (top_level);
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 599458d082..564de4a6ed 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -266,7 +266,7 @@ get_font_for_size (double h, GnomeFontWeight weight, gboolean italic)
font = gnome_font_find_closest_from_weight_slant (DEFAULT_FONT, weight, italic, size);
- gtk_object_unref (GTK_OBJECT (face));
+ g_object_unref (face);
return font;
}
@@ -405,7 +405,7 @@ print_text_size(GnomePrintContext *pc, const char *text,
font = get_font_for_size (t - b, GNOME_FONT_BOOK, FALSE);
print_text(pc, font, text, align, l, r, t, b);
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
}
/* gets/frees the font for you, as a bold font */
@@ -417,7 +417,7 @@ print_text_size_bold(GnomePrintContext *pc, const char *text,
font = get_font_for_size (t - b, GNOME_FONT_BOLD, FALSE);
print_text(pc, font, text, align, l, r, t, b);
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
}
static void
@@ -538,7 +538,7 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal, time_t month,
}
print_text (pc, font, buf, ALIGN_CENTER, left, right,
top, top - header_size);
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
top -= header_size;
@@ -633,8 +633,8 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal, time_t month,
}
}
}
- gtk_object_unref (GTK_OBJECT (font_normal));
- gtk_object_unref (GTK_OBJECT (font_bold));
+ g_object_unref (font_normal);
+ g_object_unref (font_bold);
}
@@ -820,8 +820,8 @@ print_day_background (GnomePrintContext *pc, GnomeCalendar *gcal,
row++;
}
- gtk_object_unref (GTK_OBJECT (font_hour));
- gtk_object_unref (GTK_OBJECT (font_minute));
+ g_object_unref (font_hour);
+ g_object_unref (font_minute);
}
@@ -857,7 +857,7 @@ print_day_add_event (CalComponent *comp,
end_tt = icaltime_from_timet_with_zone (end, FALSE, zone);
event.comp = comp;
- gtk_object_ref (GTK_OBJECT (comp));
+ g_object_ref (comp);
event.start = start;
event.end = end;
event.canvas_item = NULL;
@@ -926,7 +926,7 @@ free_event_array (GArray *array)
event = &g_array_index (array, EDayViewEvent, event_num);
if (event->canvas_item)
gtk_object_destroy (GTK_OBJECT (event->canvas_item));
- gtk_object_unref (GTK_OBJECT (event->comp));
+ g_object_unref (event->comp);
}
g_array_set_size (array, 0);
@@ -1165,7 +1165,7 @@ print_day_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
print_day_long_event (pc, font, left, right, top, bottom,
DAY_VIEW_ROW_HEIGHT, event, &pdi);
}
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
/* We always leave space for DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY in the
top display, but we may have more rows than that, in which case
@@ -1202,7 +1202,7 @@ print_day_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
print_day_event (pc, font, left, right, top, bottom,
event, &pdi);
}
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
/* Free everything. */
free_event_array (pdi.long_events);
@@ -1242,7 +1242,7 @@ print_week_summary_cb (CalComponent *comp,
end_tt = icaltime_from_timet_with_zone (end, FALSE, zone);
event.comp = comp;
- gtk_object_ref (GTK_OBJECT (event.comp));
+ g_object_ref (event.comp);
event.start = start;
event.end = end;
event.spans_index = 0;
@@ -1610,12 +1610,12 @@ print_week_summary (GnomePrintContext *pc, GnomeCalendar *gcal,
cell_width, cell_height, event, spans);
}
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
/* Free everything. */
for (event_num = 0; event_num < psi.events->len; event_num++) {
event = &g_array_index (psi.events, EWeekViewEvent, event_num);
- gtk_object_unref (GTK_OBJECT (event->comp));
+ g_object_unref (event->comp);
}
g_array_free (psi.events, TRUE);
g_array_free (spans, TRUE);
@@ -1738,7 +1738,7 @@ print_month_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
tm.tm_mday++;
tm.tm_wday = (tm.tm_wday + 1) % 7;
}
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
top = y2;
print_week_summary (pc, gcal, date, TRUE, 6, month,
@@ -1824,7 +1824,7 @@ print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal,
y -= 3;
}
- gtk_object_unref (GTK_OBJECT (font_summary));
+ g_object_unref (font_summary);
}
@@ -2256,7 +2256,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
1.0, 0.9);
print_text (pc, font, title, ALIGN_CENTER, left, right,
top - header_size * 0.1, top - header_size);
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
top -= header_size + 10;
@@ -2265,7 +2265,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
cal_component_get_summary (comp, &text);
top = bound_text (pc, font, text.value, left, right,
top - 3, bottom, 0);
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
/* Date information */
print_date_label (pc, comp, client, left, right, top-3, top - 15);
@@ -2399,7 +2399,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
top = bound_text (pc, font, text->value, left, right, top-3, bottom, 0);
}
cal_component_free_text_list (desc);
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
gnome_print_showpage (pc);
}
@@ -2522,7 +2522,7 @@ print_calendar (GnomeCalendar *gcal, gboolean preview, time_t date,
gnome_print_master_print (gpm);
}
- gtk_object_unref (GTK_OBJECT (gpm));
+ g_object_unref (gpm);
#endif
}
@@ -2616,7 +2616,7 @@ print_comp (CalComponent *comp, CalClient *client, gboolean preview)
gnome_print_master_print (gpm);
}
- gtk_object_unref (GTK_OBJECT (gpm));
+ g_object_unref (gpm);
#endif
}
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 13f2f98925..9bf6b0e249 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -517,7 +517,7 @@ print_title (GnomePrintContext *pc,
gnome_print_setrgbcolor (pc, 0, 0, 0);
gnome_print_show (pc, text);
- gtk_object_unref (GTK_OBJECT (font));
+ g_object_unref (font);
}
@@ -594,8 +594,8 @@ print_tasks (ETasks *tasks, gboolean preview, gboolean landscape,
gnome_print_master_print (master);
}
- gtk_object_unref (GTK_OBJECT (master));
- gtk_object_unref (GTK_OBJECT (printable));
+ g_object_unref (master);
+ g_object_unref (printable);
#endif
}
diff --git a/calendar/gui/tasks-migrate.c b/calendar/gui/tasks-migrate.c
index 53ffa9bad4..8f1f2aeb8f 100644
--- a/calendar/gui/tasks-migrate.c
+++ b/calendar/gui/tasks-migrate.c
@@ -79,7 +79,7 @@ migrate (void)
else
success = FALSE;
- gtk_object_unref (GTK_OBJECT (comp));
+ g_object_unref (comp);
break;
case CAL_CLIENT_GET_NOT_FOUND:
@@ -170,10 +170,10 @@ tasks_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
g_assert_not_reached ();
}
- gtk_object_unref (GTK_OBJECT (calendar_client));
+ g_object_unref (calendar_client);
calendar_client = NULL;
- gtk_object_unref (GTK_OBJECT (tasks_client));
+ g_object_unref (tasks_client);
tasks_client = NULL;
}
@@ -204,7 +204,7 @@ load_tasks_client (void)
g_message ("load_tasks_client(): could not issue open request for the tasks client");
if (tasks_client) {
- gtk_object_unref (GTK_OBJECT (tasks_client));
+ g_object_unref (tasks_client);
tasks_client = NULL;
}
@@ -244,7 +244,7 @@ calendar_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data
g_assert_not_reached ();
}
- gtk_object_unref (GTK_OBJECT (calendar_client));
+ g_object_unref (calendar_client);
calendar_client = NULL;
}
@@ -276,7 +276,7 @@ load_calendar_client (void)
g_message ("load_calendar_client(): could not issue open request for the calendar client");
if (calendar_client) {
- gtk_object_unref (GTK_OBJECT (calendar_client));
+ g_object_unref (calendar_client);
calendar_client = NULL;
}
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index fd1e14cb54..087c7000da 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -433,7 +433,7 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style)
GtkWidget *
weekday_picker_new (void)
{
- return gtk_type_new (TYPE_WEEKDAY_PICKER);
+ return g_object_new (TYPE_WEEKDAY_PICKER, NULL);
}
/**