This commit is contained in:
parent
cb074a7c52
commit
4586aa86b8
@ -1,114 +0,0 @@
|
||||
2007-09-12 Federico Mena Quintero <federico@novell.com>
|
||||
|
||||
Fix the critical part of
|
||||
https://bugzilla.novell.com/show_bug.cgi?id=303869
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=476342
|
||||
|
||||
* gtk/gtkiconcachevalidator.c (_gtk_icon_cache_validate): To avoid
|
||||
massive page-in when starting an application, don't validate icon
|
||||
caches unless we have "GTK_DEBUG=icontheme".
|
||||
|
||||
* gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path): Tell
|
||||
_gtk_icon_cache_validate() that it is not mandatory to do the
|
||||
validation.
|
||||
|
||||
* gtk/updateiconcache.c (validate_file): Here it *is* mandatory to
|
||||
do the validation.
|
||||
|
||||
Index: gtk+-2.12.1/gtk/gtkiconcache.c
|
||||
===================================================================
|
||||
--- gtk+-2.12.1.orig/gtk/gtkiconcache.c
|
||||
+++ gtk+-2.12.1/gtk/gtkiconcache.c
|
||||
@@ -130,7 +130,7 @@ _gtk_icon_cache_new_for_path (const gcha
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (gtk_debug_flags & GTK_DEBUG_ICONTHEME)
|
||||
{
|
||||
- if (!_gtk_icon_cache_validate (&info))
|
||||
+ if (!_gtk_icon_cache_validate (&info, path, FALSE))
|
||||
{
|
||||
g_mapped_file_free (map);
|
||||
g_warning ("Icon cache '%s' is invalid\n", cache_filename);
|
||||
Index: gtk+-2.12.1/gtk/gtkiconcachevalidator.c
|
||||
===================================================================
|
||||
--- gtk+-2.12.1.orig/gtk/gtkiconcachevalidator.c
|
||||
+++ gtk+-2.12.1/gtk/gtkiconcachevalidator.c
|
||||
@@ -17,6 +17,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "config.h"
|
||||
+#include "gtkdebug.h"
|
||||
#include "gtkiconcachevalidator.h"
|
||||
|
||||
#include <glib.h>
|
||||
@@ -370,7 +371,10 @@ check_hash (CacheInfo *info,
|
||||
|
||||
/**
|
||||
* _gtk_icon_cache_validate:
|
||||
- * @info: a CacheInfo structure
|
||||
+ * @info: a CacheInfo structure
|
||||
+ * @icon_path: Name of the file that is being checked (unused except for debug output)
|
||||
+ * @mandatory: Whether to actually perform the validation; if FALSE, validation will only
|
||||
+ * be performed if there is an environment variable GTK_DEBUG=icontheme.
|
||||
*
|
||||
* Validates the icon cache passed in the @cache and
|
||||
* @cache_size fields of the @info structure. The
|
||||
@@ -383,11 +387,19 @@ check_hash (CacheInfo *info,
|
||||
* Return value: %TRUE if the cache is valid
|
||||
*/
|
||||
gboolean
|
||||
-_gtk_icon_cache_validate (CacheInfo *info)
|
||||
+_gtk_icon_cache_validate (CacheInfo *info,
|
||||
+ const gchar *icon_path,
|
||||
+ gboolean mandatory)
|
||||
{
|
||||
guint32 hash_offset;
|
||||
guint32 directory_list_offset;
|
||||
|
||||
+ if (!mandatory && (gtk_debug_flags & GTK_DEBUG_ICONTHEME) == 0)
|
||||
+ return TRUE;
|
||||
+
|
||||
+ GTK_NOTE (ICONTHEME,
|
||||
+ g_print ("validating icon cache for %s", icon_path));
|
||||
+
|
||||
if (!check_version (info))
|
||||
return FALSE;
|
||||
check ("header, hash offset", get_uint32 (info, 4, &hash_offset));
|
||||
Index: gtk+-2.12.1/gtk/gtkiconcachevalidator.h
|
||||
===================================================================
|
||||
--- gtk+-2.12.1.orig/gtk/gtkiconcachevalidator.h
|
||||
+++ gtk+-2.12.1/gtk/gtkiconcachevalidator.h
|
||||
@@ -37,7 +37,9 @@ typedef struct {
|
||||
gint flags;
|
||||
} CacheInfo;
|
||||
|
||||
-gboolean _gtk_icon_cache_validate (CacheInfo *info);
|
||||
+gboolean _gtk_icon_cache_validate (CacheInfo *info,
|
||||
+ const gchar *icon_path,
|
||||
+ gboolean mandatory);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
Index: gtk+-2.12.1/gtk/updateiconcache.c
|
||||
===================================================================
|
||||
--- gtk+-2.12.1.orig/gtk/updateiconcache.c
|
||||
+++ gtk+-2.12.1/gtk/updateiconcache.c
|
||||
@@ -49,6 +49,10 @@ static gboolean validate = FALSE;
|
||||
static gchar *var_name = "-";
|
||||
static gboolean remove_empty_cache = FALSE;
|
||||
|
||||
+guint gtk_debug_flags; /* HACK: gtkiconcachevalidator.c needs this from
|
||||
+ * gtkdebug.h/gtkmain.c, but we don't link to libgtk.
|
||||
+ */
|
||||
+
|
||||
/* Quite ugly - if we just add the c file to the
|
||||
* list of sources in Makefile.am, libtool complains.
|
||||
*/
|
||||
@@ -1408,7 +1412,7 @@ validate_file (const gchar *file)
|
||||
info.n_directories = 0;
|
||||
info.flags = CHECK_OFFSETS|CHECK_STRINGS|CHECK_PIXBUFS;
|
||||
|
||||
- if (!_gtk_icon_cache_validate (&info))
|
||||
+ if (!_gtk_icon_cache_validate (&info, file, TRUE))
|
||||
{
|
||||
g_mapped_file_free (map);
|
||||
return FALSE;
|
1532
gtk2-bnc171077-bgo314873-filechooser-tab-in-the-middle-of-entry.diff
Normal file
1532
gtk2-bnc171077-bgo314873-filechooser-tab-in-the-middle-of-entry.diff
Normal file
File diff suppressed because it is too large
Load Diff
12
gtk2.changes
12
gtk2.changes
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 27 19:34:53 CET 2008 - federico@novell.com
|
||||
|
||||
- Removed gtk2-303869-disable-icon-cache-validation.diff, as this
|
||||
patch made it into the stock tarball.
|
||||
- Added
|
||||
gtk2-bnc171077-bgo314873-filechooser-tab-in-the-middle-of-entry.diff
|
||||
to fix https://bugzilla.novell.com/show_bug.cgi?id=171077 - The GTK+
|
||||
file dialog now lets you use Tab completion even when the cursor is
|
||||
not at the end of the text in the filename entry. Completion is
|
||||
also improved in general.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 19 18:35:06 CET 2008 - vuntz@suse.de
|
||||
|
||||
|
16
gtk2.spec
16
gtk2.spec
@ -29,7 +29,7 @@ Group: System/Libraries
|
||||
AutoReqProv: on
|
||||
PreReq: /usr/bin/touch /bin/rm /bin/rmdir
|
||||
Version: 2.12.9
|
||||
Release: 6
|
||||
Release: 10
|
||||
Summary: Library for Creation of Graphical User Interfaces (version 2)
|
||||
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.12/%{_name}-%{version}.tar.bz2
|
||||
Source1: SuSEconfig.gtk2
|
||||
@ -57,9 +57,10 @@ Patch35: gtk2-flash-player-busyloop.patch
|
||||
# be sufficient.
|
||||
# FIXME: this section is incomplete, and that some of the patches listed earlier should
|
||||
# be here instead.
|
||||
Patch50: gtk2-303869-disable-icon-cache-validation.diff
|
||||
# PATCH-FIX-UPSTREAM gtk2-bnc343858-buggy-intel-xinerama.patch bnc343858 bgo523408 vuntz@novell.com -- Some Intel cards misreports a connected output and this leads applications to use a lower screen resolution than the real one
|
||||
Patch51: gtk2-bnc343858-buggy-intel-xinerama.patch
|
||||
# PATCH-FIX-UPSTREAM gtk2-bnc171077-bgo314873-filechooser-tab-in-the-middle-of-entry.diff bnc171077 bgo314873 federico@novell.com -- Tab-completion rewrite for the file chooser
|
||||
Patch52: gtk2-bnc171077-bgo314873-filechooser-tab-in-the-middle-of-entry.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: cairo >= 0.9.2 hicolor-icon-theme
|
||||
%if %suse_version > 1020
|
||||
@ -266,8 +267,8 @@ cp -a %{S:2} .
|
||||
%patch31
|
||||
%patch32 -p1
|
||||
%patch35
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
%patch52 -p1
|
||||
gnome-patch-translation-update
|
||||
|
||||
%build
|
||||
@ -426,6 +427,15 @@ fi
|
||||
%{_datadir}/gtk-doc/html/*
|
||||
|
||||
%changelog
|
||||
* Thu Mar 27 2008 federico@novell.com
|
||||
- Removed gtk2-303869-disable-icon-cache-validation.diff, as this
|
||||
patch made it into the stock tarball.
|
||||
- Added
|
||||
gtk2-bnc171077-bgo314873-filechooser-tab-in-the-middle-of-entry.diff
|
||||
to fix https://bugzilla.novell.com/show_bug.cgi?id=171077 - The GTK+
|
||||
file dialog now lets you use Tab completion even when the cursor is
|
||||
not at the end of the text in the filename entry. Completion is
|
||||
also improved in general.
|
||||
* Wed Mar 19 2008 vuntz@suse.de
|
||||
- Add gtk2-bnc343858-buggy-intel-xinerama.patch to sanitize
|
||||
overlapping monitors, a situation that can happen with some intel
|
||||
|
Loading…
x
Reference in New Issue
Block a user