changeset 12827:0f40c44348f4

[gaim-migrate @ 15175] SF Patch #1402533 from Sadrul " This patch pops up the dropdown when mouse-wheel is scrolled over the statusbox. This will perhaps be `better' (as in `less confusing' or something) for many users." The original patch didn't stop the scroll wheel action from applying after the dropdown popped up (at least on my system with GtkComboBox::appears-as-list = 1), so I fixed that. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 11 Jan 2006 07:03:58 +0000
parents 74eb10cead7f
children 09ac562f0813
files src/gtkstatusbox.c
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkstatusbox.c	Wed Jan 11 06:20:32 2006 +0000
+++ b/src/gtkstatusbox.c	Wed Jan 11 07:03:58 2006 +0000
@@ -520,7 +520,13 @@
 	}
 }
 
-static gboolean scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml)
+static gboolean combo_box_scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml)
+{
+	gtk_combo_box_popup(GTK_COMBO_BOX(w));
+	return TRUE;
+}
+
+static gboolean imhtml_scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml)
 {
 	if (event->direction == GDK_SCROLL_UP)
 		gtk_imhtml_page_up(imhtml);
@@ -787,8 +793,9 @@
 
 	gtk_box_pack_start(GTK_BOX(status_box->vbox), status_box->sw, TRUE, TRUE, 0);
 
+	g_signal_connect(G_OBJECT(status_box), "scroll_event", G_CALLBACK(combo_box_scroll_event_cb), NULL);
 	g_signal_connect(G_OBJECT(status_box->imhtml), "scroll_event",
-					G_CALLBACK(scroll_event_cb), status_box->imhtml);
+					G_CALLBACK(imhtml_scroll_event_cb), status_box->imhtml);
 
 #if GTK_CHECK_VERSION(2,6,0)
 	gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(status_box), dropdown_store_row_separator_func, NULL, NULL);