This commit is contained in:
Matthias Clasen 2007-11-27 00:15:21 +00:00
parent c92c95d259
commit fab0c8ea3c
22 changed files with 4 additions and 6030 deletions

View File

@ -1 +1 @@
gtk+-2.12.1.tar.bz2
gtk+-2.12.2.tar.bz2

View File

@ -1,30 +0,0 @@
--- trunk/gtk/gtkbuilder.c 2007/09/14 00:56:57 18820
+++ trunk/gtk/gtkbuilder.c 2007/10/22 09:15:50 18939
@@ -21,7 +21,6 @@
*/
#include <config.h>
-#include <ctype.h> /* tolower, toupper */
#include <errno.h> /* errno */
#include <stdlib.h> /* strtol, strtoul */
#include <string.h> /* strlen */
@@ -210,13 +209,13 @@
{
c = name[i];
/* skip if uppercase, first or previous is uppercase */
- if ((c == toupper (c) &&
- i > 0 && name[i-1] != toupper (name[i-1])) ||
- (i > 2 && name[i] == toupper (name[i]) &&
- name[i-1] == toupper (name[i-1]) &&
- name[i-2] == toupper (name[i-2])))
+ if ((c == g_ascii_toupper (c) &&
+ i > 0 && name[i-1] != g_ascii_toupper (name[i-1])) ||
+ (i > 2 && name[i] == g_ascii_toupper (name[i]) &&
+ name[i-1] == g_ascii_toupper (name[i-1]) &&
+ name[i-2] == g_ascii_toupper (name[i-2])))
g_string_append_c (symbol_name, '_');
- g_string_append_c (symbol_name, tolower (c));
+ g_string_append_c (symbol_name, g_ascii_tolower (c));
}
g_string_append (symbol_name, "_get_type");

View File

