This commit is contained in:
Matthias Clasen 2010-06-28 15:03:47 +00:00
parent db0ee820e2
commit 5920340bcb
16 changed files with 14 additions and 989 deletions

View File

@ -1 +1 @@
gtk+-2.21.2.tar.bz2
gtk+-2.21.3.tar.bz2

View File

@ -1,39 +0,0 @@
From f96e51db46f2196707c0ea44a46f1d67f9a069d4 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl@redhat.com>
Date: Fri, 15 Jan 2010 16:06:12 +0100
Subject: [PATCH] Avoid drawing implicit paints to destroyed windows
It may happen that a window gets destroyed during painting, if so
we should not draw the implicit paint double-buffered pixmap to it
as that will cause a BadDrawable X error.
This fixes bug 600865
---
gdk/gdkwindow.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index eeaee78..9e6b14a 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2679,7 +2679,7 @@ gdk_window_flush_implicit_paint (GdkWindow *window)
gdk_region_offset (region, private->abs_x, private->abs_y);
gdk_region_intersect (region, paint->region);
- if (!gdk_region_empty (region))
+ if (!GDK_WINDOW_DESTROYED (window) && !gdk_region_empty (region))
{
/* Remove flushed region from the implicit paint */
gdk_region_subtract (paint->region, region);
@@ -2712,7 +2712,7 @@ gdk_window_end_implicit_paint (GdkWindow *window)
private->implicit_paint = NULL;
- if (!gdk_region_empty (paint->region))
+ if (!GDK_WINDOW_DESTROYED (window) && !gdk_region_empty (paint->region))
{
/* Some regions are valid, push these to window now */
tmp_gc = _gdk_drawable_get_scratch_gc ((GdkDrawable *)window, FALSE);
--
1.6.6

View File

@ -1,30 +0,0 @@
From 6f566057e85dc0d542f26db1d7964a774a5f88a4 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Wed, 10 Feb 2010 16:07:43 -0500
Subject: [PATCH 01/12] Drop duplicate declarations
---
gtk/gtkwidget.h | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 757be3f..164c0e1 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -916,13 +916,6 @@ gboolean gtk_widget_get_has_window (GtkWidget *widget);
gboolean gtk_widget_is_toplevel (GtkWidget *widget);
gboolean gtk_widget_is_drawable (GtkWidget *widget);
-void gtk_widget_set_realized (GtkWidget *widget,
- gboolean realized);
-gboolean gtk_widget_get_realized (GtkWidget *widget);
-void gtk_widget_set_mapped (GtkWidget *widget,
- gboolean mapped);
-gboolean gtk_widget_get_mapped (GtkWidget *widget);
-
void gtk_widget_set_app_paintable (GtkWidget *widget,
gboolean app_paintable);
gboolean gtk_widget_get_app_paintable (GtkWidget *widget);
--
1.7.0

View File

@ -1,40 +0,0 @@
From d4b92737abaf1f7d25090cc989846ca130617b73 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Wed, 25 Nov 2009 01:02:40 -0500
Subject: [PATCH] Make level3 keys work again
We were not paying attention to consumed modifiers when adding
virtual modifiers. This fixes RH bug 537567.
---
gdk/x11/gdkevents-x11.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c
index 032f9a5..a9efe76 100644
--- a/gdk/x11/gdkevents-x11.c
+++ b/gdk/x11/gdkevents-x11.c
@@ -618,6 +618,7 @@ translate_key_event (GdkDisplay *display,
GdkKeymap *keymap = gdk_keymap_get_for_display (display);
gunichar c = 0;
gchar buf[7];
+ GdkModifierType consumed, state;
event->key.type = xevent->xany.type == KeyPress ? GDK_KEY_PRESS : GDK_KEY_RELEASE;
event->key.time = xevent->xkey.time;
@@ -633,9 +634,11 @@ translate_key_event (GdkDisplay *display,
event->key.state,
event->key.group,
&event->key.keyval,
- NULL, NULL, NULL);
+ NULL, NULL, &consumed);
+ state = event->key.state & ~consumed;
+ _gdk_keymap_add_virtual_modifiers (keymap, &state);
+ event->key.state |= state;
- _gdk_keymap_add_virtual_modifiers (keymap, &event->key.state);
event->key.is_modifier = _gdk_keymap_key_is_modifier (keymap, event->key.hardware_keycode);
/* Fill in event->string crudely, since various programs
--
1.6.5.2

View File

@ -1,11 +0,0 @@
--- gtk+-2.18.3/gtk/gtkwindow.c 2009-10-09 01:00:44.000000000 -0400
+++ hacked/gtk/gtkwindow.c 2009-10-28 11:45:33.583105288 -0400
@@ -2414,7 +2414,7 @@
GtkWindowPrivate *priv;
g_return_if_fail (GTK_IS_WINDOW (window));
- g_return_if_fail (!GTK_WIDGET_VISIBLE (window));
+ g_return_if_fail (!GTK_WIDGET_MAPPED (window));
priv = GTK_WINDOW_GET_PRIVATE (window);

View File

@ -1,134 +0,0 @@
diff -u -r pristine/gtk/gtkfilechooserbutton.c gtk+-2.18.3/gtk/gtkfilechooserbutton.c
--- pristine/gtk/gtkfilechooserbutton.c 2009-10-09 01:00:43.000000000 -0400
+++ gtk+-2.18.3/gtk/gtkfilechooserbutton.c 2009-11-10 19:25:55.257874597 -0500
@@ -1776,10 +1776,16 @@
GFile *base_file;
base_file = _gtk_file_system_volume_get_root (volume);
- if (base_file != NULL && !g_file_is_native (base_file))
+ if (base_file != NULL)
{
- _gtk_file_system_volume_free (volume);
- continue;
+ if (!g_file_is_native (base_file))
+ {
+ g_object_unref (base_file);
+ _gtk_file_system_volume_free (volume);
+ continue;
+ }
+ else
+ g_object_unref (base_file);
}
}
}
diff -u -r pristine/gtk/gtkfilechooserdefault.c gtk+-2.18.3/gtk/gtkfilechooserdefault.c
--- pristine/gtk/gtkfilechooserdefault.c 2009-10-16 10:35:45.000000000 -0400
+++ gtk+-2.18.3/gtk/gtkfilechooserdefault.c 2009-11-10 19:25:49.165873229 -0500
@@ -828,7 +828,7 @@
if (cancellable)
g_cancellable_cancel (cancellable);
- if (!(shortcut_type == SHORTCUT_TYPE_FILE ||
+ if (!(shortcut_type == SHORTCUT_TYPE_FILE ||
shortcut_type == SHORTCUT_TYPE_VOLUME) ||
!col_data)
return;
@@ -840,12 +840,10 @@
volume = col_data;
_gtk_file_system_volume_free (volume);
}
- else
+ if (shortcut_type == SHORTCUT_TYPE_FILE)
{
GFile *file;
- g_assert (shortcut_type == SHORTCUT_TYPE_FILE);
-
file = col_data;
g_object_unref (file);
}
@@ -2094,7 +2092,10 @@
}
if (!base_is_native)
- continue;
+ {
+ _gtk_file_system_volume_free (volume);
+ continue;
+ }
}
}
@@ -3587,9 +3588,7 @@
if (shortcut_type == SHORTCUT_TYPE_SEPARATOR)
return FALSE;
else if (shortcut_type == SHORTCUT_TYPE_VOLUME)
- {
- return FALSE;
- }
+ return FALSE;
else if (shortcut_type == SHORTCUT_TYPE_FILE)
{
GFile *file;
@@ -10794,6 +10793,9 @@
"standard::type",
shortcuts_activate_get_info_cb, data);
}
+
+ if (volume)
+ _gtk_file_system_volume_free (volume);
}
else if (shortcut_type == SHORTCUT_TYPE_SEARCH)
{
diff -u -r pristine/gtk/gtkfilesystem.c gtk+-2.18.3/gtk/gtkfilesystem.c
--- pristine/gtk/gtkfilesystem.c 2009-06-04 15:18:04.000000000 -0400
+++ gtk+-2.18.3/gtk/gtkfilesystem.c 2009-11-10 19:20:13.192873941 -0500
@@ -468,6 +468,8 @@
priv->volumes = g_slist_prepend (priv->volumes, g_object_ref (drive));
}
+
+ g_object_unref (drive);
}
g_list_free (drives);
@@ -499,6 +501,8 @@
/* see comment above in why we add an icon for a volume */
priv->volumes = g_slist_prepend (priv->volumes, g_object_ref (volume));
}
+
+ g_object_unref (volume);
}
/* add mounts that has no volume (/etc/mtab mounts, ftp, sftp,...) */
@@ -520,11 +524,13 @@
*/
if (mount_referenced_by_volume_activation_root (volumes, mount))
{
+ g_object_unref (mount);
continue;
}
/* show this mount */
priv->volumes = g_slist_prepend (priv->volumes, g_object_ref (mount));
+ g_object_unref (mount);
}
g_list_free (volumes);
@@ -604,6 +610,7 @@
get_volumes_list (GTK_FILE_SYSTEM (file_system));
list = g_slist_copy (priv->volumes);
+ g_slist_foreach (list, (GFunc)g_object_ref, NULL);
#ifndef G_OS_WIN32
/* Prepend root volume */
@@ -1025,6 +1032,8 @@
if (error)
g_error_free (error);
+
+ _gtk_file_system_volume_free (volume);
}
GCancellable *

