[40671] trunk/dports/x11/gtk2
nox at macports.org
nox at macports.org
Fri Oct 10 02:34:25 PDT 2008
Revision: 40671
http://trac.macports.org/changeset/40671
Author: nox at macports.org
Date: 2008-10-10 02:34:24 -0700 (Fri, 10 Oct 2008)
Log Message:
-----------
gtk2: Added patch from GNOME bug tracker to make it possible to use accel modifier alt in input in Quartz support.
http://bugzilla.gnome.org/show_bug.cgi?id=531599
Modified Paths:
--------------
trunk/dports/x11/gtk2/Portfile
Added Paths:
-----------
trunk/dports/x11/gtk2/files/patch-gnome-bug-531599.diff
Modified: trunk/dports/x11/gtk2/Portfile
===================================================================
--- trunk/dports/x11/gtk2/Portfile 2008-10-10 07:52:10 UTC (rev 40670)
+++ trunk/dports/x11/gtk2/Portfile 2008-10-10 09:34:24 UTC (rev 40671)
@@ -5,7 +5,7 @@
name gtk2
version 2.14.3
-revision 2
+revision 3
set branch [join [lrange [split ${version} .] 0 1] .]
categories x11
maintainers nox openmaintainer
@@ -26,7 +26,8 @@
http://ftp.gtk.org/pub/gtk/v${branch}/
patchfiles patch-configure.diff \
- patch-modules-gail.diff patch-modules-printbackends.diff
+ patch-modules-gail.diff \
+ patch-modules-printbackends.diff
if {[variant_isset no_x11]} {
default_variants +quartz
@@ -112,6 +113,7 @@
}
variant quartz requires no_x11 conflicts x11 description {Enable Quartz rendering} {
+ patchfiles-append patch-gnome-bug-531599.diff
configure.args-append --with-gdktarget=quartz
}
Added: trunk/dports/x11/gtk2/files/patch-gnome-bug-531599.diff
===================================================================
--- trunk/dports/x11/gtk2/files/patch-gnome-bug-531599.diff (rev 0)
+++ trunk/dports/x11/gtk2/files/patch-gnome-bug-531599.diff 2008-10-10 09:34:24 UTC (rev 40671)
@@ -0,0 +1,78 @@
+Taken from http://bugzilla.gnome.org/show_bug.cgi?id=531599
+
+Index: gtk/gtkaccelgroup.c
+===================================================================
+--- gtk/gtkaccelgroup.c (revision 20074)
++++ gtk/gtkaccelgroup.c (working copy)
+@@ -1299,5 +1298,23 @@ gtk_accelerator_get_default_mod_mask (vo
+ return default_accel_mod_mask;
+ }
+
++/**
++ * gtk_accelerator_get_input_mod_mask:
++ * @returns: the accelerator input modifier mask
++ *
++ * Gets the modifiers that are allowed in both accelerators and as input
++ * modifiers. This is backend specific: on X11, Win32 and DirectFB it is
++ * Shift, on Quartz it is Shift and Alt.
++ */
++guint
++gtk_accelerator_get_input_mod_mask (void)
++{
++#ifndef GDK_WINDOWING_QUARTZ
++ return GDK_SHIFT_MASK;
++#else
++ return GDK_SHIFT_MASK | GDK_MOD1_MASK;
++#endif
++}
++
+ #define __GTK_ACCEL_GROUP_C__
+ #include "gtkaliasdef.c"
+Index: gtk/gtkaccelgroup.h
+===================================================================
+--- gtk/gtkaccelgroup.h (revision 20074)
++++ gtk/gtkaccelgroup.h (working copy)
+@@ -152,6 +152,7 @@ gchar* gtk_accelerator_get_label
+ GdkModifierType accelerator_mods);
+ void gtk_accelerator_set_default_mod_mask (GdkModifierType default_mod_mask);
+ guint gtk_accelerator_get_default_mod_mask (void);
++guint gtk_accelerator_get_input_mod_mask (void);
+
+
+ /* --- internal --- */
+Index: gtk/gtkimcontextsimple.c
+===================================================================
+--- gtk/gtkimcontextsimple.c (revision 20074)
++++ gtk/gtkimcontextsimple.c (working copy)
+@@ -763,7 +763,7 @@ gtk_im_context_simple_filter_keypress (G
+ (context_simple->in_hex_sequence && !hex_keyval &&
+ !is_hex_start && !is_hex_end && !is_escape && !is_backspace))
+ {
+- if (event->state & (gtk_accelerator_get_default_mod_mask () & ~GDK_SHIFT_MASK) ||
++ if (event->state & (gtk_accelerator_get_default_mod_mask () & ~gtk_accelerator_get_input_mod_mask ()) ||
+ (context_simple->in_hex_sequence && context_simple->modifiers_dropped &&
+ (event->keyval == GDK_Return ||
+ event->keyval == GDK_ISO_Enter ||
+Index: gtk/gtkfilechooserdefault.c
+===================================================================
+--- gtk/gtkfilechooserdefault.c (revision 20074)
++++ gtk/gtkfilechooserdefault.c (working copy)
+@@ -3692,7 +3692,8 @@ tree_view_keybinding_cb (GtkWidget
+ #ifdef G_OS_UNIX
+ || event->keyval == GDK_asciitilde
+ #endif
+- ) && ! (event->state & (~GDK_SHIFT_MASK & gtk_accelerator_get_default_mod_mask ())))
++ ) && ! (event->state & (~gtk_accelerator_get_input_mod_mask () &
++ gtk_accelerator_get_default_mod_mask ())))
+ {
+ location_popup_handler (impl, event->string);
+ return TRUE;
+@@ -4070,7 +4071,7 @@ trap_activate_cb (GtkWidget *widget,
+ #ifdef G_OS_UNIX
+ || event->keyval == GDK_asciitilde
+ #endif
+- ) && ! (event->state & (~GDK_SHIFT_MASK & modifiers)))
++ ) && ! (event->state & (~gtk_accelerator_get_input_mod_mask () & modifiers)))
+ {
+ location_popup_handler (impl, event->string);
+ return TRUE;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20081010/dd5599c8/attachment.html
More information about the macports-changes
mailing list