[evolution-patches] Cleanup of deprecated functions in evolution/widgets
- From: Kjartan Maraas <kmaraas broadpark no>
- To: evolution-patches ximian com
- Subject: [evolution-patches] Cleanup of deprecated functions in evolution/widgets
- Date: Wed, 29 Sep 2004 22:21:01 +0200
Same as before for the widgets subdir.
Cheers
Kjartan
? misc/warnings
Index: e-timezone-dialog/e-timezone-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/e-timezone-dialog/e-timezone-dialog.c,v
retrieving revision 1.15
diff -u -p -r1.15 e-timezone-dialog.c
--- e-timezone-dialog/e-timezone-dialog.c 13 Sep 2004 20:52:19 -0000 1.15
+++ e-timezone-dialog/e-timezone-dialog.c 29 Sep 2004 20:20:10 -0000
@@ -255,7 +255,7 @@ e_timezone_dialog_construct (ETimezoneDi
| GDK_LEAVE_NOTIFY_MASK
| GDK_VISIBILITY_NOTIFY_MASK);
- gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (priv->timezone_combo)->entry), FALSE);
+ gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->timezone_combo)->entry), FALSE);
e_timezone_dialog_add_timezones (etd);
@@ -439,7 +439,7 @@ on_map_visibility_changed (GtkWidget *w,
/* Map is visible, at least partly, so make sure we flash the
selected point. */
if (!priv->timeout_id)
- priv->timeout_id = gtk_timeout_add (100, on_map_timeout, etd);
+ priv->timeout_id = g_timeout_add (100, on_map_timeout, etd);
} else {
/* Map is invisible, so don't waste resources on the timeout.*/
if (priv->timeout_id) {
Index: misc/e-calendar-item.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-calendar-item.c,v
retrieving revision 1.41
diff -u -p -r1.41 e-calendar-item.c
--- misc/e-calendar-item.c 15 Mar 2004 16:26:54 -0000 1.41
+++ misc/e-calendar-item.c 29 Sep 2004 20:20:11 -0000
@@ -322,19 +322,21 @@ e_calendar_item_class_init (ECalendarIte
ARG_DISPLAY_POPUP);
e_calendar_item_signals[DATE_RANGE_CHANGED] =
- gtk_signal_new ("date_range_changed",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- G_STRUCT_OFFSET (ECalendarItemClass, date_range_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("date_range_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalendarItemClass, date_range_changed),
+ NULL, NULL,
+ gtk_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
e_calendar_item_signals[SELECTION_CHANGED] =
- gtk_signal_new ("selection_changed",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- G_STRUCT_OFFSET (ECalendarItemClass, selection_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("selection_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalendarItemClass, selection_changed),
+ NULL, NULL,
+ gtk_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
e_calendar_item_signals[SELECTION_PREVIEW_CHANGED] =
g_signal_new ("selection_preview_changed",
G_TYPE_FROM_CLASS (object_class),
Index: misc/e-calendar.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-calendar.c,v
retrieving revision 1.23
diff -u -p -r1.23 e-calendar.c
--- misc/e-calendar.c 5 Dec 2003 02:01:46 -0000 1.23
+++ misc/e-calendar.c 29 Sep 2004 20:20:11 -0000
@@ -161,15 +161,27 @@ e_calendar_init (ECalendar *cal)
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_widget_show (button);
- gtk_signal_connect_object (GTK_OBJECT (button), "pressed",
- G_CALLBACK (e_calendar_on_prev_pressed),
- GTK_OBJECT (cal));
- gtk_signal_connect_object (GTK_OBJECT (button), "released",
- G_CALLBACK (e_calendar_on_prev_released),
- GTK_OBJECT (cal));
- gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
- G_CALLBACK (e_calendar_on_prev_clicked),
- GTK_OBJECT (cal));
+ gtk_signal_connect_full (GTK_OBJECT (button), "pressed",
+ G_CALLBACK (e_calendar_on_prev_pressed),
+ 0,
+ GTK_OBJECT (cal),
+ 0,
+ 1,
+ 0);
+ gtk_signal_connect_full (GTK_OBJECT (button), "released",
+ G_CALLBACK (e_calendar_on_prev_released),
+ 0,
+ GTK_OBJECT (cal),
+ 0,
+ 1,
+ 0);
+ gtk_signal_connect_full (GTK_OBJECT (button), "clicked",
+ G_CALLBACK (e_calendar_on_prev_clicked),
+ 0,
+ GTK_OBJECT (cal),
+ 0,
+ 1,
+ 0);
pixmap = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
gtk_widget_show (pixmap);
@@ -183,15 +195,27 @@ e_calendar_init (ECalendar *cal)
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_widget_show (button);
- gtk_signal_connect_object (GTK_OBJECT (button), "pressed",
- G_CALLBACK (e_calendar_on_next_pressed),
- GTK_OBJECT (cal));
- gtk_signal_connect_object (GTK_OBJECT (button), "released",
- G_CALLBACK (e_calendar_on_next_released),
- GTK_OBJECT (cal));
- gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
- G_CALLBACK (e_calendar_on_next_clicked),
- GTK_OBJECT (cal));
+ gtk_signal_connect_full (GTK_OBJECT (button), "pressed",
+ G_CALLBACK (e_calendar_on_next_pressed),
+ 0,
+ GTK_OBJECT (cal),
+ 0,
+ 1,
+ 0);
+ gtk_signal_connect_full (GTK_OBJECT (button), "released",
+ G_CALLBACK (e_calendar_on_next_released),
+ 0,
+ GTK_OBJECT (cal),
+ 0,
+ 1,
+ 0);
+ gtk_signal_connect_full (GTK_OBJECT (button), "clicked",
+ G_CALLBACK (e_calendar_on_next_clicked),
+ 0,
+ GTK_OBJECT (cal),
+ 0,
+ 1,
+ 0);
pixmap = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
gtk_widget_show (pixmap);
@@ -239,7 +263,7 @@ e_calendar_destroy (GtkObject *object)
cal = E_CALENDAR (object);
if (cal->timeout_id != 0) {
- gtk_timeout_remove (cal->timeout_id);
+ g_source_remove (cal->timeout_id);
cal->timeout_id = 0;
}
@@ -506,7 +530,7 @@ static void
e_calendar_stop_auto_move (ECalendar *cal)
{
if (cal->timeout_id != 0) {
- gtk_timeout_remove (cal->timeout_id);
+ g_source_remove (cal->timeout_id);
cal->timeout_id = 0;
}
}
Index: misc/e-cell-date-edit.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-cell-date-edit.c,v
retrieving revision 1.20
diff -u -p -r1.20 e-cell-date-edit.c
--- misc/e-cell-date-edit.c 18 Dec 2003 03:59:42 -0000 1.20
+++ misc/e-cell-date-edit.c 29 Sep 2004 20:20:11 -0000
@@ -528,14 +528,14 @@ e_cell_date_edit_select_matching_time (E
GtkWidget *listitem, *label;
GList *elem;
gboolean found = FALSE;
- char *list_item_text;
+ const char *list_item_text;
list = GTK_LIST (ecde->time_list);
elem = list->children;
while (elem) {
listitem = GTK_WIDGET (elem->data);
label = GTK_BIN (listitem)->child;
- gtk_label_get (GTK_LABEL (label), &list_item_text);
+ list_item_text = gtk_label_get_text (GTK_LABEL (label));
if (!strcmp (list_item_text, time)) {
found = TRUE;
@@ -910,14 +910,14 @@ e_cell_date_edit_on_time_selected (GtkLi
ECellDateEdit *ecde)
{
GtkWidget *listitem, *label;
- char *list_item_text;
+ const char *list_item_text;
if (!list->selection)
return;
listitem = list->selection->data;
label = GTK_BIN (listitem)->child;
- gtk_label_get (GTK_LABEL (label), &list_item_text);
+ list_item_text = gtk_label_get_text (GTK_LABEL (label));
gtk_entry_set_text (GTK_ENTRY (ecde->time_entry), list_item_text);
}
Index: misc/e-combo-button.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-combo-button.c,v
retrieving revision 1.18
diff -u -p -r1.18 e-combo-button.c
--- misc/e-combo-button.c 17 May 2004 17:10:39 -0000 1.18
+++ misc/e-combo-button.c 29 Sep 2004 20:20:11 -0000
@@ -202,7 +202,8 @@ menu_detacher (GtkWidget *widget,
combo_button = E_COMBO_BUTTON (widget);
priv = combo_button->priv;
- gtk_signal_disconnect_by_data (GTK_OBJECT (menu), combo_button);
+ gtk_signal_compat_matched (GTK_OBJECT (menu), 0, combo_button,
+ G_SIGNAL_MATCH_DATA, 0);
priv->menu = NULL;
}
@@ -409,12 +410,13 @@ class_init (GtkObjectClass *object_class
button_class = GTK_BUTTON_CLASS (object_class);
button_class->released = impl_released;
- signals[ACTIVATE_DEFAULT] = gtk_signal_new ("activate_default",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- G_STRUCT_OFFSET (EComboButtonClass, activate_default),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ signals[ACTIVATE_DEFAULT] = g_signal_new ("activate_default",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EComboButtonClass, activate_default),
+ NULL, NULL,
+ gtk_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
static void
@@ -502,7 +504,7 @@ e_combo_button_set_label (EComboButton *
if (label == NULL)
label = "";
- gtk_label_parse_uline (GTK_LABEL (priv->label), label);
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (priv->label), label);
}
void
Index: misc/e-combo-cell-editable.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-combo-cell-editable.c,v
retrieving revision 1.1
diff -u -p -r1.1 e-combo-cell-editable.c
--- misc/e-combo-cell-editable.c 30 Sep 2003 22:35:10 -0000 1.1
+++ misc/e-combo-cell-editable.c 29 Sep 2004 20:20:11 -0000
@@ -322,7 +322,7 @@ ecce_init (EComboCellEditable *ecce)
entry = gtk_entry_new ();
ecce->priv->entry = GTK_ENTRY (entry);
gtk_entry_set_has_frame (ecce->priv->entry, FALSE);
- gtk_entry_set_editable (ecce->priv->entry, FALSE);
+ gtk_editable_set_editable (GTK_EDITABLE (ecce->priv->entry), FALSE);
g_signal_connect (entry, "activate", G_CALLBACK (entry_activated_cb), ecce);
g_signal_connect (entry, "key_press_event", G_CALLBACK (entry_key_press_event_cb), ecce);
gtk_widget_show (entry);
Index: misc/e-dateedit.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-dateedit.c,v
retrieving revision 1.40
diff -u -p -r1.40 e-dateedit.c
--- misc/e-dateedit.c 12 Mar 2004 08:44:23 -0000 1.40
+++ misc/e-dateedit.c 29 Sep 2004 20:20:11 -0000
@@ -515,7 +515,7 @@ e_date_edit_set_editable (EDateEdit *ded
priv = dedit->priv;
- gtk_entry_set_editable (GTK_ENTRY (priv->date_entry), editable);
+ gtk_editable_set_editable (GTK_EDITABLE (priv->date_entry), editable);
gtk_widget_set_sensitive (priv->date_button, editable);
}
Index: misc/e-dropdown-button.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-dropdown-button.c,v
retrieving revision 1.15
diff -u -p -r1.15 e-dropdown-button.c
--- misc/e-dropdown-button.c 26 Feb 2004 22:20:15 -0000 1.15
+++ misc/e-dropdown-button.c 29 Sep 2004 20:20:11 -0000
@@ -30,6 +30,7 @@
#include <stdio.h>
+#include <glib-object.h>
#include <gtk/gtkarrow.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkwidget.h>
@@ -104,7 +105,7 @@ impl_destroy (GtkObject *object)
dropdown_button = E_DROPDOWN_BUTTON (object);
priv = dropdown_button->priv;
- gtk_accel_group_unref (priv->accel_group);
+ g_object_unref (priv->accel_group);
gtk_widget_destroy (priv->menu);
g_free (priv);
@@ -187,7 +188,6 @@ e_dropdown_button_construct (EDropdownBu
GtkWidget *hbox;
GtkWidget *arrow;
GtkWidget *label;
- unsigned int accel_key;
g_return_if_fail (dropdown_button != NULL);
g_return_if_fail (E_IS_DROPDOWN_BUTTON (dropdown_button));
@@ -201,12 +201,9 @@ e_dropdown_button_construct (EDropdownBu
gtk_container_add (GTK_CONTAINER (dropdown_button), hbox);
gtk_widget_show (hbox);
- label = gtk_label_new ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (label), label_text);
+ label = gtk_label_new_with_mnemonic (label_text);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
gtk_widget_show (label);
- gtk_widget_add_accelerator (GTK_WIDGET (dropdown_button), "clicked",
- priv->accel_group, accel_key, GDK_MOD1_MASK, 0);
arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (hbox), arrow, FALSE, FALSE, 2);
Index: misc/e-filter-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-filter-bar.c,v
retrieving revision 1.50
diff -u -p -r1.50 e-filter-bar.c
--- misc/e-filter-bar.c 14 Apr 2004 21:30:54 -0000 1.50
+++ misc/e-filter-bar.c 29 Sep 2004 20:20:12 -0000
@@ -567,7 +567,7 @@ get_property (GObject *object, guint pro
GString *out = g_string_new ("");
filter_rule_build_code (efb->current_query, out);
- g_value_set_string_take_ownership (value, out->str);
+ g_value_take_string (value, out->str);
g_string_free (out, FALSE);
} else {
g_value_set_string (value, NULL);
@@ -613,7 +613,7 @@ get_property (GObject *object, guint pro
text[n] = '\0';
xmlFree (xmlbuf);
- g_value_set_string_take_ownership (value, text);
+ g_value_take_string (value, text);
break; }
default:
Index: misc/e-image-chooser.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-image-chooser.c,v
retrieving revision 1.3
diff -u -p -r1.3 e-image-chooser.c
--- misc/e-image-chooser.c 3 Feb 2004 02:32:29 -0000 1.3
+++ misc/e-image-chooser.c 29 Sep 2004 20:20:12 -0000
@@ -236,7 +236,7 @@ set_image_from_data (EImageChooser *choo
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
if (pixbuf)
- gdk_pixbuf_ref (pixbuf);
+ g_object_ref (pixbuf);
gdk_pixbuf_loader_close (loader, NULL);
g_object_unref (loader);
@@ -306,11 +306,12 @@ set_image_from_data (EImageChooser *choo
chooser->priv->image_height / 2 - new_height / 2);
gtk_image_set_from_pixbuf (GTK_IMAGE (chooser->priv->image), composite);
- gdk_pixbuf_unref (scaled);
- gdk_pixbuf_unref (composite);
+ g_object_unref (scaled);
+ g_object_unref (composite);
}
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
+
g_free (chooser->priv->image_buf);
chooser->priv->image_buf = data;
Index: misc/e-map.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-map.c,v
retrieving revision 1.6
diff -u -p -r1.6 e-map.c
--- misc/e-map.c 25 Feb 2003 15:39:47 -0000 1.6
+++ misc/e-map.c 29 Sep 2004 20:20:12 -0000
@@ -174,12 +174,13 @@ e_map_class_init (EMapClass *class)
object_class->destroy = e_map_destroy;
class->set_scroll_adjustments = e_map_set_scroll_adjustments;
- widget_class->set_scroll_adjustments_signal = gtk_signal_new ("set_scroll_adjustments",
- GTK_RUN_LAST,
- GTK_CLASS_TYPE (object_class),
+ widget_class->set_scroll_adjustments_signal = g_signal_new ("set_scroll_adjustments",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EMapClass, set_scroll_adjustments),
- gtk_marshal_NONE__POINTER_POINTER,
- GTK_TYPE_NONE, 2,
+ NULL, NULL,
+ gtk_marshal_VOID__POINTER_POINTER,
+ G_TYPE_NONE, 2,
GTK_TYPE_ADJUSTMENT,
GTK_TYPE_ADJUSTMENT);
@@ -312,7 +313,7 @@ e_map_realize (GtkWidget *widget)
attr.height = widget->allocation.height;
attr.wclass = GDK_INPUT_OUTPUT;
attr.visual = gdk_rgb_get_visual ();
- attr.colormap = gdk_rgb_get_cmap ();
+ attr.colormap = gdk_rgb_get_colormap ();
attr.event_mask = gtk_widget_get_events (widget) |
GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK |
GDK_POINTER_MOTION_MASK;
@@ -604,8 +605,10 @@ e_map_key_press (GtkWidget *widget, GdkE
scroll_to (view, x, y);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->hadj), view);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->vadj), view);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->hadj), 0,
+ view, G_SIGNAL_MATCH_DATA, 1);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->vadj), 0,
+ view, G_SIGNAL_MATCH_DATA, 1);
priv->hadj->value = x;
priv->vadj->value = y;
@@ -613,8 +616,10 @@ e_map_key_press (GtkWidget *widget, GdkE
gtk_signal_emit_by_name (GTK_OBJECT (priv->hadj), "value_changed");
gtk_signal_emit_by_name (GTK_OBJECT (priv->vadj), "value_changed");
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->hadj), view);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->vadj), view);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->hadj), 0,
+ view, G_SIGNAL_MATCH_DATA, 2);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->vadj), 0,
+ view, G_SIGNAL_MATCH_DATA, 2);
}
return TRUE;
@@ -1303,7 +1308,7 @@ scroll_to (EMap *view, int x, int y)
gc = gdk_gc_new (window);
gdk_gc_set_exposures (gc, TRUE);
- gdk_window_copy_area (window, gc, dest_x, dest_y, window, src_x, src_y, width - abs (xofs), height - abs (yofs));
+ gdk_draw_pixmap (window, gc, window, src_x, src_y, dest_x, dest_y, width - abs (xofs), height - abs (yofs));
gdk_gc_destroy (gc);
@@ -1455,7 +1460,7 @@ blowup_window_area (GdkWindow *window, g
/* Get area constraints */
- gdk_window_get_size (window, &area_width, &area_height);
+ gdk_drawable_get_size (window, &area_width, &area_height);
/* Initialize area division array indexes */
@@ -1513,9 +1518,9 @@ blowup_window_area (GdkWindow *window, g
/* Push left */
for (j = 0; j < zoom_chunk - 1; j++)
- gdk_window_copy_area (window, gc, line + j + 1, 0, window, line, 0, 1, area_height);
+ gdk_draw_pixmap (window, gc, window, line, 0, line + j + 1, 0, 1, area_height);
- gdk_window_copy_area (window, gc, 0, 0, window, zoom_chunk, 0, line, area_height);
+ gdk_draw_pixmap (window, gc, window, zoom_chunk, 0, 0, 0, line, area_height);
if (line > target_x) target_x -= zoom_chunk;
}
else
@@ -1523,9 +1528,9 @@ blowup_window_area (GdkWindow *window, g
/* Push right */
for (j = 0; j < zoom_chunk - 1; j++)
- gdk_window_copy_area (window, gc, line + j - (zoom_chunk - 1), 0, window, line - zoom_chunk, 0, 1, area_height);
+ gdk_draw_pixmap (window, gc, window, line - zoom_chunk, 0, line + j - (zoom_chunk - 1), 0, 1, area_height);
- gdk_window_copy_area (window, gc, line, 0, window, line - zoom_chunk, 0, area_width - line, area_height);
+ gdk_draw_pixmap (window, gc, window, line - zoom_chunk, 0, line, 0, area_width - line, area_height);
if (line < target_x) target_x += zoom_chunk;
}
}
@@ -1541,9 +1546,9 @@ blowup_window_area (GdkWindow *window, g
/* Push up */
for (j = 0; j < zoom_chunk - 1; j++)
- gdk_window_copy_area (window, gc, 0, line + j + 1, window, 0, line, area_width, 1);
+ gdk_draw_pixmap (window, gc, window, 0, line, 0, line + j + 1, area_width, 1);
- gdk_window_copy_area (window, gc, 0, 0, window, 0, zoom_chunk, area_width, line);
+ gdk_draw_pixmap (window, gc, window, 0, zoom_chunk, 0, 0, area_width, line);
if (line > target_y) target_y -= zoom_chunk;
}
else
@@ -1551,9 +1556,9 @@ blowup_window_area (GdkWindow *window, g
/* Push down */
for (j = 0; j < zoom_chunk - 1; j++)
- gdk_window_copy_area (window, gc, 0, line + j - (zoom_chunk - 1), window, 0, line - zoom_chunk, area_width, 1);
+ gdk_draw_pixmap (window, gc, window, 0, line - zoom_chunk, 0, line + j - (zoom_chunk - 1), area_width, 1);
- gdk_window_copy_area (window, gc, 0, line, window, 0, line - zoom_chunk, area_width, area_height - line);
+ gdk_draw_pixmap (window, gc, window, 0, line - zoom_chunk, 0, line, area_width, area_height - line);
if (line < target_y) target_y += zoom_chunk;
}
}
@@ -1696,8 +1701,10 @@ zoom_do (EMap *map)
priv = map->priv;
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->hadj), map);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->vadj), map);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->hadj), 0,
+ map, G_SIGNAL_MATCH_DATA, 1);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->vadj), 0,
+ map, G_SIGNAL_MATCH_DATA, 1);
if (priv->zoom_state == E_MAP_ZOOMING_IN)
{
@@ -1710,8 +1717,10 @@ zoom_do (EMap *map)
zoom_out (map);
}
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->hadj), map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->vadj), map);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->hadj), 0,
+ map, G_SIGNAL_MATCH_DATA, 2);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->vadj), 0,
+ map, G_SIGNAL_MATCH_DATA, 2);
set_scroll_area(map);
}
@@ -1772,17 +1781,21 @@ set_scroll_area (EMap *view)
{
priv->hadj->value = priv->xofs;
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->hadj), view);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->hadj), 0,
+ view, G_SIGNAL_MATCH_DATA, 1);
gtk_signal_emit_by_name (GTK_OBJECT (priv->hadj), "value_changed");
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->hadj), view);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->hadj), 0,
+ view, G_SIGNAL_MATCH_DATA, 2);
}
if (priv->vadj->value != priv->yofs)
{
priv->vadj->value = priv->yofs;
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->vadj), view);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->vadj), 0,
+ view, G_SIGNAL_MATCH_DATA, 1);
gtk_signal_emit_by_name (GTK_OBJECT (priv->vadj), "value_changed");
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->vadj), view);
+ gtk_signal_compat_matched (GTK_OBJECT (priv->vadj), 0,
+ view, G_SIGNAL_MATCH_DATA, 2);
}
}
Index: misc/e-multi-config-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-multi-config-dialog.c,v
retrieving revision 1.30
diff -u -p -r1.30 e-multi-config-dialog.c
--- misc/e-multi-config-dialog.c 13 Sep 2004 16:24:32 -0000 1.30
+++ misc/e-multi-config-dialog.c 29 Sep 2004 20:20:12 -0000
@@ -121,7 +121,7 @@ set_page_timeout_callback (void *data)
multi_config_dialog = E_MULTI_CONFIG_DIALOG (data);
priv = multi_config_dialog->priv;
- gtk_notebook_set_page (GTK_NOTEBOOK (priv->notebook), priv->set_page_timeout_page);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), priv->set_page_timeout_page);
priv->set_page_timeout_id = 0;
return FALSE;
@@ -437,7 +437,7 @@ e_multi_config_dialog_show_page (EMultiC
priv = dialog->priv;
e_table_set_cursor_row (e_table_scrolled_get_table (E_TABLE_SCROLLED (priv->list_e_table)), page);
- gtk_notebook_set_page (GTK_NOTEBOOK (priv->notebook), page);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), page);
}
Index: misc/e-search-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-search-bar.c,v
retrieving revision 1.79
diff -u -p -r1.79 e-search-bar.c
--- misc/e-search-bar.c 26 Jul 2004 15:30:14 -0000 1.79
+++ misc/e-search-bar.c 29 Sep 2004 20:20:12 -0000
@@ -747,7 +747,7 @@ impl_get_property (GObject *object, guin
break;
case PROP_TEXT:
- g_value_set_string_take_ownership (value, e_search_bar_get_text (esb));
+ g_value_take_string (value, e_search_bar_get_text (esb));
break;
default:
Index: misc/e-source-option-menu.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-source-option-menu.c,v
retrieving revision 1.3
diff -u -p -r1.3 e-source-option-menu.c
--- misc/e-source-option-menu.c 17 Dec 2003 00:50:03 -0000 1.3
+++ misc/e-source-option-menu.c 29 Sep 2004 20:20:12 -0000
@@ -68,7 +68,7 @@ static void
select_source_foreach_menu_item (GtkWidget *menu_item,
ForeachMenuItemData *data)
{
- ESource *source = gtk_object_get_data (GTK_OBJECT (menu_item), MENU_ITEM_SOURCE_DATA_ID);
+ ESource *source = g_object_get_data (G_OBJECT (menu_item), MENU_ITEM_SOURCE_DATA_ID);
if (data->found_source)
return;
@@ -109,7 +109,7 @@ static void
menu_item_activate_callback (GtkMenuItem *menu_item,
ESourceOptionMenu *option_menu)
{
- ESource *source = gtk_object_get_data (GTK_OBJECT (menu_item), MENU_ITEM_SOURCE_DATA_ID);
+ ESource *source = g_object_get_data (G_OBJECT (menu_item), MENU_ITEM_SOURCE_DATA_ID);
if (source != NULL)
select_source (option_menu, source);
@@ -137,7 +137,7 @@ populate (ESourceOptionMenu *option_menu
gtk_widget_set_sensitive (item, FALSE);
gtk_widget_show (item);
- gtk_menu_append (GTK_MENU (menu), item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
i ++;
@@ -146,14 +146,14 @@ populate (ESourceOptionMenu *option_menu
char *label = g_strconcat (" ", e_source_peek_name (source), NULL);
GtkWidget *item = gtk_menu_item_new_with_label (label);
- gtk_object_set_data_full (GTK_OBJECT (item), MENU_ITEM_SOURCE_DATA_ID, source,
+ g_object_set_data_full (G_OBJECT (item), MENU_ITEM_SOURCE_DATA_ID, source,
(GtkDestroyNotify) g_object_unref);
g_object_ref (source);
g_signal_connect (item, "activate", G_CALLBACK (menu_item_activate_callback), option_menu);
gtk_widget_show (item);
- gtk_menu_append (GTK_MENU (menu), item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
if (first_source_item == -1) {
first_source_item = i;
Index: misc/e-task-widget.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-task-widget.c,v
retrieving revision 1.3
diff -u -p -r1.3 e-task-widget.c
--- misc/e-task-widget.c 20 May 2004 18:38:52 -0000 1.3
+++ misc/e-task-widget.c 29 Sep 2004 20:20:12 -0000
@@ -166,7 +166,7 @@ e_task_widget_construct (ETaskWidget *ta
gtk_widget_show (priv->label);
gtk_box_pack_start (GTK_BOX (box), priv->label, TRUE, TRUE, 0);
- gdk_pixmap_unref (pixmap);
+ gdk_drawable_unref (pixmap);
if (mask)
gdk_bitmap_unref (mask);
Index: misc/e-title-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-title-bar.c,v
retrieving revision 1.13
diff -u -p -r1.13 e-title-bar.c
--- misc/e-title-bar.c 23 Jan 2003 19:30:48 -0000 1.13
+++ misc/e-title-bar.c 29 Sep 2004 20:20:12 -0000
@@ -199,9 +199,9 @@ button_realize_cb (GtkWidget *widget,
gtk_container_add (GTK_CONTAINER (priv->button), hbox);
- gdk_pixmap_unref (close_pixmap);
+ gdk_drawable_unref (close_pixmap);
g_object_unref (close_mask);
- gdk_pixmap_unref (pin_pixmap);
+ gdk_drawable_unref (pin_pixmap);
g_object_unref (pin_mask);
show_and_hide_pixmaps_according_to_mode (title_bar);
@@ -259,21 +259,23 @@ class_init (ETitleBarClass *klass)
parent_class = g_type_class_ref(gtk_frame_get_type ());
signals[LABEL_BUTTON_PRESS_EVENT] =
- gtk_signal_new ("label_button_press_event",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- G_STRUCT_OFFSET (ETitleBarClass, label_button_press_event),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
+ g_signal_new ("label_button_press_event",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ETitleBarClass, label_button_press_event),
+ NULL, NULL,
+ gtk_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
signals[BUTTON_CLICKED] =
- gtk_signal_new ("button_clicked",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- G_STRUCT_OFFSET (ETitleBarClass, button_clicked),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("button_clicked",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ETitleBarClass, button_clicked),
+ NULL, NULL,
+ gtk_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]