@ -1,35 +0,0 @@
Index: configure.in
===================================================================
--- configure.in (revision 18526)
+++ configure.in (working copy)
@@ -1572,6 +1572,15 @@
fi
AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
+gtk_save_cflags="$CFLAGS"
+CFLAGS="$CUPS_CFLAGS"
+AC_TRY_COMPILE([#include <cups/http.h>],
+ [http_t http; char *s = http.authstring;],
+ [AC_DEFINE(HAVE_HTTP_AUTHSTRING,[],[Define if cups http_t authstring field is accessible])],)
+CFLAGS="$gtk_save_cflags"
+
+AC_SUBST(HAVE_HTTP_AUTHSTRING)
+
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
Index: modules/printbackends/cups/gtkcupsutils.c
===================================================================
--- modules/printbackends/cups/gtkcupsutils.c (revision 18526)
+++ modules/printbackends/cups/gtkcupsutils.c (working copy)
@@ -30,10 +30,6 @@
#include <stdlib.h>
#include <time.h>
-#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR > 1) || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR == 1 && CUPS_VERSION_PATCH >= 20)
-#define HAVE_HTTP_AUTHSTRING 1
-#endif
-
typedef void (*GtkCupsRequestStateFunc) (GtkCupsRequest *request);
static void _connect (GtkCupsRequest *request);

View File

@ -1,11 +0,0 @@
diff -up gtk+-2.12.0/gtk/updateiconcache.c.double-free gtk+-2.12.0/gtk/updateiconcache.c
--- gtk+-2.12.0/gtk/updateiconcache.c.double-free 2007-10-11 15:33:11.000000000 -0400
+++ gtk+-2.12.0/gtk/updateiconcache.c 2007-10-11 15:33:38.000000000 -0400
@@ -219,7 +219,6 @@ foreach_remove_func (gpointer key, gpoin
{
/* just a .icon file, throw away */
g_free (key);
- free_icon_data (image->icon_data);
g_free (image);
return TRUE;

View File

@ -1,27 +0,0 @@
Index: gtk+/gdk/gdkwindow.c
===================================================================
--- gtk+/gdk/gdkwindow.c (revision 18802)
+++ gtk+/gdk/gdkwindow.c (working copy)
@@ -615,7 +615,11 @@ gdk_window_get_toplevel (GdkWindow *wind
obj = (GdkWindowObject *)window;
while (GDK_WINDOW_TYPE (obj) == GDK_WINDOW_CHILD)
- obj = (GdkWindowObject *)obj->parent;
+ {
+ obj = (GdkWindowObject *)obj->parent;
+ if (!obj)
+ return NULL;
+ }
return GDK_WINDOW (obj);
}
@@ -2297,6 +2301,9 @@ gdk_window_is_toplevel_frozen (GdkWindow
toplevel = (GdkWindowObject *)gdk_window_get_toplevel (window);
+ if (!toplevel)
+ return FALSE;
+
return toplevel->update_and_descendants_freeze_count > 0;
}

View File

@ -1,23 +0,0 @@
--- gtk+-2.10.10/gtk/gtknotebook.c.detach 2007-03-12 23:36:03.000000000 -0400
+++ gtk+-2.10.10/gtk/gtknotebook.c 2007-03-12 23:42:11.000000000 -0400
@@ -3926,9 +3926,6 @@
else
g_object_ref_sink (page->menu_label);
- /* child visible will be turned on by switch_page below */
- gtk_widget_set_child_visible (child, FALSE);
-
if (notebook->menu)
gtk_notebook_menu_item_create (notebook,
g_list_find (notebook->children, page));
@@ -3942,6 +3939,10 @@
if (!notebook->first_tab)
notebook->first_tab = notebook->children;
+ /* child visible will be turned on by switch_page below */
+ if (notebook->cur_page != page)
+ gtk_widget_set_child_visible (child, FALSE);
+
if (tab_label)
{
if (notebook->show_tabs && GTK_WIDGET_VISIBLE (child))

View File

@ -1,320 +0,0 @@
--- gtk+-2.10.11/gtk/Makefile.am.user-dirs 2007-04-10 20:50:54.000000000 +0200
+++ gtk+-2.10.11/gtk/Makefile.am 2007-04-10 20:50:54.000000000 +0200
@@ -598,6 +598,7 @@
gtkwidget.c \
gtkwindow-decorate.c \
gtkwindow.c \
+ xdg-user-dir-lookup.c \
$(gtk_clipboard_dnd_c_sources)
gtk_c_sources = $(gtk_base_c_sources)
gtk_all_c_sources = $(gtk_base_c_sources)
--- gtk+-2.10.11/gtk/gtkpathbar.c.user-dirs 2007-03-14 05:07:01.000000000 +0100
+++ gtk+-2.10.11/gtk/gtkpathbar.c 2007-04-10 20:50:54.000000000 +0200
@@ -1586,6 +1586,8 @@
return TRUE;
}
+char *_xdg_user_dir_lookup (const char *type);
+
/* FIXME: This should be a construct-only property */
void
_gtk_path_bar_set_file_system (GtkPathBar *path_bar,
@@ -1607,9 +1609,9 @@
/* FIXME: Need file system backend specific way of getting the
* Desktop path.
*/
- desktop = g_build_filename (home, "Desktop", NULL);
+ desktop = _xdg_user_dir_lookup ("DESKTOP");
path_bar->desktop_path = gtk_file_system_filename_to_path (path_bar->file_system, desktop);
- g_free (desktop);
+ free (desktop);
}
else
{
--- gtk+-2.10.11/gtk/gtkfilesystemunix.c.user-dirs 2007-03-14 05:07:06.000000000 +0100
+++ gtk+-2.10.11/gtk/gtkfilesystemunix.c 2007-04-10 20:50:54.000000000 +0200
@@ -1605,6 +1605,8 @@
return filename_to_path (filename);
}
+char *_xdg_user_dir_lookup (const char *type);
+
/* Returns the name of the icon to be used for a path which is known to be a
* directory. This can vary for Home, Desktop, etc.
*/
@@ -1617,7 +1619,7 @@
return "gnome-fs-directory";
if (!desktop_path)
- desktop_path = g_build_filename (g_get_home_dir (), "Desktop", NULL);
+ desktop_path = _xdg_user_dir_lookup ("DESKTOP");
if (strcmp (g_get_home_dir (), path) == 0)
return "gnome-fs-home";
--- gtk+-2.10.11/gtk/gtkfilechooserdefault.c.user-dirs 2007-04-10 20:50:54.000000000 +0200
+++ gtk+-2.10.11/gtk/gtkfilechooserdefault.c 2007-04-10 21:15:22.000000000 +0200
@@ -1767,12 +1767,14 @@
profile_end ("end", NULL);
}
+char *_xdg_user_dir_lookup (const char *type);
+
/* Appends the ~/Desktop directory to the shortcuts model */
static void
shortcuts_append_desktop (GtkFileChooserDefault *impl)
{
- char *name;
- const char *home;
+ char *name, *tmp;
+ const char *display_name = NULL;
GtkFilePath *path;
profile_start ("start", NULL);
@@ -1780,20 +1782,18 @@
#ifdef G_OS_WIN32
name = _gtk_file_system_win32_get_desktop ();
#else
- home = g_get_home_dir ();
- if (home == NULL)
- {
- profile_end ("end - no home directory!?", NULL);
- return;
- }
-
- name = g_build_filename (home, "Desktop", NULL);
+ tmp = _xdg_user_dir_lookup ("DESKTOP");
+ name = g_strdup (tmp);
+ free (tmp);
+ display_name = g_path_get_basename (name);
#endif
path = gtk_file_system_filename_to_path (impl->file_system, name);
g_free (name);
- shortcuts_insert_path (impl, -1, SHORTCUT_TYPE_PATH, NULL, path, _("Desktop"), FALSE, SHORTCUTS_DESKTOP);
+ shortcuts_insert_path (impl, -1, SHORTCUT_TYPE_PATH, NULL, path,
+ display_name ? display_name : _("Desktop"),
+ FALSE, SHORTCUTS_DESKTOP);
impl->has_desktop = TRUE;
/* We do not actually pop up an error dialog if there is no desktop directory
@@ -1801,6 +1801,7 @@
*/
gtk_file_path_free (path);
+ g_free (display_name);
profile_end ("end", NULL);
}
--- /dev/null 2007-04-10 17:42:06.546489881 +0200
+++ gtk+-2.10.11/gtk/xdg-user-dir-lookup.c 2007-04-10 20:50:54.000000000 +0200
@@ -0,0 +1,150 @@
+/*
+ This file is not licenced under the GPL like the rest of the code.
+ Its is under the MIT license, to encourage reuse by cut-and-paste.
+
+ Copyright (c) 2007 Red Hat, inc
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+char *
+_xdg_user_dir_lookup (const char *type)
+{
+ FILE *file;
+ char *home_dir, *config_home, *config_file;
+ char buffer[512];
+ char *user_dir;
+ char *p, *d;
+ int len;
+ int relative;
+
+ home_dir = getenv ("HOME");
+
+ if (home_dir == NULL)
+ return strdup ("/tmp");
+
+ config_home = getenv ("XDG_CONFIG_HOME");
+ if (config_home == NULL || config_home[0] == 0)
+ {
+ config_file = malloc (strlen (home_dir) + strlen ("/.config/user-dirs.dirs") + 1);
+ strcpy (config_file, home_dir);
+ strcat (config_file, "/.config/user-dirs.dirs");
+ }
+ else
+ {
+ config_file = malloc (strlen (config_home) + strlen ("/user-dirs.dirs") + 1);
+ strcpy (config_file, config_home);
+ strcat (config_file, "/user-dirs.dirs");
+ }
+
+ file = fopen (config_file, "r");
+ free (config_file);
+ if (file == NULL)
+ goto error;
+
+ user_dir = NULL;
+ while (fgets (buffer, sizeof (buffer), file))
+ {
+ /* Remove newline at end */
+ len = strlen (buffer);
+ if (len > 0 && buffer[len-1] == '\n')
+ buffer[len-1] = 0;
+
+ p = buffer;
+ while (*p == ' ' || *p == '\t')
+ p++;
+
+ if (strncmp (p, "XDG_", 4) != 0)
+ continue;
+ p += 4;
+ if (strncmp (p, type, strlen (type)) != 0)
+ continue;
+ p += strlen (type);
+ if (strncmp (p, "_DIR", 4) != 0)
+ continue;
+ p += 4;
+
+ while (*p == ' ' || *p == '\t')
+ p++;
+
+ if (*p != '=')
+ continue;
+ p++;
+
+ while (*p == ' ' || *p == '\t')
+ p++;
+
+ if (*p != '"')
+ continue;
+ p++;
+
+ relative = 0;
+ if (strncmp (p, "$HOME/", 6) == 0)
+ {
+ p += 6;
+ relative = 1;
+ }
+ else if (*p != '/')
+ continue;
+
+ if (relative)
+ {
+ user_dir = malloc (strlen (home_dir) + 1 + strlen (p) + 1);
+ strcpy (user_dir, home_dir);
+ strcat (user_dir, "/");
+ }
+ else
+ {
+ user_dir = malloc (strlen (p) + 1);
+ *user_dir = 0;
+ }
+
+ d = user_dir + strlen (user_dir);
+ while (*p && *p != '"')
+ {
+ if ((*p == '\\') && (*(p+1) != 0))
+ p++;
+ *d++ = *p++;
+ }
+ *d = 0;
+ }
+ fclose (file);
+
+ if (user_dir)
+ return user_dir;
+
+ error:
+ /* Special case desktop for historical compatibility */
+ if (strcmp (type, "DESKTOP") == 0)
+ {
+ user_dir = malloc (strlen (home_dir) + strlen ("/Desktop") + 1);
+ strcpy (user_dir, home_dir);
+ strcat (user_dir, "/Desktop");
+ return user_dir;
+ }
+ else
+ return strdup (home_dir);
+}
--- gtk+-2.10.11/gtk/gtkfilechooserbutton.c.user-dirs 2007-03-14 05:07:03.000000000 +0100
+++ gtk+-2.10.11/gtk/gtkfilechooserbutton.c 2007-04-10 21:15:42.000000000 +0200
@@ -65,7 +65,6 @@
#define GTK_FILE_CHOOSER_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_FILE_CHOOSER_BUTTON, GtkFileChooserButtonPrivate))
#define DEFAULT_TITLE N_("Select A File")
-#define DESKTOP_DISPLAY_NAME N_("Desktop")
#define FALLBACK_DISPLAY_NAME N_("(None)")
#define FALLBACK_ICON_NAME "stock_unknown"
#define FALLBACK_ICON_SIZE 16
@@ -1642,11 +1641,14 @@
g_object_unref (handle);
}
+char *_xdg_user_dir_lookup (const char *type);
+
static inline void
model_add_special (GtkFileChooserButton *button)
{
const gchar *homedir;
gchar *desktopdir = NULL;
+ gchar *desktopname = NULL;
GtkListStore *store;
GtkTreeIter iter;
GtkFilePath *path;
@@ -1690,12 +1692,14 @@
button->priv->n_special++;
#ifndef G_OS_WIN32
- desktopdir = g_build_filename (homedir, DESKTOP_DISPLAY_NAME, NULL);
+ desktopdir = _xdg_user_dir_lookup ("DESKTOP");
+ desktopname = g_path_get_basename (desktopdir);
#endif
}
#ifdef G_OS_WIN32
desktopdir = _gtk_file_system_win32_get_desktop ();
+ desktopname = NULL;
#endif
if (desktopdir)
@@ -1723,7 +1727,7 @@
gtk_list_store_set (store, &iter,
TYPE_COLUMN, ROW_TYPE_SPECIAL,
ICON_COLUMN, NULL,
- DISPLAY_NAME_COLUMN, _(DESKTOP_DISPLAY_NAME),
+ DISPLAY_NAME_COLUMN, desktopname ? desktopname :_("Desktop"),
DATA_COLUMN, path,
IS_FOLDER_COLUMN, TRUE,
HANDLE_COLUMN, handle,
@@ -1731,6 +1735,8 @@
button->priv->n_special++;
}
+
+ g_free (desktopname);
}
static void

