# HG changeset patch # User Luke Schierer # Date 1180039790 0 # Node ID e88994a3f13b9183bef270fa173fecbde3756371 # Parent f01ffb3ea78f9b1c68a2dd33d947b68eadc8f8f7# Parent 0018ab54be9c137b25d53cc9cfc342c184b709b1 merge of '64ee7c914990b77a9dc5a39b4cd32209d3b75f7c' and 'da684d8432437c2aac354655c463487fc9a9b34b' diff -r f01ffb3ea78f -r e88994a3f13b libpurple/protocols/jabber/google.c --- a/libpurple/protocols/jabber/google.c Thu May 24 20:48:43 2007 +0000 +++ b/libpurple/protocols/jabber/google.c Thu May 24 20:49:50 2007 +0000 @@ -219,7 +219,7 @@ const char *grt = xmlnode_get_attrib_with_namespace(item, "t", "google:roster"); const char *subscription = xmlnode_get_attrib(item, "subscription"); - if (!strcmp(subscription, "none")) { + if (subscription && !strcmp(subscription, "none")) { /* The Google Talk servers will automatically add people from your Gmail address book * with subscription=none. If we see someone with subscription=none, ignore them. */ diff -r f01ffb3ea78f -r e88994a3f13b pidgin/gtkaccount.c --- a/pidgin/gtkaccount.c Thu May 24 20:48:43 2007 +0000 +++ b/pidgin/gtkaccount.c Thu May 24 20:49:50 2007 +0000 @@ -388,6 +388,8 @@ GtkWidget *hbox; GtkWidget *vbox; GtkWidget *entry; + GtkWidget *menu; + GtkWidget *item; GList *user_splits; GList *l, *l2; char *username = NULL; @@ -474,7 +476,7 @@ GtkWidget *entry = l->data; PurpleAccountUserSplit *split = l2->data; - const char *value = NULL; + const char *value = NULL, *protocol = NULL; char *c; if (dialog->account != NULL) { @@ -488,10 +490,17 @@ value = c; } } - if (value == NULL) value = purple_account_user_split_get_default_value(split); + /* Google Talk default domain hackery! */ + menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(dialog->protocol_menu)); + item = gtk_menu_get_active(GTK_MENU(menu)); + protocol = g_object_get_data(G_OBJECT(item), "protocol"); + if (value == NULL && !strcmp(protocol, "prpl-fake") && + !strcmp(purple_account_user_split_get_text(split), _("Domain"))) + value = "gmail.com"; + if (value != NULL) gtk_entry_set_text(GTK_ENTRY(entry), value); } @@ -680,7 +689,7 @@ { PurpleAccountOption *option; PurpleAccount *account; - GtkWidget *frame, *vbox, *check, *entry, *combo; + GtkWidget *frame, *vbox, *check, *entry, *combo, *menu, *item; const GList *list, *node; gint i, idx, int_value; GtkListStore *model; @@ -690,7 +699,7 @@ GList *l; char buf[1024]; char *title; - const char *str_value; + const char *str_value, *protocol; gboolean bool_value; if (dialog->protocol_frame != NULL) { @@ -813,6 +822,14 @@ gtk_entry_set_invisible_char(GTK_ENTRY(entry), PIDGIN_INVISIBLE_CHAR); } + /* Google Talk default domain hackery! */ + menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(dialog->protocol_menu)); + item = gtk_menu_get_active(GTK_MENU(menu)); + protocol = g_object_get_data(G_OBJECT(item), "protocol"); + if (str_value == NULL && !strcmp(protocol, "prpl-fake") && + !strcmp(_("Connect server"), purple_account_option_get_text(option))) + str_value = "talk.google.com"; + if (str_value != NULL) gtk_entry_set_text(GTK_ENTRY(entry), str_value); diff -r f01ffb3ea78f -r e88994a3f13b pidgin/gtkconv.c --- a/pidgin/gtkconv.c Thu May 24 20:48:43 2007 +0000 +++ b/pidgin/gtkconv.c Thu May 24 20:49:50 2007 +0000 @@ -4207,9 +4207,6 @@ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(imhtml_sw), imhtml_sw_hscroll, GTK_POLICY_ALWAYS); - gtk_widget_set_size_request(gtkconv->imhtml, - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/default_width"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/default_height")); g_signal_connect(G_OBJECT(gtkconv->imhtml), "size-allocate", G_CALLBACK(size_allocate_cb), gtkconv); @@ -4386,9 +4383,6 @@ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(imhtml_sw), imhtml_sw_hscroll, GTK_POLICY_ALWAYS); - gtk_widget_set_size_request(gtkconv->imhtml, - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/default_width"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/default_height")); g_signal_connect(G_OBJECT(gtkconv->imhtml), "size-allocate", G_CALLBACK(size_allocate_cb), gtkconv); @@ -7714,6 +7708,11 @@ gtkconv = PIDGIN_CONVERSATION(conv); + if (gtkconv->u.im->typing_timer != 0) { + g_source_remove(gtkconv->u.im->typing_timer); + gtkconv->u.im->typing_timer = 0; + } + stop_anim(NULL, gtkconv); } static void @@ -8046,8 +8045,9 @@ gtk_window_set_role(GTK_WINDOW(win->window), "conversation"); gtk_window_set_resizable(GTK_WINDOW(win->window), TRUE); gtk_container_set_border_width(GTK_CONTAINER(win->window), 0); - GTK_WINDOW(win->window)->allow_shrink = TRUE; - + gtk_window_set_default_size(win->window, + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/default_width"), + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/default_height")); if (available_list == NULL) { create_icon_lists(win->window); } diff -r f01ffb3ea78f -r e88994a3f13b pidgin/gtkimhtmltoolbar.c --- a/pidgin/gtkimhtmltoolbar.c Thu May 24 20:48:43 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Thu May 24 20:49:50 2007 +0000 @@ -899,7 +899,10 @@ { GtkWidget *hbox = GTK_WIDGET(toolbar); GtkWidget *button; + GtkWidget *bbox; + GtkWidget *label; GtkWidget *sep; + GtkWidget *image; GtkSizeGroup *sg; toolbar->imhtml = NULL; @@ -912,7 +915,7 @@ toolbar->tooltips = gtk_tooltips_new(); - gtk_box_set_spacing(GTK_BOX(toolbar), 3); + gtk_box_set_spacing(GTK_BOX(toolbar), 0); sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); /* Bold */ @@ -981,12 +984,16 @@ gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); /* Font Face */ - - button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_TOOLBAR_FONT_FACE); - gtk_size_group_add_widget(sg, button); + button = gtk_toggle_button_new(); + gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); + bbox = gtk_hbox_new(FALSE, 3); + gtk_container_add(GTK_CONTAINER(button), bbox); + image = gtk_image_new_from_stock(GTK_STOCK_BOLD, 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(_("Font")); + gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); - gtk_tooltips_set_tip(toolbar->tooltips, button, - _("Font face"), NULL); + gtk_widget_show_all(button); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(toggle_font), toolbar); @@ -1020,13 +1027,20 @@ /* Sep */ sep = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); + gtk_widget_show(sep); - /* Reset Formatting */ - button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_CLEAR); - gtk_size_group_add_widget(sg, button); + /* Reset formatting */ + button = gtk_toggle_button_new(); + gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); + bbox = gtk_hbox_new(FALSE, 3); + gtk_container_add(GTK_CONTAINER(button), bbox); + image = gtk_image_new_from_stock(PIDGIN_STOCK_CLEAR, 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(_("Reset font")); + gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); - gtk_tooltips_set_tip(toolbar->tooltips, button, - _("Reset formatting"), NULL); + gtk_widget_show_all(button); + g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(clear_formatting_cb), toolbar); @@ -1036,6 +1050,7 @@ /* Sep */ sep = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); + gtk_widget_show(sep); /* Insert Link */ button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_TOOLBAR_INSERT_LINK); @@ -1059,10 +1074,16 @@ toolbar->image = button; /* Insert Smiley */ - button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_TOOLBAR_SMILEY); - gtk_size_group_add_widget(sg, button); + button = gtk_toggle_button_new(); + gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); + bbox = gtk_hbox_new(FALSE, 3); + gtk_container_add(GTK_CONTAINER(button), bbox); + image = gtk_image_new_from_stock(PIDGIN_STOCK_TOOLBAR_INSERT, 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(_("Insert")); + gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); - gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert smiley"), NULL); + gtk_widget_show_all(button); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(insert_smiley_cb), toolbar); @@ -1070,7 +1091,7 @@ toolbar->smiley = button; toolbar->sml = NULL; - gtk_widget_show_all(hbox); + gtk_widget_show(hbox); } GtkWidget *gtk_imhtmltoolbar_new() diff -r f01ffb3ea78f -r e88994a3f13b pidgin/pidginstock.c --- a/pidgin/pidginstock.c Thu May 24 20:48:43 2007 +0000 +++ b/pidgin/pidginstock.c Thu May 24 20:49:50 2007 +0000 @@ -160,6 +160,7 @@ { PIDGIN_STOCK_TOOLBAR_UNBLOCK, "toolbar", "unblock.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL }, { PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR, "toolbar", "select-avatar.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL }, { PIDGIN_STOCK_TOOLBAR_SEND_FILE, "toolbar", "send-file.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL }, + { PIDGIN_STOCK_TOOLBAR_INSERT, "toolbar", "insert.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL }, { PIDGIN_STOCK_TRAY_AVAILABLE, "tray", "tray-online.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL }, { PIDGIN_STOCK_TRAY_INVISIBLE, "tray", "tray-invisible.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL }, diff -r f01ffb3ea78f -r e88994a3f13b pidgin/pidginstock.h --- a/pidgin/pidginstock.h Thu May 24 20:48:43 2007 +0000 +++ b/pidgin/pidginstock.h Thu May 24 20:49:50 2007 +0000 @@ -125,6 +125,7 @@ #define PIDGIN_STOCK_TOOLBAR_UNBLOCK "pidgin-unblock" #define PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR "pidgin-select-avatar" #define PIDGIN_STOCK_TOOLBAR_SEND_FILE "pidgin-send-file" +#define PIDGIN_STOCK_TOOLBAR_INSERT "pidgin-insert" /* Tray icons */ #define PIDGIN_STOCK_TRAY_AVAILABLE "pidgin-tray-available" diff -r f01ffb3ea78f -r e88994a3f13b pidgin/pixmaps/toolbar/16/Makefile.am --- a/pidgin/pixmaps/toolbar/16/Makefile.am Thu May 24 20:48:43 2007 +0000 +++ b/pidgin/pixmaps/toolbar/16/Makefile.am Thu May 24 20:49:50 2007 +0000 @@ -6,6 +6,7 @@ font-face.png \ font-size-down.png \ font-size-up.png \ + insert.png \ insert-image.png \ insert-link.png \ message-new.png \ diff -r f01ffb3ea78f -r e88994a3f13b pidgin/pixmaps/toolbar/16/insert.png Binary file pidgin/pixmaps/toolbar/16/insert.png has changed diff -r f01ffb3ea78f -r e88994a3f13b pidgin/pixmaps/toolbar/16/scalable/Makefile.am --- a/pidgin/pixmaps/toolbar/16/scalable/Makefile.am Thu May 24 20:48:43 2007 +0000 +++ b/pidgin/pixmaps/toolbar/16/scalable/Makefile.am Thu May 24 20:49:50 2007 +0000 @@ -2,4 +2,5 @@ change-fgcolor.svg \ emote-select.svg \ font-size-down.svg \ - font-size-up.svg + font-size-up.svg \ + insert.svg diff -r f01ffb3ea78f -r e88994a3f13b pidgin/pixmaps/toolbar/16/scalable/insert.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/toolbar/16/scalable/insert.svg Thu May 24 20:49:50 2007 +0000 @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + +