denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] GTK3 version


From: Richard Shann
Subject: Re: [Denemo-devel] GTK3 version
Date: Tue, 02 Oct 2012 14:29:22 +0100

Thank you for the testing. I have put this version into git and hope
that the guy with the Ubuntu installation on which the failure was
happening will test. The code is more plausibly correct than the
previous version in any case.
Richard

On Tue, 2012-10-02 at 02:22 -0600, Josue Abarca wrote:
> On Mon, Oct 01, 2012 at 12:10:14PM +0100, Richard Shann wrote:
> ...
> > This is curious indeed, while looking at the question of Esc and arrows
> > (see other email) I came across the relevant bit of code
> > 
> > #if GTK_MAJOR_VERSION == 3
> >   action = 
> > gtk_activatable_get_related_action(gtk_menu_get_active(GTK_MENU(menu)));
> > #else
> >   action = 
> > gtk_widget_get_action(GTK_MENU_SHELL(menu)->active_menu_item);//note this 
> > is not gtk_menu_get_active(menu) except after a selection has been made, we 
> > want the menu item that the pointer has moved to before it is selected.
> > #endif
> > 
> > The second definition of the action is the one I wrote (for GTK2) and I
> > obviously had a struggle to get at the highlighted item, hence my note
> > and my access to the structure itself. Jeremiah would have created the
> > alternative for GTK3, and for GTK2 this yields the first menu item every
> > time, because the highlighted item is not selected until you release the
> > mouse button (when it is too late to take action).
> > That it actual works on some versions of GTK3 and not others is strange.
> > If someone compiling with GTK3 could test the following replacement for
> > the above:
> > 
> > action = 
> > gtk_activatable_get_related_action(gtk_menu_shell_get_selected_item( 
> > GTK_MENU_SHELL(menu)));
> > 
> > that would be interesting. This (gtk_menu_shell_get_selected_item) is a
> > new accessor in GTK3, and may be the right thing to use. The name of
> > this function is less promising than the one currently in use, however.
> > As usual the documentation is vague.
> > 
> > Richard
> 
> I have tested this (gtk_menu_shell_get_selected_item), and for me,
> Denemo keeps working fine :).
> 
> You can see attached the change(patch) that I made.
> 
> $ ldd /tmp/denemo/bin/denemo | grep gtk
>   libgtksourceview-3.0.so.0 =>
>   /usr/lib/x86_64-linux-gnu/libgtksourceview-3.0.so.0
>   (0x00007fbe96f19000)
>   libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 
> (0x00007fbe96005000)
> 
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/denemo-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]