File diff suppressed because it is too large Load Diff

View File

@ -1,405 +0,0 @@
--- gtk+-2.10.3/gtk/gtkrecentmanager.c.fam 2006-08-18 11:30:57.000000000 -0400
+++ gtk+-2.10.3/gtk/gtkrecentmanager.c 2006-09-05 11:33:48.000000000 -0400
@@ -38,6 +38,9 @@
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
#include "gtkmarshalers.h"
+
+#include <fam.h>
+
#include "gtkalias.h"
#ifdef G_OS_UNIX
@@ -110,6 +113,9 @@
time_t last_mtime;
guint poll_timeout;
+
+ FAMRequest *fam_request;
+ guint changed_timeout;
};
enum
@@ -274,6 +280,309 @@
g_type_class_add_private (klass, sizeof (GtkRecentManagerPrivate));
}
+
+/* fam support */
+#undef DEBUG_FAM
+
+static FAMConnection fam_connection;
+static gboolean opened_connection = FALSE;
+static gboolean failed_to_connect = FALSE;
+static guint fam_io_watch = 0;
+
+static int (*fam_open) (FAMConnection *fc) = NULL;
+static int (*fam_close) (FAMConnection *fc) = NULL;
+static int (*fam_pending) (FAMConnection *fc) = NULL;
+static int (*fam_next_event) (FAMConnection *fc,
+ FAMEvent *fe) = NULL;
+static int (*fam_monitor_file) (FAMConnection *fc,
+ const char *filename,
+ FAMRequest *fr,
+ void *userData) = NULL;
+static int (*fam_cancel_monitor) (FAMConnection *fc,
+ const FAMRequest *fr) = NULL;
+
+
+static struct FamDlMapping
+{
+ const char *fn_name;
+ gpointer fn_ptr_ref;
+} fam_dl_mapping[] = {
+ { "FAMOpen", &fam_open },
+ { "FAMClose", &fam_close },
+ { "FAMPending", &fam_pending },
+ { "FAMNextEvent", &fam_next_event },
+ { "FAMMonitorFile", &fam_monitor_file },
+ { "FAMCancelMonitor", &fam_cancel_monitor }
+};
+
+static void
+open_libfam (void)
+{
+ static gboolean done = FALSE;
+
+ if (!done)
+ {
+ int i;
+ GModule *fam;
+
+ done = TRUE;
+
+ fam = g_module_open ("libfam.so.0", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
+ if (!fam)
+ {
+ g_warning ("Can't open libfam '%s'\n", g_module_error ());
+ return;
+ }
+
+ for (i = 0; i < G_N_ELEMENTS (fam_dl_mapping); i++)
+ {
+ if (!g_module_symbol (fam, fam_dl_mapping[i].fn_name,
+ fam_dl_mapping[i].fn_ptr_ref))
+ {
+ g_warning ("Missing symbol '%s' in libfam\n",
+ fam_dl_mapping[i].fn_name);
+ g_module_close (fam);
+ for (i = 0; i < G_N_ELEMENTS (fam_dl_mapping); i++)
+ fam_dl_mapping[i].fn_ptr_ref = NULL;
+
+ return;
+ }
+ }
+ }
+}
+
+static gboolean
+changed_timeout (gpointer data)
+{
+ GtkRecentManager *manager;
+
+ GDK_THREADS_ENTER ();
+
+ manager = (GtkRecentManager *)data;
+ manager->priv->changed_timeout = 0;
+
+ gtk_recent_manager_changed (manager);
+
+ GDK_THREADS_LEAVE ();
+
+ return FALSE;
+}
+
+static void
+handle_fam_event (GtkRecentManager *manager,
+ FAMEvent *event)
+{
+ GtkRecentManagerPrivate *priv = manager->priv;
+
+ /* try to group delete-create pairs */
+ if (event->code == FAMDeleted)
+ {
+ if (priv->changed_timeout == 0)
+ priv->changed_timeout = g_timeout_add (500, changed_timeout, manager);
+ }
+ else
+ {
+ if (priv->changed_timeout != 0)
+ {
+ g_source_remove (priv->changed_timeout);
+ priv->changed_timeout = 0;
+ }
+ gtk_recent_manager_changed (manager);
+ }
+}
+
+#ifdef DEBUG_FAM
+static inline void
+debug_event (FAMEvent *event)
+{
+#define PRINT_EVENT(str) g_print ("Got event: %d %s <" str ">\n", event->code, event->filename);
+
+ switch (event->code)
+ {
+ case FAMChanged:
+ PRINT_EVENT ("changed");
+ break;
+ case FAMDeleted:
+ PRINT_EVENT ("deleted");
+ break;
+ case FAMStartExecuting:
+ PRINT_EVENT ("start-executing");
+ break;
+ case FAMStopExecuting:
+ PRINT_EVENT ("stop-executing");
+ break;
+ case FAMCreated:
+ PRINT_EVENT ("created");
+ break;
+ case FAMAcknowledge:
+ PRINT_EVENT ("acknowledge");
+ break;
+ case FAMExists:
+ PRINT_EVENT ("exists");
+ break;
+ case FAMEndExist:
+ PRINT_EVENT ("end-exist");
+ break;
+ case FAMMoved:
+ PRINT_EVENT ("moved");
+ break;
+ default:
+ PRINT_EVENT ("invalid");
+ break;
+ }
+
+#undef PRINT_EVENT
+}
+#else
+#define debug_event(event)
+#endif
+
+static gboolean
+process_fam_events (void)
+{
+ if (failed_to_connect)
+ return FALSE;
+
+ while (fam_pending (&fam_connection))
+ {
+ FAMEvent event;
+
+ if (fam_next_event (&fam_connection, &event) != 1)
+ {
+ g_warning ("Failed to read next event from FAM");
+ failed_to_connect = TRUE;
+ fam_close (&fam_connection);
+ return FALSE;
+ }
+
+ debug_event (&event);
+
+ if (event.code != FAMChanged &&
+ event.code != FAMCreated &&
+ event.code != FAMDeleted)
+ continue;
+
+ handle_fam_event (event.userdata, &event);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+fam_data_pending (GIOChannel *source,
+ GIOCondition condition)
+{
+ g_assert (condition == G_IO_IN || condition == G_IO_PRI);
+
+ if (!process_fam_events ())
+ {
+ fam_io_watch = 0;
+ return FALSE;
+ }
+
+ return TRUE; /* do come again */
+}
+
+static FAMConnection *
+get_fam_connection (void)
+{
+ if (!opened_connection)
+ {
+ opened_connection = TRUE;
+
+ open_libfam ();
+
+ if (fam_open != NULL &&
+ fam_open (&fam_connection) == 0)
+ {
+ GIOChannel *io_channel;
+
+ io_channel = g_io_channel_unix_new (fam_connection.fd);
+ fam_io_watch = g_io_add_watch (io_channel,
+ G_IO_IN|G_IO_PRI,
+ (GIOFunc) fam_data_pending,
+ NULL);
+ g_io_channel_unref (io_channel);
+ }
+ else
+ {
+ g_warning ("Failed to connect to the FAM server");
+ failed_to_connect = TRUE;
+ }
+ }
+
+ return failed_to_connect ? NULL : &fam_connection;
+}
+
+static FAMRequest *
+register_fam_monitor (const gchar *path,
+ gpointer user_data)
+{
+ FAMConnection *fam_connection;
+ FAMRequest *request;
+
+ if ((fam_connection = get_fam_connection ()) == NULL)
+ {
+ g_warning ("Not adding file monitor on '%s', "
+ "failed to connect to FAM server\n",
+ path);
+ return NULL;
+ }
+
+ /* Need to process any pending events, otherwise we may block
+ * on write - i.e. the FAM sever is blocked because its write
+ * buffer is full notifying us of events, we need to read those
+ * events before it can process our new request.
+ */
+ if (!process_fam_events ())
+ {
+ g_source_remove (fam_io_watch);
+ fam_io_watch = 0;
+ return NULL;
+ }
+
+ request = g_new0 (FAMRequest, 1);
+
+ if (fam_monitor_file (fam_connection, path, request, user_data) != 0)
+ {
+ g_warning ("Failed to add file monitor on '%s'", path);
+ g_free (request);
+
+ return NULL;
+ }
+
+#ifdef DEBUG_FAM
+ g_print ("registering file monitor for '%s'\n", path);
+#endif
+
+ return request;
+}
+
+static void
+unregister_fam_monitor (FAMRequest *request)
+{
+ if (failed_to_connect)
+ return;
+
+ if (request != NULL)
+ fam_cancel_monitor (&fam_connection, request);
+
+ /* Need to process any remaining events for this monitor
+ */
+ if (!process_fam_events ())
+ {
+ g_source_remove (fam_io_watch);
+ fam_io_watch = 0;
+ }
+
+#ifdef DEBUG_FAM
+ g_print ("unregistering file monitor\n");
+#endif
+}
+
+/* end of fam support */
+
+
static void
gtk_recent_manager_init (GtkRecentManager *manager)
{
@@ -296,9 +605,12 @@
priv->filename = g_build_filename (g_get_home_dir (),
GTK_RECENTLY_USED_FILE,
NULL);
- priv->poll_timeout = g_timeout_add (POLL_DELTA,
- gtk_recent_manager_poll_timeout,
- manager);
+
+ priv->fam_request = register_fam_monitor (priv->filename, manager);
+ if (priv->fam_request == NULL)
+ priv->poll_timeout = g_timeout_add (POLL_DELTA,
+ gtk_recent_manager_poll_timeout,
+ manager);
build_recent_items_list (manager);
}
@@ -356,10 +668,19 @@
GtkRecentManager *manager = GTK_RECENT_MANAGER (object);
GtkRecentManagerPrivate *priv = manager->priv;
+ if (priv->fam_request)
+ {
+ unregister_fam_monitor (priv->fam_request);
+ g_free (priv->fam_request);
+ priv->fam_request = NULL;
+ }
+ if (priv->changed_timeout)
+ g_source_remove (priv->changed_timeout);
+
/* remove the poll timeout */
if (priv->poll_timeout)
g_source_remove (priv->poll_timeout);
-
+
if (priv->filename)
g_free (priv->filename);
@@ -499,18 +820,28 @@
if (!filename || filename[0] == '\0')
return;
- g_free (manager->priv->filename);
+ g_free (priv->filename);
- if (manager->priv->poll_timeout)
+ if (priv->fam_request)
{
- g_source_remove (manager->priv->poll_timeout);
- manager->priv->poll_timeout = 0;
+ unregister_fam_monitor (priv->fam_request);
+ g_free (priv->fam_request);
+ priv->fam_request = NULL;
+ }
+
+ if (priv->poll_timeout)
+ {
+ g_source_remove (priv->poll_timeout);
+ priv->poll_timeout = 0;
}
priv->filename = g_strdup (filename);
- priv->poll_timeout = g_timeout_add (POLL_DELTA,
- gtk_recent_manager_poll_timeout,
- manager);
+
+ priv->fam_request = register_fam_monitor (priv->filename, manager);
+ if (priv->fam_request == NULL)
+ priv->poll_timeout = g_timeout_add (POLL_DELTA,
+ gtk_recent_manager_poll_timeout,
+ manager);
/* mark us clean, so that we can re-read the list
* of recently used resources

View File

@ -1,40 +0,0 @@
--- gtk+-2.10.4/gtk/gtkentry.c.im-reset 2006-10-06 00:41:48.000000000 -0400
+++ gtk+-2.10.4/gtk/gtkentry.c 2006-10-06 00:40:54.000000000 -0400
@@ -238,6 +238,7 @@
*/
static void gtk_entry_start_editing (GtkCellEditable *cell_editable,
GdkEvent *event);
+static void gtk_entry_editing_done (GtkCellEditable *cell_editable);
/* Default signal handlers
*/
@@ -903,6 +904,7 @@
gtk_entry_cell_editable_init (GtkCellEditableIface *iface)
{
iface->start_editing = gtk_entry_start_editing;
+ iface->editing_done = gtk_entry_editing_done;
}
static void
@@ -2302,6 +2304,12 @@
}
static void
+gtk_entry_editing_done (GtkCellEditable *cell_editable)
+{
+ gtk_im_context_reset (GTK_ENTRY (cell_editable)->im_context);
+}
+
+static void
gtk_entry_password_hint_free (GtkEntryPasswordHint *password_hint)
{
if (password_hint->password_hint_timeout_id)
@@ -3505,7 +3513,7 @@
{
if (entry->need_im_reset)
{
- entry->need_im_reset = 0;
+ entry->need_im_reset = FALSE;
gtk_im_context_reset (entry->im_context);
}
}

View File

@ -1,417 +0,0 @@
--- gtk+-2.10.7/gtk/gtksettings.c.cursor-blink 2006-12-30 18:35:43.000000000 -0500
+++ gtk+-2.10.7/gtk/gtksettings.c 2007-01-05 18:56:11.000000000 -0500
@@ -64,6 +64,7 @@
PROP_DOUBLE_CLICK_DISTANCE,
PROP_CURSOR_BLINK,
PROP_CURSOR_BLINK_TIME,
+ PROP_CURSOR_BLINK_TIMEOUT,
PROP_SPLIT_CURSOR,
PROP_THEME_NAME,
PROP_ICON_THEME_NAME,
@@ -201,6 +202,15 @@
GTK_PARAM_READWRITE),
NULL);
g_assert (result == PROP_DOUBLE_CLICK_DISTANCE);
+
+ /**
+ * GtkSettings:gtk-cursor-blink:
+ *
+ * Whether the cursor should blink.
+ *
+ * Also see the gtk-cursor-blink-timeout setting, which allows
+ * more flexible control over cursor blinking.
+ */
result = settings_install_property_parser (class,
g_param_spec_boolean ("gtk-cursor-blink",
P_("Cursor Blink"),
@@ -212,11 +222,31 @@
result = settings_install_property_parser (class,
g_param_spec_int ("gtk-cursor-blink-time",
P_("Cursor Blink Time"),
- P_("Length of the cursor blink cycle, in milleseconds"),
+ P_("Length of the cursor blink cycle, in milliseconds"),
100, G_MAXINT, 1200,
GTK_PARAM_READWRITE),
NULL);
g_assert (result == PROP_CURSOR_BLINK_TIME);
+
+ /**
+ * GtkSettings:gtk-cursor-blink-timeout:
+ *
+ * Time after which the cursor stops blinking, in seconds.
+ * The timer is reset after each user interaction.
+ *
+ * Setting this to zero has the same effect as setting
+ * gtk-cursor-blinks to %FALSE.
+ *
+ * Since: 2.12
+ */
+ result = settings_install_property_parser (class,
+ g_param_spec_int ("gtk-cursor-blink-timeout",
+ P_("Cursor Blink Timeout"),
+ P_("Time after which the cursor stops blinking, in seconds"),
+ 1, G_MAXINT, 60,
+ GTK_PARAM_READWRITE),
+ NULL);
+ g_assert (result == PROP_CURSOR_BLINK_TIMEOUT);
result = settings_install_property_parser (class,
g_param_spec_boolean ("gtk-split-cursor",
P_("Split Cursor"),
--- gtk+-2.10.7/gtk/gtkentry.c.cursor-blink 2007-01-05 18:56:11.000000000 -0500
+++ gtk+-2.10.7/gtk/gtkentry.c 2007-01-05 18:58:58.000000000 -0500
@@ -82,6 +82,7 @@
{
gfloat xalign;
gint insert_pos;
+ guint blink_time; /* time in msec the cursor has blinked since last user event */
guint real_changed : 1;
guint change_count : 8;
};
@@ -334,6 +335,7 @@
GtkStateType previous_state);
static void gtk_entry_check_cursor_blink (GtkEntry *entry);
static void gtk_entry_pend_cursor_blink (GtkEntry *entry);
+static void gtk_entry_reset_blink_time (GtkEntry *entry);
static void get_text_area_size (GtkEntry *entry,
gint *x,
gint *y,
@@ -1654,6 +1656,8 @@
(entry->button && event->button != entry->button))
return FALSE;
+ gtk_entry_reset_blink_time (entry);
+
entry->button = event->button;
if (!GTK_WIDGET_HAS_FOCUS (widget))
@@ -1744,7 +1748,7 @@
entry->drag_start_y = event->y + entry->scroll_offset;
}
else
- gtk_editable_set_position (editable, tmp_pos);
+ gtk_editable_set_position (editable, tmp_pos);
break;
case GDK_2BUTTON_PRESS:
@@ -2006,6 +2010,7 @@
{
GtkEntry *entry = GTK_ENTRY (widget);
+ gtk_entry_reset_blink_time (entry);
gtk_entry_pend_cursor_blink (entry);
if (entry->editable)
@@ -2078,6 +2083,7 @@
"direction_changed",
G_CALLBACK (gtk_entry_keymap_direction_changed), entry);
+ gtk_entry_reset_blink_time (entry);
gtk_entry_check_cursor_blink (entry);
return FALSE;
@@ -5281,9 +5287,10 @@
* - the widget has focus
*/
-#define CURSOR_ON_MULTIPLIER 0.66
-#define CURSOR_OFF_MULTIPLIER 0.34
-#define CURSOR_PEND_MULTIPLIER 1.0
+#define CURSOR_ON_MULTIPLIER 2
+#define CURSOR_OFF_MULTIPLIER 1
+#define CURSOR_PEND_MULTIPLIER 3
+#define CURSOR_DIVIDER 3
static gboolean
cursor_blinks (GtkEntry *entry)
@@ -5315,6 +5322,17 @@
return time;
}
+static gint
+get_cursor_blink_timeout (GtkEntry *entry)
+{
+ GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (entry));
+ gint timeout;
+
+ g_object_get (settings, "gtk-cursor-blink-timeout", &timeout, NULL);
+
+ return timeout;
+}
+
static void
show_cursor (GtkEntry *entry)
{
@@ -5346,11 +5364,14 @@
blink_cb (gpointer data)
{
GtkEntry *entry;
+ GtkEntryPrivate *priv;
+ gint blink_timeout;
GDK_THREADS_ENTER ();
entry = GTK_ENTRY (data);
-
+ priv = GTK_ENTRY_GET_PRIVATE (entry);
+
if (!GTK_WIDGET_HAS_FOCUS (entry))
{
g_warning ("GtkEntry - did not receive focus-out-event. If you\n"
@@ -5363,18 +5384,27 @@
}
g_assert (entry->selection_bound == entry->current_pos);
-
- if (entry->cursor_visible)
+
+ blink_timeout = get_cursor_blink_timeout (entry);
+ if (priv->blink_time > 1000 * blink_timeout &&
+ blink_timeout < G_MAXINT/1000)
+ {
+ /* we've blinked enough without the user doing anything, stop blinking */
+ show_cursor (entry);
+ entry->blink_timeout = 0;
+ }
+ else if (entry->cursor_visible)
{
hide_cursor (entry);
- entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_OFF_MULTIPLIER,
+ entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_OFF_MULTIPLIER / CURSOR_DIVIDER,
blink_cb,
entry);
}
else
{
show_cursor (entry);
- entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_ON_MULTIPLIER,
+ priv->blink_time += get_cursor_time (entry);
+ entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_ON_MULTIPLIER / CURSOR_DIVIDER,
blink_cb,
entry);
}
@@ -5388,14 +5418,18 @@
static void
gtk_entry_check_cursor_blink (GtkEntry *entry)
{
+ GtkEntryPrivate *priv;
+
+ priv = GTK_ENTRY_GET_PRIVATE (entry);
+
if (cursor_blinks (entry))
{
if (!entry->blink_timeout)
{
- entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_ON_MULTIPLIER,
+ show_cursor (entry);
+ entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_ON_MULTIPLIER / CURSOR_DIVIDER,
blink_cb,
entry);
- show_cursor (entry);
}
}
else
@@ -5419,13 +5453,24 @@
if (entry->blink_timeout != 0)
g_source_remove (entry->blink_timeout);
- entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_PEND_MULTIPLIER,
+ entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_PEND_MULTIPLIER / CURSOR_DIVIDER,
blink_cb,
entry);
show_cursor (entry);
}
}
+static void
+gtk_entry_reset_blink_time (GtkEntry *entry)
+{
+ GtkEntryPrivate *priv;
+
+ priv = GTK_ENTRY_GET_PRIVATE (entry);
+
+ priv->blink_time = 0;
+}
+
+
/* completion */
static gint
gtk_entry_completion_timeout (gpointer data)
--- gtk+-2.10.7/gtk/gtktextview.c.cursor-blink 2007-01-02 01:49:04.000000000 -0500
+++ gtk+-2.10.7/gtk/gtktextview.c 2007-01-05 18:56:11.000000000 -0500
@@ -99,6 +99,16 @@
#define SPACE_FOR_CURSOR 1
+typedef struct _GtkTextViewPrivate GtkTextViewPrivate;
+
+#define GTK_TEXT_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TEXT_VIEW, GtkTextViewPrivate))
+
+struct _GtkTextViewPrivate
+{
+ guint blink_time; /* time in msec the cursor has blinked since last user event */
+};
+
+
struct _GtkTextPendingScroll
{
GtkTextMark *mark;
@@ -291,6 +301,7 @@
static void gtk_text_view_check_cursor_blink (GtkTextView *text_view);
static void gtk_text_view_pend_cursor_blink (GtkTextView *text_view);
static void gtk_text_view_stop_cursor_blink (GtkTextView *text_view);
+static void gtk_text_view_reset_blink_time (GtkTextView *text_view);
static void gtk_text_view_value_changed (GtkAdjustment *adj,
GtkTextView *view);
@@ -1008,6 +1019,8 @@
gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
+
+ g_type_class_add_private (gobject_class, sizeof (GtkTextViewPrivate));
}
static void
@@ -3920,6 +3933,7 @@
if (obscure)
gtk_text_view_obscure_mouse_cursor (text_view);
+ gtk_text_view_reset_blink_time (text_view);
gtk_text_view_pend_cursor_blink (text_view);
return retval;
@@ -3963,6 +3977,8 @@
return FALSE;
}
+ gtk_text_view_reset_blink_time (text_view);
+
#if 0
/* debug hack */
if (event->button == 3 && (event->state & GDK_CONTROL_MASK) != 0)
@@ -4104,7 +4120,9 @@
gtk_widget_queue_draw (widget);
DV(g_print (G_STRLOC": focus_in_event\n"));
-
+
+ gtk_text_view_reset_blink_time (text_view);
+
if (text_view->cursor_visible && text_view->layout)
{
gtk_text_layout_set_cursor_visible (text_view->layout, TRUE);
@@ -4435,9 +4453,10 @@
g_slist_free (copy);
}
-#define CURSOR_ON_MULTIPLIER 0.66
-#define CURSOR_OFF_MULTIPLIER 0.34
-#define CURSOR_PEND_MULTIPLIER 1.0
+#define CURSOR_ON_MULTIPLIER 2
+#define CURSOR_OFF_MULTIPLIER 1
+#define CURSOR_PEND_MULTIPLIER 3
+#define CURSOR_DIVIDER 3
static gboolean
cursor_blinks (GtkTextView *text_view)
@@ -4482,6 +4501,18 @@
return time;
}
+static gint
+get_cursor_blink_timeout (GtkTextView *text_view)
+{
+ GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (text_view));
+ gint time;
+
+ g_object_get (settings, "gtk-cursor-blink-timeout", &time, NULL);
+
+ return time;
+}
+
+
/*
* Blink!
*/
@@ -4490,12 +4521,15 @@
blink_cb (gpointer data)
{
GtkTextView *text_view;
+ GtkTextViewPrivate *priv;
gboolean visible;
+ gint blink_timeout;
GDK_THREADS_ENTER ();
text_view = GTK_TEXT_VIEW (data);
-
+ priv = GTK_TEXT_VIEW_GET_PRIVATE (text_view);
+
if (!GTK_WIDGET_HAS_FOCUS (text_view))
{
g_warning ("GtkTextView - did not receive focus-out-event. If you\n"
@@ -4512,14 +4546,25 @@
visible = gtk_text_layout_get_cursor_visible (text_view->layout);
- if (visible)
- text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER,
- blink_cb,
- text_view);
- else
- text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_ON_MULTIPLIER,
+ blink_timeout = get_cursor_blink_timeout (text_view);
+ if (priv->blink_time > 1000 * blink_timeout &&
+ blink_timeout < G_MAXINT/1000)
+ {
+ /* we've blinked enough without the user doing anything, stop blinking */
+ visible = 0;
+ text_view->blink_timeout = 0;
+ }
+ else if (visible)
+ text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER / CURSOR_DIVIDER,
blink_cb,
text_view);
+ else
+ {
+ text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_ON_MULTIPLIER / CURSOR_DIVIDER,
+ blink_cb,
+ text_view);
+ priv->blink_time += get_cursor_time (text_view);
+ }
/* Block changed_handler while changing the layout's cursor visibility
* because it would expose the whole paragraph. Instead, we expose
@@ -4565,7 +4610,7 @@
{
gtk_text_layout_set_cursor_visible (text_view->layout, TRUE);
- text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER,
+ text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER / CURSOR_DIVIDER,
blink_cb,
text_view);
}
@@ -4594,12 +4639,22 @@
gtk_text_view_stop_cursor_blink (text_view);
gtk_text_layout_set_cursor_visible (text_view->layout, TRUE);
- text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_PEND_MULTIPLIER,
+ text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_PEND_MULTIPLIER / CURSOR_DIVIDER,
blink_cb,
text_view);
}
}
+static void
+gtk_text_view_reset_blink_time (GtkTextView *text_view)
+{
+ GtkTextViewPrivate *priv;
+
+ priv = GTK_TEXT_VIEW_GET_PRIVATE (text_view);
+
+ priv->blink_time = 0;
+}
+
/*
* Key binding handlers

View File

@ -1,21 +0,0 @@
diff -ru gtk+-2.11.3/gtk/gtkbuilder.h gtk+-2.11.3/gtk/gtkbuilder.h
--- gtk+-2.11.3/gtk/gtkbuilder.h.typename 2007-06-16 17:36:17.000000000 +0100
+++ gtk+-2.11.3/gtk/gtkbuilder.h 2007-06-16 17:36:42.000000000 +0100
@@ -60,7 +60,7 @@
GObjectClass parent_class;
GType (* get_type_from_name) (GtkBuilder *builder,
- const char *typename);
+ const char *type_name);
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
@@ -103,7 +103,7 @@
const gchar *domain);
const gchar* gtk_builder_get_translation_domain (GtkBuilder *builder);
GType gtk_builder_get_type_from_name (GtkBuilder *builder,
- const char *typename);
+ const char *type_name);
gboolean gtk_builder_value_from_string (GParamSpec *pspec,
const gchar *string,

View File

@ -31,11 +31,8 @@ Patch1: gtk+-2.11.1-set-invisible-char-to-bullet.patch
# see http://bugzilla.gnome.org/show_bug.cgi?id=463773
Patch2: workaround.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=482531
Patch3: firefox-print-preview.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=488119
Patch4: system-log-crash.patch
Patch3: system-log-crash.patch
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: pango-devel >= %{pango_version}
@ -113,8 +110,7 @@ docs for the GTK+ widget toolkit.
%patch0 -p1 -b .lib64
%patch1 -p1 -b .set-invisible-char-to-bullet
%patch2 -p1 -b .workaround
%patch3 -p1 -b .firefox-print-preview
%patch4 -p1 -b .system-log-crash
%patch3 -p1 -b .system-log-crash
for i in config.guess config.sub ; do
test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i .

View File

@ -1,22 +0,0 @@
diff -up gtk+-2.12.0/gtk/gtksearchenginetracker.c.libtracker gtk+-2.12.0/gtk/gtksearchenginetracker.c
--- gtk+-2.12.0/gtk/gtksearchenginetracker.c.libtracker 2007-09-18 19:29:57.000000000 -0400
+++ gtk+-2.12.0/gtk/gtksearchenginetracker.c 2007-09-18 19:30:54.000000000 -0400
@@ -71,10 +71,16 @@ open_libtracker (void)
{
int i;
GModule *tracker;
+ GModuleFlags flags;
done = TRUE;
-
- tracker = g_module_open ("libtracker.so.0", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
+ flags = G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL;
+
+ tracker = g_module_open ("libtrackerclient.so.0", flags);
+
+ if (!tracker)
+ tracker = g_module_open ("libtracker.so.0", flags);
+
if (!tracker)
return;

View File

@ -1,28 +0,0 @@
diff -up gtk+-2.12.0/gtk/gtkiconcache.c.novalidate gtk+-2.12.0/gtk/gtkiconcache.c
--- gtk+-2.12.0/gtk/gtkiconcache.c.novalidate 2007-09-14 01:13:49.000000000 -0400
+++ gtk+-2.12.0/gtk/gtkiconcache.c 2007-09-14 01:13:59.000000000 -0400
@@ -127,14 +127,19 @@ _gtk_icon_cache_new_for_path (const gcha
info.n_directories = 0;
info.flags = CHECK_OFFSETS|CHECK_STRINGS;
- if (!_gtk_icon_cache_validate (&info))
+#ifdef G_ENABLE_DEBUG
+ if (gtk_debug_flags & GTK_DEBUG_ICONTHEME)
{
- g_mapped_file_free (map);
- g_warning ("Icon cache '%s' is invalid\n", cache_filename);
+ if (!_gtk_icon_cache_validate (&info))
+ {
+ g_mapped_file_free (map);
+ g_warning ("Icon cache '%s' is invalid\n", cache_filename);
- goto done;
+ goto done;
+ }
}
-
+#endif
+
GTK_NOTE (ICONTHEME, g_print ("found cache for %s\n", path));
cache = g_new0 (GtkIconCache, 1);

View File

@ -1,42 +0,0 @@
Index: gtk/gtkscalebutton.c
===================================================================
--- gtk/gtkscalebutton.c (revision 18880)
+++ gtk/gtkscalebutton.c (revision 18881)
@@ -877,6 +877,9 @@
priv = button->priv;
+ if (!GTK_WIDGET_HAS_GRAB (priv->dock))
+ return;
+
if (gtk_widget_is_ancestor (gtk_grab_get_current (), priv->dock))
return;
Index: tests/testvolumebutton.c
===================================================================
--- tests/testvolumebutton.c (revision 18880)
+++ tests/testvolumebutton.c (revision 18881)
@@ -60,15 +60,22 @@
{
GtkWidget *window;
GtkWidget *button;
+ GtkWidget *button2;
+ GtkWidget *box;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
button = gtk_volume_button_new ();
+ button2 = gtk_volume_button_new ();
+ box = gtk_hbox_new (FALSE, 0);
+
g_signal_connect (G_OBJECT (button),
"value-changed",
G_CALLBACK (value_changed), NULL);
- gtk_container_add (GTK_CONTAINER (window), button);
+ gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_container_add (GTK_CONTAINER (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button2);
gtk_widget_show_all (window);
gtk_button_clicked (GTK_BUTTON (button));

View File

@ -1,12 +0,0 @@
diff -up gtk+-2.11.6/gtk/gtkiconcachevalidator.c.silence gtk+-2.11.6/gtk/gtkiconcachevalidator.c
--- gtk+-2.11.6/gtk/gtkiconcachevalidator.c.silence 2007-07-24 22:08:11.000000000 -0400
+++ gtk+-2.11.6/gtk/gtkiconcachevalidator.c 2007-07-24 22:08:24.000000000 -0400
@@ -23,7 +23,7 @@
#include <gdk-pixbuf/gdk-pixdata.h>
-#define VERBOSE(x) x
+#define VERBOSE(x)
#define check(name,condition) \
if (!(condition)) \

View File

@ -1,84 +0,0 @@
Index: gtk/gtksearchenginesimple.c
===================================================================
--- gtk/gtksearchenginesimple.c (revision 18864)
+++ gtk/gtksearchenginesimple.c (working copy)
@@ -72,19 +72,27 @@ struct _GtkSearchEngineSimplePrivate
G_DEFINE_TYPE (GtkSearchEngineSimple, _gtk_search_engine_simple, GTK_TYPE_SEARCH_ENGINE);
static void
-finalize (GObject *object)
+gtk_search_engine_simple_dispose (GObject *object)
{
GtkSearchEngineSimple *simple;
+ GtkSearchEngineSimplePrivate *priv;
simple = GTK_SEARCH_ENGINE_SIMPLE (object);
+ priv = simple->priv;
- if (simple->priv->query)
+ if (priv->query)
+ {
+ g_object_unref (priv->query);
+ priv->query = NULL;
+ }
+
+ if (priv->active_search)
{
- g_object_unref (simple->priv->query);
- simple->priv->query = NULL;
+ priv->active_search->cancelled = TRUE;
+ priv->active_search = NULL;
}
- G_OBJECT_CLASS (_gtk_search_engine_simple_parent_class)->finalize (object);
+ G_OBJECT_CLASS (_gtk_search_engine_simple_parent_class)->dispose (object);
}
static SearchThreadData *
@@ -131,12 +139,10 @@ search_thread_done_idle (gpointer user_d
data = user_data;
- if (!data->cancelled)
- {
- _gtk_search_engine_finished (GTK_SEARCH_ENGINE (data->engine));
- data->engine->priv->active_search = NULL;
- }
-
+ if (!data->cancelled)
+ _gtk_search_engine_finished (GTK_SEARCH_ENGINE (data->engine));
+
+ data->engine->priv->active_search = NULL;
search_thread_data_free (data);
return FALSE;
@@ -181,6 +187,7 @@ send_batch (SearchThreadData *data)
hits = g_new (SearchHits, 1);
hits->uris = data->uri_hits;
hits->thread_data = data;
+
gdk_threads_add_idle (search_thread_add_hits_idle, hits);
}
data->uri_hits = NULL;
@@ -349,7 +356,7 @@ _gtk_search_engine_simple_class_init (Gt
GtkSearchEngineClass *engine_class;
gobject_class = G_OBJECT_CLASS (class);
- gobject_class->finalize = finalize;
+ gobject_class->dispose = gtk_search_engine_simple_dispose;
engine_class = GTK_SEARCH_ENGINE_CLASS (class);
engine_class->set_query = gtk_search_engine_simple_set_query;
Index: gtk/gtkfilechooserdefault.c
===================================================================
--- gtk/gtkfilechooserdefault.c (revision 18864)
+++ gtk/gtkfilechooserdefault.c (working copy)
@@ -8994,6 +8994,8 @@ search_stop_searching (GtkFileChooserDef
if (impl->search_engine)
{
+ _gtk_search_engine_stop (impl->search_engine);
+
g_object_unref (impl->search_engine);
impl->search_engine = NULL;
}

View File

@ -1 +1 @@
c46f34addc2fe3ea6756055d59fb8856 gtk+-2.12.1.tar.bz2
a789a8a333d418f47cda1dba106d9aac gtk+-2.12.2.tar.bz2

View File

@ -1,13 +0,0 @@
diff -up gtk+-2.12.0/gtk/gtktooltips.c.swt-tooltips gtk+-2.12.0/gtk/gtktooltips.c
--- gtk+-2.12.0/gtk/gtktooltips.c.swt-tooltips 2007-09-20 15:47:54.000000000 -0400
+++ gtk+-2.12.0/gtk/gtktooltips.c 2007-09-20 15:48:22.000000000 -0400
@@ -229,7 +229,8 @@ gtk_tooltips_set_tip (GtkTooltips *toolt
return;
}
- if (tooltips->active_tips_data
+ if (tooltipsdata
+ && tooltips->active_tips_data
&& tooltips->active_tips_data->widget == widget
&& GTK_WIDGET_DRAWABLE (tooltips->active_tips_data->widget))
{

View File

@ -1,12 +0,0 @@
diff -up gtk+-2.11.6/gtk/gtktooltip.c.systray-tooltips gtk+-2.11.6/gtk/gtktooltip.c
--- gtk+-2.11.6/gtk/gtktooltip.c.systray-tooltips 2007-07-25 13:46:43.000000000 -0400
+++ gtk+-2.11.6/gtk/gtktooltip.c 2007-07-25 13:47:05.000000000 -0400
@@ -1116,7 +1116,7 @@ _gtk_tooltip_handle_event (GdkEvent *eve
/* Hide the tooltip when there's no new tooltip widget */
if (!has_tooltip_widget)
{
- if (current_tooltip && GTK_TOOLTIP_VISIBLE (current_tooltip))
+ if (current_tooltip)
gtk_tooltip_hide_tooltip (current_tooltip);
return;

View File

@ -1,44 +0,0 @@
--- trunk/gtk/gtktooltips.c 2007/07/21 13:19:11 18520
+++ trunk/gtk/gtktooltips.c 2007/08/07 13:32:19 18587
@@ -103,6 +103,8 @@
private->tips_data_table =
g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) gtk_tooltips_destroy_data);
+
+ gtk_tooltips_force_window (tooltips);
}
static void
@@ -144,6 +146,12 @@
g_return_if_fail (tooltips != NULL);
+ if (tooltips->tip_window)
+ {
+ gtk_widget_destroy (tooltips->tip_window);
+ tooltips->tip_window = NULL;
+ }
+
g_hash_table_remove_all (private->tips_data_table);
GTK_OBJECT_CLASS (gtk_tooltips_parent_class)->destroy (object);
@@ -154,7 +162,18 @@
{
g_return_if_fail (GTK_IS_TOOLTIPS (tooltips));
- /* nop */
+ if (!tooltips->tip_window)
+ {
+ tooltips->tip_window = gtk_window_new (GTK_WINDOW_POPUP);
+ g_signal_connect (tooltips->tip_window,
+ "destroy",
+ G_CALLBACK (gtk_widget_destroyed),
+ &tooltips->tip_window);
+
+ tooltips->tip_label = gtk_label_new (NULL);
+ gtk_container_add (GTK_CONTAINER (tooltips->tip_window),
+ tooltips->tip_label);
+ }
}
void