RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/gtk2#7ef3e63372e5e049d7a4ada9e011e4491015ddb3
This commit is contained in:
parent
c51d3d561e
commit
18a5fa703d
37
.gitignore
vendored
37
.gitignore
vendored
@ -0,0 +1,37 @@
|
||||
gtk+-2.21.5.tar.bz2
|
||||
/gtk+-2.21.6.tar.bz2
|
||||
/gtk+-2.21.7.tar.bz2
|
||||
/gtk+-2.21.8.tar.bz2
|
||||
/gtk+-2.22.0.tar.bz2
|
||||
/gtk+-2.23.2.tar.bz2
|
||||
/gtk+-2.23.90.tar.bz2
|
||||
/gtk+-2.24.0.tar.bz2
|
||||
/gtk+-2.24.1.tar.bz2
|
||||
/gtk+-2.24.3.tar.bz2
|
||||
/gtk+-2.24.4.tar.bz2
|
||||
/gtk+-2.24.5.tar.xz
|
||||
/gtk+-2.24.6.tar.xz
|
||||
/gtk+-2.24.7.tar.xz
|
||||
/gtk+-2.24.8.tar.xz
|
||||
/gtk+-2.24.10.tar.bz2
|
||||
/gtk+-2.24.11.tar.bz2
|
||||
/gtk+-2.24.13.tar.xz
|
||||
/gtk+-2.24.14.tar.xz
|
||||
/gtk+-2.24.15.tar.xz
|
||||
/gtk+-2.24.16.tar.xz
|
||||
/gtk+-2.24.17.tar.bz2
|
||||
/gtk+-2.24.18.tar.bz2
|
||||
/gtk+-2.24.19.tar.bz2
|
||||
/gtk+-2.24.20.tar.bz2
|
||||
/gtk+-2.24.21.tar.xz
|
||||
/gtk+-2.24.22.tar.bz2
|
||||
/gtk+-2.24.23.tar.xz
|
||||
/gtk+-2.24.24.tar.xz
|
||||
/gtk+-2.24.25.tar.xz
|
||||
/gtk+-2.24.26.tar.bz2
|
||||
/gtk+-2.24.27.tar.bz2
|
||||
/gtk+-2.24.28.tar.bz2
|
||||
/gtk+-2.24.29.tar.xz
|
||||
/gtk+-2.24.30.tar.xz
|
||||
/gtk+-2.24.31.tar.xz
|
||||
/gtk+-2.24.32.tar.xz
|
67
0001-Fix-compiler-warnings-with-GCC-8.1.patch
Normal file
67
0001-Fix-compiler-warnings-with-GCC-8.1.patch
Normal file
@ -0,0 +1,67 @@
|
||||
From 889a63dffc72c048502d0f7d2b26bfc8532462eb Mon Sep 17 00:00:00 2001
|
||||
From: John Lindgren <john@jlindgren.net>
|
||||
Date: Tue, 15 May 2018 21:47:12 -0400
|
||||
Subject: [PATCH] Fix compiler warnings with GCC 8.1.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
GCC 8.1 added some new warnings, including warning about parentheses
|
||||
with no effect in variable declarations. GTK2 headers have a few of
|
||||
these, which produce a lot of warnings in projects using GTK2.
|
||||
|
||||
The warnings look like:
|
||||
/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h:59:8: warning:
|
||||
unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses]
|
||||
void (*__gtk_reserved1);
|
||||
^
|
||||
|
||||
Removing the parentheses is harmless and fixes the warnings.
|
||||
---
|
||||
gtk/gtkfilechooserbutton.h | 14 +++++++-------
|
||||
gtk/gtkstatusicon.h | 4 ++--
|
||||
2 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/gtk/gtkfilechooserbutton.h b/gtk/gtkfilechooserbutton.h
|
||||
index b3d9112cf9..fdacc4b6ec 100644
|
||||
--- a/gtk/gtkfilechooserbutton.h
|
||||
+++ b/gtk/gtkfilechooserbutton.h
|
||||
@@ -56,13 +56,13 @@ struct _GtkFileChooserButtonClass
|
||||
|
||||
void (* file_set) (GtkFileChooserButton *fc);
|
||||
|
||||
- void (*__gtk_reserved1);
|
||||
- void (*__gtk_reserved2);
|
||||
- void (*__gtk_reserved3);
|
||||
- void (*__gtk_reserved4);
|
||||
- void (*__gtk_reserved5);
|
||||
- void (*__gtk_reserved6);
|
||||
- void (*__gtk_reserved7);
|
||||
+ void *__gtk_reserved1;
|
||||
+ void *__gtk_reserved2;
|
||||
+ void *__gtk_reserved3;
|
||||
+ void *__gtk_reserved4;
|
||||
+ void *__gtk_reserved5;
|
||||
+ void *__gtk_reserved6;
|
||||
+ void *__gtk_reserved7;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/gtk/gtkstatusicon.h b/gtk/gtkstatusicon.h
|
||||
index 19dbd1cdeb..c45caca5ae 100644
|
||||
--- a/gtk/gtkstatusicon.h
|
||||
+++ b/gtk/gtkstatusicon.h
|
||||
@@ -73,8 +73,8 @@ struct _GtkStatusIconClass
|
||||
gboolean keyboard_mode,
|
||||
GtkTooltip *tooltip);
|
||||
|
||||
- void (*__gtk_reserved1);
|
||||
- void (*__gtk_reserved2);
|
||||
+ void *__gtk_reserved1;
|
||||
+ void *__gtk_reserved2;
|
||||
};
|
||||
|
||||
GType gtk_status_icon_get_type (void) G_GNUC_CONST;
|
||||
--
|
||||
2.20.1
|
||||
|
63
0001-calendar-Use-the-new-OB-format-if-supported.patch
Normal file
63
0001-calendar-Use-the-new-OB-format-if-supported.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From 2ea743ab466703091a44a74e1a4ac7db983c0bca Mon Sep 17 00:00:00 2001
|
||||
From: Rafal Luzynski <digitalfreak@lingonborough.com>
|
||||
Date: Sat, 10 Feb 2018 14:07:56 +0100
|
||||
Subject: [PATCH] calendar: Use the new "%OB" format if supported
|
||||
|
||||
Due to the recent changes introduced in glibc 2.27 "%OB" is the
|
||||
correct format to obtain a month name as used in the calendar
|
||||
header. The same rule has been working in BSD family (including
|
||||
OS X) since 1990s. This simple hack checks whether "%OB" is supported
|
||||
at runtime and uses it if it is, falls back to the old "%B" otherwise.
|
||||
|
||||
Closes: #9
|
||||
---
|
||||
gtk/gtkcalendar.c | 19 +++++++++++++++++--
|
||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
|
||||
index 2dd68d6394..28baba16f1 100644
|
||||
--- a/gtk/gtkcalendar.c
|
||||
+++ b/gtk/gtkcalendar.c
|
||||
@@ -689,6 +689,7 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
#ifdef G_OS_WIN32
|
||||
wchar_t wbuffer[100];
|
||||
#else
|
||||
+ static const char *month_format = NULL;
|
||||
char buffer[255];
|
||||
time_t tmp_time;
|
||||
#endif
|
||||
@@ -714,7 +715,7 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
tmp_time= (i+3)*86400;
|
||||
- strftime ( buffer, sizeof (buffer), "%a", gmtime (&tmp_time));
|
||||
+ strftime (buffer, sizeof (buffer), "%a", gmtime (&tmp_time));
|
||||
default_abbreviated_dayname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
|
||||
#else
|
||||
if (!GetLocaleInfoW (GetThreadLocale (), LOCALE_SABBREVDAYNAME1 + (i+6)%7,
|
||||
@@ -730,7 +731,21 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
tmp_time=i*2764800;
|
||||
- strftime ( buffer, sizeof (buffer), "%B", gmtime (&tmp_time));
|
||||
+ if (G_UNLIKELY (month_format == NULL))
|
||||
+ {
|
||||
+ buffer[0] = '\0';
|
||||
+ month_format = "%OB";
|
||||
+ strftime (buffer, sizeof (buffer), month_format, gmtime (&tmp_time));
|
||||
+ /* "%OB" is not supported in Linux with glibc < 2.27 */
|
||||
+ if (!strcmp (buffer, "%OB") || !strcmp (buffer, "OB") || !strcmp (buffer, ""))
|
||||
+ {
|
||||
+ month_format = "%B";
|
||||
+ strftime (buffer, sizeof (buffer), month_format, gmtime (&tmp_time));
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ strftime (buffer, sizeof (buffer), month_format, gmtime (&tmp_time));
|
||||
+
|
||||
default_monthname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
|
||||
#else
|
||||
if (!GetLocaleInfoW (GetThreadLocale (), LOCALE_SMONTHNAME1 + i,
|
||||
--
|
||||
2.20.1
|
||||
|
258
icon-padding.patch
Normal file
258
icon-padding.patch
Normal file
@ -0,0 +1,258 @@
|
||||
diff -up gtk+-2.19.7/gtk/gtkstatusicon.c.icon-padding gtk+-2.19.7/gtk/gtkstatusicon.c
|
||||
--- gtk+-2.19.7/gtk/gtkstatusicon.c.icon-padding 2010-03-08 08:42:22.000000000 -0500
|
||||
+++ gtk+-2.19.7/gtk/gtkstatusicon.c 2010-03-10 00:40:11.165527903 -0500
|
||||
@@ -170,6 +170,7 @@ static void gtk_status_icon_screen_c
|
||||
GdkScreen *old_screen);
|
||||
static void gtk_status_icon_embedded_changed (GtkStatusIcon *status_icon);
|
||||
static void gtk_status_icon_orientation_changed (GtkStatusIcon *status_icon);
|
||||
+static void gtk_status_icon_padding_changed (GtkStatusIcon *status_icon);
|
||||
static gboolean gtk_status_icon_scroll (GtkStatusIcon *status_icon,
|
||||
GdkEventScroll *event);
|
||||
static gboolean gtk_status_icon_query_tooltip (GtkStatusIcon *status_icon,
|
||||
@@ -850,6 +851,8 @@ gtk_status_icon_init (GtkStatusIcon *sta
|
||||
G_CALLBACK (gtk_status_icon_embedded_changed), status_icon);
|
||||
g_signal_connect_swapped (priv->tray_icon, "notify::orientation",
|
||||
G_CALLBACK (gtk_status_icon_orientation_changed), status_icon);
|
||||
+ g_signal_connect_swapped (priv->tray_icon, "notify::padding",
|
||||
+ G_CALLBACK (gtk_status_icon_padding_changed), status_icon);
|
||||
g_signal_connect_swapped (priv->tray_icon, "button-press-event",
|
||||
G_CALLBACK (gtk_status_icon_button_press), status_icon);
|
||||
g_signal_connect_swapped (priv->tray_icon, "button-release-event",
|
||||
@@ -975,6 +978,8 @@ gtk_status_icon_finalize (GObject *objec
|
||||
g_signal_handlers_disconnect_by_func (priv->tray_icon,
|
||||
gtk_status_icon_orientation_changed, status_icon);
|
||||
g_signal_handlers_disconnect_by_func (priv->tray_icon,
|
||||
+ gtk_status_icon_padding_changed, status_icon);
|
||||
+ g_signal_handlers_disconnect_by_func (priv->tray_icon,
|
||||
gtk_status_icon_button_press, status_icon);
|
||||
g_signal_handlers_disconnect_by_func (priv->tray_icon,
|
||||
gtk_status_icon_button_release, status_icon);
|
||||
@@ -1679,14 +1684,32 @@ gtk_status_icon_screen_changed (GtkStatu
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
|
||||
static void
|
||||
+gtk_status_icon_padding_changed (GtkStatusIcon *status_icon)
|
||||
+{
|
||||
+ GtkStatusIconPrivate *priv = status_icon->priv;
|
||||
+ GtkOrientation orientation;
|
||||
+ gint padding;
|
||||
+
|
||||
+ orientation = _gtk_tray_icon_get_orientation (GTK_TRAY_ICON (priv->tray_icon));
|
||||
+ padding = _gtk_tray_icon_get_padding (GTK_TRAY_ICON (priv->tray_icon));
|
||||
+
|
||||
+ if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
+ gtk_misc_set_padding (GTK_MISC (priv->image), padding, 0);
|
||||
+ else
|
||||
+ gtk_misc_set_padding (GTK_MISC (priv->image), 0, padding);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
gtk_status_icon_embedded_changed (GtkStatusIcon *status_icon)
|
||||
{
|
||||
+ gtk_status_icon_padding_changed (status_icon);
|
||||
g_object_notify (G_OBJECT (status_icon), "embedded");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_status_icon_orientation_changed (GtkStatusIcon *status_icon)
|
||||
{
|
||||
+ gtk_status_icon_padding_changed (status_icon);
|
||||
g_object_notify (G_OBJECT (status_icon), "orientation");
|
||||
}
|
||||
|
||||
@@ -1804,7 +1827,7 @@ gtk_status_icon_reset_image_data (GtkSta
|
||||
|
||||
g_object_notify (G_OBJECT (status_icon), "stock");
|
||||
break;
|
||||
-
|
||||
+
|
||||
case GTK_IMAGE_ICON_NAME:
|
||||
g_free (priv->image_data.icon_name);
|
||||
priv->image_data.icon_name = NULL;
|
||||
diff -up gtk+-2.19.7/gtk/gtktrayicon.h.icon-padding gtk+-2.19.7/gtk/gtktrayicon.h
|
||||
--- gtk+-2.19.7/gtk/gtktrayicon.h.icon-padding 2009-10-18 01:35:45.000000000 -0400
|
||||
+++ gtk+-2.19.7/gtk/gtktrayicon.h 2010-03-10 00:40:11.169528392 -0500
|
||||
@@ -69,7 +69,8 @@ void _gtk_tray_icon_cancel_mes
|
||||
guint id);
|
||||
|
||||
GtkOrientation _gtk_tray_icon_get_orientation (GtkTrayIcon *icon);
|
||||
-
|
||||
+gint _gtk_tray_icon_get_padding (GtkTrayIcon *icon);
|
||||
+
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_TRAY_ICON_H__ */
|
||||
diff -up gtk+-2.19.7/gtk/gtktrayicon-x11.c.icon-padding gtk+-2.19.7/gtk/gtktrayicon-x11.c
|
||||
--- gtk+-2.19.7/gtk/gtktrayicon-x11.c.icon-padding 2010-03-08 21:01:28.000000000 -0500
|
||||
+++ gtk+-2.19.7/gtk/gtktrayicon-x11.c 2010-03-10 00:49:48.229509604 -0500
|
||||
@@ -43,23 +43,26 @@
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
- PROP_ORIENTATION
|
||||
+ PROP_ORIENTATION,
|
||||
+ PROP_PADDING
|
||||
};
|
||||
|
||||
struct _GtkTrayIconPrivate
|
||||
{
|
||||
guint stamp;
|
||||
-
|
||||
+
|
||||
Atom selection_atom;
|
||||
Atom manager_atom;
|
||||
Atom system_tray_opcode_atom;
|
||||
Atom orientation_atom;
|
||||
Atom visual_atom;
|
||||
+ Atom padding_atom;
|
||||
Window manager_window;
|
||||
GdkVisual *manager_visual;
|
||||
gboolean manager_visual_rgba;
|
||||
|
||||
GtkOrientation orientation;
|
||||
+ gint padding;
|
||||
};
|
||||
|
||||
static void gtk_tray_icon_constructed (GObject *object);
|
||||
@@ -113,6 +116,16 @@ gtk_tray_icon_class_init (GtkTrayIconCla
|
||||
GTK_ORIENTATION_HORIZONTAL,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
+ g_object_class_install_property (gobject_class,
|
||||
+ PROP_PADDING,
|
||||
+ g_param_spec_int ("padding",
|
||||
+ P_("Padding"),
|
||||
+ P_("Padding that should be put around icons in the tray"),
|
||||
+ 0,
|
||||
+ G_MAXINT,
|
||||
+ 0,
|
||||
+ GTK_PARAM_READABLE));
|
||||
+
|
||||
g_type_class_add_private (class, sizeof (GtkTrayIconPrivate));
|
||||
}
|
||||
|
||||
@@ -124,6 +137,7 @@ gtk_tray_icon_init (GtkTrayIcon *icon)
|
||||
|
||||
icon->priv->stamp = 1;
|
||||
icon->priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
+ icon->priv->padding = 0;
|
||||
|
||||
gtk_widget_set_app_paintable (GTK_WIDGET (icon), TRUE);
|
||||
gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
|
||||
@@ -161,6 +175,10 @@ gtk_tray_icon_constructed (GObject *obje
|
||||
"_NET_SYSTEM_TRAY_VISUAL",
|
||||
False);
|
||||
|
||||
+ icon->priv->padding_atom = XInternAtom (xdisplay,
|
||||
+ "_NET_SYSTEM_TRAY_PADDING",
|
||||
+ False);
|
||||
+
|
||||
/* Add a root window filter so that we get changes on MANAGER */
|
||||
gdk_window_add_filter (root_window,
|
||||
gtk_tray_icon_manager_filter, icon);
|
||||
@@ -212,6 +230,9 @@ gtk_tray_icon_get_property (GObject *
|
||||
case PROP_ORIENTATION:
|
||||
g_value_set_enum (value, icon->priv->orientation);
|
||||
break;
|
||||
+ case PROP_PADDING:
|
||||
+ g_value_set_int (value, icon->priv->padding);
|
||||
+ break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@@ -372,9 +393,58 @@ gtk_tray_icon_get_visual_property (GtkTr
|
||||
XFree (prop.prop);
|
||||
}
|
||||
|
||||
+static void
|
||||
+gtk_tray_icon_get_padding_property (GtkTrayIcon *icon)
|
||||
+{
|
||||
+ GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (icon));
|
||||
+ GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
+ Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
|
||||
+
|
||||
+ Atom type;
|
||||
+ int format;
|
||||
+ union {
|
||||
+ gulong *prop;
|
||||
+ guchar *prop_ch;
|
||||
+ } prop = { NULL };
|
||||
+ gulong nitems;
|
||||
+ gulong bytes_after;
|
||||
+ int error, result;
|
||||
+
|
||||
+ g_assert (icon->priv->manager_window != None);
|
||||
+
|
||||
+ gdk_error_trap_push ();
|
||||
+ type = None;
|
||||
+ result = XGetWindowProperty (xdisplay,
|
||||
+ icon->priv->manager_window,
|
||||
+ icon->priv->padding_atom,
|
||||
+ 0, G_MAXLONG, FALSE,
|
||||
+ XA_CARDINAL,
|
||||
+ &type, &format, &nitems,
|
||||
+ &bytes_after, &(prop.prop_ch));
|
||||
+ error = gdk_error_trap_pop ();
|
||||
+
|
||||
+ if (!error && result == Success &&
|
||||
+ type == XA_CARDINAL && nitems == 1 && format == 32)
|
||||
+ {
|
||||
+ gint padding;
|
||||
+
|
||||
+ padding = prop.prop[0];
|
||||
+
|
||||
+ if (icon->priv->padding != padding)
|
||||
+ {
|
||||
+ icon->priv->padding = padding;
|
||||
+
|
||||
+ g_object_notify (G_OBJECT (icon), "padding");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (type != None)
|
||||
+ XFree (prop.prop);
|
||||
+}
|
||||
+
|
||||
static GdkFilterReturn
|
||||
-gtk_tray_icon_manager_filter (GdkXEvent *xevent,
|
||||
- GdkEvent *event,
|
||||
+gtk_tray_icon_manager_filter (GdkXEvent *xevent,
|
||||
+ GdkEvent *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkTrayIcon *icon = user_data;
|
||||
@@ -399,6 +469,11 @@ gtk_tray_icon_manager_filter (GdkXEvent
|
||||
|
||||
gtk_tray_icon_get_orientation_property (icon);
|
||||
}
|
||||
+ else if (xev->xany.type == PropertyNotify &&
|
||||
+ xev->xproperty.atom == icon->priv->padding_atom)
|
||||
+ {
|
||||
+ gtk_tray_icon_get_padding_property (icon);
|
||||
+ }
|
||||
else if (xev->xany.type == DestroyNotify)
|
||||
{
|
||||
GTK_NOTE (PLUGSOCKET,
|
||||
@@ -504,6 +579,7 @@ gtk_tray_icon_update_manager_window (Gtk
|
||||
|
||||
gtk_tray_icon_get_orientation_property (icon);
|
||||
gtk_tray_icon_get_visual_property (icon);
|
||||
+ gtk_tray_icon_get_padding_property (icon);
|
||||
|
||||
if (gtk_widget_get_realized (GTK_WIDGET (icon)))
|
||||
{
|
||||
@@ -740,6 +816,14 @@ _gtk_tray_icon_get_orientation (GtkTrayI
|
||||
return icon->priv->orientation;
|
||||
}
|
||||
|
||||
+gint
|
||||
+_gtk_tray_icon_get_padding (GtkTrayIcon *icon)
|
||||
+{
|
||||
+ g_return_val_if_fail (GTK_IS_TRAY_ICON (icon), 0);
|
||||
+
|
||||
+ return icon->priv->padding;
|
||||
+}
|
||||
+
|
||||
|
||||
#define __GTK_TRAY_ICON_X11_C__
|
||||
#include "gtkaliasdef.c"
|
6
im-cedilla.conf
Normal file
6
im-cedilla.conf
Normal file
@ -0,0 +1,6 @@
|
||||
XIM=none
|
||||
XIM_PROGRAM=/bin/true
|
||||
XIM_ARGS=
|
||||
SHORT_DESC=im-cedilla
|
||||
GTK_IM_MODULE=cedilla
|
||||
QT_IM_MODULE=xim
|
170
python3.patch
Normal file
170
python3.patch
Normal file
@ -0,0 +1,170 @@
|
||||
Uupstream pull request: https://gitlab.gnome.org/GNOME/gtk/merge_requests/1080
|
||||
|
||||
From 3ff8f70b9686205f0618d7a479fd42a457b90165 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Viktorin <encukou@gmail.com>
|
||||
Date: Tue, 3 Sep 2019 13:54:49 +0200
|
||||
Subject: [PATCH 1/3] Make gtk-builder-convert compatible with Python 3
|
||||
|
||||
- Convert tabs to spaces
|
||||
- Use print as a function, even on Python 2
|
||||
- Output a binary file, or decode for stdout
|
||||
---
|
||||
gtk/gtk-builder-convert | 25 ++++++++++++++-----------
|
||||
1 file changed, 14 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/gtk/gtk-builder-convert b/gtk/gtk-builder-convert
|
||||
index ea737de195..41f7a8c941 100755
|
||||
--- a/gtk/gtk-builder-convert
|
||||
+++ b/gtk/gtk-builder-convert
|
||||
@@ -36,6 +36,7 @@ Examples:
|
||||
|
||||
Report bugs to http://bugzilla.gnome.org/."""
|
||||
|
||||
+from __future__ import print_function
|
||||
import getopt
|
||||
import os
|
||||
import sys
|
||||
@@ -259,7 +260,7 @@ class GtkBuilderConverter(object):
|
||||
for node in objects:
|
||||
self._convert(node.getAttribute("class"), node)
|
||||
if self._get_object(node.getAttribute('id')) is not None:
|
||||
- print "WARNING: duplicate id \"" + node.getAttribute('id') + "\""
|
||||
+ print("WARNING: duplicate id \"" + node.getAttribute('id') + "\"")
|
||||
self.objects[node.getAttribute('id')] = node
|
||||
|
||||
# Convert Gazpachos UI tag
|
||||
@@ -277,8 +278,7 @@ class GtkBuilderConverter(object):
|
||||
# reverse=True):
|
||||
# when we can depend on python 2.4 or higher
|
||||
root_objects = self.root_objects[:]
|
||||
- root_objects.sort(lambda a, b: cmp(b.getAttribute('id'),
|
||||
- a.getAttribute('id')))
|
||||
+ root_objects.sort(key=lambda a: a.getAttribute('id'), reverse=True)
|
||||
for obj in root_objects:
|
||||
self._interface.childNodes.insert(0, obj)
|
||||
|
||||
@@ -461,8 +461,8 @@ class GtkBuilderConverter(object):
|
||||
if signal_name in ['activate', 'toggled']:
|
||||
action.appendChild(signal)
|
||||
else:
|
||||
- print 'Unhandled signal %s::%s' % (node.getAttribute('class'),
|
||||
- signal_name)
|
||||
+ print('Unhandled signal %s::%s' % (node.getAttribute('class'),
|
||||
+ signal_name))
|
||||
|
||||
if not uimgr.childNodes:
|
||||
child = self._dom.createElement('child')
|
||||
@@ -481,8 +481,8 @@ class GtkBuilderConverter(object):
|
||||
for accelerator in get_accelerator_nodes(node):
|
||||
signal_name = accelerator.getAttribute('signal')
|
||||
if signal_name != 'activate':
|
||||
- print 'Unhandled accelerator signal for %s::%s' % (
|
||||
- node.getAttribute('class'), signal_name)
|
||||
+ print('Unhandled accelerator signal for %s::%s' % (
|
||||
+ node.getAttribute('class'), signal_name))
|
||||
continue
|
||||
accelerator.removeAttribute('signal')
|
||||
child.appendChild(accelerator)
|
||||
@@ -747,7 +747,7 @@ def _indent(output):
|
||||
return s.stdout.read()
|
||||
|
||||
def usage():
|
||||
- print __doc__
|
||||
+ print(__doc__)
|
||||
|
||||
def main(args):
|
||||
try:
|
||||
@@ -788,10 +788,13 @@ def main(args):
|
||||
|
||||
xml = _indent(conv.to_xml())
|
||||
if output_filename == "-":
|
||||
- print xml
|
||||
+ if isinstance(xml, str):
|
||||
+ print(xml)
|
||||
+ else:
|
||||
+ print(xml.decode(sys.stdout.encoding))
|
||||
else:
|
||||
- open(output_filename, 'w').write(xml)
|
||||
- print "Wrote", output_filename
|
||||
+ open(output_filename, 'wb').write(xml)
|
||||
+ print("Wrote", output_filename)
|
||||
|
||||
return 0
|
||||
|
||||
--
|
||||
2.22.0
|
||||
|
||||
|
||||
From 4f8efe3ae09ee69657b83399a118b5252f25d830 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Viktorin <encukou@gmail.com>
|
||||
Date: Tue, 3 Sep 2019 14:53:05 +0200
|
||||
Subject: [PATCH 2/3] gtk-builder-convert: Remove compat code for Python 2.3
|
||||
and below
|
||||
|
||||
---
|
||||
gtk/gtk-builder-convert | 13 +------------
|
||||
1 file changed, 1 insertion(+), 12 deletions(-)
|
||||
|
||||
diff --git a/gtk/gtk-builder-convert b/gtk/gtk-builder-convert
|
||||
index 41f7a8c941..a16f83b217 100755
|
||||
--- a/gtk/gtk-builder-convert
|
||||
+++ b/gtk/gtk-builder-convert
|
||||
@@ -48,12 +48,7 @@ DIALOGS = ['GtkDialog',
|
||||
'GtkMessageDialog']
|
||||
WINDOWS = ['GtkWindow'] + DIALOGS
|
||||
|
||||
-# The subprocess is only available in Python 2.4+
|
||||
-try:
|
||||
- import subprocess
|
||||
- subprocess # pyflakes
|
||||
-except ImportError:
|
||||
- subprocess = None
|
||||
+import subprocess
|
||||
|
||||
def get_child_nodes(node):
|
||||
assert node.tagName == 'object'
|
||||
@@ -271,12 +266,6 @@ class GtkBuilderConverter(object):
|
||||
for node in self._dom.getElementsByTagName("accessibility"):
|
||||
self._convert_accessibility(node)
|
||||
|
||||
- # Output the newly created root objects and sort them
|
||||
- # by attribute id
|
||||
- # FIXME: Use sorted(self.root_objects,
|
||||
- # key=lambda n: n.getAttribute('id'),
|
||||
- # reverse=True):
|
||||
- # when we can depend on python 2.4 or higher
|
||||
root_objects = self.root_objects[:]
|
||||
root_objects.sort(key=lambda a: a.getAttribute('id'), reverse=True)
|
||||
for obj in root_objects:
|
||||
--
|
||||
2.22.0
|
||||
|
||||
|
||||
From b5ea5a0cf1f12be5072b9f06d1127a8977414916 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Viktorin <encukou@gmail.com>
|
||||
Date: Tue, 3 Sep 2019 14:56:14 +0200
|
||||
Subject: [PATCH 3/3] gtk-builder-convert: Update bug report URL
|
||||
|
||||
Also, use a newline instead of period at the end to make the
|
||||
URL easy to copy
|
||||
---
|
||||
gtk/gtk-builder-convert | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gtk/gtk-builder-convert b/gtk/gtk-builder-convert
|
||||
index a16f83b217..b1faba822e 100755
|
||||
--- a/gtk/gtk-builder-convert
|
||||
+++ b/gtk/gtk-builder-convert
|
||||
@@ -34,7 +34,8 @@ When OUTPUT is -, write to standard output.
|
||||
Examples:
|
||||
gtk-builder-convert preference.glade preferences.ui
|
||||
|
||||
-Report bugs to http://bugzilla.gnome.org/."""
|
||||
+Report bugs to https://gitlab.gnome.org/GNOME/gtk/issues/new
|
||||
+"""
|
||||
|
||||
from __future__ import print_function
|
||||
import getopt
|
||||
--
|
||||
2.22.0
|
||||
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (gtk+-2.24.32.tar.xz) = 8e8fd9ae32f1d6fb544da260f00599f0f05090d910d767b06ef086ab4f1f8373a29bb0da9767761c9b5f4cfd51b5c45d0fa5d39b0428c839ddf0a579df806696
|
182
tooltip-positioning.patch
Normal file
182
tooltip-positioning.patch
Normal file
@ -0,0 +1,182 @@
|
||||
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
|
||||
index 5cc2334..204a2b6 100644
|
||||
--- a/gtk/gtktooltip.c
|
||||
+++ b/gtk/gtktooltip.c
|
||||
@@ -903,53 +903,128 @@ gtk_tooltip_position (GtkTooltip *tooltip,
|
||||
{
|
||||
gint x, y;
|
||||
GdkScreen *screen;
|
||||
+ gint monitor_num;
|
||||
+ GdkRectangle monitor;
|
||||
+ GtkRequisition requisition;
|
||||
+ guint cursor_size;
|
||||
+ GdkRectangle bounds;
|
||||
+
|
||||
+#define MAX_DISTANCE 32
|
||||
|
||||
tooltip->tooltip_widget = new_tooltip_widget;
|
||||
|
||||
+ screen = gtk_widget_get_screen (new_tooltip_widget);
|
||||
+
|
||||
+ gtk_widget_size_request (GTK_WIDGET (tooltip->current_window), &requisition);
|
||||
+
|
||||
+ monitor_num = gdk_screen_get_monitor_at_point (screen,
|
||||
+ tooltip->last_x,
|
||||
+ tooltip->last_y);
|
||||
+ gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
|
||||
+
|
||||
+ get_bounding_box (new_tooltip_widget, &bounds);
|
||||
+
|
||||
/* Position the tooltip */
|
||||
- /* FIXME: should we swap this when RTL is enabled? */
|
||||
- if (tooltip->keyboard_mode_enabled)
|
||||
+
|
||||
+ cursor_size = gdk_display_get_default_cursor_size (display);
|
||||
+
|
||||
+ /* Try below */
|
||||
+ x = bounds.x + bounds.width / 2 - requisition.width / 2;
|
||||
+ y = bounds.y + bounds.height + 4;
|
||||
+
|
||||
+ if (y + requisition.height <= monitor.y + monitor.height)
|
||||
{
|
||||
- GdkRectangle bounds;
|
||||
+ if (tooltip->keyboard_mode_enabled)
|
||||
+ goto found;
|
||||
|
||||
- get_bounding_box (new_tooltip_widget, &bounds);
|
||||
+ if (y <= tooltip->last_y + cursor_size + MAX_DISTANCE)
|
||||
+ {
|
||||
+ if (tooltip->last_x + cursor_size + MAX_DISTANCE < x)
|
||||
+ x = tooltip->last_x + cursor_size + MAX_DISTANCE;
|
||||
+ else if (x + requisition.width < tooltip->last_x - MAX_DISTANCE)
|
||||
+ x = tooltip->last_x - MAX_DISTANCE - requisition.width;
|
||||
|
||||
- /* For keyboard mode we position the tooltip below the widget,
|
||||
- * right of the center of the widget.
|
||||
- */
|
||||
- x = bounds.x + bounds.width / 2;
|
||||
- y = bounds.y + bounds.height + 4;
|
||||
+ goto found;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Try above */
|
||||
+ x = bounds.x + bounds.width / 2 - requisition.width / 2;
|
||||
+ y = bounds.y - requisition.height - 4;
|
||||
+
|
||||
+ if (y >= monitor.y)
|
||||
+ {
|
||||
+ if (tooltip->keyboard_mode_enabled)
|
||||
+ goto found;
|
||||
+
|
||||
+ if (y + requisition.height >= tooltip->last_y - MAX_DISTANCE)
|
||||
+ {
|
||||
+ if (tooltip->last_x + cursor_size + MAX_DISTANCE < x)
|
||||
+ x = tooltip->last_x + cursor_size + MAX_DISTANCE;
|
||||
+ else if (x + requisition.width < tooltip->last_x - MAX_DISTANCE)
|
||||
+ x = tooltip->last_x - MAX_DISTANCE - requisition.width;
|
||||
+
|
||||
+ goto found;
|
||||
+ }
|
||||
}
|
||||
- else
|
||||
+
|
||||
+ /* Try right FIXME: flip on rtl ? */
|
||||
+ x = bounds.x + bounds.width + 4;
|
||||
+ y = bounds.y + bounds.height / 2 - requisition.height / 2;
|
||||
+
|
||||
+ if (x + requisition.width <= monitor.x + monitor.width)
|
||||
{
|
||||
- guint cursor_size;
|
||||
+ if (tooltip->keyboard_mode_enabled)
|
||||
+ goto found;
|
||||
|
||||
- x = tooltip->last_x;
|
||||
- y = tooltip->last_y;
|
||||
+ if (x <= tooltip->last_x + cursor_size + MAX_DISTANCE)
|
||||
+ {
|
||||
+ if (tooltip->last_y + cursor_size + MAX_DISTANCE < y)
|
||||
+ y = tooltip->last_y + cursor_size + MAX_DISTANCE;
|
||||
+ else if (y + requisition.height < tooltip->last_y - MAX_DISTANCE)
|
||||
+ y = tooltip->last_y - MAX_DISTANCE - requisition.height;
|
||||
|
||||
- /* For mouse mode, we position the tooltip right of the cursor,
|
||||
- * a little below the cursor's center.
|
||||
- */
|
||||
- cursor_size = gdk_display_get_default_cursor_size (display);
|
||||
- x += cursor_size / 2;
|
||||
- y += cursor_size / 2;
|
||||
+ goto found;
|
||||
+ }
|
||||
}
|
||||
|
||||
- screen = gtk_widget_get_screen (new_tooltip_widget);
|
||||
+ /* Try left FIXME: flip on rtl ? */
|
||||
+ x = bounds.x - requisition.width - 4;
|
||||
+ y = bounds.y + bounds.height / 2 - requisition.height / 2;
|
||||
|
||||
- /* Show it */
|
||||
- if (tooltip->current_window)
|
||||
+ if (x >= monitor.x)
|
||||
{
|
||||
- gint monitor_num;
|
||||
- GdkRectangle monitor;
|
||||
- GtkRequisition requisition;
|
||||
+ if (tooltip->keyboard_mode_enabled)
|
||||
+ goto found;
|
||||
|
||||
- gtk_widget_size_request (GTK_WIDGET (tooltip->current_window),
|
||||
- &requisition);
|
||||
+ if (x + requisition.width >= tooltip->last_x - MAX_DISTANCE)
|
||||
+ {
|
||||
+ if (tooltip->last_y + cursor_size + MAX_DISTANCE < y)
|
||||
+ y = tooltip->last_y + cursor_size + MAX_DISTANCE;
|
||||
+ else if (y + requisition.height < tooltip->last_y - MAX_DISTANCE)
|
||||
+ y = tooltip->last_y - MAX_DISTANCE - requisition.height;
|
||||
|
||||
- monitor_num = gdk_screen_get_monitor_at_point (screen, x, y);
|
||||
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
|
||||
+ goto found;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+ /* Fallback */
|
||||
+ if (tooltip->keyboard_mode_enabled)
|
||||
+ {
|
||||
+ x = bounds.x + bounds.width / 2 - requisition.width / 2;
|
||||
+ y = bounds.y + bounds.height + 4;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* At cursor */
|
||||
+ x = tooltip->last_x + cursor_size * 3 / 4;
|
||||
+ y = tooltip->last_y + cursor_size * 3 / 4;
|
||||
+ }
|
||||
+
|
||||
+found:
|
||||
+ /* Show it */
|
||||
+ if (tooltip->current_window)
|
||||
+ {
|
||||
if (x + requisition.width > monitor.x + monitor.width)
|
||||
x -= x - (monitor.x + monitor.width) + requisition.width;
|
||||
else if (x < monitor.x)
|
||||
@@ -957,7 +1032,9 @@ gtk_tooltip_position (GtkTooltip *tooltip,
|
||||
|
||||
if (y + requisition.height > monitor.y + monitor.height)
|
||||
y -= y - (monitor.y + monitor.height) + requisition.height;
|
||||
-
|
||||
+ else if (y < monitor.y)
|
||||
+ y = monitor.y;
|
||||
+
|
||||
if (!tooltip->keyboard_mode_enabled)
|
||||
{
|
||||
/* don't pop up under the pointer */
|
||||
@@ -965,7 +1042,7 @@ gtk_tooltip_position (GtkTooltip *tooltip,
|
||||
y <= tooltip->last_y && tooltip->last_y < y + requisition.height)
|
||||
y = tooltip->last_y - requisition.height - 2;
|
||||
}
|
||||
-
|
||||
+
|
||||
gtk_window_move (GTK_WINDOW (tooltip->current_window), x, y);
|
||||
gtk_widget_show (GTK_WIDGET (tooltip->current_window));
|
||||
}
|
48
update-gdk-pixbuf-loaders
Executable file
48
update-gdk-pixbuf-loaders
Executable file
@ -0,0 +1,48 @@
|
||||
#! /bin/sh
|
||||
|
||||
if test $# != 1; then
|
||||
echo usage: update-gdk-pixbuf-loaders host_triplet 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
umask 022
|
||||
# Deriving /etc/gtk-2.0/$host location
|
||||
#
|
||||
# autoconf changes linux to linux-gnu
|
||||
case "$1" in
|
||||
*linux) host="$1-gnu"
|
||||
;;
|
||||
*) host=$1
|
||||
;;
|
||||
esac
|
||||
|
||||
# autoconf uses powerpc not ppc
|
||||
host=`echo $host | sed "s/^ppc/powerpc/"`
|
||||
# autoconf uses ibm-linux not redhat-linux (s390x)
|
||||
host=`echo $host | sed "s/^s390\(x\)*-redhat/s390\1-ibm/"`
|
||||
|
||||
# We have had problems in the past with build systems
|
||||
# changing host from i386 to i686 and appending/dropping
|
||||
# the -gnu suffix, so try to match up the $host we got
|
||||
# with whats actually there.
|
||||
if [ ! -d /etc/gtk-2.0/$host ]; then
|
||||
case "$host" in
|
||||
i?86*)
|
||||
for d in $(ls -d /etc/gtk-2.0/i?86*); do
|
||||
host=$(basename $d)
|
||||
break
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
FILE=/etc/gtk-2.0/$host/gdk-pixbuf.loaders
|
||||
|
||||
case "$host" in
|
||||
alpha*|ia64*|powerpc64*|s390x*|x86_64*|aarch64*)
|
||||
/usr/bin/gdk-pixbuf-query-loaders-64 > $FILE
|
||||
;;
|
||||
*)
|
||||
/usr/bin/gdk-pixbuf-query-loaders-32 > $FILE
|
||||
;;
|
||||
esac
|
17
update-gtk-immodules
Executable file
17
update-gtk-immodules
Executable file
@ -0,0 +1,17 @@
|
||||
#! /bin/sh
|
||||
|
||||
if test $# != 1; then
|
||||
echo usage: update-gtk-immodules host_triplet 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
umask 022
|
||||
|
||||
case "$1" in
|
||||
alpha*|ia64*|ppc64*|powerpc64*|s390x*|x86_64*|aarch64*)
|
||||
/usr/bin/gtk-query-immodules-2.0-64 --update-cache
|
||||
;;
|
||||
*)
|
||||
/usr/bin/gtk-query-immodules-2.0-32 --update-cache
|
||||
;;
|
||||
esac
|
52
update-gtk-immodules.1
Normal file
52
update-gtk-immodules.1
Normal file
@ -0,0 +1,52 @@
|
||||
'\" t
|
||||
.\" Title: update-gtk-immodules
|
||||
.\" Author: Matthias Clasen <mclasen@redhat.com>
|
||||
.\" Date: 06/26/2013
|
||||
.\" Manual: User Commands
|
||||
.\" Source: GTK+
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "UPDATE\-GTK\-IMMODULES" "1" "" "GTK+" "User Commands"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
update-gtk-immodules - Update GTK+ immodule cache
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBupdate-gtk-immodules\fR\ 'u
|
||||
\fBupdate-gtk-immodules\fR [HOST_TRIPLET]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBupdate-gtk-immodules\fR
|
||||
is a wrapper around gtk-query-immodules-2.0 that tries to help with
|
||||
multilib installations. It is meant to be used in %post scripts of rpm
|
||||
packages that install input method modules for GTK+ 2.x.
|
||||
|
||||
.PP
|
||||
It needs to be given a GNU-style host triplet as argument, such as
|
||||
"x86_64-redhat-linux-gnu". This argument determines where the tool
|
||||
saves the gtk.immodules file that it creates. It must be the same
|
||||
as the host triplet that GTK+ was configured with.
|
||||
|
||||
.SH "FILES"
|
||||
.PP
|
||||
$libdir/gtk-2.0/2.10.0/immodules.cache - the file created by update-gtk-immodules.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR gtk-query-immodules-2.0 "(1)"
|
116
window-dragging.patch
Normal file
116
window-dragging.patch
Normal file
@ -0,0 +1,116 @@
|
||||
diff -up gtk+-2.24.7/gtk/gtkmenushell.c.window-dragging gtk+-2.24.7/gtk/gtkmenushell.c
|
||||
--- gtk+-2.24.7/gtk/gtkmenushell.c.window-dragging 2011-08-15 22:30:52.000000000 -0400
|
||||
+++ gtk+-2.24.7/gtk/gtkmenushell.c 2011-10-17 19:50:52.180468086 -0400
|
||||
@@ -589,18 +589,45 @@ gtk_menu_shell_button_press (GtkWidget
|
||||
|
||||
if (!menu_shell->active || !menu_shell->button)
|
||||
{
|
||||
- gtk_menu_shell_activate (menu_shell);
|
||||
+ gboolean initially_active = menu_shell->active;
|
||||
|
||||
menu_shell->button = event->button;
|
||||
|
||||
- if (menu_item && _gtk_menu_item_is_selectable (menu_item) &&
|
||||
- menu_item->parent == widget &&
|
||||
- menu_item != menu_shell->active_menu_item)
|
||||
+ if (menu_item)
|
||||
{
|
||||
- if (GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement == GTK_TOP_BOTTOM)
|
||||
+ if (_gtk_menu_item_is_selectable (menu_item) &&
|
||||
+ menu_item->parent == widget &&
|
||||
+ menu_item != menu_shell->active_menu_item)
|
||||
{
|
||||
- menu_shell->activate_time = event->time;
|
||||
- gtk_menu_shell_select_item (menu_shell, menu_item);
|
||||
+ gtk_menu_shell_activate (menu_shell);
|
||||
+ menu_shell->button = event->button;
|
||||
+
|
||||
+ if (GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement == GTK_TOP_BOTTOM)
|
||||
+ {
|
||||
+ menu_shell->activate_time = event->time;
|
||||
+ gtk_menu_shell_select_item (menu_shell, menu_item);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (!initially_active)
|
||||
+ {
|
||||
+ gboolean window_drag = FALSE;
|
||||
+
|
||||
+ gtk_widget_style_get (widget,
|
||||
+ "window-dragging", &window_drag,
|
||||
+ NULL);
|
||||
+
|
||||
+ if (window_drag)
|
||||
+ {
|
||||
+ gtk_menu_shell_deactivate (menu_shell);
|
||||
+ gtk_window_begin_move_drag (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
|
||||
+ event->button,
|
||||
+ event->x_root,
|
||||
+ event->y_root,
|
||||
+ event->time);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -up gtk+-2.24.7/gtk/gtktoolbar.c.window-dragging gtk+-2.24.7/gtk/gtktoolbar.c
|
||||
--- gtk+-2.24.7/gtk/gtktoolbar.c.window-dragging 2011-10-01 11:29:06.000000000 -0400
|
||||
+++ gtk+-2.24.7/gtk/gtktoolbar.c 2011-10-17 19:52:56.104463657 -0400
|
||||
@@ -2701,6 +2701,8 @@ static gboolean
|
||||
gtk_toolbar_button_press (GtkWidget *toolbar,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
+ GtkWidget *window;
|
||||
+
|
||||
if (_gtk_button_event_triggers_context_menu (event))
|
||||
{
|
||||
gboolean return_value;
|
||||
@@ -2711,7 +2713,29 @@ gtk_toolbar_button_press (GtkWidget
|
||||
|
||||
return return_value;
|
||||
}
|
||||
-
|
||||
+
|
||||
+ window = gtk_widget_get_toplevel (toolbar);
|
||||
+
|
||||
+ if (window)
|
||||
+ {
|
||||
+ gboolean window_drag = FALSE;
|
||||
+
|
||||
+ gtk_widget_style_get (toolbar,
|
||||
+ "window-dragging", &window_drag,
|
||||
+ NULL);
|
||||
+
|
||||
+ if (window_drag)
|
||||
+ {
|
||||
+ gtk_window_begin_move_drag (GTK_WINDOW (window),
|
||||
+ event->button,
|
||||
+ event->x_root,
|
||||
+ event->y_root,
|
||||
+ event->time);
|
||||
+
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
diff -up gtk+-2.24.7/gtk/gtkwidget.c.window-dragging gtk+-2.24.7/gtk/gtkwidget.c
|
||||
--- gtk+-2.24.7/gtk/gtkwidget.c.window-dragging 2011-10-17 19:50:52.175468086 -0400
|
||||
+++ gtk+-2.24.7/gtk/gtkwidget.c 2011-10-17 19:50:52.184468086 -0400
|
||||
@@ -2467,6 +2467,13 @@ gtk_widget_class_init (GtkWidgetClass *k
|
||||
0.0, 1.0, 0.04,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
+ gtk_widget_class_install_style_property (klass,
|
||||
+ g_param_spec_boolean ("window-dragging",
|
||||
+ P_("Window dragging"),
|
||||
+ P_("Window dragging"),
|
||||
+ FALSE,
|
||||
+ GTK_PARAM_READWRITE));
|
||||
+
|
||||
/**
|
||||
* GtkWidget:draw-border:
|
||||
*
|
Loading…
Reference in New Issue
Block a user