comparison src/gtkstatusbox.c @ 12075:f62022e07351

[gaim-migrate @ 14372] another docklet patch from sadrul - this one fixes the scrollwheel behavior in the status message box so that it doesn't change your status. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 14 Nov 2005 01:23:36 +0000
parents 950acb2bc835
children 4fb1edd43f45
comparison
equal deleted inserted replaced
12074:950acb2bc835 12075:f62022e07351
493 update_to_reflect_account_status(status_box, account, gaim_account_get_active_status(account)); 493 update_to_reflect_account_status(status_box, account, gaim_account_get_active_status(account));
494 } 494 }
495 495
496 } 496 }
497 497
498 static gboolean scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml)
499 {
500 if (event->direction == GDK_SCROLL_UP)
501 gtk_imhtml_page_up(imhtml);
502 else if (event->direction == GDK_SCROLL_DOWN)
503 gtk_imhtml_page_down(imhtml);
504 return TRUE;
505 }
506
498 #if GTK_CHECK_VERSION(2,6,0) 507 #if GTK_CHECK_VERSION(2,6,0)
499 static gboolean 508 static gboolean
500 dropdown_store_row_separator_func(GtkTreeModel *model, 509 dropdown_store_row_separator_func(GtkTreeModel *model,
501 GtkTreeIter *iter, gpointer data) 510 GtkTreeIter *iter, gpointer data)
502 { 511 {
587 status_box->sw = gtk_scrolled_window_new(NULL, NULL); 596 status_box->sw = gtk_scrolled_window_new(NULL, NULL);
588 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(status_box->sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); 597 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(status_box->sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
589 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(status_box->sw), GTK_SHADOW_IN); 598 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(status_box->sw), GTK_SHADOW_IN);
590 gtk_container_add(GTK_CONTAINER(status_box->sw), status_box->imhtml); 599 gtk_container_add(GTK_CONTAINER(status_box->sw), status_box->imhtml);
591 gtk_box_pack_start(GTK_BOX(status_box->vbox), status_box->sw, TRUE, TRUE, 0); 600 gtk_box_pack_start(GTK_BOX(status_box->vbox), status_box->sw, TRUE, TRUE, 0);
601
602 g_signal_connect(G_OBJECT(status_box->imhtml), "scroll_event",
603 G_CALLBACK(scroll_event_cb), status_box->imhtml);
592 604
593 605
594 #if GTK_CHECK_VERSION(2,6,0) 606 #if GTK_CHECK_VERSION(2,6,0)
595 gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(status_box), dropdown_store_row_separator_func, NULL, NULL); 607 gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(status_box), dropdown_store_row_separator_func, NULL, NULL);
596 #endif 608 #endif