Re: [Gtk-osx-users] accelerator problem with GtkOSXApplication



2011/2/14 Richard Procter <richard n procter gmail com>:

> Stylistically, I'd be inclined to reduce this to:
>
> static void osx_accel_map_foreach_lcb(gpointer data,const gchar
> *accel_path,guint accel_key, GdkModifierType accel_mods, gboolean
> changed) {
>    if (accel_mods & GDK_CONTROL_MASK) {
>                accel_mods |= GDK_META_MASK;
>                accel_mods &= (accel_mods & GDK_MOD1_MASK) ? ~GDK_MOD1_MASK : ~GDK_CONTROL_MASK;
>
>                if (!gtk_accel_map_change_entry(accel_path,accel_key,accel_mods,FALSE)) {
>                    g_print("could not change accelerator %s\n",accel_path);
>                }
>    }
> }

looks better indeed, thanks :)

Olivier

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Gtk-osx-users mailing list
Gtk-osx-users lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gtk-osx-users


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