comparison src/gtkstatusbox.c @ 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 ff267281e882
children f8748df5c17a
comparison
equal deleted inserted replaced
12826:74eb10cead7f 12827:0f40c44348f4
518 518
519 update_to_reflect_account_status(status_box, account, gaim_account_get_active_status(account)); 519 update_to_reflect_account_status(status_box, account, gaim_account_get_active_status(account));
520 } 520 }
521 } 521 }
522 522
523 static gboolean scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml) 523 static gboolean combo_box_scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml)
524 {
525 gtk_combo_box_popup(GTK_COMBO_BOX(w));
526 return TRUE;
527 }
528
529 static gboolean imhtml_scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml)
524 { 530 {
525 if (event->direction == GDK_SCROLL_UP) 531 if (event->direction == GDK_SCROLL_UP)
526 gtk_imhtml_page_up(imhtml); 532 gtk_imhtml_page_up(imhtml);
527 else if (event->direction == GDK_SCROLL_DOWN) 533 else if (event->direction == GDK_SCROLL_DOWN)
528 gtk_imhtml_page_down(imhtml); 534 gtk_imhtml_page_down(imhtml);
785 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(status_box->sw), vbox); 791 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(status_box->sw), vbox);
786 gtk_box_pack_start(GTK_BOX(vbox), status_box->imhtml, TRUE, TRUE, 0); 792 gtk_box_pack_start(GTK_BOX(vbox), status_box->imhtml, TRUE, TRUE, 0);
787 793
788 gtk_box_pack_start(GTK_BOX(status_box->vbox), status_box->sw, TRUE, TRUE, 0); 794 gtk_box_pack_start(GTK_BOX(status_box->vbox), status_box->sw, TRUE, TRUE, 0);
789 795
796 g_signal_connect(G_OBJECT(status_box), "scroll_event", G_CALLBACK(combo_box_scroll_event_cb), NULL);
790 g_signal_connect(G_OBJECT(status_box->imhtml), "scroll_event", 797 g_signal_connect(G_OBJECT(status_box->imhtml), "scroll_event",
791 G_CALLBACK(scroll_event_cb), status_box->imhtml); 798 G_CALLBACK(imhtml_scroll_event_cb), status_box->imhtml);
792 799
793 #if GTK_CHECK_VERSION(2,6,0) 800 #if GTK_CHECK_VERSION(2,6,0)
794 gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(status_box), dropdown_store_row_separator_func, NULL, NULL); 801 gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(status_box), dropdown_store_row_separator_func, NULL, NULL);
795 #endif 802 #endif
796 803