changeset 6979:bdd046deec7e

[gaim-migrate @ 7535] Two string corrections from KAMO Tomoyuki. Thanks dude I fiddled with the prefs away message stuff... Changed a function to static and renamed it to have a _cb at the end. Added an away_message_click_cb() callback--double clicking on an away message in the list brings up the edit away message window. I want to add an "Activate" button, but I don't have time now, and away.c needs to be core/ui split, I think, with the ability to activate a chosen message. The Second Annual Chips & Dip night was good. We watched The Unborn 2, which is supposed to be one of the worst movies ever. It rocked. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 27 Sep 2003 05:11:11 +0000
parents 755462e647e5
children 1da447732906
files plugins/docklet/docklet.c src/gtkprefs.c src/protocols/napster/napster.c
diffstat 3 files changed, 19 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/docklet/docklet.c	Fri Sep 26 21:11:26 2003 +0000
+++ b/plugins/docklet/docklet.c	Sat Sep 27 05:11:11 2003 +0000
@@ -114,7 +114,7 @@
 			gaim_new_item_from_stock(menu, _("Auto-login"), GAIM_STOCK_SIGN_ON, G_CALLBACK(docklet_auto_login), NULL, 0, 0, NULL);
 			break;
 		default:
-			gaim_new_item_from_stock(menu, _("New Message.."), GAIM_STOCK_IM, G_CALLBACK(show_im_dialog), NULL, 0, 0, NULL);
+			gaim_new_item_from_stock(menu, _("New Message..."), GAIM_STOCK_IM, G_CALLBACK(show_im_dialog), NULL, 0, 0, NULL);
 			gaim_new_item_from_stock(menu, _("Join A Chat..."), GAIM_STOCK_CHAT, G_CALLBACK(join_chat), NULL, 0, 0, NULL);
 			break;
 	}
--- a/src/gtkprefs.c	Fri Sep 26 21:11:26 2003 +0000
+++ b/src/gtkprefs.c	Sat Sep 27 05:11:11 2003 +0000
@@ -2099,7 +2099,7 @@
 	return ret;
 }
 
-void away_message_sel(GtkTreeSelection *sel, GtkTreeModel *model)
+static void away_message_sel_cb(GtkTreeSelection *sel, GtkTreeModel *model)
 {
 	GtkTreeIter  iter;
 	GValue val = { 0, };
@@ -2123,6 +2123,18 @@
 
 }
 
+static gboolean away_message_click_cb(GtkWidget *tv, GdkEventButton *event, gpointer null)
+{
+	/* Only respond to double click on button 1 */
+	if ((event->button != 1) || (event->type != GDK_2BUTTON_PRESS))
+		return FALSE;
+
+	/* Show the edit away message dialog */
+	create_away_mess(NULL, tv);
+
+	return FALSE;
+}
+
 void remove_away_message(GtkWidget *widget, GtkTreeView *tv) {
 	struct away_message *am;
 	GtkTreeIter iter;
@@ -2161,9 +2173,6 @@
 	sw = gtk_scrolled_window_new(NULL,NULL);
 	away_text = gtk_imhtml_new(NULL, NULL);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
-	/*
-	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
-	*/
 	gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0);
 
 	prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
@@ -2196,9 +2205,10 @@
 	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), away_text);
 	gaim_setup_imhtml(away_text);
 	sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view));
-	g_signal_connect (G_OBJECT (sel), "changed",
-			  G_CALLBACK (away_message_sel),
-			  NULL);
+	g_signal_connect(G_OBJECT(sel), "changed",
+					 G_CALLBACK(away_message_sel_cb), NULL);
+	g_signal_connect(G_OBJECT(event_view), "button-press-event",
+					 G_CALLBACK(away_message_click_cb), NULL);
 	hbox = gtk_hbox_new(TRUE, 5);
 	gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0);
 	button = gtk_button_new_from_stock (GTK_STOCK_ADD);
--- a/src/protocols/napster/napster.c	Fri Sep 26 21:11:26 2003 +0000
+++ b/src/protocols/napster/napster.c	Sat Sep 27 05:11:11 2003 +0000
@@ -243,7 +243,7 @@
 		int tmp = read(source, buf + i, len - i);
 		if (tmp <= 0) {
 			g_free(buf);
-			buf = g_strdup_printf(_("Unable to read mesage from server.  Command is %hd, length is %hd."), len, command);
+			buf = g_strdup_printf(_("Unable to read message from server.  Command is %hd, length is %hd."), len, command);
 			gaim_connection_error(gc, buf);
 			g_free(buf);
 			return;