changeset 17284:e88994a3f13b

merge of '64ee7c914990b77a9dc5a39b4cd32209d3b75f7c' and 'da684d8432437c2aac354655c463487fc9a9b34b'
author Luke Schierer <lschiere@pidgin.im>
date Thu, 24 May 2007 20:49:50 +0000
parents f01ffb3ea78f (current diff) 0018ab54be9c (diff)
children b7fa0e44d723 752d16a0de51
files
diffstat 10 files changed, 206 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- 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.
 		 */
--- 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);
 
--- 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);
 	}
--- 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()
--- 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  },
--- 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"
--- 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 \
Binary file pidgin/pixmaps/toolbar/16/insert.png has changed
--- 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
--- /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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="16px"
+   height="16px"
+   id="svg1872"
+   sodipodi:version="0.32"
+   inkscape:version="0.44.1"
+   inkscape:export-filename="/home/hbons/Desktop/insert-all.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docbase="/home/hbons/Desktop"
+   sodipodi:docname="insert-all.svg">
+  <defs
+     id="defs1874">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2802">
+      <stop
+         style="stop-color:white;stop-opacity:1;"
+         offset="0"
+         id="stop2804" />
+      <stop
+         style="stop-color:white;stop-opacity:0;"
+         offset="1"
+         id="stop2806" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2783">
+      <stop
+         style="stop-color:white;stop-opacity:1;"
+         offset="0"
+         id="stop2785" />
+      <stop
+         style="stop-color:white;stop-opacity:0;"
+         offset="1"
+         id="stop2787" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2783"
+       id="linearGradient2789"
+       x1="8.6048269"
+       y1="4.077672"
+       x2="8.6048269"
+       y2="8.9015455"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2783"
+       id="linearGradient2794"
+       gradientUnits="userSpaceOnUse"
+       x1="8.6048269"
+       y1="4.077672"
+       x2="8.6048269"
+       y2="8.9015455"
+       gradientTransform="matrix(1,0,0,0.974001,0.153466,2.116996)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2802"
+       id="linearGradient2808"
+       x1="9.5280094"
+       y1="11.860396"
+       x2="-0.20531939"
+       y2="11.860396"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.974001,0.153466,-0.805007)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.197802"
+     inkscape:cx="9.6217822"
+     inkscape:cy="7.0539604"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1440"
+     inkscape:window-height="849"
+     inkscape:window-x="0"
+     inkscape:window-y="0" />
+  <metadata
+     id="metadata1877">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <image
+       y="-18.531683"
+       x="-33.423763"
+       id="image1887"
+       height="31"
+       width="29"
+       sodipodi:absref="/home/hbons/Desktop/Screenshot-2.png"
+       xlink:href="Screenshot-2.png" />
+    <path
+       style="fill:#fcaf3e;fill-opacity:1;stroke:#c05400;stroke-width:0.99999982;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 0.18515042,6.5000001 L 15.653466,6.5000001 L 8.168182,14.841153 L 0.18515042,6.5000001 z "
+       id="rect1890"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="opacity:0.49431817;fill:url(#linearGradient2794);fill-opacity:1;stroke:white;stroke-width:0.99999982;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 2.5909654,7.474001 L 8.1534654,13.56705 L 13.372216,7.474001 L 2.5909654,7.474001 z "
+       id="path2781"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="opacity:0.18181817;fill:url(#linearGradient2808);fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1"
+       d="M -1,6.0655571 L 8.2096212,15.428502 L 8.2069307,6.0655571 L -1,6.0655571 z "
+       id="path2798"
+       sodipodi:nodetypes="cccc" />
+  </g>
+</svg>