pidgin/gtkstatusbox.c

changeset 38433
361c801c4536
parent 38358
30ba44276e74
child 38705
62a7a975251a
equal deleted inserted replaced
38431:71898cf4d20f 38433:361c801c4536
1092 return FALSE; 1092 return FALSE;
1093 1093
1094 /* Reset the status if Escape was pressed */ 1094 /* Reset the status if Escape was pressed */
1095 if (event->keyval == GDK_KEY_Escape) 1095 if (event->keyval == GDK_KEY_Escape)
1096 { 1096 {
1097 purple_timeout_remove(status_box->typing); 1097 g_source_remove(status_box->typing);
1098 status_box->typing = 0; 1098 status_box->typing = 0;
1099 #if 0 1099 #if 0
1100 /* TODO WebKit: Doesn't do this? */ 1100 /* TODO WebKit: Doesn't do this? */
1101 pidgin_webview_set_populate_primary_clipboard( 1101 pidgin_webview_set_populate_primary_clipboard(
1102 PIDGIN_WEBVIEW(status_box->webview), TRUE); 1102 PIDGIN_WEBVIEW(status_box->webview), TRUE);
1110 } 1110 }
1111 return TRUE; 1111 return TRUE;
1112 } 1112 }
1113 1113
1114 pidgin_status_box_pulse_typing(status_box); 1114 pidgin_status_box_pulse_typing(status_box);
1115 purple_timeout_remove(status_box->typing); 1115 g_source_remove(status_box->typing);
1116 status_box->typing = purple_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); 1116 status_box->typing = g_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box);
1117 1117
1118 return FALSE; 1118 return FALSE;
1119 } 1119 }
1120 1120
1121 static gboolean 1121 static gboolean
2560 /* TODO WebKit: Doesn't do this? */ 2560 /* TODO WebKit: Doesn't do this? */
2561 pidgin_webview_set_populate_primary_clipboard( 2561 pidgin_webview_set_populate_primary_clipboard(
2562 PIDGIN_WEBVIEW(status_box->webview), TRUE); 2562 PIDGIN_WEBVIEW(status_box->webview), TRUE);
2563 #endif 2563 #endif
2564 2564
2565 purple_timeout_remove(status_box->typing); 2565 g_source_remove(status_box->typing);
2566 status_box->typing = 0; 2566 status_box->typing = 0;
2567 2567
2568 activate_currently_selected_status(status_box); 2568 activate_currently_selected_status(status_box);
2569 pidgin_status_box_refresh(status_box); 2569 pidgin_status_box_refresh(status_box);
2570 } 2570 }
2589 gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, 2589 gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
2590 TYPE_COLUMN, &type, 2590 TYPE_COLUMN, &type,
2591 DATA_COLUMN, &data, 2591 DATA_COLUMN, &data,
2592 -1); 2592 -1);
2593 if ((wastyping = (status_box->typing != 0))) 2593 if ((wastyping = (status_box->typing != 0)))
2594 purple_timeout_remove(status_box->typing); 2594 g_source_remove(status_box->typing);
2595 status_box->typing = 0; 2595 status_box->typing = 0;
2596 2596
2597 if (gtk_widget_get_sensitive(GTK_WIDGET(status_box))) 2597 if (gtk_widget_get_sensitive(GTK_WIDGET(status_box)))
2598 { 2598 {
2599 if (type == PIDGIN_STATUS_BOX_TYPE_POPULAR || type == PIDGIN_STATUS_BOX_TYPE_SAVED_POPULAR) 2599 if (type == PIDGIN_STATUS_BOX_TYPE_POPULAR || type == PIDGIN_STATUS_BOX_TYPE_SAVED_POPULAR)
2659 if (gtk_widget_get_sensitive(GTK_WIDGET(status_box))) 2659 if (gtk_widget_get_sensitive(GTK_WIDGET(status_box)))
2660 { 2660 {
2661 if (status_box->webview_visible) 2661 if (status_box->webview_visible)
2662 { 2662 {
2663 gtk_widget_show_all(status_box->vbox); 2663 gtk_widget_show_all(status_box->vbox);
2664 status_box->typing = purple_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); 2664 status_box->typing = g_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box);
2665 gtk_widget_grab_focus(status_box->webview); 2665 gtk_widget_grab_focus(status_box->webview);
2666 #if 0 2666 #if 0
2667 /* TODO WebKit: Doesn't do this? */ 2667 /* TODO WebKit: Doesn't do this? */
2668 pidgin_webview_set_populate_primary_clipboard( 2668 pidgin_webview_set_populate_primary_clipboard(
2669 PIDGIN_WEBVIEW(status_box->webview), FALSE); 2669 PIDGIN_WEBVIEW(status_box->webview), FALSE);
2716 PidginStatusBox *status_box = (PidginStatusBox*)data; 2716 PidginStatusBox *status_box = (PidginStatusBox*)data;
2717 if (gtk_widget_get_sensitive(GTK_WIDGET(status_box))) 2717 if (gtk_widget_get_sensitive(GTK_WIDGET(status_box)))
2718 { 2718 {
2719 if (status_box->typing != 0) { 2719 if (status_box->typing != 0) {
2720 pidgin_status_box_pulse_typing(status_box); 2720 pidgin_status_box_pulse_typing(status_box);
2721 purple_timeout_remove(status_box->typing); 2721 g_source_remove(status_box->typing);
2722 } 2722 }
2723 status_box->typing = purple_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); 2723 status_box->typing = g_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box);
2724 } 2724 }
2725 pidgin_status_box_refresh(status_box); 2725 pidgin_status_box_refresh(status_box);
2726 } 2726 }
2727 2727
2728 static void 2728 static void

mercurial