View File

@ -1,55 +0,0 @@
diff -up gtk+-2.13.5/gdk-pixbuf/gdk-pixbuf-io.c.lib64 gtk+-2.13.5/gdk-pixbuf/gdk-pixbuf-io.c
--- gtk+-2.13.5/gdk-pixbuf/gdk-pixbuf-io.c.lib64 2008-07-21 16:18:31.000000000 -0400
+++ gtk+-2.13.5/gdk-pixbuf/gdk-pixbuf-io.c 2008-07-21 22:38:19.000000000 -0400
@@ -285,7 +285,17 @@ gdk_pixbuf_get_module_file (void)
gchar *result = g_strdup (g_getenv ("GDK_PIXBUF_MODULE_FILE"));
if (!result)
- result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gdk-pixbuf.loaders", NULL);
+ {
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0",
+ HOST, "gdk-pixbuf.loaders", NULL);
+ if (!g_file_test (result, G_FILE_TEST_EXISTS))
+ {
+ g_free (result);
+
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0",
+ "gdk-pixbuf.loaders", NULL);
+ }
+ }
return result;
}
diff -up gtk+-2.13.5/gdk-pixbuf/Makefile.am.lib64 gtk+-2.13.5/gdk-pixbuf/Makefile.am
--- gtk+-2.13.5/gdk-pixbuf/Makefile.am.lib64 2008-07-21 16:18:31.000000000 -0400
+++ gtk+-2.13.5/gdk-pixbuf/Makefile.am 2008-07-21 22:43:23.000000000 -0400
@@ -505,6 +505,7 @@ INCLUDES = \
-I$(top_srcdir)/gdk-pixbuf \
-I$(top_builddir)/gdk-pixbuf \
-DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
+ -DHOST=\"$(host_triplet)\" \
-DGTK_VERSION=\"$(GTK_VERSION)\" \
-DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
-DGTK_PREFIX=\"$(prefix)\" \
diff -up gtk+-2.13.5/gtk/gtkrc.c.lib64 gtk+-2.13.5/gtk/gtkrc.c
--- gtk+-2.13.5/gtk/gtkrc.c.lib64 2008-07-21 16:18:22.000000000 -0400
+++ gtk+-2.13.5/gtk/gtkrc.c 2008-07-21 22:46:09.000000000 -0400
@@ -450,7 +450,17 @@ gtk_rc_get_im_module_file (void)
if (im_module_file)
result = g_strdup (im_module_file);
else
- result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtk.immodules", NULL);
+ {
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", GTK_HOST,
+ "gtk.immodules", NULL);
+ if (!g_file_test (result, G_FILE_TEST_EXISTS))
+ {
+ g_free (result);
+
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0",
+ "gtk.immodules", NULL);
+ }
+ }
}
return result;

