Mercurial > pidgin
changeset 6771:8eebba08b44b
[gaim-migrate @ 7308]
The right-click menu for conversation tabs now shows the tab icon and
status, if tab icons are enabled. Thanks Jesse Farmer.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 07 Sep 2003 03:08:50 +0000 |
parents | efef00de3f09 |
children | e719379c8a79 |
files | ChangeLog src/gtkconv.c src/gtkconv.h |
diffstat | 3 files changed, 31 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Sep 07 02:58:47 2003 +0000 +++ b/ChangeLog Sun Sep 07 03:08:50 2003 +0000 @@ -12,6 +12,8 @@ online accounts as colored. * Added SSL support, compatible with GNUTLS and Mozilla NSS. * Added support for gettext 0.12.x. + * The right-click menu for conversation tabs now shows the tab icon + and status, if tab icons are enabled. (Jesse Farmer) * Korean translation updated (Kyung-uk Son) * Swedish translation updated (Tore Lundqvist (luntor))
--- a/src/gtkconv.c Sun Sep 07 02:58:47 2003 +0000 +++ b/src/gtkconv.c Sun Sep 07 03:08:50 2003 +0000 @@ -3806,7 +3806,7 @@ GaimConversation *focus_conv; GtkWidget *pane = NULL; GtkWidget *tab_cont; - GtkWidget *tabby; + GtkWidget *tabby, *menu_tabby; gboolean new_ui; GaimConversationType conv_type; const char *name; @@ -3932,6 +3932,7 @@ } gtkconv->tabby = tabby = gtk_hbox_new(FALSE, 5); + gtkconv->menu_tabby = menu_tabby = gtk_hbox_new(FALSE, 5); /* Close button. */ gtkconv->close = gtk_button_new(); @@ -3948,10 +3949,12 @@ /* Status icon. */ gtkconv->icon = gtk_image_new(); + gtkconv->menu_icon = gtk_image_new(); update_tab_icon(conv); /* Tab label. */ gtkconv->tab_label = gtk_label_new(gaim_conversation_get_title(conv)); + gtkconv->menu_label = gtk_label_new(gaim_conversation_get_title(conv)); #if 0 gtk_misc_set_alignment(GTK_MISC(gtkconv->tab_label), 0.00, 0.5); gtk_misc_set_padding(GTK_MISC(gtkconv->tab_label), 4, 0); @@ -3960,23 +3963,29 @@ /* Pack it all together. */ gtk_box_pack_start(GTK_BOX(tabby), gtkconv->icon, FALSE, FALSE, 0); - if (gaim_prefs_get_bool("/gaim/gtk/conversations/icons_on_tabs")) + gtk_box_pack_start(GTK_BOX(menu_tabby), gtkconv->menu_icon, FALSE, FALSE, 0); + if (gaim_prefs_get_bool("/gaim/gtk/conversations/icons_on_tabs")) { gtk_widget_show_all(gtkconv->icon); + gtk_widget_show_all(gtkconv->menu_icon); + } gtk_box_pack_start(GTK_BOX(tabby), gtkconv->tab_label, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(menu_tabby), gtkconv->menu_label, TRUE, TRUE, 0); gtk_widget_show(gtkconv->tab_label); + gtk_widget_show(gtkconv->menu_label); + gtk_misc_set_alignment(GTK_MISC(gtkconv->menu_label), 0, 0); gtk_box_pack_start(GTK_BOX(tabby), gtkconv->close, FALSE, FALSE, 0); if (gaim_prefs_get_bool("/gaim/gtk/conversations/close_on_tabs")) gtk_widget_show_all(gtkconv->close); gtk_widget_show(tabby); + gtk_widget_show(menu_tabby); /* Add this pane to the conversations notebook. */ gtk_notebook_append_page(GTK_NOTEBOOK(gtkwin->notebook), tab_cont, tabby); - gtk_notebook_set_menu_label_text(GTK_NOTEBOOK(gtkwin->notebook), tab_cont, - gaim_conversation_get_title(conv)); + gtk_notebook_set_menu_label(GTK_NOTEBOOK(gtkwin->notebook), tab_cont, menu_tabby); gtk_widget_show(tab_cont); @@ -4845,7 +4854,8 @@ gtkconv = GAIM_GTK_CONVERSATION(conv); gtk_label_set_text(GTK_LABEL(gtkconv->tab_label), title); - + gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title); + if(conv == gaim_window_get_active_conversation(win)) gtk_window_set_title(GTK_WINDOW(gtkwin->window), title); } @@ -4868,6 +4878,9 @@ gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->icon), gaim_gtk_blist_get_status_icon((GaimBlistNode *)b, GAIM_STATUS_ICON_SMALL)); + gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->menu_icon), + gaim_gtk_blist_get_status_icon((GaimBlistNode *)b, + GAIM_STATUS_ICON_SMALL)); } else { GdkPixbuf *pixbuf, *scale; pixbuf = create_prpl_icon(account); @@ -4876,11 +4889,13 @@ scale = gdk_pixbuf_scale_simple(pixbuf, 15, 15, GDK_INTERP_BILINEAR); gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->icon), scale); + gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->menu_icon), scale); g_object_unref(pixbuf); g_object_unref(scale); } else { gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->icon), NULL); + gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->menu_icon), NULL); } } } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { @@ -4891,11 +4906,13 @@ scale = gdk_pixbuf_scale_simple(pixbuf, 15, 15, GDK_INTERP_BILINEAR); gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->icon), scale); + gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->menu_icon), scale); g_object_unref(pixbuf); g_object_unref(scale); } else { gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->icon), NULL); + gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->menu_icon), NULL); } } } @@ -5687,9 +5704,12 @@ if (value) { update_tab_icon(conv); gtk_widget_show(gtkconv->icon); + gtk_widget_show(gtkconv->menu_icon); } - else + else { gtk_widget_hide(gtkconv->icon); + gtk_widget_hide(gtkconv->menu_icon); + } } }
--- a/src/gtkconv.h Sun Sep 07 02:58:47 2003 +0000 +++ b/src/gtkconv.h Sun Sep 07 03:08:50 2003 +0000 @@ -135,6 +135,7 @@ GtkWidget *tab_cont; GtkWidget *tabby; + GtkWidget *menu_tabby; GtkWidget *imhtml; GtkTextBuffer *entry_buffer; @@ -145,6 +146,8 @@ GtkWidget *close; GtkWidget *icon; GtkWidget *tab_label; + GtkWidget *menu_icon; + GtkWidget *menu_label; GtkSizeGroup *sg; GtkWidget *bbox;