changeset 17208:9c7abb947af4

Change Toolbar to use three buttons with text.
author Sean Egan <seanegan@gmail.com>
date Thu, 24 May 2007 00:35:15 +0000
parents f8893e01cda8
children baaf2cf9339c 9ca9f87b4b47
files pidgin/gtkconv.c pidgin/gtkimhtmltoolbar.c pidgin/pidginstock.c pidgin/pidginstock.h pidgin/pixmaps/toolbar/16/Makefile.am pidgin/pixmaps/toolbar/16/insert.png pidgin/pixmaps/toolbar/16/scalable/Makefile.am pidgin/pixmaps/toolbar/16/scalable/insert.svg
diffstat 8 files changed, 179 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Wed May 23 23:21:48 2007 +0000
+++ b/pidgin/gtkconv.c	Thu May 24 00:35:15 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);
 
@@ -8046,8 +8040,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	Wed May 23 23:21:48 2007 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Thu May 24 00:35:15 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	Wed May 23 23:21:48 2007 +0000
+++ b/pidgin/pidginstock.c	Thu May 24 00:35:15 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	Wed May 23 23:21:48 2007 +0000
+++ b/pidgin/pidginstock.h	Thu May 24 00:35:15 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	Wed May 23 23:21:48 2007 +0000
+++ b/pidgin/pixmaps/toolbar/16/Makefile.am	Thu May 24 00:35:15 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	Wed May 23 23:21:48 2007 +0000
+++ b/pidgin/pixmaps/toolbar/16/scalable/Makefile.am	Thu May 24 00:35:15 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 00:35:15 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>