View File

@ -1,22 +0,0 @@
From cdb13d233eb5bc223dd980f120c54f17dea30398 Mon Sep 17 00:00:00 2001
From: Johan Dahlin <johan@gnome.org>
Date: Thu, 31 Dec 2009 00:48:50 +0000
Subject: Make sure Gdk-2.0.gir is installed
Fixes a variable name typo
---
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 7dfc193..e1cd8c7 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -211,7 +211,7 @@ girdir = $(datadir)/gir-1.0
dist_gir_DATA = $(INTROSPECTION_GIRS)
typelibsdir = $(INTROSPECTION_TYPELIBDIR)
-typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA)
endif
--
cgit v0.8.3.1

View File

@ -1,337 +0,0 @@
--- gtk+-2.18.3/gtk/gtkprintoperation.c 2009-10-09 07:00:44.000000000 +0200
+++ gtk+-2.18.3/gtk/gtkprintoperation.c 2009-11-02 12:05:55.000000000 +0100
@@ -78,11 +78,15 @@ enum
static guint signals[LAST_SIGNAL] = { 0 };
static int job_nr = 0;
+typedef struct _PrintPagesData PrintPagesData;
-static void preview_iface_init (GtkPrintOperationPreviewIface *iface);
-static GtkPageSetup *create_page_setup (GtkPrintOperation *op);
-static void common_render_page (GtkPrintOperation *op,
- gint page_nr);
+static void preview_iface_init (GtkPrintOperationPreviewIface *iface);
+static GtkPageSetup *create_page_setup (GtkPrintOperation *op);
+static void common_render_page (GtkPrintOperation *op,
+ gint page_nr);
+static void increment_page_sequence (PrintPagesData *data);
+static void prepare_data (PrintPagesData *data);
+static void clamp_page_ranges (PrintPagesData *data);
G_DEFINE_TYPE_WITH_CODE (GtkPrintOperation, gtk_print_operation, G_TYPE_OBJECT,
@@ -260,13 +264,23 @@ preview_start_page (GtkPrintOperation *o
GtkPrintContext *print_context,
GtkPageSetup *page_setup)
{
- g_signal_emit_by_name (op, "got-page-size", print_context, page_setup);
+ if ((op->priv->manual_number_up < 2) ||
+ (op->priv->page_position % op->priv->manual_number_up == 0))
+ g_signal_emit_by_name (op, "got-page-size", print_context, page_setup);
}
static void
preview_end_page (GtkPrintOperation *op,
GtkPrintContext *print_context)
{
+ cairo_t *cr;
+
+ cr = gtk_print_context_get_cairo_context (print_context);
+
+ if ((op->priv->manual_number_up < 2) ||
+ ((op->priv->page_position + 1) % op->priv->manual_number_up == 0) ||
+ (op->priv->page_position == op->priv->nr_of_pages_to_print - 1))
+ cairo_show_page (cr);
}
static void
@@ -411,6 +425,31 @@ gtk_print_operation_get_property (GObjec
}
}
+struct _PrintPagesData
+{
+ GtkPrintOperation *op;
+ gint uncollated_copies;
+ gint collated_copies;
+ gint uncollated, collated, total;
+
+ gint range, num_ranges;
+ GtkPageRange *ranges;
+ GtkPageRange one_range;
+
+ gint page;
+ gint sheet;
+ gint first_position, last_position;
+ gint first_sheet;
+ gint num_of_sheets;
+ gint *pages;
+
+ GtkWidget *progress;
+
+ gboolean initialized;
+ gboolean is_preview;
+ gboolean done;
+};
+
typedef struct
{
GtkPrintOperationPreview *preview;
@@ -418,8 +457,8 @@ typedef struct
GtkWindow *parent;
cairo_surface_t *surface;
gchar *filename;
- guint page_nr;
gboolean wait;
+ PrintPagesData *pages_data;
} PreviewOp;
static void
@@ -441,6 +480,10 @@ preview_print_idle_done (gpointer data)
gtk_print_operation_preview_end_preview (pop->preview);
+ g_object_unref (pop->pages_data->op);
+ g_free (pop->pages_data->pages);
+ g_free (pop->pages_data);
+
g_object_unref (op);
g_free (pop);
}
@@ -450,9 +493,8 @@ preview_print_idle (gpointer data)
{
PreviewOp *pop;
GtkPrintOperation *op;
- gboolean retval = TRUE;
- cairo_t *cr;
GtkPrintOperationPrivate *priv;
+ gboolean done = FALSE;
pop = (PreviewOp *) data;
op = GTK_PRINT_OPERATION (pop->preview);
@@ -461,24 +503,23 @@ preview_print_idle (gpointer data)
if (priv->page_drawing_state == GTK_PAGE_DRAWING_STATE_READY)
{
- /* TODO: print out sheets not pages and follow ranges */
- if (pop->page_nr >= op->priv->nr_of_pages)
- retval = FALSE;
-
- if (pop->page_nr > 0)
+ if (!pop->pages_data->initialized)
{
- cr = gtk_print_context_get_cairo_context (pop->print_context);
- _gtk_print_operation_platform_backend_preview_end_page (op, pop->surface, cr);
+ pop->pages_data->initialized = TRUE;
+ prepare_data (pop->pages_data);
}
-
- if (retval)
+ else
{
- gtk_print_operation_preview_render_page (pop->preview, pop->page_nr);
- pop->page_nr++;
+ increment_page_sequence (pop->pages_data);
+
+ if (!pop->pages_data->done)
+ gtk_print_operation_preview_render_page (pop->preview, pop->pages_data->page);
+ else
+ done = priv->page_drawing_state == GTK_PAGE_DRAWING_STATE_READY;
}
}
- return retval;
+ return !done;
}
static void
@@ -502,7 +543,6 @@ preview_ready (GtkPrintOperationPreview
GtkPrintContext *context,
PreviewOp *pop)
{
- pop->page_nr = 0;
pop->print_context = context;
g_object_ref (preview);
@@ -529,6 +569,9 @@ gtk_print_operation_preview_handler (Gtk
pop->filename = NULL;
pop->preview = preview;
pop->parent = parent;
+ pop->pages_data = g_new0 (PrintPagesData, 1);
+ pop->pages_data->op = g_object_ref (GTK_PRINT_OPERATION (preview));
+ pop->pages_data->is_preview = TRUE;
page_setup = gtk_print_context_get_page_setup (context);
@@ -2026,30 +2069,6 @@ run_pdf (GtkPrintOperation *op,
return GTK_PRINT_OPERATION_RESULT_APPLY;
}
-typedef struct
-{
- GtkPrintOperation *op;
- gint uncollated_copies;
- gint collated_copies;
- gint uncollated, collated, total;
-
- gint range, num_ranges;
- GtkPageRange *ranges;
- GtkPageRange one_range;
-
- gint page;
- gint sheet;
- gint first_position, last_position;
- gint first_sheet;
- gint num_of_sheets;
- gint *pages;
-
- GtkWidget *progress;
-
- gboolean initialized;
- gboolean is_preview;
- gboolean done;
-} PrintPagesData;
static void
clamp_page_ranges (PrintPagesData *data)
@@ -2127,7 +2146,8 @@ increment_page_sequence (PrintPagesData
inc = 1;
/* changing sheet */
- if ((priv->page_position + 1) % priv->manual_number_up == 0 ||
+ if (priv->manual_number_up < 2 ||
+ (priv->page_position + 1) % priv->manual_number_up == 0 ||
priv->page_position == data->last_position ||
priv->page_position == priv->nr_of_pages_to_print - 1)
{
@@ -2579,27 +2599,27 @@ prepare_data (PrintPagesData *data)
priv = data->op->priv;
+ if (priv->manual_collation)
+ {
+ data->uncollated_copies = priv->manual_num_copies;
+ data->collated_copies = 1;
+ }
+ else
+ {
+ data->uncollated_copies = 1;
+ data->collated_copies = priv->manual_num_copies;
+ }
+
if (!data->initialized)
{
data->initialized = TRUE;
page_setup = create_page_setup (data->op);
- _gtk_print_context_set_page_setup (priv->print_context,
- page_setup);
+ _gtk_print_context_set_page_setup (priv->print_context,
+ page_setup);
g_object_unref (page_setup);
g_signal_emit (data->op, signals[BEGIN_PRINT], 0, priv->print_context);
- if (priv->manual_collation)
- {
- data->uncollated_copies = priv->manual_num_copies;
- data->collated_copies = 1;
- }
- else
- {
- data->uncollated_copies = 1;
- data->collated_copies = priv->manual_num_copies;
- }
-
return;
}
@@ -2670,10 +2690,15 @@ prepare_data (PrintPagesData *data)
data->collated = 0;
data->uncollated = 0;
- if (priv->nr_of_pages_to_print % priv->manual_number_up == 0)
- data->num_of_sheets = priv->nr_of_pages_to_print / priv->manual_number_up;
+ if (priv->manual_number_up > 1)
+ {
+ if (priv->nr_of_pages_to_print % priv->manual_number_up == 0)
+ data->num_of_sheets = priv->nr_of_pages_to_print / priv->manual_number_up;
+ else
+ data->num_of_sheets = priv->nr_of_pages_to_print / priv->manual_number_up + 1;
+ }
else
- data->num_of_sheets = priv->nr_of_pages_to_print / priv->manual_number_up + 1;
+ data->num_of_sheets = priv->nr_of_pages_to_print;
if (priv->manual_reverse)
{
@@ -2906,12 +2931,12 @@ print_pages (GtkPrintOperation *op
&priv->num_page_ranges);
priv->manual_num_copies = 1;
priv->manual_collation = FALSE;
- priv->manual_reverse = FALSE;
- priv->manual_page_set = GTK_PAGE_SET_ALL;
- priv->manual_scale = 1.0;
+ priv->manual_reverse = gtk_print_settings_get_reverse (priv->print_settings);
+ priv->manual_page_set = gtk_print_settings_get_page_set (priv->print_settings);
+ priv->manual_scale = gtk_print_settings_get_scale (priv->print_settings) / 100.0;
priv->manual_orientation = TRUE;
- priv->manual_number_up = 1;
- priv->manual_number_up_layout = GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM;
+ priv->manual_number_up = gtk_print_settings_get_number_up (priv->print_settings);
+ priv->manual_number_up_layout = gtk_print_settings_get_number_up_layout (priv->print_settings);
}
priv->print_pages_idle_id = gdk_threads_add_idle_full (G_PRIORITY_DEFAULT_IDLE + 10,
--- gtk+-2.18.3/gtk/gtkprintoperation-unix.c 2009-10-09 07:00:44.000000000 +0200
+++ gtk+-2.18.3/gtk/gtkprintoperation-unix.c 2009-11-02 12:05:52.000000000 +0100
@@ -207,7 +207,7 @@ _gtk_print_operation_platform_backend_la
gchar *cmd;
gchar *preview_cmd;
GtkSettings *settings;
- GtkPrintSettings *print_settings;
+ GtkPrintSettings *print_settings = NULL;
GtkPageSetup *page_setup;
GKeyFile *key_file = NULL;
gchar *data = NULL;
@@ -235,8 +235,28 @@ _gtk_print_operation_platform_backend_la
key_file = g_key_file_new ();
- print_settings = gtk_print_operation_get_print_settings (op);
- gtk_print_settings_to_key_file (print_settings, key_file, NULL);
+ print_settings = gtk_print_settings_copy (gtk_print_operation_get_print_settings (op));
+
+ if (print_settings != NULL)
+ {
+ gtk_print_settings_set_reverse (print_settings, FALSE);
+ gtk_print_settings_set_page_set (print_settings, GTK_PAGE_SET_ALL);
+ gtk_print_settings_set_scale (print_settings, 1.0);
+ gtk_print_settings_set_number_up (print_settings, 1);
+ gtk_print_settings_set_number_up_layout (print_settings, GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM);
+
+ /* These removals are neccessary because cups-* settings have higher priority
+ * than normal settings.
+ */
+ gtk_print_settings_unset (print_settings, "cups-reverse");
+ gtk_print_settings_unset (print_settings, "cups-page-set");
+ gtk_print_settings_unset (print_settings, "cups-scale");
+ gtk_print_settings_unset (print_settings, "cups-number-up");
+ gtk_print_settings_unset (print_settings, "cups-number-up-layout");
+
+ gtk_print_settings_to_key_file (print_settings, key_file, NULL);
+ g_object_unref (print_settings);
+ }
page_setup = gtk_print_context_get_page_setup (op->priv->print_context);
gtk_page_setup_to_key_file (page_setup, key_file, NULL);
--- gtk+-2.18.3/gtk/gtkprintsettings.c 2009-10-09 07:00:44.000000000 +0200
+++ gtk+-2.18.3/gtk/gtkprintsettings.c 2009-11-02 12:05:52.000000000 +0100
@@ -1152,7 +1152,7 @@ gtk_print_settings_set_n_copies (GtkPrin
gint
gtk_print_settings_get_number_up (GtkPrintSettings *settings)
{
- return gtk_print_settings_get_int (settings, GTK_PRINT_SETTINGS_NUMBER_UP);
+ return gtk_print_settings_get_int_with_default (settings, GTK_PRINT_SETTINGS_NUMBER_UP, 1);
}
/**

View File

@ -1,25 +0,0 @@
--- gtk+-2.18.3/modules/printbackends/cups/gtkprintbackendcups.c 2009-11-02 12:10:58.000000000 +0100
+++ gtk+-2.18.3/modules/printbackends/cups/gtkprintbackendcups.c 2009-11-02 12:11:18.000000000 +0100
@@ -4317,18 +4317,18 @@ cups_printer_prepare_for_print (GtkPrint
break;
case GTK_PAGE_ORIENTATION_LANDSCAPE:
if (layout < 4)
- layout = layout + 5 - 2 * (layout % 2);
+ layout = layout + 2 + 4 * (1 - layout / 2);
else
- layout = layout - 6 + 4 * (1 - (layout - 4) / 2);
+ layout = layout - 3 - 2 * (layout % 2);
break;
case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
layout = (layout + 3 - 2 * (layout % 2)) % 4 + 4 * (layout / 4);
break;
case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
if (layout < 4)
- layout = layout + 2 + 4 * (1 - layout / 2);
+ layout = layout + 5 - 2 * (layout % 2);
else
- layout = layout - 3 - 2 * (layout % 2);
+ layout = layout - 6 + 4 * (1 - (layout - 4) / 2);
break;
}

View File

@ -17,8 +17,8 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk2
Version: 2.21.2
Release: 2%{?dist}
Version: 2.21.3
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@ -45,8 +45,10 @@ Patch11: gtk2-remove-connecting-reason.patch
Patch15: window-dragging.patch
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: pango-devel >= %{pango_version}
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: cairo-devel
BuildRequires: gdk-pixbuf2-devel
BuildRequires: pango-devel >= %{pango_version}
BuildRequires: libtiff-devel
BuildRequires: libjpeg-devel
BuildRequires: jasper-devel
@ -66,8 +68,6 @@ BuildRequires: libXcomposite-devel
BuildRequires: libXdamage-devel
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Conflicts with packages containing theme engines
# built against the 2.4.0 ABI
Conflicts: gtk2-engines < 2.7.4-7
@ -120,6 +120,7 @@ Requires: gtk2 = %{version}-%{release}
Requires: pango-devel >= %{pango_version}
Requires: atk-devel >= %{atk_version}
Requires: glib2-devel >= %{glib2_version}
Requires: gdk-pixbuf2-devel
Requires: cairo-devel >= %{cairo_version}
Requires: libX11-devel, libXcursor-devel, libXinerama-devel
Requires: libXext-devel, libXi-devel, libXrandr-devel
@ -166,9 +167,7 @@ This package contains developer documentation for the GTK+ widget toolkit.
--enable-debug \
--disable-gtk-doc \
--disable-rebuilds \
--enable-introspection \
--with-libjasper \
--with-included-loaders=png
--enable-introspection
# fight unused direct deps
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
@ -209,8 +208,7 @@ if test "x$compile_host" != "x$host" ; then
fi
make install DESTDIR=$RPM_BUILD_ROOT \
RUN_QUERY_IMMODULES_TEST=false \
RUN_QUERY_LOADER_TEST=false
RUN_QUERY_IMMODULES_TEST=false
%find_lang gtk20
%find_lang gtk20-properties
@ -238,16 +236,13 @@ done
case "$host" in
alpha*|ia64*|powerpc64*|s390x*|x86_64*)
mv $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-2.0 $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-2.0-64
mv $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders-64
;;
*)
mv $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-2.0 $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-2.0-32
mv $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders-32
;;
esac
# Install wrappers for the binaries
cp %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/update-gdk-pixbuf-loaders
cp %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/update-gtk-immodules
# Input method frameworks want this
@ -261,7 +256,6 @@ rm $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{bin_version}/*/*.la
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0/$host
touch $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0/$host/gtk.immodules
touch $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0/$host/gdk-pixbuf.loaders
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/immodules
@ -273,14 +267,12 @@ mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{bin_version}/filesystems
#
echo %dir %{_sysconfdir}/gtk-2.0/$host >> gtk20.lang
echo %ghost %{_sysconfdir}/gtk-2.0/$host/gtk.immodules >> gtk20.lang
echo %ghost %{_sysconfdir}/gtk-2.0/$host/gdk-pixbuf.loaders >> gtk20.lang
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
/usr/bin/update-gdk-pixbuf-loaders %{_host}
/usr/bin/update-gtk-immodules %{_host}
%post immodules
@ -292,7 +284,6 @@ rm -rf $RPM_BUILD_ROOT
%postun
/sbin/ldconfig
if [ $1 -gt 0 ]; then
/usr/bin/update-gdk-pixbuf-loaders %{_host}
/usr/bin/update-gtk-immodules %{_host}
fi
@ -306,22 +297,17 @@ fi
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/gdk-pixbuf-query-loaders*
%{_bindir}/gtk-query-immodules-2.0*
%{_bindir}/update-gdk-pixbuf-loaders
%{_bindir}/update-gtk-immodules
%{_bindir}/gtk-update-icon-cache
%{_libdir}/libgtk-x11-2.0.so.*
%{_libdir}/libgdk-x11-2.0.so.*
%{_libdir}/libgdk_pixbuf-2.0.so.*
%{_libdir}/libgdk_pixbuf_xlib-2.0.so.*
%{_libdir}/libgailutil.so.*
%dir %{_libdir}/gtk-2.0
%dir %{_libdir}/gtk-2.0/%{bin_version}
%{_libdir}/gtk-2.0/%{bin_version}/engines
%{_libdir}/gtk-2.0/%{bin_version}/filesystems
%dir %{_libdir}/gtk-2.0/%{bin_version}/immodules
%{_libdir}/gtk-2.0/%{bin_version}/loaders
%{_libdir}/gtk-2.0/%{bin_version}/printbackends
%{_libdir}/gtk-2.0/modules
%{_libdir}/gtk-2.0/immodules
@ -373,7 +359,10 @@ fi
%doc tmpdocs/examples
%changelog
* Fri Jun 25 2010 Colin Walters <walters@verbum.org> - 2.21.2-1
* Mon Jun 28 2010 Matthias Clasen <mclasen@redhat.com> - 2.21.3-1
- Update to 2.21.3
* Fri Jun 25 2010 Colin Walters <walters@verbum.org> - 2.21.2-2
- drop gir-repository-devel dep
* Thu Jun 10 2010 Matthias Clasen <mclasen@redhat.com> - 2.21.2-1

View File

@ -1,15 +0,0 @@
diff -up gtk+-2.18.3/gtk/gtkiconview.c.icon-view-hang gtk+-2.18.3/gtk/gtkiconview.c
--- gtk+-2.18.3/gtk/gtkiconview.c.icon-view-hang 2009-10-09 01:00:44.000000000 -0400
+++ gtk+-2.18.3/gtk/gtkiconview.c 2009-10-23 20:09:18.670311545 -0400
@@ -1545,6 +1545,11 @@ gtk_icon_view_expose (GtkWidget *widget,
if (expose->window != icon_view->priv->bin_window)
return FALSE;
+ /* If a layout has been scheduled, do it now so that all
+ * cell view items have valid sizes before we proceed. */
+ if (icon_view->priv->layout_idle_id != 0)
+ gtk_icon_view_layout (icon_view);
+
cr = gdk_cairo_create (icon_view->priv->bin_window);
cairo_set_line_width (cr, 1.);

View File

@ -1,73 +0,0 @@
--- /home/mclasen/git.gnome.org/gtk+/gtk/gtkimage.c 2009-06-04 15:18:04.063943764 -0400
+++ gtk+-2.18.3/gtk/gtkimage.c 2009-10-18 01:31:00.705062264 -0400
@@ -45,6 +45,7 @@
gchar *filename;
gint pixel_size;
+ guint need_calc_size : 1;
};
#define GTK_IMAGE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_IMAGE, GtkImagePrivate))
@@ -1710,6 +1711,7 @@
{
GtkImage *image;
GtkMisc *misc;
+ GtkImagePrivate *priv;
GdkRectangle area, image_bound;
gfloat xalign;
gint x, y, mask_x, mask_y;
@@ -1719,6 +1721,7 @@
image = GTK_IMAGE (widget);
misc = GTK_MISC (widget);
+ priv = GTK_IMAGE_GET_PRIVATE (image);
area = event->area;
@@ -1727,7 +1730,7 @@
* and size_request() if something explicitely forces
* a redraw.
*/
- if (widget->requisition.width == 0 && widget->requisition.height == 0)
+ if (priv->need_calc_size)
gtk_image_calc_size (image);
if (!gdk_rectangle_intersect (&area, &widget->allocation, &area))
@@ -1737,7 +1740,7 @@
xalign = misc->xalign;
else
xalign = 1.0 - misc->xalign;
-
+
x = floor (widget->allocation.x + misc->xpad
+ ((widget->allocation.width - widget->requisition.width) * xalign));
y = floor (widget->allocation.y + misc->ypad
@@ -2149,8 +2152,13 @@
void
gtk_image_clear (GtkImage *image)
{
- gtk_image_reset (image);
+ GtkImagePrivate *priv;
+
+ priv = GTK_IMAGE_GET_PRIVATE (image);
+
+ priv->need_calc_size = 1;
+ gtk_image_reset (image);
gtk_image_update_size (image, 0, 0);
}
@@ -2159,7 +2167,12 @@
{
GtkWidget *widget = GTK_WIDGET (image);
GdkPixbuf *pixbuf = NULL;
-
+ GtkImagePrivate *priv;
+
+ priv = GTK_IMAGE_GET_PRIVATE (image);
+
+ priv->need_calc_size = 0;
+
/* We update stock/icon set on every size request, because
* the theme could have affected the size; for other kinds of
* image, we just update the requisition when the image data

View File

@ -1 +1 @@
4c8d78dc50c0f9bf7784194e52670d6a gtk+-2.21.2.tar.bz2
6c2ce2dc24b4864365630eebf51368c6 gtk+-2.21.3.tar.bz2

View File

@ -1,160 +0,0 @@
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index a2ac58b..70540a3 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -659,11 +659,15 @@ gtk_rc_color_hash_changed (GtkSettings *settings,
GParamSpec *pspec,
GtkRcContext *context)
{
- if (context->color_hash)
- g_hash_table_unref (context->color_hash);
-
+ GHashTable *old_hash;
+
+ old_hash = context->color_hash;
+
g_object_get (settings, "color-hash", &context->color_hash, NULL);
+ if (old_hash)
+ g_hash_table_unref (old_hash);
+
gtk_rc_reparse_all_for_settings (settings, TRUE);
}
@@ -3148,8 +3152,10 @@ gtk_rc_parse_style (GtkRcContext *context,
break;
case GTK_RC_TOKEN_COLOR:
if (our_hash == NULL)
- gtk_rc_style_prepend_empty_color_hash (rc_style);
- our_hash = rc_priv->color_hashes->data;
+ {
+ gtk_rc_style_prepend_empty_color_hash (rc_style);
+ our_hash = rc_priv->color_hashes->data;
+ }
token = gtk_rc_parse_logical_color (scanner, rc_style, our_hash);
break;
case G_TOKEN_IDENTIFIER:
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 4917263..2b6b24e 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -2190,8 +2190,8 @@ settings_update_color_scheme (GtkSettings *settings)
}
static gboolean
-add_color_to_hash (gchar *name,
- GdkColor *color,
+add_color_to_hash (gchar *name,
+ GdkColor *color,
GHashTable *target)
{
GdkColor *old;
@@ -2200,7 +2200,7 @@ add_color_to_hash (gchar *name,
if (!old || !gdk_color_equal (old, color))
{
g_hash_table_insert (target, g_strdup (name), gdk_color_copy (color));
-
+
return TRUE;
}
@@ -2208,7 +2208,7 @@ add_color_to_hash (gchar *name,
}
static gboolean
-add_colors_to_hash_from_string (GHashTable *hash,
+add_colors_to_hash_from_string (GHashTable *hash,
const gchar *colors)
{
gchar *s, *p, *name;
@@ -2256,24 +2256,27 @@ add_colors_to_hash_from_string (GHashTable *hash,
static gboolean
update_color_hash (ColorSchemeData *data,
- const gchar *str,
+ const gchar *str,
GtkSettingsSource source)
{
gboolean changed = FALSE;
gint i;
GHashTable *old_hash;
+ GHashTableIter iter;
+ gchar *name;
+ GdkColor *color;
- if ((str == NULL || *str == '\0') &&
+ if ((str == NULL || *str == '\0') &&
(data->lastentry[source] == NULL || data->lastentry[source][0] == '\0'))
return FALSE;
if (str && data->lastentry[source] && strcmp (str, data->lastentry[source]) == 0)
return FALSE;
- /* For the RC_FILE source we merge the values rather than over-writing
+ /* For the RC_FILE source we merge the values rather than over-writing
* them, since multiple rc files might define independent sets of colors
*/
- if ((source != GTK_SETTINGS_SOURCE_RC_FILE) &&
+ if ((source != GTK_SETTINGS_SOURCE_RC_FILE) &&
data->tables[source] && g_hash_table_size (data->tables[source]) > 0)
{
g_hash_table_unref (data->tables[source]);
@@ -2282,22 +2285,36 @@ update_color_hash (ColorSchemeData *data,
}
if (data->tables[source] == NULL)
- data->tables[source] = g_hash_table_new_full (g_str_hash, g_str_equal,
+ data->tables[source] = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free,
(GDestroyNotify) gdk_color_free);
g_free (data->lastentry[source]);
data->lastentry[source] = g_strdup (str);
-
+
changed |= add_colors_to_hash_from_string (data->tables[source], str);
if (!changed)
return FALSE;
-
+
/* Rebuild the merged hash table. */
- old_hash = data->color_hash;
- data->color_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
- (GDestroyNotify) gdk_color_free);
+ if (data->color_hash)
+ {
+ old_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
+ (GDestroyNotify) gdk_color_free);
+
+ g_hash_table_iter_init (&iter, data->color_hash);
+ while (g_hash_table_iter_next (&iter, &name, &color))
+ {
+ g_hash_table_insert (old_hash, name, color);
+ g_hash_table_iter_steal (&iter);
+ }
+ }
+ else
+ {
+ old_hash = NULL;
+ }
+
for (i = 0; i <= GTK_SETTINGS_SOURCE_APPLICATION; i++)
{
if (data->tables[i])
@@ -2324,13 +2341,13 @@ update_color_hash (ColorSchemeData *data,
{
changed = TRUE;
break;
- }
+ }
}
}
g_hash_table_unref (old_hash);
}
- else
+ else
changed = TRUE;
return changed;

View File

@ -1,23 +0,0 @@
diff -up gtk+-2.18.3/gtk/gtktoolbutton.c.toolbutton-assert gtk+-2.18.3/gtk/gtktoolbutton.c
--- gtk+-2.18.3/gtk/gtktoolbutton.c.toolbutton-assert 2009-10-16 10:38:56.000000000 -0400
+++ gtk+-2.18.3/gtk/gtktoolbutton.c 2009-10-26 01:12:26.146186990 -0400
@@ -916,11 +916,15 @@ gtk_tool_button_set_label (GtkToolButton
button->priv->label_text = g_strdup (label);
button->priv->contents_invalid = TRUE;
- elided_label = _gtk_toolbar_elide_underscores (label);
- accessible = gtk_widget_get_accessible (GTK_WIDGET (button->priv->button));
- atk_object_set_name (accessible, elided_label);
+ if (label)
+ {
+ elided_label = _gtk_toolbar_elide_underscores (label);
+ accessible = gtk_widget_get_accessible (GTK_WIDGET (button->priv->button));
+ atk_object_set_name (accessible, elided_label);
+
+ g_free (elided_label);
+ }
- g_free (elided_label);
g_free (old_label);
g_object_notify (G_OBJECT (button), "label");