Re: disabling mouse scroll on GtkComboBox and spin buttons

2016-05-22 Thread Franco Broi
I sent a post about this in January. My solution retains the scrolling feature but disables it when scrolling the parent window. Note that each combobox is inside an event box and hence the gtk_bin_get_child in combobox_scroll_fix. static gboolean _block_scroll = TRUE; static void

Re: disabling mouse scroll on GtkComboBox and spin buttons

2016-05-22 Thread Lokesh Chakka
thanks guys I am using like this: g_signal_connect( spin_button, "scroll-event", G_CALLBACK(gtk_true), NULL ); g_signal_connect( combo_box, "scroll-event", G_CALLBACK(gtk_true), NULL ); issue resolved.. Thanks & Regards -- Lokesh Chakka, Mobile: 9731023458 On Sun, May 22, 2016 at 8:48

Re: disabling mouse scroll on GtkComboBox and spin buttons

2016-05-22 Thread Ben Iofel
There's a utility function for just returning true: gtk_true On Sun, May 22, 2016, 6:53 AM wrote: > On 22 May 2016 at 10:57, Florian Pelz wrote: > > On 05/22/2016 11:54 AM, jcup...@gmail.com wrote: > >> x = gtk_combo_box_new_text(); > >>

Re: disabling mouse scroll on GtkComboBox and spin buttons

2016-05-22 Thread jcupitt
On 22 May 2016 at 10:57, Florian Pelz wrote: > On 05/22/2016 11:54 AM, jcup...@gmail.com wrote: >> x = gtk_combo_box_new_text(); >> g_signal_connect(x, "scroll-event", G_CALLBACK(true_cb), NULL); >> ... > > Ah yes, this is a much better way. I'm not sure it'd work for

Re: disabling mouse scroll on GtkComboBox and spin buttons

2016-05-22 Thread Florian Pelz
On 05/22/2016 11:54 AM, jcup...@gmail.com wrote: > x = gtk_combo_box_new_text(); > g_signal_connect(x, "scroll-event", G_CALLBACK(true_cb), NULL); > ... Ah yes, this is a much better way. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: disabling mouse scroll on GtkComboBox and spin buttons

2016-05-22 Thread jcupitt
On 22 May 2016 at 07:36, Lokesh Chakka wrote: > Is there a way to disable mouse scroll on GtkComboBox and GtkSpinButton > widgets ? Yes, the mouse wheel to change the combo drives me CRAZY. It means you can't use the mouse wheel to scroll a window that contains

Re: disabling mouse scroll on GtkComboBox and spin buttons

2016-05-22 Thread Florian Pelz
On 05/22/2016 08:36 AM, Lokesh Chakka wrote: > Hello, > > Is there a way to disable mouse scroll on GtkComboBox and GtkSpinButton > widgets ? > > an example will help much. > > Thanks & Regards > Use a function like static void disable_scroll (GtkWidget *widget) { GdkEventMask events;

disabling mouse scroll on GtkComboBox and spin buttons

2016-05-22 Thread Lokesh Chakka
Hello, Is there a way to disable mouse scroll on GtkComboBox and GtkSpinButton widgets ? an example will help much. Thanks & Regards -- Lokesh Chakka, Mobile: 9731023458 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org