Mercurial > pidgin
comparison src/gtkstatusbox.c @ 12309:b3385115815c
[gaim-migrate @ 14613]
3 seconds seemed a bit too short for the typing timeout.
Let's do the beta thing tomorrow
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 03 Dec 2005 20:28:52 +0000 |
parents | d6b5373948f9 |
children | c2867c4ddcd3 |
comparison
equal
deleted
inserted
replaced
12308:1d4a05772625 | 12309:b3385115815c |
---|---|
36 #include "gtksavedstatuses.h" | 36 #include "gtksavedstatuses.h" |
37 #include "gtkstock.h" | 37 #include "gtkstock.h" |
38 #include "gtkstatusbox.h" | 38 #include "gtkstatusbox.h" |
39 #include "gtkutils.h" | 39 #include "gtkutils.h" |
40 | 40 |
41 #define TYPING_TIMEOUT 4000 | |
42 | |
41 static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data); | 43 static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data); |
42 static void remove_typing_cb(GtkGaimStatusBox *box); | 44 static void remove_typing_cb(GtkGaimStatusBox *box); |
43 | 45 |
44 static void gtk_gaim_status_box_pulse_typing(GtkGaimStatusBox *status_box); | 46 static void gtk_gaim_status_box_pulse_typing(GtkGaimStatusBox *status_box); |
45 static void gtk_gaim_status_box_refresh(GtkGaimStatusBox *status_box); | 47 static void gtk_gaim_status_box_refresh(GtkGaimStatusBox *status_box); |
462 } | 464 } |
463 if (!box->typing) | 465 if (!box->typing) |
464 return FALSE; | 466 return FALSE; |
465 gtk_gaim_status_box_pulse_typing(box); | 467 gtk_gaim_status_box_pulse_typing(box); |
466 g_source_remove(box->typing); | 468 g_source_remove(box->typing); |
467 box->typing = g_timeout_add(3000, (GSourceFunc)remove_typing_cb, box); | 469 box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, box); |
468 return FALSE; | 470 return FALSE; |
469 } | 471 } |
470 | 472 |
471 #if GTK_CHECK_VERSION(2,6,0) | 473 #if GTK_CHECK_VERSION(2,6,0) |
472 static gboolean | 474 static gboolean |
1042 | 1044 |
1043 if (status_box->imhtml_visible) | 1045 if (status_box->imhtml_visible) |
1044 { | 1046 { |
1045 gtk_widget_show_all(status_box->vbox); | 1047 gtk_widget_show_all(status_box->vbox); |
1046 if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box))) { | 1048 if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box))) { |
1047 status_box->typing = g_timeout_add(3000, (GSourceFunc)remove_typing_cb, status_box); | 1049 status_box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); |
1048 } else { | 1050 } else { |
1049 gtk_widget_hide(status_box->toolbar); | 1051 gtk_widget_hide(status_box->toolbar); |
1050 gtk_widget_hide(status_box->hsep); | 1052 gtk_widget_hide(status_box->hsep); |
1051 } | 1053 } |
1052 gtk_imhtml_clear(GTK_IMHTML(status_box->imhtml)); | 1054 gtk_imhtml_clear(GTK_IMHTML(status_box->imhtml)); |
1069 { | 1071 { |
1070 if (box->typing) { | 1072 if (box->typing) { |
1071 gtk_gaim_status_box_pulse_typing(box); | 1073 gtk_gaim_status_box_pulse_typing(box); |
1072 g_source_remove(box->typing); | 1074 g_source_remove(box->typing); |
1073 } | 1075 } |
1074 box->typing = g_timeout_add(3000, (GSourceFunc)remove_typing_cb, box); | 1076 box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, box); |
1075 gtk_widget_show(box->hsep); | 1077 gtk_widget_show(box->hsep); |
1076 gtk_widget_show(box->toolbar); | 1078 gtk_widget_show(box->toolbar); |
1077 } | 1079 } |
1078 gtk_gaim_status_box_refresh(box); | 1080 gtk_gaim_status_box_refresh(box); |
1079 } | 1081 } |