| 120 static void got_typing_keypress(struct gaim_conversation *conv, gboolean first); |
120 static void got_typing_keypress(struct gaim_conversation *conv, gboolean first); |
| 121 static GList *generate_invite_user_names(struct gaim_connection *gc); |
121 static GList *generate_invite_user_names(struct gaim_connection *gc); |
| 122 static void add_chat_buddy_common(struct gaim_conversation *conv, |
122 static void add_chat_buddy_common(struct gaim_conversation *conv, |
| 123 const char *name, int pos); |
123 const char *name, int pos); |
| 124 static void tab_complete(struct gaim_conversation *conv); |
124 static void tab_complete(struct gaim_conversation *conv); |
| |
125 static void update_typing_icon(struct gaim_conversation *conv); |
| 125 static gboolean update_send_as_selection(struct gaim_window *win); |
126 static gboolean update_send_as_selection(struct gaim_window *win); |
| 126 static char *item_factory_translate_func (const char *path, gpointer func_data); |
127 static char *item_factory_translate_func (const char *path, gpointer func_data); |
| 127 |
128 |
| 128 /************************************************************************** |
129 /************************************************************************** |
| 129 * Callbacks |
130 * Callbacks |
| 1721 |
1722 |
| 1722 if (gtkwin->menu.send_as != NULL) |
1723 if (gtkwin->menu.send_as != NULL) |
| 1723 gtk_widget_hide(gtkwin->menu.send_as); |
1724 gtk_widget_hide(gtkwin->menu.send_as); |
| 1724 } |
1725 } |
| 1725 |
1726 |
| |
1727 update_typing_icon(conv); |
| |
1728 |
| 1726 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.logging), |
1729 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.logging), |
| 1727 gaim_conversation_is_logging(conv)); |
1730 gaim_conversation_is_logging(conv)); |
| 1728 |
1731 |
| 1729 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.sounds), |
1732 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.sounds), |
| 1730 gtkconv->make_sound); |
1733 gtkconv->make_sound); |
| 1889 |
1892 |
| 1890 if (timeout) |
1893 if (timeout) |
| 1891 gaim_im_set_type_again(im, time(NULL) + timeout); |
1894 gaim_im_set_type_again(im, time(NULL) + timeout); |
| 1892 else |
1895 else |
| 1893 gaim_im_set_type_again(im, 0); |
1896 gaim_im_set_type_again(im, 0); |
| |
1897 } |
| |
1898 } |
| |
1899 |
| |
1900 static void |
| |
1901 update_typing_icon(struct gaim_conversation *conv) |
| |
1902 { |
| |
1903 struct gaim_gtk_window *gtkwin; |
| |
1904 struct gaim_im *im = NULL; |
| |
1905 |
| |
1906 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(conv)); |
| |
1907 |
| |
1908 if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) |
| |
1909 im = GAIM_IM(conv); |
| |
1910 |
| |
1911 if(gtkwin->menu.typing_icon) { |
| |
1912 gtk_widget_destroy(gtkwin->menu.typing_icon); |
| |
1913 gtkwin->menu.typing_icon = NULL; |
| |
1914 } |
| |
1915 if(im && gaim_im_get_typing_state(im) == TYPING) { |
| |
1916 gtkwin->menu.typing_icon = gtk_image_menu_item_new(); |
| |
1917 gtk_image_menu_item_set_image( |
| |
1918 GTK_IMAGE_MENU_ITEM(gtkwin->menu.typing_icon), |
| |
1919 gtk_image_new_from_stock(GAIM_STOCK_TYPING, |
| |
1920 GTK_ICON_SIZE_MENU)); |
| |
1921 gtk_tooltips_set_tip(gtk_tooltips_new(), gtkwin->menu.typing_icon, |
| |
1922 _("User is typing..."), NULL); |
| |
1923 } else if(im && gaim_im_get_typing_state(im) == TYPED) { |
| |
1924 gtkwin->menu.typing_icon = gtk_image_menu_item_new(); |
| |
1925 gtk_image_menu_item_set_image( |
| |
1926 GTK_IMAGE_MENU_ITEM(gtkwin->menu.typing_icon), |
| |
1927 gtk_image_new_from_stock(GAIM_STOCK_TYPED, |
| |
1928 GTK_ICON_SIZE_MENU)); |
| |
1929 gtk_tooltips_set_tip(gtk_tooltips_new(), gtkwin->menu.typing_icon, |
| |
1930 _("User has typed something and paused"), NULL); |
| |
1931 } |
| |
1932 |
| |
1933 if(gtkwin->menu.typing_icon) { |
| |
1934 gtk_menu_item_set_right_justified( |
| |
1935 GTK_MENU_ITEM(gtkwin->menu.typing_icon), TRUE); |
| |
1936 gtk_widget_show_all(gtkwin->menu.typing_icon); |
| |
1937 gtk_menu_shell_append(GTK_MENU_SHELL(gtkwin->menu.menubar), |
| |
1938 gtkwin->menu.typing_icon); |
| 1894 } |
1939 } |
| 1895 } |
1940 } |
| 1896 |
1941 |
| 1897 static gboolean |
1942 static gboolean |
| 1898 update_send_as_selection(struct gaim_window *win) |
1943 update_send_as_selection(struct gaim_window *win) |
| 4183 |
4228 |
| 4184 static void |
4229 static void |
| 4185 gaim_gtkconv_updated(struct gaim_conversation *conv, GaimConvUpdateType type) |
4230 gaim_gtkconv_updated(struct gaim_conversation *conv, GaimConvUpdateType type) |
| 4186 { |
4231 { |
| 4187 struct gaim_window *win; |
4232 struct gaim_window *win; |
| |
4233 struct gaim_gtk_window *gtkwin; |
| 4188 struct gaim_gtk_conversation *gtkconv; |
4234 struct gaim_gtk_conversation *gtkconv; |
| 4189 struct gaim_gtk_chat_pane *gtkchat; |
4235 struct gaim_gtk_chat_pane *gtkchat; |
| 4190 struct gaim_chat *chat; |
4236 struct gaim_chat *chat; |
| 4191 |
4237 |
| 4192 win = gaim_conversation_get_window(conv); |
4238 win = gaim_conversation_get_window(conv); |
| |
4239 gtkwin = GAIM_GTK_WINDOW(win); |
| 4193 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4240 gtkconv = GAIM_GTK_CONVERSATION(conv); |
| 4194 |
4241 |
| 4195 if (type == GAIM_CONV_UPDATE_ACCOUNT) { |
4242 if (type == GAIM_CONV_UPDATE_ACCOUNT) { |
| 4196 gaim_conversation_autoset_title(conv); |
4243 gaim_conversation_autoset_title(conv); |
| 4197 gaim_gtkconv_update_buddy_icon(conv); |
4244 gaim_gtkconv_update_buddy_icon(conv); |
| 4201 |
4248 |
| 4202 smiley_themeize(gtkconv->imhtml); |
4249 smiley_themeize(gtkconv->imhtml); |
| 4203 } |
4250 } |
| 4204 else if (type == GAIM_CONV_UPDATE_TYPING || |
4251 else if (type == GAIM_CONV_UPDATE_TYPING || |
| 4205 type == GAIM_CONV_UPDATE_UNSEEN) { |
4252 type == GAIM_CONV_UPDATE_UNSEEN) { |
| 4206 |
|
| 4207 GtkStyle *style; |
4253 GtkStyle *style; |
| 4208 struct gaim_im *im = NULL; |
4254 struct gaim_im *im = NULL; |
| |
4255 |
| 4209 |
4256 |
| 4210 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) |
4257 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) |
| 4211 im = GAIM_IM(conv); |
4258 im = GAIM_IM(conv); |
| 4212 |
4259 |
| 4213 style = gtk_style_new(); |
4260 style = gtk_style_new(); |
| 4243 style->fg[GTK_STATE_NORMAL] = style->fg[GTK_STATE_ACTIVE]; |
4290 style->fg[GTK_STATE_NORMAL] = style->fg[GTK_STATE_ACTIVE]; |
| 4244 } |
4291 } |
| 4245 |
4292 |
| 4246 gtk_widget_set_style(gtkconv->tab_label, style); |
4293 gtk_widget_set_style(gtkconv->tab_label, style); |
| 4247 g_object_unref(G_OBJECT(style)); |
4294 g_object_unref(G_OBJECT(style)); |
| |
4295 |
| |
4296 if(type == GAIM_CONV_UPDATE_TYPING && |
| |
4297 conv == gaim_window_get_active_conversation(win)) { |
| |
4298 update_typing_icon(conv); |
| |
4299 } |
| |
4300 |
| 4248 } |
4301 } |
| 4249 else if (type == GAIM_CONV_UPDATE_TOPIC) { |
4302 else if (type == GAIM_CONV_UPDATE_TOPIC) { |
| 4250 chat = GAIM_CHAT(conv); |
4303 chat = GAIM_CHAT(conv); |
| 4251 gtkchat = gtkconv->u.chat; |
4304 gtkchat = gtkconv->u.chat; |
| 4252 |
4305 |
| 4258 |
4311 |
| 4259 generate_send_as_items(win, NULL); |
4312 generate_send_as_items(win, NULL); |
| 4260 } |
4313 } |
| 4261 else if(type == GAIM_CONV_UPDATE_ADD || |
4314 else if(type == GAIM_CONV_UPDATE_ADD || |
| 4262 type == GAIM_CONV_UPDATE_REMOVE) { |
4315 type == GAIM_CONV_UPDATE_REMOVE) { |
| 4263 |
4316 |
| 4264 update_convo_add_button(conv); |
4317 update_convo_add_button(conv); |
| 4265 } |
4318 } |
| 4266 } |
4319 } |
| 4267 |
4320 |
| 4268 static struct gaim_conversation_ui_ops conversation_ui_ops = |
4321 static struct gaim_conversation_ui_ops conversation_ui_ops = |