comparison src/gtkconv.c @ 10971:57e3e958ff49

[gaim-migrate @ 12796] This commit includes the changes I made to oldstatus to make urgent notification/taskbar flashing more sensible (auto- tab switching), the changes to notify.c so that tab switching doesn't reset the counters, and the changes and translations for gaim.desktop committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 06 Jun 2005 01:40:46 +0000
parents aae07c7e23a3
children 56cfc50d2a81
comparison
equal deleted inserted replaced
10970:a126bdfd7688 10971:57e3e958ff49
133 gaim_conv_window_destroy(win); 133 gaim_conv_window_destroy(win);
134 134
135 return TRUE; 135 return TRUE;
136 } 136 }
137 137
138 /*
139 * When a conversation window is focused, we know the user
140 * has looked at it so we know there are no longer unseen
141 * messages.
142 */
143 static gint
144 focus_win_cb(GtkWidget *w, GdkEventFocus *e, gpointer d)
145 {
146 GaimConvWindow *win = (GaimConvWindow *)d;
147 GaimConversation *conv = gaim_conv_window_get_active_conversation(win);
148
149 gaim_conversation_set_unseen(conv, GAIM_UNSEEN_NONE);
150
151 return FALSE;
152 }
153
138 static gint 154 static gint
139 close_conv_cb(GtkWidget *w, GaimGtkConversation *gtkconv) 155 close_conv_cb(GtkWidget *w, GaimGtkConversation *gtkconv)
140 { 156 {
141 GList *list = g_list_copy(gtkconv->convs), *l; 157 GList *list = g_list_copy(gtkconv->convs), *l;
142 158
2861 2877
2862 g_return_if_fail(conv != NULL); 2878 g_return_if_fail(conv != NULL);
2863 2879
2864 gtkwin = GAIM_GTK_WINDOW(win); 2880 gtkwin = GAIM_GTK_WINDOW(win);
2865 2881
2866 gaim_conversation_set_unseen(conv, GAIM_UNSEEN_NONE); 2882 /*
2883 * Only set "unseen" to "none" if the window has focus
2884 */
2885 if (gaim_conv_window_has_focus(win))
2886 gaim_conversation_set_unseen(conv, GAIM_UNSEEN_NONE);
2867 2887
2868 /* Update the menubar */ 2888 /* Update the menubar */
2869 gray_stuff_out(gtkconv); 2889 gray_stuff_out(gtkconv);
2870 2890
2871 update_typing_icon(gtkconv); 2891 update_typing_icon(gtkconv);
4188 gtk_container_set_border_width(GTK_CONTAINER(gtkwin->window), 0); 4208 gtk_container_set_border_width(GTK_CONTAINER(gtkwin->window), 0);
4189 GTK_WINDOW(gtkwin->window)->allow_shrink = TRUE; 4209 GTK_WINDOW(gtkwin->window)->allow_shrink = TRUE;
4190 4210
4191 g_signal_connect(G_OBJECT(gtkwin->window), "delete_event", 4211 g_signal_connect(G_OBJECT(gtkwin->window), "delete_event",
4192 G_CALLBACK(close_win_cb), win); 4212 G_CALLBACK(close_win_cb), win);
4213
4214 g_signal_connect(G_OBJECT(gtkwin->window), "focus_in_event",
4215 G_CALLBACK(focus_win_cb), win);
4193 4216
4194 /* Create the notebook. */ 4217 /* Create the notebook. */
4195 gtkwin->notebook = gtk_notebook_new(); 4218 gtkwin->notebook = gtk_notebook_new();
4196 4219
4197 pos = gaim_prefs_get_int("/gaim/gtk/conversations/tab_side"); 4220 pos = gaim_prefs_get_int("/gaim/gtk/conversations/tab_side");