Mercurial > pidgin
changeset 23813:de644f7e3958
Remove the "Call" button from the formatting toolbar.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Sat, 31 May 2008 06:45:42 +0000 |
parents | 28ab41065172 |
children | d0ac3c438b71 |
files | pidgin/gtkconv.c pidgin/gtkimhtml.h pidgin/gtkimhtmltoolbar.c |
diffstat | 3 files changed, 3 insertions(+), 53 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Sat May 31 06:29:38 2008 +0000 +++ b/pidgin/gtkconv.c Sat May 31 06:45:42 2008 +0000 @@ -6368,24 +6368,16 @@ PURPLE_MEDIA_VIDEO); gboolean av = serv_can_do_media(gc, purple_conversation_get_name(conv), PURPLE_MEDIA_AUDIO | PURPLE_MEDIA_VIDEO); - if (audio) { - buttons |= GTK_IMHTML_CALL; - gtk_widget_set_sensitive(win->menu.audio_call, TRUE); - } else { - buttons &= ~GTK_IMHTML_CALL; - gtk_widget_set_sensitive(win->menu.audio_call, FALSE); - } - + + gtk_widget_set_sensitive(win->menu.audio_call, audio ? TRUE : FALSE); gtk_widget_set_sensitive(win->menu.video_call, video ? TRUE : FALSE); gtk_widget_set_sensitive(win->menu.audio_video_call, av ? TRUE : FALSE); } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { /* for now, don't care about chats... */ - buttons &= ~GTK_IMHTML_CALL; gtk_widget_set_sensitive(win->menu.audio_call, FALSE); gtk_widget_set_sensitive(win->menu.video_call, FALSE); gtk_widget_set_sensitive(win->menu.audio_video_call, FALSE); } else { - buttons &= ~GTK_IMHTML_CALL; gtk_widget_set_sensitive(win->menu.audio_call, FALSE); gtk_widget_set_sensitive(win->menu.video_call, FALSE); gtk_widget_set_sensitive(win->menu.audio_video_call, FALSE);
--- a/pidgin/gtkimhtml.h Sat May 31 06:29:38 2008 +0000 +++ b/pidgin/gtkimhtml.h Sat May 31 06:45:42 2008 +0000 @@ -78,7 +78,6 @@ GTK_IMHTML_STRIKE = 1 << 13, /** Show custom smileys when appropriate. @since 2.5.0 */ GTK_IMHTML_CUSTOM_SMILEY = 1 << 14, - GTK_IMHTML_CALL = 1 << 15, GTK_IMHTML_ALL = -1 } GtkIMHtmlButtons;
--- a/pidgin/gtkimhtmltoolbar.c Sat May 31 06:29:38 2008 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Sat May 31 06:45:42 2008 +0000 @@ -907,14 +907,6 @@ gtk_widget_grab_focus(toolbar->imhtml); } -#ifdef USE_VV -static void -init_voice_call_cb(GtkWidget *smiley, GtkIMHtmlToolbar *toolbar) -{ - purple_debug_info("gtkimhtmltoolbar", "Call clicked!\n"); -} -#endif - static void update_buttons_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons, GtkIMHtmlToolbar *toolbar) { gtk_widget_set_sensitive(GTK_WIDGET(toolbar->bold), buttons & GTK_IMHTML_BOLD); @@ -943,9 +935,6 @@ gtk_widget_set_sensitive(GTK_WIDGET(toolbar->image), buttons & GTK_IMHTML_IMAGE); gtk_widget_set_sensitive(GTK_WIDGET(toolbar->link), buttons & GTK_IMHTML_LINK); gtk_widget_set_sensitive(GTK_WIDGET(toolbar->smiley), buttons & GTK_IMHTML_SMILEY); -#ifdef USE_VV - gtk_widget_set_sensitive(GTK_WIDGET(toolbar->call), buttons & GTK_IMHTML_CALL); -#endif } /* we call this when we want to _set_active the toggle button, it'll @@ -1234,10 +1223,6 @@ {PIDGIN_STOCK_TOOLBAR_INSERT_LINK, insert_link_cb, &toolbar->link, _("Insert Link")}, {PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE, insert_image_cb, &toolbar->image, _("Insert IM Image")}, {PIDGIN_STOCK_TOOLBAR_SMILEY, insert_smiley_cb, &toolbar->smiley, _("Insert Smiley")}, -#ifdef USE_VV - {"", NULL, NULL, NULL}, - {PIDGIN_STOCK_TOOLBAR_AUDIO_CALL, init_voice_call_cb, &toolbar->call, _("Call")}, -#endif {NULL, NULL, NULL, NULL} }; int iter; @@ -1303,11 +1288,7 @@ GtkWidget *insert_button; GtkWidget *font_button; GtkWidget *smiley_button; - -#ifdef USE_VV - GtkWidget *call_button; -#endif /* USE_VV */ - + GtkWidget *font_menu; GtkWidget *insert_menu; GtkWidget *menuitem; @@ -1449,28 +1430,6 @@ g_signal_connect_swapped(G_OBJECT(smiley_button), "clicked", G_CALLBACK(gtk_button_clicked), toolbar->smiley); gtk_widget_show_all(smiley_button); -#ifdef USE_VV - /* Sep */ - sep = gtk_vseparator_new(); - gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 0); - gtk_widget_show_all(sep); - - /* Call */ - call_button = gtk_button_new(); - gtk_button_set_relief(GTK_BUTTON(call_button), GTK_RELIEF_NONE); - bbox = gtk_hbox_new(FALSE, 3); - gtk_container_add(GTK_CONTAINER(call_button), bbox); - image = gtk_image_new_from_stock(PIDGIN_STOCK_TOOLBAR_AUDIO_CALL, - gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL)); - gtk_box_pack_start(GTK_BOX(bbox), image, FALSE, FALSE, 0); - label = gtk_label_new_with_mnemonic(_("Call")); - gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(box), call_button, FALSE, FALSE, 0); - g_signal_connect_swapped(G_OBJECT(call_button), "clicked", G_CALLBACK(gtk_button_clicked), toolbar->call); - gtk_widget_show_all(call_button); - -#endif /* USE_VV */ - gtk_box_pack_start(GTK_BOX(hbox), box, FALSE, FALSE, 0); g_object_set_data(G_OBJECT(hbox), "lean-view", box); gtk_widget_show(box);