Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 4681:efa194b5caaf
[gaim-migrate @ 4992]
Set the title of the conversation window to be the same as the tab label,
because that's the cool thing to do.
For the moment, this will suffer from the same problem as the tabs that are
red when they shouldn't be. I hope to get all of that fixed this weekend.
I define "this weekend" as "before I go to class on Monday", just like Sean
defines "tonight" as "before he goes to bed" ;-)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 09 Mar 2003 08:20:51 +0000 |
parents | 7ffe2b64de2d |
children | 794cc8ec1166 |
comparison
equal
deleted
inserted
replaced
4680:2c380754eb67 | 4681:efa194b5caaf |
---|---|
1757 gtkconv->make_sound); | 1757 gtkconv->make_sound); |
1758 | 1758 |
1759 gaim_gtk_set_state_lock(FALSE); | 1759 gaim_gtk_set_state_lock(FALSE); |
1760 | 1760 |
1761 gtk_widget_grab_focus(gtkconv->entry); | 1761 gtk_widget_grab_focus(gtkconv->entry); |
1762 | |
1763 gtk_window_set_title(GTK_WINDOW(gtkwin->window), | |
1764 gtk_label_get_text(GTK_LABEL(gtkconv->tab_label))); | |
1762 } | 1765 } |
1763 | 1766 |
1764 /************************************************************************** | 1767 /************************************************************************** |
1765 * Utility functions | 1768 * Utility functions |
1766 **************************************************************************/ | 1769 **************************************************************************/ |
3265 gtkwin->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 3268 gtkwin->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
3266 gtk_window_set_role(GTK_WINDOW(gtkwin->window), "conversation"); | 3269 gtk_window_set_role(GTK_WINDOW(gtkwin->window), "conversation"); |
3267 gtk_window_set_resizable(GTK_WINDOW(gtkwin->window), TRUE); | 3270 gtk_window_set_resizable(GTK_WINDOW(gtkwin->window), TRUE); |
3268 gtk_container_set_border_width(GTK_CONTAINER(gtkwin->window), 0); | 3271 gtk_container_set_border_width(GTK_CONTAINER(gtkwin->window), 0); |
3269 gtk_widget_realize(gtkwin->window); | 3272 gtk_widget_realize(gtkwin->window); |
3270 gtk_window_set_title(GTK_WINDOW(gtkwin->window), _("Conversations")); | |
3271 | 3273 |
3272 g_signal_connect(G_OBJECT(gtkwin->window), "delete_event", | 3274 g_signal_connect(G_OBJECT(gtkwin->window), "delete_event", |
3273 G_CALLBACK(close_win_cb), win); | 3275 G_CALLBACK(close_win_cb), win); |
3274 | 3276 |
3275 /* Create the notebook. */ | 3277 /* Create the notebook. */ |
4171 | 4173 |
4172 static void | 4174 static void |
4173 gaim_gtkconv_set_title(struct gaim_conversation *conv, const char *title) | 4175 gaim_gtkconv_set_title(struct gaim_conversation *conv, const char *title) |
4174 { | 4176 { |
4175 struct gaim_gtk_conversation *gtkconv; | 4177 struct gaim_gtk_conversation *gtkconv; |
4176 | 4178 struct gaim_window *win; |
4179 struct gaim_gtk_window *gtkwin; | |
4180 | |
4181 win = gaim_conversation_get_window(conv); | |
4182 gtkwin = GAIM_GTK_WINDOW(win); | |
4177 gtkconv = GAIM_GTK_CONVERSATION(conv); | 4183 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4178 | 4184 |
4179 gtk_label_set_text(GTK_LABEL(gtkconv->tab_label), title); | 4185 gtk_label_set_text(GTK_LABEL(gtkconv->tab_label), title); |
4186 | |
4187 if(conv == gaim_window_get_active_conversation(win)) | |
4188 gtk_window_set_title(GTK_WINDOW(gtkwin->window), title); | |
4180 } | 4189 } |
4181 | 4190 |
4182 static void | 4191 static void |
4183 gaim_gtkconv_updated(struct gaim_conversation *conv, GaimConvUpdateType type) | 4192 gaim_gtkconv_updated(struct gaim_conversation *conv, GaimConvUpdateType type) |
4184 { | 4193 { |