Permalink
Browse files

Use G_CALLBACK for porting to gtk3

  • Loading branch information...
thynson committed Mar 26, 2012
1 parent d6c30de commit 5548adc0b1a67596f2dbbaa32ebf067ff30ea6bf
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/gui/facepopupwindow.c
View
@@ -116,7 +116,7 @@ static void qq_face_popup_window_init(QQFacePopupWindow *win)
gtk_window_set_skip_taskbar_hint(GTK_WINDOW(win), TRUE);
g_signal_connect(win, "focus-out-event"
- , GTK_SIGNAL_FUNC(qq_face_popup_window_focus_out), win);
+ , G_CALLBACK(qq_face_popup_window_focus_out), win);
GtkWidget *table, *img, *eventbox, *frame;
gint i, j, k;
@@ -136,16 +136,16 @@ static void qq_face_popup_window_init(QQFacePopupWindow *win)
par -> face = face_transfer_table[k];
par -> win = GTK_WIDGET(win);
++k;
- g_signal_connect(eventbox , "button-release-event"
- , GTK_SIGNAL_FUNC(face_popup_window_clicked)
+ g_signal_connect(eventbox , "button-release-event"
+ , G_CALLBACK(face_popup_window_clicked)
, par);
frame = gtk_frame_new(NULL);
gtk_container_add(GTK_CONTAINER(frame), eventbox);
- g_signal_connect(eventbox , "enter-notify-event"
- , GTK_SIGNAL_FUNC(face_enter_notify_event)
+ g_signal_connect(eventbox , "enter-notify-event"
+ , G_CALLBACK(face_enter_notify_event)
, frame);
- g_signal_connect(eventbox , "leave-notify-event"
- , GTK_SIGNAL_FUNC(face_leave_notify_event)
+ g_signal_connect(eventbox , "leave-notify-event"
+ , G_CALLBACK(face_leave_notify_event)
, frame);
gtk_table_attach_defaults(GTK_TABLE(table), frame
, j, j + 1, i, i + 1);
@@ -171,9 +171,9 @@ static void qq_face_popup_windowclass_init(QQFacePopupWindowClass *klass)
//install the 'face-clicked' signal
klass -> face_clicked_default_handler = default_handler;
//void signal_handler(gpointer instance, gint face, gpointer data)
- klass -> face_clicked_signal_id =
+ klass -> face_clicked_signal_id =
g_signal_new("face-clicked"
- , G_TYPE_FROM_CLASS(klass)
+ , G_TYPE_FROM_CLASS(klass)
, G_SIGNAL_RUN_LAST //run after the default handler
, G_STRUCT_OFFSET(QQFacePopupWindowClass
, face_clicked_default_handler)

0 comments on commit 5548adc

Please sign in to comment.