Mercurial > pidgin
diff src/gtkprefs.c @ 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 | 31c45d99e1a8 |
children | 083d1e4a9c78 |
line wrap: on
line diff
--- 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);