[atomix] Replace deprecated gtk symbols
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atomix] Replace deprecated gtk symbols
- Date: Tue, 9 Mar 2010 21:42:39 +0000 (UTC)
commit 7d174ba8e975b95cc28c69d7fbe68192383a0d74
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date: Tue Mar 9 22:42:28 2010 +0100
Replace deprecated gtk symbols
src/board.c | 12 ++++++------
src/canvas_helper.c | 2 +-
src/clock.c | 6 +++---
src/preferences.c | 16 ++++++++--------
4 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/src/board.c b/src/board.c
index 35635de..97ea0b1 100644
--- a/src/board.c
+++ b/src/board.c
@@ -495,7 +495,7 @@ gboolean board_undo_move ()
anim_data->dest_col = move->src_col;
selector_data->sel_item = move->item;
- anim_data->timeout_id = gtk_timeout_add (ANIM_TIMEOUT,
+ anim_data->timeout_id = g_timeout_add (ANIM_TIMEOUT,
move_item_anim, anim_data);
g_free (move);
@@ -863,7 +863,7 @@ void move_item (GnomeCanvasItem *item, ItemDirection direc)
anim_data->dest_row = dest_row;
anim_data->dest_col = dest_col;
- anim_data->timeout_id = gtk_timeout_add (ANIM_TIMEOUT, move_item_anim,
+ anim_data->timeout_id = g_timeout_add (ANIM_TIMEOUT, move_item_anim,
anim_data);
}
}
@@ -918,7 +918,7 @@ static void selector_move_to (SelectorData *data, guint row, guint col)
g_return_if_fail (data != NULL);
if (data->arrow_show_timeout > -1)
- gtk_timeout_remove (data->arrow_show_timeout);
+ g_source_remove (data->arrow_show_timeout);
data->arrow_show_timeout = -1;
@@ -953,7 +953,7 @@ static void selector_unselect (SelectorData *data)
static void selector_arrows_hide (SelectorData *data)
{
if (data->arrow_show_timeout > -1)
- gtk_timeout_remove (data->arrow_show_timeout);
+ g_source_remove (data->arrow_show_timeout);
data->arrow_show_timeout = -1;
gnome_canvas_item_hide (GNOME_CANVAS_ITEM (data->arrows));
}
@@ -1061,10 +1061,10 @@ static void selector_arrows_show (SelectorData *data)
else
{
if (data->arrow_show_timeout > -1)
- gtk_timeout_remove (data->arrow_show_timeout);
+ g_source_remove (data->arrow_show_timeout);
data->arrow_show_timeout =
- gtk_timeout_add (800, (GtkFunction) show_arrow_group, data);
+ g_timeout_add (800, (GtkFunction) show_arrow_group, data);
}
}
diff --git a/src/canvas_helper.c b/src/canvas_helper.c
index 196e8fa..a0ce58c 100644
--- a/src/canvas_helper.c
+++ b/src/canvas_helper.c
@@ -23,7 +23,7 @@
void set_background_color (GtkWidget *canvas, GdkColor *color)
{
/* try to alloc color */
- if (gdk_color_alloc (gdk_colormap_get_system (), color))
+ if (gdk_colormap_alloc_color (gdk_colormap_get_system (), color, FALSE, TRUE))
{
GtkStyle *style;
style = gtk_style_copy (gtk_widget_get_style (GTK_WIDGET (canvas)));
diff --git a/src/clock.c b/src/clock.c
index 05a28c1..a40dcfe 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -65,7 +65,7 @@ static void clock_class_init (ClockClass *klass)
GtkObjectClass *object_class = (GtkObjectClass *) klass;
object_class->destroy = clock_destroy;
- parent_class = gtk_type_class (gtk_label_get_type ());
+ parent_class = g_type_class_peek (gtk_label_get_type ());
}
static void clock_init (Clock *clock)
@@ -146,7 +146,7 @@ void clock_start (Clock *clock)
return;
clock_set_seconds (clock, clock->stopped);
- clock->timer_id = gtk_timeout_add (1000 * clock->update_interval,
+ clock->timer_id = g_timeout_add (1000 * clock->update_interval,
clock_timer_callback, clock);
}
@@ -159,6 +159,6 @@ void clock_stop (Clock *clock)
clock->stopped = time (NULL) - clock->seconds;
- gtk_timeout_remove (clock->timer_id);
+ g_source_remove (clock->timer_id);
clock->timer_id = -1;
}
diff --git a/src/preferences.c b/src/preferences.c
index c2e831a..1450c14 100644
--- a/src/preferences.c
+++ b/src/preferences.c
@@ -97,7 +97,7 @@ void preferences_show_dialog (void)
pref_xml = glade_xml_new (GLADE_FILE, "dlg_properties", NULL);
dlg = glade_xml_get_widget (pref_xml, "dlg_properties");
gtk_signal_connect (GTK_OBJECT (dlg), "apply",
- GTK_SIGNAL_FUNC (handle_apply), NULL);
+ G_CALLBACK (handle_apply), NULL);
/* get widget */
radio_keyboard = glade_xml_get_widget (pref_xml, "radio_keyboard");
@@ -141,17 +141,17 @@ void preferences_show_dialog (void)
/* connect widgets with handlers */
gtk_signal_connect (GTK_OBJECT (radio_mouse), "toggled",
- GTK_SIGNAL_FUNC (handle_mouse_ctrl_toggled), dlg);
+ G_CALLBACK (handle_mouse_ctrl_toggled), dlg);
gtk_signal_connect (GTK_OBJECT (radio_keyboard), "toggled",
- GTK_SIGNAL_FUNC (handle_widget_changed), dlg);
+ G_CALLBACK (handle_widget_changed), dlg);
gtk_signal_connect (GTK_OBJECT (check_hide_cursor), "toggled",
- GTK_SIGNAL_FUNC (handle_widget_changed), dlg);
+ G_CALLBACK (handle_widget_changed), dlg);
gtk_signal_connect (GTK_OBJECT (check_lazy_dragging), "toggled",
- GTK_SIGNAL_FUNC (handle_widget_changed), dlg);
+ G_CALLBACK (handle_widget_changed), dlg);
gtk_signal_connect (GTK_OBJECT (check_score_time), "toggled",
- GTK_SIGNAL_FUNC (handle_global_checkbox_toggled), dlg);
+ G_CALLBACK (handle_global_checkbox_toggled), dlg);
gtk_signal_connect (GTK_OBJECT (adjustment), "value-changed",
- GTK_SIGNAL_FUNC (handle_widget_changed), dlg);
+ G_CALLBACK (handle_widget_changed), dlg);
/* show dialog */
gtk_widget_show (dlg);
@@ -262,7 +262,7 @@ void handle_global_checkbox_toggled (GtkToggleButton *togglebutton,
gtk_widget_set_sensitive (GTK_WIDGET (frame), FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (togglebutton),
- GTK_SIGNAL_FUNC
+ G_CALLBACK
(handle_global_checkbox_toggled), data);
gtk_toggle_button_set_active (togglebutton,
!gtk_toggle_button_get_active
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]