diff options
Diffstat (limited to 'openembedded/packages/gtk+')
136 files changed, 28923 insertions, 0 deletions
diff --git a/openembedded/packages/gtk+/files/migration.patch b/openembedded/packages/gtk+/files/migration.patch new file mode 100644 index 0000000000..f4c7f853ad --- /dev/null +++ b/openembedded/packages/gtk+/files/migration.patch @@ -0,0 +1,619 @@ +Index: configure.in +=================================================================== +RCS file: /cvs/gnome/gtk+/configure.in,v +retrieving revision 1.419.2.4 +diff -u -r1.419.2.4 configure.in +--- configure.in 8 Feb 2005 21:39:42 -0000 1.419.2.4 ++++ configure.in 27 Feb 2005 13:10:16 -0000 +@@ -1495,6 +1495,16 @@ + GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS" + GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS" + ++AC_ARG_ENABLE(display-migration, ++ [AC_HELP_STRING([--enable-display-migration], ++ [include support for GPE_CHANGE_DISPLAY protocol])], ++ enable_migration=yes, enable_migration=no) ++if test "$enable_migration" = "yes"; then ++ AC_DEFINE([ENABLE_MIGRATION], 1, [Define if display migration is enabled]) ++ GTK_DEP_LIBS="$GTK_DEP_LIBS -lgcrypt" ++fi ++AM_CONDITIONAL(ENABLE_MIGRATION, test $enable_migration = "yes") ++ + AC_SUBST(GTK_PACKAGES) + AC_SUBST(GTK_EXTRA_LIBS) + AC_SUBST(GTK_EXTRA_CFLAGS) +Index: gtk/Makefile.am +=================================================================== +RCS file: /cvs/gnome/gtk+/gtk/Makefile.am,v +retrieving revision 1.266.2.1 +diff -u -r1.266.2.1 Makefile.am +--- gtk/Makefile.am 13 Jan 2005 15:18:21 -0000 1.266.2.1 ++++ gtk/Makefile.am 27 Feb 2005 13:10:17 -0000 +@@ -520,6 +520,10 @@ + gtkwindow.c \ + xembed.h + ++if ENABLE_MIGRATION ++gtk_c_sources += gtkmigration.c ++endif ++ + if OS_UNIX + gtk_private_h_sources += gtkfilesystemunix.h + gtk_c_sources += gtkfilesystemunix.c +Index: gtk/gtkmain.c +=================================================================== +RCS file: /cvs/gnome/gtk+/gtk/gtkmain.c,v +retrieving revision 1.255 +diff -u -r1.255 gtkmain.c +--- gtk/gtkmain.c 27 Dec 2004 05:25:15 -0000 1.255 ++++ gtk/gtkmain.c 27 Feb 2005 13:10:19 -0000 +@@ -491,6 +491,10 @@ + _gtk_accel_map_init (); + _gtk_rc_init (); + ++#ifdef ENABLE_MIGRATION ++ gtk_migration_init (); ++#endif ++ + /* Set the 'initialized' flag. + */ + gtk_initialized = TRUE; +Index: gtk/gtkwindow.c +=================================================================== +RCS file: /cvs/gnome/gtk+/gtk/gtkwindow.c,v +retrieving revision 1.281.2.4 +diff -u -r1.281.2.4 gtkwindow.c +--- gtk/gtkwindow.c 21 Feb 2005 04:21:49 -0000 1.281.2.4 ++++ gtk/gtkwindow.c 27 Feb 2005 13:10:56 -0000 +@@ -731,6 +731,8 @@ + add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD); + } + ++extern void gtk_migration_mark_window (GtkWidget *w); ++ + static void + gtk_window_init (GtkWindow *window) + { +@@ -790,6 +792,10 @@ + "event", + G_CALLBACK (gtk_window_event), + NULL); ++ ++#ifdef ENABLE_MIGRATION ++ gtk_migration_mark_window (window); ++#endif + } + + static void +--- /dev/null 2005-02-20 01:07:50.714416160 +0000 ++++ gtk/gtkmigration.c 2005-02-27 15:05:04.052757352 +0000 +@@ -0,0 +1,529 @@ ++/* ++ * Copyright (C) 2003, 2005 Philip Blundell <philb@gnu.org> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version ++ * 2 of the License, or (at your option) any later version. ++ */ ++ ++#include <stdlib.h> ++#include <ctype.h> ++#include <libintl.h> ++#include <string.h> ++#include <assert.h> ++ ++#include <X11/X.h> ++#include <X11/Xlib.h> ++#include <X11/Xatom.h> ++ ++#include <gcrypt.h> ++ ++#include "gtk.h" ++#include "gdk.h" ++#include "x11/gdkx.h" ++ ++#define _(x) gettext(x) ++ ++static GdkAtom string_gdkatom, display_change_gdkatom; ++static GdkAtom rsa_challenge_gdkatom; ++ ++#define DISPLAY_CHANGE_SUCCESS 0 ++#define DISPLAY_CHANGE_UNABLE_TO_CONNECT 1 ++#define DISPLAY_CHANGE_NO_SUCH_SCREEN 2 ++#define DISPLAY_CHANGE_AUTHENTICATION_BAD 3 ++#define DISPLAY_CHANGE_INDETERMINATE_ERROR 4 ++ ++static gboolean no_auth; ++ ++static GSList *all_widgets; ++ ++static gboolean gtk_migration_initialised; ++ ++#define CHALLENGE_LEN 64 ++ ++gchar *gtk_migration_auth_challenge_string; ++ ++static unsigned char challenge_bytes[CHALLENGE_LEN]; ++static unsigned long challenge_seq; ++ ++#define hexbyte(x) ((x) >= 10 ? (x) + 'a' - 10 : (x) + '0') ++ ++struct rsa_key ++{ ++ gcry_mpi_t n, e, d, p, q, u; ++}; ++ ++static gcry_mpi_t ++mpi_from_sexp (gcry_sexp_t r, char *tag) ++{ ++ gcry_sexp_t s = gcry_sexp_find_token (r, tag, 0); ++ return gcry_sexp_nth_mpi (s, 1, GCRYMPI_FMT_USG); ++} ++ ++static char * ++hex_from_mpi (gcry_mpi_t m) ++{ ++ char *buf; ++ gcry_mpi_aprint (GCRYMPI_FMT_HEX, (void *)&buf, NULL, m); ++ return buf; ++} ++ ++static void ++gtk_migration_crypt_create_hash (char *display, char *challenge, size_t len, char *result) ++{ ++ size_t dlen = strlen (display); ++ gchar *buf = g_malloc (dlen + 1 + len); ++ strcpy (buf, display); ++ memcpy (buf + dlen + 1, challenge, len); ++ gcry_md_hash_buffer (GCRY_MD_SHA1, result, buf, len + dlen + 1); ++ g_free (buf); ++} ++ ++static int ++do_encode_md (const unsigned char *digest, size_t digestlen, int algo, ++ unsigned int nbits, gcry_mpi_t *r_val) ++{ ++ int nframe = (nbits+7) / 8; ++ unsigned char *frame; ++ int i, n; ++ unsigned char asn[100]; ++ size_t asnlen; ++ ++ asnlen = sizeof(asn); ++ if (gcry_md_algo_info (algo, GCRYCTL_GET_ASNOID, asn, &asnlen)) ++ return -1; ++ ++ if (digestlen + asnlen + 4 > nframe ) ++ return -1; ++ ++ /* We encode the MD in this way: ++ * ++ * 0 1 PAD(n bytes) 0 ASN(asnlen bytes) MD(len bytes) ++ * ++ * PAD consists of FF bytes. ++ */ ++ frame = g_malloc (nframe); ++ n = 0; ++ frame[n++] = 0; ++ frame[n++] = 1; /* block type */ ++ i = nframe - digestlen - asnlen -3 ; ++ assert ( i > 1 ); ++ memset ( frame+n, 0xff, i ); n += i; ++ frame[n++] = 0; ++ memcpy ( frame+n, asn, asnlen ); n += asnlen; ++ memcpy ( frame+n, digest, digestlen ); n += digestlen; ++ assert ( n == nframe ); ++ ++ gcry_mpi_scan (r_val, GCRYMPI_FMT_USG, frame, nframe, &nframe); ++ g_free (frame); ++ return 0; ++} ++ ++static gboolean ++gtk_migration_crypt_check_signature (struct rsa_key *k, char *hash, char *sigbuf) ++{ ++ gcry_mpi_t mpi, mpi2; ++ gcry_sexp_t data, sig, key; ++ int rc; ++ ++ do_encode_md (hash, 20, GCRY_MD_SHA1, 1024, &mpi); ++ ++ gcry_sexp_build (&data, NULL, "(data (value %m))", mpi); ++ ++ gcry_mpi_release (mpi); ++ ++ gcry_sexp_build (&key, NULL, "(public-key (rsa (n %m) (e %m)))", k->n, k->e); ++ ++ if (gcry_mpi_scan (&mpi2, GCRYMPI_FMT_HEX, sigbuf, 0, NULL)) ++ { ++ gcry_sexp_release (data); ++ return FALSE; ++ } ++ ++ gcry_sexp_build (&sig, NULL, "(sig-val (rsa (s %m)))", mpi2); ++ ++ rc = gcry_pk_verify (sig, data, key); ++ ++ gcry_sexp_release (data); ++ gcry_sexp_release (key); ++ gcry_sexp_release (sig); ++ gcry_mpi_release (mpi2); ++ ++ if (rc) ++ return FALSE; ++ ++ return TRUE; ++} ++ ++static void ++gtk_migration_auth_update_challenge (void) ++{ ++ int i; ++ unsigned char *p; ++ ++ if (gtk_migration_auth_challenge_string == NULL) ++ gtk_migration_auth_challenge_string = g_malloc ((CHALLENGE_LEN * 2) + 9); ++ ++ p = gtk_migration_auth_challenge_string; ++ ++ for (i = 0; i < CHALLENGE_LEN; i++) ++ { ++ *p++ = hexbyte (challenge_bytes[i] >> 4); ++ *p++ = hexbyte (challenge_bytes[i] & 15); ++ } ++ ++ sprintf (p, "%08lx", challenge_seq++); ++} ++ ++static void ++gtk_migration_auth_generate_challenge (void) ++{ ++ gcry_randomize (challenge_bytes, sizeof (challenge_bytes), GCRY_STRONG_RANDOM); ++ gtk_migration_auth_update_challenge (); ++} ++ ++static struct rsa_key * ++parse_pubkey (char *s) ++{ ++ struct rsa_key *r; ++ gcry_mpi_t n, e; ++ gchar *sp; ++ ++ sp = strtok (s, " \n"); ++ gcry_mpi_scan (&e, GCRYMPI_FMT_HEX, sp, 0, NULL); ++ sp = strtok (NULL, " \n"); ++ gcry_mpi_scan (&n, GCRYMPI_FMT_HEX, sp, 0, NULL); ++ ++ r = g_malloc0 (sizeof (struct rsa_key)); ++ r->e = e; ++ r->n = n; ++ return r; ++} ++ ++static struct rsa_key * ++lookup_pubkey (u_int32_t id) ++{ ++ const gchar *home_dir = g_get_home_dir (); ++ gchar *filename = g_strdup_printf ("%s/.gpe/migrate/public", home_dir); ++ FILE *fp = fopen (filename, "r"); ++ struct rsa_key *r = NULL; ++ ++ if (fp) ++ { ++ while (!feof (fp)) ++ { ++ char buffer[4096]; ++ if (fgets (buffer, 4096, fp)) ++ { ++ char *p; ++ u_int32_t this_id = strtoul (buffer, &p, 16); ++ if (p != buffer && *p == ' ') ++ { ++#ifdef DEBUG ++ fprintf (stderr, "found id %x\n", this_id); ++#endif ++ if (this_id == id) ++ { ++ r = parse_pubkey (++p); ++ break; ++ } ++ } ++ } ++ } ++ fclose (fp); ++ } ++ ++ g_free (filename); ++ return r; ++} ++ ++static void ++free_pubkey (struct rsa_key *k) ++{ ++ gcry_mpi_release (k->n); ++ gcry_mpi_release (k->e); ++ ++ g_free (k); ++} ++ ++static gboolean ++gtk_migration_auth_validate_request (char *display, char *data) ++{ ++ u_int32_t key_id; ++ char *ep; ++ char *p; ++ struct rsa_key *k; ++ char hash[20]; ++ gboolean rc; ++ ++ p = strchr (data, ' '); ++ if (p == NULL) ++ return FALSE; ++ *p++ = 0; ++ ++ key_id = strtoul (data, &ep, 16); ++ if (*ep) ++ return FALSE; ++ ++ k = lookup_pubkey (key_id); ++ if (k == NULL) ++ return FALSE; ++ ++ gtk_migration_crypt_create_hash (display, gtk_migration_auth_challenge_string, ++ strlen (gtk_migration_auth_challenge_string), hash); ++ ++ rc = gtk_migration_crypt_check_signature (k, hash, p); ++ ++ free_pubkey (k); ++ ++ return rc; ++} ++ ++static int ++do_change_display (GtkWidget *w, char *display_name) ++{ ++ GdkDisplay *newdisplay; ++ guint screen_nr = 1; ++ guint i; ++ ++ if (display_name[0] == 0) ++ return DISPLAY_CHANGE_INDETERMINATE_ERROR; ++ ++ i = strlen (display_name) - 1; ++ while (i > 0 && isdigit (display_name[i])) ++ i--; ++ ++ if (display_name[i] == '.') ++ { ++ screen_nr = atoi (display_name + i + 1); ++ display_name[i] = 0; ++ } ++ ++ newdisplay = gdk_display_open (display_name); ++ if (newdisplay) ++ { ++ GdkScreen *screen = gdk_display_get_screen (newdisplay, screen_nr); ++ if (screen) ++ { ++ gtk_window_set_screen (GTK_WINDOW (w), screen); ++ gdk_display_manager_set_default_display (gdk_display_manager_get (), ++ newdisplay); ++ return DISPLAY_CHANGE_SUCCESS; ++ } ++ else ++ return DISPLAY_CHANGE_NO_SUCH_SCREEN; ++ } ++ ++ return DISPLAY_CHANGE_UNABLE_TO_CONNECT; ++} ++ ++static void ++set_challenge_on_window (GdkWindow *window) ++{ ++ gdk_property_change (window, rsa_challenge_gdkatom, string_gdkatom, ++ 8, GDK_PROP_MODE_REPLACE, gtk_migration_auth_challenge_string, ++ strlen (gtk_migration_auth_challenge_string)); ++} ++ ++static void ++update_challenge_on_windows (void) ++{ ++ GSList *i; ++ ++ gtk_migration_auth_update_challenge (); ++ ++ for (i = all_widgets; i; i = i->next) ++ { ++ GtkWidget *w = GTK_WIDGET (i->data); ++ if (w->window) ++ set_challenge_on_window (w->window); ++ } ++} ++ ++static void ++reset_state (GdkWindow *window) ++{ ++ gdk_property_change (window, display_change_gdkatom, string_gdkatom, ++ 8, GDK_PROP_MODE_REPLACE, NULL, 0); ++} ++ ++static void ++generate_response (GdkDisplay *gdisplay, Display *dpy, Window window, int code) ++{ ++ XClientMessageEvent ev; ++ Atom atom = gdk_x11_atom_to_xatom_for_display (gdisplay, ++ display_change_gdkatom); ++ ++ memset (&ev, 0, sizeof (ev)); ++ ++ ev.type = ClientMessage; ++ ev.window = window; ++ ev.message_type = atom; ++ ev.format = 32; ++ ++ ev.data.l[0] = window; ++ ev.data.l[1] = code; ++ ++ XSendEvent (dpy, DefaultRootWindow (dpy), False, SubstructureNotifyMask, (XEvent *)&ev); ++} ++ ++static int ++handle_request (GdkWindow *gwindow, char *prop) ++{ ++ GtkWidget *widget; ++ char *target, *auth_method, *auth_data; ++ char *p; ++ ++ target = prop; ++ auth_method = "NULL"; ++ auth_data = NULL; ++ ++ p = strchr (prop, ' '); ++ if (p) ++ { ++ *p = 0; ++ auth_method = ++p; ++ ++ p = strchr (p, ' '); ++ if (p) ++ { ++ *p = 0; ++ auth_data = ++p; ++ } ++ } ++ ++ if (no_auth == FALSE) ++ { ++ if (!strcasecmp (auth_method, "null")) ++ return DISPLAY_CHANGE_AUTHENTICATION_BAD; ++ else if (!strcasecmp (auth_method, "rsa-sig")) ++ { ++ if (gtk_migration_auth_validate_request (target, auth_data) == FALSE) ++ return DISPLAY_CHANGE_AUTHENTICATION_BAD; ++ } ++ else ++ return DISPLAY_CHANGE_AUTHENTICATION_BAD; ++ } ++ ++ gdk_window_get_user_data (gwindow, (gpointer*) &widget); ++ ++ if (widget) ++ return do_change_display (widget, target); ++ ++ return DISPLAY_CHANGE_INDETERMINATE_ERROR; ++} ++ ++static GdkFilterReturn ++filter_func (GdkXEvent *xevp, GdkEvent *ev, gpointer p) ++{ ++ XPropertyEvent *xev = (XPropertyEvent *)xevp; ++ ++ if (xev->type == PropertyNotify) ++ { ++ GdkDisplay *gdisplay; ++ Atom atom; ++ ++ gdisplay = gdk_x11_lookup_xdisplay (xev->display); ++ if (gdisplay) ++ { ++ atom = gdk_x11_atom_to_xatom_for_display (gdisplay, display_change_gdkatom); ++ ++ if (xev->atom == atom) ++ { ++ GdkWindow *gwindow; ++ ++ gwindow = gdk_window_lookup_for_display (gdisplay, xev->window); ++ ++ if (gwindow) ++ { ++ GdkAtom actual_type; ++ gint actual_format; ++ gint actual_length; ++ unsigned char *prop = NULL; ++ ++ if (gdk_property_get (gwindow, display_change_gdkatom, string_gdkatom, ++ 0, G_MAXLONG, FALSE, &actual_type, &actual_format, ++ &actual_length, &prop)) ++ { ++ if (actual_length != 0) ++ { ++ if (actual_type == string_gdkatom && actual_length > 8) ++ { ++ gchar *buf = g_malloc (actual_length + 1); ++ int rc; ++ ++ memcpy (buf, prop, actual_length); ++ buf[actual_length] = 0; ++ ++ rc = handle_request (gwindow, buf); ++ ++ g_free (buf); ++ generate_response (gdisplay, xev->display, xev->window, rc); ++ ++ if (rc == DISPLAY_CHANGE_SUCCESS) ++ update_challenge_on_windows (); ++ } ++ ++ reset_state (gwindow); ++ } ++ } ++ ++ if (prop) ++ g_free (prop); ++ } ++ } ++ ++ return GDK_FILTER_REMOVE; ++ } ++ } ++ ++ return GDK_FILTER_CONTINUE; ++} ++ ++static void ++unrealize_window (GtkWidget *w) ++{ ++ all_widgets = g_slist_remove (all_widgets, w); ++} ++ ++void ++gtk_migration_mark_window (GtkWidget *w) ++{ ++ if (! gtk_migration_initialised) ++ { ++ g_warning ("gtk_migration not initialised yet"); ++ return; ++ } ++ ++ if (GTK_WIDGET_REALIZED (w)) ++ { ++ GdkWindow *window = w->window; ++ ++ gdk_window_add_filter (window, filter_func, NULL); ++ ++ reset_state (window); ++ set_challenge_on_window (window); ++ ++ all_widgets = g_slist_append (all_widgets, w); ++ ++ g_signal_connect (G_OBJECT (w), "unrealize", G_CALLBACK (unrealize_window), NULL); ++ } ++ else ++ g_signal_connect (G_OBJECT (w), "realize", G_CALLBACK (gtk_migration_mark_window), NULL); ++} ++ ++void ++gtk_migration_init (void) ++{ ++ if (getenv ("GPE_DISPLAY_MIGRATION_NO_AUTH") != NULL) ++ no_auth = TRUE; ++ ++ string_gdkatom = gdk_atom_intern ("STRING", FALSE); ++ display_change_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE", FALSE); ++ rsa_challenge_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE_RSA_CHALLENGE", FALSE); ++ ++ gtk_migration_auth_generate_challenge (); ++ ++ gtk_migration_initialised = TRUE; ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/000_gtk+-2.0.6-exportsymbols.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/000_gtk+-2.0.6-exportsymbols.patch new file mode 100644 index 0000000000..736473696f --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/000_gtk+-2.0.6-exportsymbols.patch @@ -0,0 +1,26 @@ +diff -ruN gtk+-2.0.6.orig/configure gtk+-2.0.6/configure +--- gtk+-2.0.6.orig/configure 2002-08-31 03:49:07.000000000 +0900 ++++ gtk+-2.0.6/configure 2002-08-31 03:52:45.000000000 +0900 +@@ -7904,7 +7904,8 @@ + if test "$os_win32" != yes; then + # libtool option to control which symbols are exported + # right now, symbols starting with _ are not exported +- LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[^_].*"' ++ # Disabled until -export-symbols-regex works (RH patch) ++ LIBTOOL_EXPORT_OPTIONS= + else + # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk) + LIBTOOL_EXPORT_OPTIONS= +diff -ruN gtk+-2.0.6.orig/configure.in gtk+-2.0.6/configure.in +--- gtk+-2.0.6.orig/configure.in 2002-08-31 03:49:07.000000000 +0900 ++++ gtk+-2.0.6/configure.in 2002-08-31 03:51:22.000000000 +0900 +@@ -273,7 +273,8 @@ + if test "$os_win32" != yes; then + # libtool option to control which symbols are exported + # right now, symbols starting with _ are not exported +- LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"' ++ # Disabled until -export-symbols-regex works (RH patch) ++ LIBTOOL_EXPORT_OPTIONS= + else + # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk) + LIBTOOL_EXPORT_OPTIONS= diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/000_gtk+-2.2.0-buildfix-immodule.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/000_gtk+-2.2.0-buildfix-immodule.patch new file mode 100644 index 0000000000..5d80daf0bc --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/000_gtk+-2.2.0-buildfix-immodule.patch @@ -0,0 +1,33 @@ +diff -ruN gtk+-2.2.0.orig/modules/input/Makefile.am gtk+-2.2.0/modules/input/Makefile.am +--- gtk+-2.2.0.orig/modules/input/Makefile.am 2003-01-06 23:40:37.000000000 +0900 ++++ gtk+-2.2.0/modules/input/Makefile.am 2003-01-06 23:46:35.000000000 +0900 +@@ -118,7 +118,12 @@ + im-viqr.la + + gtk.immodules: Makefile.am $(module_LTLIBRARIES) +- $(top_builddir)/gtk/gtk-query-immodules-2.0 $(module_LTLIBRARIES) > gtk.immodules ++ @if $(RUN_QUERY_IMMODULES_TEST) ; then \ ++ $(top_builddir)/gtk/gtk-query-immodules-2.0 $(module_LTLIBRARIES) > gtk.immodules ; \ ++ else \ ++ touch $@ ; \ ++ fi ++ + + CLEANFILES = gtk.immodules + +diff -ruN gtk+-2.2.0.orig/modules/input/Makefile.in gtk+-2.2.0/modules/input/Makefile.in +--- gtk+-2.2.0.orig/modules/input/Makefile.in 2003-01-06 23:39:08.000000000 +0900 ++++ gtk+-2.2.0/modules/input/Makefile.in 2003-01-06 23:46:44.000000000 +0900 +@@ -785,7 +785,11 @@ + rm -f $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules + + gtk.immodules: Makefile.am $(module_LTLIBRARIES) +- $(top_builddir)/gtk/gtk-query-immodules-2.0 $(module_LTLIBRARIES) > gtk.immodules ++ @if $(RUN_QUERY_IMMODULES_TEST) ; then \ ++ $(top_builddir)/gtk/gtk-query-immodules-2.0 $(module_LTLIBRARIES) > gtk.immodules ; \ ++ else \ ++ touch $@ ; \ ++ fi + + @CROSS_COMPILING_FALSE@all-local: gtk.immodules + # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/002_xpmico.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/002_xpmico.patch new file mode 100644 index 0000000000..21500db65a --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/002_xpmico.patch @@ -0,0 +1,18 @@ +diff -Nur gtk+-2.4.9.orig/gdk-pixbuf/io-ico.c gtk+-2.4.9/gdk-pixbuf/io-ico.c +--- gtk+-2.4.9.orig/gdk-pixbuf/io-ico.c 2004-08-25 18:52:18.000000000 +0200 ++++ gtk+-2.4.9/gdk-pixbuf/io-ico.c 2004-09-15 00:40:17.000000000 +0200 +@@ -210,6 +210,14 @@ + + State->HeaderSize = 6 + IconCount*16; + ++ if (State->HeaderSize < 0) { ++ g_set_error (error, ++ GDK_PIXBUF_ERROR, ++ GDK_PIXBUF_ERROR_CORRUPT_IMAGE, ++ _("Invalid header in icon")); ++ return; ++ } ++ + if (State->HeaderSize>State->BytesInHeaderBuf) { + guchar *tmp=g_try_realloc(State->HeaderBuf,State->HeaderSize); + if (!tmp) { diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/003_iconcache.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/003_iconcache.patch new file mode 100644 index 0000000000..e579c8e208 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/003_iconcache.patch @@ -0,0 +1,11 @@ +--- gtk/updateiconcache.c.orig 2005-02-06 21:08:09.638762480 +0100 ++++ gtk+-2.6.2/gtk/updateiconcache.c 2005-02-06 21:15:13.639304600 +0100 +@@ -53,7 +53,7 @@ + gchar *cache_path; + int retval; + +- retval = g_stat (path, &path_stat); ++ retval = stat (path, &path_stat); + + if (retval < 0) + { diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/automake-lossage.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/automake-lossage.patch new file mode 100644 index 0000000000..0d423ddbb9 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/automake-lossage.patch @@ -0,0 +1,24 @@ +--- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100 ++++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100 +@@ -52,21 +52,5 @@ + + dist-hook: html + cp -Rp $(srcdir)/html $(distdir) +-else +-html: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "***" +- +-pdf: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "***" +- +-dist-hook: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "*** DISTRIBUTION IS INCOMPLETE" +- echo "***" + endif + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/configure.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/configure.diff new file mode 100644 index 0000000000..77cda1ce27 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/configure.diff @@ -0,0 +1,1885 @@ +--- gtk+-2.6.4/configure 2005-03-30 15:05:06.000000000 +0300 ++++ gtk+-2.6.4/configure 2005-03-30 15:07:58.000000000 +0300 +@@ -1057,6 +1057,7 @@ + --enable-xkb support XKB [default=maybe] + --disable-rebuilds disable all source autogeneration rules + --disable-visibility don't use ELF visibility attributes ++ --disable-shortcuts disable keyboard shortcuts + --disable-shadowfb disable shadowfb support for linux-fb + --enable-fbmanager enable framebuffer manager support (GtkFB) + --enable-explicit-deps=[yes/no/auto] +@@ -1197,7 +1198,7 @@ + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi +- cd $ac_popdir ++ cd "$ac_popdir" + done + fi + +@@ -2663,8 +2664,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2722,8 +2722,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2839,8 +2838,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2894,8 +2892,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2940,8 +2937,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2985,8 +2981,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3759,7 +3754,7 @@ + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 3762 "configure"' > conftest.$ac_ext ++ echo '#line 3757 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -3879,8 +3874,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4189,8 +4183,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4360,8 +4353,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4428,8 +4420,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4689,8 +4680,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4748,8 +4738,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4820,8 +4809,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4865,8 +4853,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -5331,7 +5318,7 @@ + + + # Provide some information about the compiler. +-echo "$as_me:5334:" \ ++echo "$as_me:5321:" \ + "checking for Fortran 77 compiler version" >&5 + ac_compiler=`set X $ac_compile; echo $2` + { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 +@@ -5377,8 +5364,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -5427,8 +5413,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -6388,11 +6373,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:6391: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:6376: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:6395: \$? = $ac_status" >&5 ++ echo "$as_me:6380: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -6631,11 +6616,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:6634: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:6619: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:6638: \$? = $ac_status" >&5 ++ echo "$as_me:6623: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -6691,11 +6676,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:6694: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:6679: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:6698: \$? = $ac_status" >&5 ++ echo "$as_me:6683: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -7082,8 +7067,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -7143,8 +7127,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -8026,7 +8009,7 @@ + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 8029 "configure"' > conftest.$ac_ext ++ echo '#line 8012 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -8357,8 +8340,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -8461,8 +8443,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -8527,8 +8508,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -8621,8 +8601,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -8687,8 +8666,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -8754,8 +8732,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -8821,8 +8798,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -8897,7 +8873,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<EOF +-#line 8900 "configure" ++#line 8876 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -8995,7 +8971,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<EOF +-#line 8998 "configure" ++#line 8974 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10032,8 +10008,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -10094,8 +10069,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -11188,11 +11162,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:11191: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:11165: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:11195: \$? = $ac_status" >&5 ++ echo "$as_me:11169: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -11248,11 +11222,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:11251: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:11225: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:11255: \$? = $ac_status" >&5 ++ echo "$as_me:11229: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -11759,7 +11733,7 @@ + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 11762 "configure"' > conftest.$ac_ext ++ echo '#line 11736 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -12090,8 +12064,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -12194,8 +12167,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -12260,8 +12232,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -12354,8 +12325,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -12420,8 +12390,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -12487,8 +12456,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -12554,8 +12522,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -12630,7 +12597,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<EOF +-#line 12633 "configure" ++#line 12600 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12728,7 +12695,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<EOF +-#line 12731 "configure" ++#line 12698 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13565,11 +13532,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:13568: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:13535: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:13572: \$? = $ac_status" >&5 ++ echo "$as_me:13539: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -13625,11 +13592,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:13628: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:13595: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:13632: \$? = $ac_status" >&5 ++ echo "$as_me:13599: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -14006,8 +13973,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -14057,8 +14023,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -14940,7 +14905,7 @@ + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 14943 "configure"' > conftest.$ac_ext ++ echo '#line 14908 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -15681,11 +15646,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:15684: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:15649: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:15688: \$? = $ac_status" >&5 ++ echo "$as_me:15653: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -15924,11 +15889,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:15927: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:15892: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:15931: \$? = $ac_status" >&5 ++ echo "$as_me:15896: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -15984,11 +15949,11 @@ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:15987: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:15952: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:15991: \$? = $ac_status" >&5 ++ echo "$as_me:15956: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -16375,8 +16340,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -16436,8 +16400,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -17319,7 +17282,7 @@ + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 17322 "configure"' > conftest.$ac_ext ++ echo '#line 17285 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -17650,8 +17613,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -17754,8 +17716,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -17820,8 +17781,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -17914,8 +17874,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -17980,8 +17939,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -18047,8 +18005,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -18114,8 +18071,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -18190,7 +18146,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<EOF +-#line 18193 "configure" ++#line 18149 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -18288,7 +18244,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<EOF +-#line 18291 "configure" ++#line 18247 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -19354,8 +19310,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -19384,8 +19339,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -19455,8 +19409,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -19508,8 +19461,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -19580,8 +19532,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -19633,8 +19584,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -19849,6 +19799,18 @@ + else + enable_visibility=yes + fi; ++# modification for Device to disable keyboard shortcuts ++# Check whether --enable-shortcuts or --disable-shortcuts was given. ++if test "${enable_shortcuts+set}" = set; then ++ enableval="$enable_shortcuts" ++ ++else ++ enable_shortcuts=yes ++fi; ++ ++if test "x$enable_shortcuts" = "xno"; then ++ GTK_EXTRA_CFLAGS="$GTK_EXTRA_CFLAGS -DDISABLE_KEYBOARD_SHORTCUTS" ++fi; + + + # Check whether --with-xinput or --without-xinput was given. +@@ -20018,8 +19980,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -20124,8 +20085,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -20652,8 +20612,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -20716,8 +20675,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -20753,7 +20711,7 @@ + # sure that both po/ and po-properties/ have .po files that correspond + # to your language. If you only add one to po/, the build will break + # in po-properties/. +-ALL_LINGUAS="af am ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu ia id is it ja ko li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@ije sr@Latn sv ta th tk tr uk uz uz@Latn vi wa xh yi zh_CN zh_TW" ++ALL_LINGUAS="" + + + for ac_header in locale.h +@@ -20789,8 +20747,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -20935,8 +20892,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21007,8 +20963,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21152,8 +21107,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21211,8 +21165,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21309,8 +21262,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21389,8 +21341,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21454,8 +21405,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21519,8 +21469,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21597,8 +21546,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21662,8 +21610,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21779,8 +21726,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -21947,8 +21893,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -22081,8 +22026,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -22167,8 +22111,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -22469,8 +22412,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -22514,8 +22456,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -22822,8 +22763,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -22949,8 +22889,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -23018,8 +22957,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -23171,8 +23109,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -23324,8 +23261,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -23486,8 +23422,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -23572,8 +23507,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -23666,8 +23600,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -23876,8 +23809,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -23949,8 +23881,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -24014,8 +23945,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -24199,8 +24129,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -24477,8 +24406,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -24579,8 +24507,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -24678,8 +24605,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -24896,8 +24822,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -24962,8 +24887,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -25037,8 +24961,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -25249,8 +25172,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -25306,8 +25228,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -25460,8 +25381,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -25517,8 +25437,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -25671,8 +25590,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -25728,8 +25646,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -25905,8 +25822,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -26022,8 +25938,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -26127,8 +26042,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -26184,8 +26098,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -26330,8 +26243,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -26488,8 +26400,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -26560,8 +26471,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -26881,8 +26791,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -26939,8 +26848,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27183,8 +27091,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27295,8 +27202,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27347,8 +27253,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27424,8 +27329,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27480,8 +27384,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27549,8 +27452,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27658,8 +27560,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27723,8 +27624,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27792,8 +27692,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27897,8 +27796,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -27962,8 +27860,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28060,8 +27957,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28125,8 +28021,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28223,8 +28118,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28288,8 +28182,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28368,8 +28261,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28462,8 +28354,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28537,8 +28428,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28609,8 +28499,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28709,8 +28598,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28766,8 +28654,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28856,8 +28743,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28907,8 +28793,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -28999,8 +28884,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29043,8 +28927,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29119,8 +29002,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29198,8 +29080,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29272,8 +29153,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29350,8 +29230,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29447,8 +29326,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29558,8 +29436,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29609,8 +29486,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29809,8 +29685,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -29860,8 +29735,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -30015,6 +29889,116 @@ + GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xfixes` $GDK_EXTRA_LIBS" + fi + ++ # Checks for XFixes extension ++ ++ have_xfixes=false ++ ++ succeeded=no ++ ++ if test -z "$PKG_CONFIG"; then ++ # Extract the first word of "pkg-config", so it can be a program name with args. ++set dummy pkg-config; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ case $PKG_CONFIG in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ++ ;; ++esac ++fi ++PKG_CONFIG=$ac_cv_path_PKG_CONFIG ++ ++if test -n "$PKG_CONFIG"; then ++ echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 ++echo "${ECHO_T}$PKG_CONFIG" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ fi ++ ++ if test "$PKG_CONFIG" = "no" ; then ++ echo "*** The pkg-config script could not be found. Make sure it is" ++ echo "*** in your path, or set the PKG_CONFIG environment variable" ++ echo "*** to the full path to pkg-config." ++ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." ++ else ++ PKG_CONFIG_MIN_VERSION=0.9.0 ++ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then ++ echo "$as_me:$LINENO: checking for xfixes" >&5 ++echo $ECHO_N "checking for xfixes... $ECHO_C" >&6 ++ ++ if $PKG_CONFIG --exists "xfixes" ; then ++ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 ++ succeeded=yes ++ ++ echo "$as_me:$LINENO: checking XFIXES_CFLAGS" >&5 ++echo $ECHO_N "checking XFIXES_CFLAGS... $ECHO_C" >&6 ++ XFIXES_CFLAGS=`$PKG_CONFIG --cflags "xfixes"` ++ echo "$as_me:$LINENO: result: $XFIXES_CFLAGS" >&5 ++echo "${ECHO_T}$XFIXES_CFLAGS" >&6 ++ ++ echo "$as_me:$LINENO: checking XFIXES_LIBS" >&5 ++echo $ECHO_N "checking XFIXES_LIBS... $ECHO_C" >&6 ++ XFIXES_LIBS=`$PKG_CONFIG --libs "xfixes"` ++ echo "$as_me:$LINENO: result: $XFIXES_LIBS" >&5 ++echo "${ECHO_T}$XFIXES_LIBS" >&6 ++ else ++ XFIXES_CFLAGS="" ++ XFIXES_LIBS="" ++ ## If we have a custom action on failure, don't print errors, but ++ ## do set a variable so people can do so. ++ XFIXES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfixes"` ++ ++ fi ++ ++ ++ ++ else ++ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." ++ echo "*** See http://www.freedesktop.org/software/pkgconfig" ++ fi ++ fi ++ ++ if test $succeeded = yes; then ++ have_xfixes=true ++ else ++ : ++ fi ++ ++ ++ if $have_xfixes ; then ++ ++cat >>confdefs.h <<\_ACEOF ++#define HAVE_XFIXES 1 ++_ACEOF ++ ++ GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags xfixes` $GDK_EXTRA_CFLAGS" ++ GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xfixes` $GDK_EXTRA_LIBS" ++ fi ++ + # Xshm checks + + if test "x$enable_shm" = "xyes"; then +@@ -30049,8 +30033,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -30196,8 +30179,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -30355,8 +30337,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -30651,8 +30632,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -30765,8 +30745,7 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -30798,7 +30777,6 @@ + + GTK_PACKAGES=atk + GTK_EXTRA_LIBS= +-GTK_EXTRA_CFLAGS= + GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS" + GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS" + +@@ -32514,11 +32492,6 @@ + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + +- if test x"$ac_file" != x-; then +- { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- rm -f "$ac_file" +- fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ +@@ -32557,6 +32530,12 @@ + fi;; + esac + done` || { (exit 1); exit 1; } ++ ++ if test x"$ac_file" != x-; then ++ { echo "$as_me:$LINENO: creating $ac_file" >&5 ++echo "$as_me: creating $ac_file" >&6;} ++ rm -f "$ac_file" ++ fi + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/configure.in.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/configure.in.diff new file mode 100644 index 0000000000..8573b11739 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/configure.in.diff @@ -0,0 +1,53 @@ +--- gtk+-2.6.4/configure.in 2005-03-30 15:05:06.000000000 +0300 ++++ gtk+-2.6.4/configure.in 2005-03-30 15:07:36.000000000 +0300 +@@ -202,6 +202,15 @@ + [AC_HELP_STRING([--disable-visibility], + [don't use ELF visibility attributes])],, + [enable_visibility=yes]) ++# modification for Device to disable keyboard shortcuts ++AC_ARG_ENABLE(shortcuts, ++ [AC_HELP_STRING([--disable-shortcuts], ++ [disable keyboard shortcuts])],, ++ [enable_shortcuts=yes]) ++ ++if test "x$enable_shortcuts" = "xno"; then ++ GTK_EXTRA_CFLAGS="$GTK_EXTRA_CFLAGS -DDISABLE_KEYBOARD_SHORTCUTS" ++fi; + + AC_ARG_WITH(xinput, + [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])]) +@@ -418,7 +427,7 @@ + # sure that both po/ and po-properties/ have .po files that correspond + # to your language. If you only add one to po/, the build will break + # in po-properties/. +-ALL_LINGUAS="af am ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu ia id is it ja ko li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@ije sr@Latn sv ta th tk tr uk uz uz@Latn vi wa xh yi zh_CN zh_TW" ++ALL_LINGUAS="" + AM_GLIB_GNU_GETTEXT + LIBS="$LIBS $INTLLIBS" + AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*) +@@ -1283,6 +1292,17 @@ + GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags xfixes` $GDK_EXTRA_CFLAGS" + GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xfixes` $GDK_EXTRA_LIBS" + fi ++ ++ # Checks for XFixes extension ++ ++ have_xfixes=false ++ PKG_CHECK_MODULES(XFIXES, xfixes, have_xfixes=true, :) ++ ++ if $have_xfixes ; then ++ AC_DEFINE(HAVE_XFIXES, 1, Have the XFIXES X extension) ++ GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags xfixes` $GDK_EXTRA_CFLAGS" ++ GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xfixes` $GDK_EXTRA_LIBS" ++ fi + + # Xshm checks + +@@ -1492,7 +1512,6 @@ + + GTK_PACKAGES=atk + GTK_EXTRA_LIBS= +-GTK_EXTRA_CFLAGS= + GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS" + GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS" + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/disable-tooltips.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/disable-tooltips.patch new file mode 100644 index 0000000000..d71d839c3c --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/disable-tooltips.patch @@ -0,0 +1,11 @@ +--- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100 +@@ -118,7 +118,7 @@ + tooltips->tips_data_list = NULL; + + tooltips->delay = DEFAULT_DELAY; +- tooltips->enabled = TRUE; ++ tooltips->enabled = FALSE; + tooltips->timer_tag = 0; + tooltips->use_sticky_delay = FALSE; + tooltips->last_popdown.tv_sec = -1; diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gdkwindow-x11.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gdkwindow-x11.c.diff new file mode 100644 index 0000000000..8104eb8559 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gdkwindow-x11.c.diff @@ -0,0 +1,38 @@ +--- gtk+-2.6.4/gdk/x11/gdkwindow-x11.c 2005-01-25 20:51:36.000000000 +0200 ++++ gtk+-2.6.4/gdk/x11/gdkwindow-x11.c 2005-04-06 16:19:35.350164320 +0300 +@@ -1286,6 +1286,7 @@ + GdkToplevelX11 *toplevel; + Atom atoms[7]; + gint i; ++ gint propmode; + + private = (GdkWindowObject*) window; + toplevel = _gdk_x11_window_get_toplevel (window); +@@ -1295,6 +1296,12 @@ + + update_wm_hints (window, TRUE); + ++ /* If the window has _NET_WM_STATE key specified, use it as the property mode */ ++ propmode = (gint)g_object_get_data (G_OBJECT (window), "_NET_WM_STATE"); ++ ++ if (!propmode) ++ propmode = PropModeReplace; ++ + /* We set the spec hints regardless of whether the spec is supported, + * since it can't hurt and it's kind of expensive to check whether + * it's supported. +@@ -1366,10 +1373,11 @@ + XChangeProperty (xdisplay, + xwindow, + gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE"), +- XA_ATOM, 32, PropModeReplace, ++ XA_ATOM, 32, propmode, + (guchar*) atoms, i); +- } +- else ++ } ++ /* Don't delete the property, unless we are replacing it */ ++ else if (propmode == PropModeReplace ) + { + XDeleteProperty (xdisplay, + xwindow, diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk+-handhelds.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk+-handhelds.patch new file mode 100644 index 0000000000..20481f059b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk+-handhelds.patch @@ -0,0 +1,236 @@ +--- gtk+-2.4.1/gtk/gtkarrow.c 2004-03-13 09:51:13.000000000 +1100 ++++ gtk+-2.4.1/gtk/gtkarrow.c 2004-05-26 14:52:17.000000000 +1000 +@@ -29,7 +29,7 @@ + #include "gtkarrow.h" + #include "gtkintl.h" + +-#define MIN_ARROW_SIZE 15 ++#define MIN_ARROW_SIZE 7 + + enum { + PROP_0, +@@ -53,6 +53,8 @@ + guint prop_id, + GValue *value, + GParamSpec *pspec); ++static void gtk_arrow_size_request (GtkWidget *arrow, ++ GtkRequisition *requisition); + + GType + gtk_arrow_get_type (void) +@@ -111,6 +113,7 @@ + G_PARAM_READABLE | G_PARAM_WRITABLE)); + + widget_class->expose_event = gtk_arrow_expose; ++ widget_class->size_request = gtk_arrow_size_request; + } + + static void +@@ -166,13 +169,18 @@ + } + + static void ++gtk_arrow_size_request (GtkWidget *arrow, ++ GtkRequisition *requisition) ++{ ++ requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; ++ requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; ++} ++ ++static void + gtk_arrow_init (GtkArrow *arrow) + { + GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW); + +- GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; +- GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; +- + arrow->arrow_type = GTK_ARROW_RIGHT; + arrow->shadow_type = GTK_SHADOW_OUT; + } +--- gtk+-2.4.1/gtk/gtkcalendar.c 2004-03-06 14:37:26.000000000 +1100 ++++ gtk+-2.4.1/gtk/gtkcalendar.c 2004-05-26 14:58:57.000000000 +1000 +@@ -340,6 +340,9 @@ + static void gtk_calendar_select_and_focus_day (GtkCalendar *calendar, + guint day); + ++static void gtk_calendar_do_select_day (GtkCalendar *calendar, ++ guint day); ++ + static void gtk_calendar_paint_arrow (GtkWidget *widget, + guint arrow); + static void gtk_calendar_paint_day_num (GtkWidget *widget, +@@ -861,13 +864,13 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else + { + if (calendar->selected_day < 0) + calendar->selected_day = calendar->selected_day + 1 + month_length[leap (calendar->year)][calendar->month + 1]; +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + } + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); +@@ -908,10 +911,10 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); +@@ -939,10 +942,10 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); +@@ -974,10 +977,10 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); +@@ -2480,9 +2483,9 @@ + return TRUE; + } + +-void +-gtk_calendar_select_day (GtkCalendar *calendar, +- guint day) ++static void ++gtk_calendar_do_select_day (GtkCalendar *calendar, ++ guint day) + { + g_return_if_fail (GTK_IS_CALENDAR (calendar)); + g_return_if_fail (day <= 31); +@@ -2499,6 +2502,13 @@ + if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar))) + gtk_calendar_paint_day_num (GTK_WIDGET (calendar), selected_day); + } ++} ++ ++void ++gtk_calendar_select_day (GtkCalendar *calendar, ++ guint day) ++{ ++ gtk_calendar_do_select_day (calendar, day); + + calendar->selected_day = day; + +--- gtk+-2.4.1/gtk/gtkentry.c 2004-04-22 08:08:08.000000000 +1000 ++++ gtk+-2.4.1/gtk/gtkentry.c 2004-05-26 14:52:17.000000000 +1000 +@@ -557,6 +557,15 @@ + 0.0, + G_PARAM_READABLE | G_PARAM_WRITABLE)); + ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("min_width", ++ _("Minimum width"), ++ _("Minimum width of the entry field"), ++ 0, ++ G_MAXINT, ++ MIN_ENTRY_WIDTH, ++ G_PARAM_READABLE)); ++ + signals[POPULATE_POPUP] = + g_signal_new ("populate_popup", + G_OBJECT_CLASS_TYPE (gobject_class), +@@ -1124,7 +1133,7 @@ + { + GtkEntry *entry = GTK_ENTRY (widget); + PangoFontMetrics *metrics; +- gint xborder, yborder; ++ gint xborder, yborder, min_width; + PangoContext *context; + + gtk_widget_ensure_style (widget); +@@ -1140,9 +1149,11 @@ + + xborder += INNER_BORDER; + yborder += INNER_BORDER; +- ++ ++ gtk_widget_style_get (widget, "min_width", &min_width, NULL); ++ + if (entry->width_chars < 0) +- requisition->width = MIN_ENTRY_WIDTH + xborder * 2; ++ requisition->width = min_width + xborder * 2; + else + { + gint char_width = pango_font_metrics_get_approximate_char_width (metrics); +--- gtk+-2.4.1/gtk/gtkrange.c 2004-03-06 14:38:08.000000000 +1100 ++++ gtk+-2.4.1/gtk/gtkrange.c 2004-05-26 14:52:17.000000000 +1000 +@@ -180,6 +180,7 @@ + static GtkWidgetClass *parent_class = NULL; + static guint signals[LAST_SIGNAL]; + ++static GdkAtom recognize_protocols_atom, atom_atom; + + GType + gtk_range_get_type (void) +@@ -220,6 +221,9 @@ + object_class = (GtkObjectClass*) class; + widget_class = (GtkWidgetClass*) class; + ++ recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE); ++ atom_atom = gdk_atom_intern ("ATOM", FALSE); ++ + parent_class = g_type_class_peek_parent (class); + + gobject_class->set_property = gtk_range_set_property; +@@ -815,6 +819,12 @@ + &attributes, attributes_mask); + gdk_window_set_user_data (range->event_window, range); + ++ gdk_property_change (range->event_window, ++ recognize_protocols_atom, ++ atom_atom, ++ 32, GDK_PROP_MODE_REPLACE, ++ NULL, 0); ++ + widget->style = gtk_style_attach (widget->style, widget->window); + } + +@@ -1186,7 +1196,7 @@ + + /* ignore presses when we're already doing something else. */ + if (range->layout->grab_location != MOUSE_OUTSIDE) +- return FALSE; ++ return TRUE; + + range->layout->mouse_x = event->x; + range->layout->mouse_y = event->y; +@@ -1364,7 +1374,7 @@ + return TRUE; + } + +- return FALSE; ++ return TRUE; + } + + /** diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk.h.diff new file mode 100644 index 0000000000..090d0da0eb --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk.h.diff @@ -0,0 +1,10 @@ +--- gtk+-2.6.4/gtk/gtk.h 2004-09-27 21:37:33.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtk.h 2005-04-06 16:19:35.812094096 +0300 +@@ -156,6 +156,7 @@ + #include <gtk/gtktearoffmenuitem.h> + #include <gtk/gtktext.h> + #include <gtk/gtktextbuffer.h> ++#include <gtk/gtktextbufferserialize.h> + #include <gtk/gtktextview.h> + #include <gtk/gtktipsquery.h> + #include <gtk/gtktoggleaction.h> diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk_Makefile.am.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk_Makefile.am.diff new file mode 100644 index 0000000000..0672df19b0 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk_Makefile.am.diff @@ -0,0 +1,27 @@ +--- gtk+-2.6.4/gtk/Makefile.am 2005-01-13 17:18:21.000000000 +0200 ++++ gtk+-2.6.4/gtk/Makefile.am 2005-04-06 16:19:35.806095008 +0300 +@@ -246,6 +246,7 @@ + gtktearoffmenuitem.h \ + gtktext.h \ + gtktextbuffer.h \ ++ gtktextbufferserialize.h\ + gtktextchild.h \ + gtktextdisplay.h \ + gtktextiter.h \ +@@ -387,6 +388,8 @@ + gtkframe.c \ + gtkgamma.c \ + gtkgc.c \ ++ gtkhashtable.c \ ++ gtkhashtable.h \ + gtkhandlebox.c \ + gtkhbbox.c \ + gtkhbox.c \ +@@ -470,6 +473,7 @@ + gtktext.c \ + gtktextbtree.c \ + gtktextbuffer.c \ ++ gtktextbufferserialize.c\ + gtktextchild.c \ + gtktextdisplay.c \ + gtktextiter.c \ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk_Makefile.in.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk_Makefile.in.diff new file mode 100644 index 0000000000..56eca02b03 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtk_Makefile.in.diff @@ -0,0 +1,292 @@ +--- gtk+-2.6.4/gtk/Makefile.in 2005-03-01 17:31:32.000000000 +0200 ++++ gtk+-2.6.4/gtk/Makefile.in 2005-04-06 16:19:35.808094704 +0300 +@@ -485,6 +485,7 @@ + gtktearoffmenuitem.h \ + gtktext.h \ + gtktextbuffer.h \ ++ gtktextbufferserialize.h\ + gtktextchild.h \ + gtktextdisplay.h \ + gtktextiter.h \ +@@ -629,6 +630,8 @@ + gtkframe.c \ + gtkgamma.c \ + gtkgc.c \ ++ gtkhashtable.c \ ++ gtkhashtable.h \ + gtkhandlebox.c \ + gtkhbbox.c \ + gtkhbox.c \ +@@ -712,6 +715,7 @@ + gtktext.c \ + gtktextbtree.c \ + gtktextbuffer.c \ ++ gtktextbufferserialize.c\ + gtktextchild.c \ + gtktextdisplay.c \ + gtktextiter.c \ +@@ -927,14 +931,14 @@ + gtkfilechooserdefault.c gtkfilechooserutils.c \ + gtkfilechooserwidget.c gtkfilefilter.c gtkfilesel.c \ + gtkfilesystem.c gtkfilesystemmodel.c gtkfixed.c gtkfontbutton.c \ +- gtkfontsel.c gtkframe.c gtkgamma.c gtkgc.c gtkhandlebox.c \ +- gtkhbbox.c gtkhbox.c gtkhpaned.c gtkhruler.c gtkhscale.c \ +- gtkhscrollbar.c gtkhseparator.c gtkhsv.c gtkhsv.h \ +- gtkiconfactory.c gtkiconcache.c gtkicontheme.c gtkiconview.c \ +- gtkimage.c gtkimagemenuitem.c gtkimcontext.c \ +- gtkimcontextsimple.c gtkimmodule.c gtkimmulticontext.c \ +- gtkinputdialog.c gtkintl.h gtkinvisible.c gtkitem.c \ +- gtkitemfactory.c gtkkeyhash.c gtkkeyhash.h gtklabel.c \ ++ gtkfontsel.c gtkframe.c gtkgamma.c gtkgc.c gtkhashtable.c \ ++ gtkhashtable.h gtkhandlebox.c gtkhbbox.c gtkhbox.c gtkhpaned.c \ ++ gtkhruler.c gtkhscale.c gtkhscrollbar.c gtkhseparator.c \ ++ gtkhsv.c gtkhsv.h gtkiconfactory.c gtkiconcache.c \ ++ gtkicontheme.c gtkiconview.c gtkimage.c gtkimagemenuitem.c \ ++ gtkimcontext.c gtkimcontextsimple.c gtkimmodule.c \ ++ gtkimmulticontext.c gtkinputdialog.c gtkintl.h gtkinvisible.c \ ++ gtkitem.c gtkitemfactory.c gtkkeyhash.c gtkkeyhash.h gtklabel.c \ + gtklayout.c gtklist.c gtklistitem.c gtkliststore.c gtkmain.c \ + gtkmarshal.c gtkmarshalers.c gtkmenu.c gtkmenubar.c \ + gtkmenuitem.c gtkmenushell.c gtkmenutoolbutton.c \ +@@ -949,21 +953,21 @@ + gtkseparatortoolitem.c gtksettings.c gtksignal.c gtksizegroup.c \ + gtkspinbutton.c gtkstatusbar.c gtkstock.c gtkstyle.c gtktable.c \ + gtktearoffmenuitem.c gtktext.c gtktextbtree.c gtktextbuffer.c \ +- gtktextchild.c gtktextdisplay.c gtktextiter.c \ +- gtktextiterprivate.h gtktextlayout.c gtktextmark.c \ +- gtktextmarkprivate.h gtktextsegment.c gtktexttag.c \ +- gtktexttagtable.c gtktexttypes.c gtktextutil.c gtktextview.c \ +- gtkthemes.c gtktipsquery.c gtktoggleaction.c gtktogglebutton.c \ +- gtktoggletoolbutton.c gtktoolbar.c gtktoolbutton.c \ +- gtktoolitem.c gtktooltips.c gtktree.c gtktreedatalist.c \ +- gtktreednd.c gtktreeitem.c gtktreemodel.c gtktreemodelfilter.c \ +- gtktreemodelsort.c gtktreeselection.c gtktreesortable.c \ +- gtktreestore.c gtktreeview.c gtktreeviewcolumn.c \ +- gtktypebuiltins.c gtktypeutils.c gtkuimanager.c gtkvbbox.c \ +- gtkvbox.c gtkviewport.c gtkvpaned.c gtkvruler.c gtkvscale.c \ +- gtkvscrollbar.c gtkvseparator.c gtkwidget.c \ +- gtkwindow-decorate.c gtkwindow.c xembed.h gtkfilesystemunix.c \ +- gtkfilesystemwin32.c ++ gtktextbufferserialize.c gtktextchild.c gtktextdisplay.c \ ++ gtktextiter.c gtktextiterprivate.h gtktextlayout.c \ ++ gtktextmark.c gtktextmarkprivate.h gtktextsegment.c \ ++ gtktexttag.c gtktexttagtable.c gtktexttypes.c gtktextutil.c \ ++ gtktextview.c gtkthemes.c gtktipsquery.c gtktoggleaction.c \ ++ gtktogglebutton.c gtktoggletoolbutton.c gtktoolbar.c \ ++ gtktoolbutton.c gtktoolitem.c gtktooltips.c gtktree.c \ ++ gtktreedatalist.c gtktreednd.c gtktreeitem.c gtktreemodel.c \ ++ gtktreemodelfilter.c gtktreemodelsort.c gtktreeselection.c \ ++ gtktreesortable.c gtktreestore.c gtktreeview.c \ ++ gtktreeviewcolumn.c gtktypebuiltins.c gtktypeutils.c \ ++ gtkuimanager.c gtkvbbox.c gtkvbox.c gtkviewport.c gtkvpaned.c \ ++ gtkvruler.c gtkvscale.c gtkvscrollbar.c gtkvseparator.c \ ++ gtkwidget.c gtkwindow-decorate.c gtkwindow.c xembed.h \ ++ gtkfilesystemunix.c gtkfilesystemwin32.c + @OS_UNIX_TRUE@am__objects_1 = gtkfilesystemunix.lo + @OS_WIN32_TRUE@am__objects_2 = gtkfilesystemwin32.lo + am__objects_3 = fnmatch.lo gtkaboutdialog.lo gtkaccelgroup.lo \ +@@ -986,16 +990,16 @@ + gtkfilechooserutils.lo gtkfilechooserwidget.lo gtkfilefilter.lo \ + gtkfilesel.lo gtkfilesystem.lo gtkfilesystemmodel.lo \ + gtkfixed.lo gtkfontbutton.lo gtkfontsel.lo gtkframe.lo \ +- gtkgamma.lo gtkgc.lo gtkhandlebox.lo gtkhbbox.lo gtkhbox.lo \ +- gtkhpaned.lo gtkhruler.lo gtkhscale.lo gtkhscrollbar.lo \ +- gtkhseparator.lo gtkhsv.lo gtkiconfactory.lo gtkiconcache.lo \ +- gtkicontheme.lo gtkiconview.lo gtkimage.lo gtkimagemenuitem.lo \ +- gtkimcontext.lo gtkimcontextsimple.lo gtkimmodule.lo \ +- gtkimmulticontext.lo gtkinputdialog.lo gtkinvisible.lo \ +- gtkitem.lo gtkitemfactory.lo gtkkeyhash.lo gtklabel.lo \ +- gtklayout.lo gtklist.lo gtklistitem.lo gtkliststore.lo \ +- gtkmain.lo gtkmarshal.lo gtkmarshalers.lo gtkmenu.lo \ +- gtkmenubar.lo gtkmenuitem.lo gtkmenushell.lo \ ++ gtkgamma.lo gtkgc.lo gtkhashtable.lo gtkhandlebox.lo \ ++ gtkhbbox.lo gtkhbox.lo gtkhpaned.lo gtkhruler.lo gtkhscale.lo \ ++ gtkhscrollbar.lo gtkhseparator.lo gtkhsv.lo gtkiconfactory.lo \ ++ gtkiconcache.lo gtkicontheme.lo gtkiconview.lo gtkimage.lo \ ++ gtkimagemenuitem.lo gtkimcontext.lo gtkimcontextsimple.lo \ ++ gtkimmodule.lo gtkimmulticontext.lo gtkinputdialog.lo \ ++ gtkinvisible.lo gtkitem.lo gtkitemfactory.lo gtkkeyhash.lo \ ++ gtklabel.lo gtklayout.lo gtklist.lo gtklistitem.lo \ ++ gtkliststore.lo gtkmain.lo gtkmarshal.lo gtkmarshalers.lo \ ++ gtkmenu.lo gtkmenubar.lo gtkmenuitem.lo gtkmenushell.lo \ + gtkmenutoolbutton.lo gtkmessagedialog.lo gtkmisc.lo \ + gtkmnemonichash.lo gtkmodules.lo gtknotebook.lo gtkobject.lo \ + gtkoldeditable.lo gtkoptionmenu.lo gtkpaned.lo gtkpathbar.lo \ +@@ -1007,14 +1011,15 @@ + gtkseparatormenuitem.lo gtkseparatortoolitem.lo gtksettings.lo \ + gtksignal.lo gtksizegroup.lo gtkspinbutton.lo gtkstatusbar.lo \ + gtkstock.lo gtkstyle.lo gtktable.lo gtktearoffmenuitem.lo \ +- gtktext.lo gtktextbtree.lo gtktextbuffer.lo gtktextchild.lo \ +- gtktextdisplay.lo gtktextiter.lo gtktextlayout.lo \ +- gtktextmark.lo gtktextsegment.lo gtktexttag.lo \ +- gtktexttagtable.lo gtktexttypes.lo gtktextutil.lo \ +- gtktextview.lo gtkthemes.lo gtktipsquery.lo gtktoggleaction.lo \ +- gtktogglebutton.lo gtktoggletoolbutton.lo gtktoolbar.lo \ +- gtktoolbutton.lo gtktoolitem.lo gtktooltips.lo gtktree.lo \ +- gtktreedatalist.lo gtktreednd.lo gtktreeitem.lo gtktreemodel.lo \ ++ gtktext.lo gtktextbtree.lo gtktextbuffer.lo \ ++ gtktextbufferserialize.lo gtktextchild.lo gtktextdisplay.lo \ ++ gtktextiter.lo gtktextlayout.lo gtktextmark.lo \ ++ gtktextsegment.lo gtktexttag.lo gtktexttagtable.lo \ ++ gtktexttypes.lo gtktextutil.lo gtktextview.lo gtkthemes.lo \ ++ gtktipsquery.lo gtktoggleaction.lo gtktogglebutton.lo \ ++ gtktoggletoolbutton.lo gtktoolbar.lo gtktoolbutton.lo \ ++ gtktoolitem.lo gtktooltips.lo gtktree.lo gtktreedatalist.lo \ ++ gtktreednd.lo gtktreeitem.lo gtktreemodel.lo \ + gtktreemodelfilter.lo gtktreemodelsort.lo gtktreeselection.lo \ + gtktreesortable.lo gtktreestore.lo gtktreeview.lo \ + gtktreeviewcolumn.lo gtktypebuiltins.lo gtktypeutils.lo \ +@@ -1042,14 +1047,14 @@ + gtkfilechooserdefault.c gtkfilechooserutils.c \ + gtkfilechooserwidget.c gtkfilefilter.c gtkfilesel.c \ + gtkfilesystem.c gtkfilesystemmodel.c gtkfixed.c gtkfontbutton.c \ +- gtkfontsel.c gtkframe.c gtkgamma.c gtkgc.c gtkhandlebox.c \ +- gtkhbbox.c gtkhbox.c gtkhpaned.c gtkhruler.c gtkhscale.c \ +- gtkhscrollbar.c gtkhseparator.c gtkhsv.c gtkhsv.h \ +- gtkiconfactory.c gtkiconcache.c gtkicontheme.c gtkiconview.c \ +- gtkimage.c gtkimagemenuitem.c gtkimcontext.c \ +- gtkimcontextsimple.c gtkimmodule.c gtkimmulticontext.c \ +- gtkinputdialog.c gtkintl.h gtkinvisible.c gtkitem.c \ +- gtkitemfactory.c gtkkeyhash.c gtkkeyhash.h gtklabel.c \ ++ gtkfontsel.c gtkframe.c gtkgamma.c gtkgc.c gtkhashtable.c \ ++ gtkhashtable.h gtkhandlebox.c gtkhbbox.c gtkhbox.c gtkhpaned.c \ ++ gtkhruler.c gtkhscale.c gtkhscrollbar.c gtkhseparator.c \ ++ gtkhsv.c gtkhsv.h gtkiconfactory.c gtkiconcache.c \ ++ gtkicontheme.c gtkiconview.c gtkimage.c gtkimagemenuitem.c \ ++ gtkimcontext.c gtkimcontextsimple.c gtkimmodule.c \ ++ gtkimmulticontext.c gtkinputdialog.c gtkintl.h gtkinvisible.c \ ++ gtkitem.c gtkitemfactory.c gtkkeyhash.c gtkkeyhash.h gtklabel.c \ + gtklayout.c gtklist.c gtklistitem.c gtkliststore.c gtkmain.c \ + gtkmarshal.c gtkmarshalers.c gtkmenu.c gtkmenubar.c \ + gtkmenuitem.c gtkmenushell.c gtkmenutoolbutton.c \ +@@ -1064,21 +1069,21 @@ + gtkseparatortoolitem.c gtksettings.c gtksignal.c gtksizegroup.c \ + gtkspinbutton.c gtkstatusbar.c gtkstock.c gtkstyle.c gtktable.c \ + gtktearoffmenuitem.c gtktext.c gtktextbtree.c gtktextbuffer.c \ +- gtktextchild.c gtktextdisplay.c gtktextiter.c \ +- gtktextiterprivate.h gtktextlayout.c gtktextmark.c \ +- gtktextmarkprivate.h gtktextsegment.c gtktexttag.c \ +- gtktexttagtable.c gtktexttypes.c gtktextutil.c gtktextview.c \ +- gtkthemes.c gtktipsquery.c gtktoggleaction.c gtktogglebutton.c \ +- gtktoggletoolbutton.c gtktoolbar.c gtktoolbutton.c \ +- gtktoolitem.c gtktooltips.c gtktree.c gtktreedatalist.c \ +- gtktreednd.c gtktreeitem.c gtktreemodel.c gtktreemodelfilter.c \ +- gtktreemodelsort.c gtktreeselection.c gtktreesortable.c \ +- gtktreestore.c gtktreeview.c gtktreeviewcolumn.c \ +- gtktypebuiltins.c gtktypeutils.c gtkuimanager.c gtkvbbox.c \ +- gtkvbox.c gtkviewport.c gtkvpaned.c gtkvruler.c gtkvscale.c \ +- gtkvscrollbar.c gtkvseparator.c gtkwidget.c \ +- gtkwindow-decorate.c gtkwindow.c xembed.h gtkfilesystemunix.c \ +- gtkfilesystemwin32.c ++ gtktextbufferserialize.c gtktextchild.c gtktextdisplay.c \ ++ gtktextiter.c gtktextiterprivate.h gtktextlayout.c \ ++ gtktextmark.c gtktextmarkprivate.h gtktextsegment.c \ ++ gtktexttag.c gtktexttagtable.c gtktexttypes.c gtktextutil.c \ ++ gtktextview.c gtkthemes.c gtktipsquery.c gtktoggleaction.c \ ++ gtktogglebutton.c gtktoggletoolbutton.c gtktoolbar.c \ ++ gtktoolbutton.c gtktoolitem.c gtktooltips.c gtktree.c \ ++ gtktreedatalist.c gtktreednd.c gtktreeitem.c gtktreemodel.c \ ++ gtktreemodelfilter.c gtktreemodelsort.c gtktreeselection.c \ ++ gtktreesortable.c gtktreestore.c gtktreeview.c \ ++ gtktreeviewcolumn.c gtktypebuiltins.c gtktypeutils.c \ ++ gtkuimanager.c gtkvbbox.c gtkvbox.c gtkviewport.c gtkvpaned.c \ ++ gtkvruler.c gtkvscale.c gtkvscrollbar.c gtkvseparator.c \ ++ gtkwidget.c gtkwindow-decorate.c gtkwindow.c xembed.h \ ++ gtkfilesystemunix.c gtkfilesystemwin32.c + am_libgtk_win32_2_0_la_OBJECTS = $(am__objects_3) + libgtk_win32_2_0_la_OBJECTS = $(am_libgtk_win32_2_0_la_OBJECTS) + @OS_UNIX_TRUE@libgtk_x11_2_0_la_DEPENDENCIES = \ +@@ -1106,14 +1111,14 @@ + gtkfilechooserdefault.c gtkfilechooserutils.c \ + gtkfilechooserwidget.c gtkfilefilter.c gtkfilesel.c \ + gtkfilesystem.c gtkfilesystemmodel.c gtkfixed.c gtkfontbutton.c \ +- gtkfontsel.c gtkframe.c gtkgamma.c gtkgc.c gtkhandlebox.c \ +- gtkhbbox.c gtkhbox.c gtkhpaned.c gtkhruler.c gtkhscale.c \ +- gtkhscrollbar.c gtkhseparator.c gtkhsv.c gtkhsv.h \ +- gtkiconfactory.c gtkiconcache.c gtkicontheme.c gtkiconview.c \ +- gtkimage.c gtkimagemenuitem.c gtkimcontext.c \ +- gtkimcontextsimple.c gtkimmodule.c gtkimmulticontext.c \ +- gtkinputdialog.c gtkintl.h gtkinvisible.c gtkitem.c \ +- gtkitemfactory.c gtkkeyhash.c gtkkeyhash.h gtklabel.c \ ++ gtkfontsel.c gtkframe.c gtkgamma.c gtkgc.c gtkhashtable.c \ ++ gtkhashtable.h gtkhandlebox.c gtkhbbox.c gtkhbox.c gtkhpaned.c \ ++ gtkhruler.c gtkhscale.c gtkhscrollbar.c gtkhseparator.c \ ++ gtkhsv.c gtkhsv.h gtkiconfactory.c gtkiconcache.c \ ++ gtkicontheme.c gtkiconview.c gtkimage.c gtkimagemenuitem.c \ ++ gtkimcontext.c gtkimcontextsimple.c gtkimmodule.c \ ++ gtkimmulticontext.c gtkinputdialog.c gtkintl.h gtkinvisible.c \ ++ gtkitem.c gtkitemfactory.c gtkkeyhash.c gtkkeyhash.h gtklabel.c \ + gtklayout.c gtklist.c gtklistitem.c gtkliststore.c gtkmain.c \ + gtkmarshal.c gtkmarshalers.c gtkmenu.c gtkmenubar.c \ + gtkmenuitem.c gtkmenushell.c gtkmenutoolbutton.c \ +@@ -1128,22 +1133,22 @@ + gtkseparatortoolitem.c gtksettings.c gtksignal.c gtksizegroup.c \ + gtkspinbutton.c gtkstatusbar.c gtkstock.c gtkstyle.c gtktable.c \ + gtktearoffmenuitem.c gtktext.c gtktextbtree.c gtktextbuffer.c \ +- gtktextchild.c gtktextdisplay.c gtktextiter.c \ +- gtktextiterprivate.h gtktextlayout.c gtktextmark.c \ +- gtktextmarkprivate.h gtktextsegment.c gtktexttag.c \ +- gtktexttagtable.c gtktexttypes.c gtktextutil.c gtktextview.c \ +- gtkthemes.c gtktipsquery.c gtktoggleaction.c gtktogglebutton.c \ +- gtktoggletoolbutton.c gtktoolbar.c gtktoolbutton.c \ +- gtktoolitem.c gtktooltips.c gtktree.c gtktreedatalist.c \ +- gtktreednd.c gtktreeitem.c gtktreemodel.c gtktreemodelfilter.c \ +- gtktreemodelsort.c gtktreeselection.c gtktreesortable.c \ +- gtktreestore.c gtktreeview.c gtktreeviewcolumn.c \ +- gtktypebuiltins.c gtktypeutils.c gtkuimanager.c gtkvbbox.c \ +- gtkvbox.c gtkviewport.c gtkvpaned.c gtkvruler.c gtkvscale.c \ +- gtkvscrollbar.c gtkvseparator.c gtkwidget.c \ +- gtkwindow-decorate.c gtkwindow.c xembed.h gtkfilesystemunix.c \ +- gtkfilesystemwin32.c gtkplug.c gtksocket.c gtkxembed.c \ +- gtkxembed.h ++ gtktextbufferserialize.c gtktextchild.c gtktextdisplay.c \ ++ gtktextiter.c gtktextiterprivate.h gtktextlayout.c \ ++ gtktextmark.c gtktextmarkprivate.h gtktextsegment.c \ ++ gtktexttag.c gtktexttagtable.c gtktexttypes.c gtktextutil.c \ ++ gtktextview.c gtkthemes.c gtktipsquery.c gtktoggleaction.c \ ++ gtktogglebutton.c gtktoggletoolbutton.c gtktoolbar.c \ ++ gtktoolbutton.c gtktoolitem.c gtktooltips.c gtktree.c \ ++ gtktreedatalist.c gtktreednd.c gtktreeitem.c gtktreemodel.c \ ++ gtktreemodelfilter.c gtktreemodelsort.c gtktreeselection.c \ ++ gtktreesortable.c gtktreestore.c gtktreeview.c \ ++ gtktreeviewcolumn.c gtktypebuiltins.c gtktypeutils.c \ ++ gtkuimanager.c gtkvbbox.c gtkvbox.c gtkviewport.c gtkvpaned.c \ ++ gtkvruler.c gtkvscale.c gtkvscrollbar.c gtkvseparator.c \ ++ gtkwidget.c gtkwindow-decorate.c gtkwindow.c xembed.h \ ++ gtkfilesystemunix.c gtkfilesystemwin32.c gtkplug.c gtksocket.c \ ++ gtkxembed.c gtkxembed.h + am__objects_4 = gtkplug.lo gtksocket.lo gtkxembed.lo + am_libgtk_x11_2_0_la_OBJECTS = $(am__objects_3) $(am__objects_4) + libgtk_x11_2_0_la_OBJECTS = $(am_libgtk_x11_2_0_la_OBJECTS) +@@ -1224,6 +1229,7 @@ + @AMDEP_TRUE@ ./$(DEPDIR)/gtkfontsel.Plo ./$(DEPDIR)/gtkframe.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtkgamma.Plo ./$(DEPDIR)/gtkgc.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtkhandlebox.Plo \ ++@AMDEP_TRUE@ ./$(DEPDIR)/gtkhashtable.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtkhbbox.Plo ./$(DEPDIR)/gtkhbox.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtkhpaned.Plo ./$(DEPDIR)/gtkhruler.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtkhscale.Plo \ +@@ -1292,6 +1298,7 @@ + @AMDEP_TRUE@ ./$(DEPDIR)/gtktext.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtktextbtree.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtktextbuffer.Plo \ ++@AMDEP_TRUE@ ./$(DEPDIR)/gtktextbufferserialize.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtktextchild.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtktextdisplay.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/gtktextiter.Plo \ +@@ -1524,6 +1531,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkgamma.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkgc.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkhandlebox.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkhashtable.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkhbbox.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkhbox.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkhpaned.Plo@am__quote@ +@@ -1604,6 +1612,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtktext.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtktextbtree.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtktextbuffer.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtktextbufferserialize.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtktextchild.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtktextdisplay.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtktextiter.Plo@am__quote@ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkalias.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkalias.h.diff new file mode 100644 index 0000000000..8c87424ce8 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkalias.h.diff @@ -0,0 +1,17 @@ +--- gtk+-2.6.4/gtk/gtkalias.h 2005-03-01 17:58:16.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkalias.h 2005-04-06 16:19:36.020062480 +0300 +@@ -5782,6 +5782,14 @@ + extern __typeof (gtk_menu_shell_select_item) gtk_menu_shell_select_item __attribute((alias("IA__gtk_menu_shell_select_item"), visibility("default"))); + #define gtk_menu_shell_select_item IA__gtk_menu_shell_select_item + ++extern __typeof (gtk_menu_shell_set_take_focus) IA__gtk_menu_shell_set_take_focus __attribute((visibility("hidden"))); ++extern __typeof (gtk_menu_shell_set_take_focus) gtk_menu_shell_set_take_focus __attribute((alias("IA__gtk_menu_shell_set_take_focus"), visibility("default"))); ++#define gtk_menu_shell_set_take_focus IA__gtk_menu_shell_set_take_focus ++ ++extern __typeof (gtk_menu_shell_get_take_focus) IA__gtk_menu_shell_get_take_focus __attribute((visibility("hidden"))); ++extern __typeof (gtk_menu_shell_get_take_focus) gtk_menu_shell_get_take_focus __attribute((alias("IA__gtk_menu_shell_get_take_focus"), visibility("default"))); ++#define gtk_menu_shell_get_take_focus IA__gtk_menu_shell_get_take_focus ++ + extern __typeof (gtk_menu_tool_button_get_menu) IA__gtk_menu_tool_button_get_menu __attribute((visibility("hidden"))); + extern __typeof (gtk_menu_tool_button_get_menu) gtk_menu_tool_button_get_menu __attribute((alias("IA__gtk_menu_tool_button_get_menu"), visibility("default"))); + #define gtk_menu_tool_button_get_menu IA__gtk_menu_tool_button_get_menu diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkbutton.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkbutton.c.diff new file mode 100644 index 0000000000..e5a007372a --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkbutton.c.diff @@ -0,0 +1,471 @@ +--- gtk+-2.6.4/gtk/gtkbutton.c 2005-01-25 22:54:43.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkbutton.c 2005-04-06 16:19:36.249027672 +0300 +@@ -24,6 +24,10 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++/* Modified for Nokia Oyj during 2002-2005. See CHANGES file for list ++ * of changes. ++ */ ++ + #include <config.h> + #include <string.h> + #include "gtkalias.h" +@@ -38,8 +42,33 @@ + #include "gtkiconfactory.h" + #include "gtkintl.h" + ++/* Osso addition: ++ * Here are the details for each attach ++ * bitmask combination. */ ++const gchar *osso_gtk_button_attach_details [OSSO_GTK_BUTTON_ATTACH_ENUM_END] = ++ { "osso_button", ++ "osso_button_n", ++ "osso_button_e", ++ "osso_button_ne", ++ "osso_button_s", ++ "osso_button_ns", ++ "osso_button_es", ++ "osso_button_nes", ++ "osso_button_w", ++ "osso_button_nw", ++ "osso_button_ew", ++ "osso_button_new", ++ "osso_button_sw", ++ "osso_button_nsw", ++ "osso_button_esw", ++ "osso_button_nesw", ++ }; ++ + #define CHILD_SPACING 1 + ++/* Take this away after font drawing is fixed */ ++#define OSSO_FONT_HACK TRUE ++ + static const GtkBorder default_default_border = { 1, 1, 1, 1 }; + static const GtkBorder default_default_outside_border = { 0, 0, 0, 0 }; + +@@ -68,6 +97,9 @@ + PROP_FOCUS_ON_CLICK, + PROP_XALIGN, + PROP_YALIGN, ++ PROP_DETAIL, ++ PROP_AUTOMATIC_DETAIL, ++ PROP_KEYBOARD_BUTTON + }; + + #define GTK_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_BUTTON, GtkButtonPrivate)) +@@ -80,6 +112,10 @@ + GtkWidget *image; + guint align_set : 1; + guint image_is_stock : 1; ++ gchar *detail; ++ gboolean automatic_detail; ++ gboolean keyboard_button; ++ GtkLabel *keyboard_label; + }; + + static void gtk_button_class_init (GtkButtonClass *klass); +@@ -231,6 +267,14 @@ + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (gobject_class, ++ PROP_KEYBOARD_BUTTON, ++ g_param_spec_boolean ("keyboard_button", ++ P_("Keyboard button"), ++ P_("If set, label foo"), ++ FALSE, ++ G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); ++ ++ g_object_class_install_property (gobject_class, + PROP_USE_STOCK, + g_param_spec_boolean ("use_stock", + P_("Use stock"), +@@ -418,6 +462,77 @@ + P_("Whether stock icons should be shown in buttons"), + TRUE, + G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("child_spacing", ++ _("Child spacing"), ++ _("Spacing between button edges and child."), ++ 0, ++ G_MAXINT, ++ CHILD_SPACING, ++ G_PARAM_READABLE)); ++ /* Osso additions below */ ++ g_object_class_install_property (gobject_class, ++ PROP_DETAIL, ++ g_param_spec_string ("detail", ++ P_("Detail"), ++ P_("The detail the button is drawn with."), ++ "buttondefault", ++ G_PARAM_READWRITE)); ++ ++ g_object_class_install_property (gobject_class, ++ PROP_AUTOMATIC_DETAIL, ++ g_param_spec_boolean ("automatic_detail", ++ P_("Automatic Detail"), ++ P_("Whether setting detail is automatic based on GtkTable/GtkHButtonBox."), ++ TRUE, ++ G_PARAM_READWRITE)); ++ ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("child_offset_y", ++ _("Child Y Offset"), ++ _("Enable hack how many pixels to add/take away from GtkButton's child size allocation."), ++ G_MININT, ++ G_MAXINT, ++ 0, ++ G_PARAM_READABLE)); ++ ++ /* OSSO: This is used to find out whether ++ * button is a GtkTreeView column Listbox ++ * header or not */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("listboxheader", ++ P_( "Listbox header" ), ++ P_( "Listbox header ( FALSE / TRUE )" ), ++ FALSE, ++ G_PARAM_READABLE)); ++ ++ /* OSSO: Column Listbox header separator height */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("separator-height", ++ P_( "Separator height" ), ++ P_( "Listbox header separator height ( FALSE / TRUE )" ), ++ 0, ++ G_MAXINT, ++ 0, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boxed ("padding", ++ P_("Padding"), ++ P_("Paddings around the button child"), ++ GTK_TYPE_BORDER, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("minimum_width", ++ P_("Minimum Width"), ++ P_("Minimum width of the button"), ++ 0, ++ G_MAXINT, ++ 0, ++ G_PARAM_READABLE)); + + g_type_class_add_private (gobject_class, sizeof (GtkButtonPrivate)); + } +@@ -445,7 +560,14 @@ + priv->xalign = 0.5; + priv->yalign = 0.5; + priv->align_set = 0; ++ priv->detail = g_strdup("buttondefault"); ++ priv->automatic_detail = TRUE; ++ priv->keyboard_button = FALSE; ++ priv->keyboard_label = NULL; + priv->image_is_stock = TRUE; ++ ++ g_object_set (G_OBJECT (button), "tap_and_hold_state", ++ GTK_STATE_ACTIVE, NULL); + } + + static void +@@ -560,6 +682,18 @@ + case PROP_YALIGN: + gtk_button_set_alignment (button, priv->xalign, g_value_get_float (value)); + break; ++ case PROP_DETAIL: ++ if (priv->detail) ++ g_free (priv->detail); ++ priv->detail = g_strdup (g_value_get_string (value)); ++ gtk_widget_queue_draw (GTK_WIDGET (button)); ++ break; ++ case PROP_AUTOMATIC_DETAIL: ++ priv->automatic_detail = g_value_get_boolean (value); ++ break; ++ case PROP_KEYBOARD_BUTTON: ++ priv->keyboard_button = g_value_get_boolean (value); ++ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; +@@ -601,6 +735,15 @@ + case PROP_YALIGN: + g_value_set_float (value, priv->yalign); + break; ++ case PROP_DETAIL: ++ g_value_set_string (value, priv->detail); ++ break; ++ case PROP_AUTOMATIC_DETAIL: ++ g_value_set_boolean (value, priv->automatic_detail); ++ break; ++ case PROP_KEYBOARD_BUTTON: ++ g_value_set_boolean (value, priv->keyboard_button); ++ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; +@@ -641,6 +784,26 @@ + if (button->label_text == NULL) + return; + ++ if (priv->keyboard_button) ++ { ++ if (priv->keyboard_label) ++ { ++ gtk_label_set_label (priv->keyboard_label, button->label_text); ++ } ++ else ++ { ++ GtkWidget *label = gtk_label_new (button->label_text); ++ priv->keyboard_label = GTK_LABEL (label); ++ ++ if (priv->align_set) ++ gtk_misc_set_alignment (GTK_MISC (label), ++ priv->xalign, priv->yalign); ++ gtk_widget_show (priv->keyboard_label); ++ gtk_container_add (GTK_CONTAINER (button), label); ++ } ++ return; ++ } ++ + if (GTK_BIN (button)->child) + { + if (priv->image && !priv->image_is_stock) +@@ -944,16 +1107,20 @@ + GtkBorder default_border; + gint focus_width; + gint focus_pad; ++ gint child_spacing; ++ gint separator_height; + + gtk_button_get_props (button, &default_border, NULL, NULL); + gtk_widget_style_get (GTK_WIDGET (widget), + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, ++ "child-spacing", &child_spacing, ++ "separator-height", &separator_height, + NULL); + +- requisition->width = (GTK_CONTAINER (widget)->border_width + CHILD_SPACING + ++ requisition->width = (GTK_CONTAINER (widget)->border_width + child_spacing + + GTK_WIDGET (widget)->style->xthickness) * 2; +- requisition->height = (GTK_CONTAINER (widget)->border_width + CHILD_SPACING + ++ requisition->height = (GTK_CONTAINER (widget)->border_width + child_spacing + + GTK_WIDGET (widget)->style->ythickness) * 2; + + if (GTK_WIDGET_CAN_DEFAULT (widget)) +@@ -965,15 +1132,35 @@ + if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child)) + { + GtkRequisition child_requisition; ++ GtkBorder *padding; ++ gint minimum_width; + + gtk_widget_size_request (GTK_BIN (button)->child, &child_requisition); + ++ gtk_widget_style_get (widget, ++ "padding", ++ &padding, ++ "minimum_width", ++ &minimum_width, ++ NULL); ++ ++ if ( padding ) ++ { ++ requisition->width += padding->left + padding->right; ++ requisition->height += padding->top + padding->bottom; ++ } ++ + requisition->width += child_requisition.width; + requisition->height += child_requisition.height; ++ ++ if (requisition->width < minimum_width) ++ requisition->width = minimum_width; + } + + requisition->width += 2 * (focus_width + focus_pad); + requisition->height += 2 * (focus_width + focus_pad); ++ ++ requisition->height += separator_height; + } + + static void +@@ -989,14 +1176,15 @@ + GtkBorder default_border; + gint focus_width; + gint focus_pad; ++ gint child_spacing; + + gtk_button_get_props (button, &default_border, NULL, NULL); + gtk_widget_style_get (GTK_WIDGET (widget), + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, ++ "child-spacing", &child_spacing, + NULL); +- +- ++ + widget->allocation = *allocation; + + if (GTK_WIDGET_REALIZED (widget)) +@@ -1008,14 +1196,27 @@ + + if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child)) + { +- child_allocation.x = widget->allocation.x + border_width + CHILD_SPACING + xthickness; +- child_allocation.y = widget->allocation.y + border_width + CHILD_SPACING + ythickness; ++ child_allocation.x = widget->allocation.x + border_width + child_spacing + xthickness; ++ child_allocation.y = widget->allocation.y + border_width + child_spacing + ythickness; + +- child_allocation.width = MAX (1, widget->allocation.width - (CHILD_SPACING + xthickness) * 2 - ++ child_allocation.width = MAX (1, widget->allocation.width - (child_spacing + xthickness) * 2 - + border_width * 2); +- child_allocation.height = MAX (1, widget->allocation.height - (CHILD_SPACING + ythickness) * 2 - ++ child_allocation.height = MAX (1, widget->allocation.height - (child_spacing + ythickness) * 2 - + border_width * 2); + ++#ifdef OSSO_FONT_HACK ++ { ++ gint child_offset_y; ++ ++ gtk_widget_style_get (widget, "child_offset_y", &child_offset_y, NULL); ++ ++ if( GTK_IS_LABEL(GTK_BIN (button)->child) ) ++ { ++ child_allocation.y += child_offset_y; ++ } ++ } ++#endif ++ + if (GTK_WIDGET_CAN_DEFAULT (button)) + { + child_allocation.x += default_border.left; +@@ -1066,7 +1267,14 @@ + gboolean interior_focus; + gint focus_width; + gint focus_pad; +- ++ gint separator_height; ++ gboolean listboxheader; ++ GtkButtonPrivate *priv; ++ ++ g_return_if_fail (GTK_IS_BUTTON (button)); ++ ++ priv = GTK_BUTTON_GET_PRIVATE (button); ++ + if (GTK_WIDGET_DRAWABLE (button)) + { + widget = GTK_WIDGET (button); +@@ -1076,6 +1284,8 @@ + gtk_widget_style_get (GTK_WIDGET (widget), + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, ++ "listboxheader", &listboxheader, ++ "separator-height", &separator_height, + NULL); + + x = widget->allocation.x + border_width; +@@ -1083,13 +1293,55 @@ + width = widget->allocation.width - border_width * 2; + height = widget->allocation.height - border_width * 2; + ++ if (listboxheader) ++ { ++ /* this changes everything! */ ++ PangoLayout *layout; ++ int layout_height; ++ ++ /* construct layout - see get_layout in gtkcellrenderertext.c */ ++ layout = gtk_widget_create_pango_layout (widget, /* use parent treeview instead? */ ++ button->label_text); ++ pango_layout_set_width (layout, -1); ++ pango_layout_get_pixel_size (layout, NULL, &layout_height); ++ ++ /* render text */ ++ gtk_paint_layout (widget->style, ++ widget->window, ++ GTK_STATE_NORMAL, ++ TRUE, ++ area, ++ widget, ++ "listboxheader", ++ x, ++ y, ++ layout); ++ ++ g_object_unref (layout); ++ ++ /* draw separator */ ++ gtk_paint_hline (widget->style, ++ widget->window, ++ GTK_STATE_NORMAL, ++ area, ++ widget, ++ "listboxseparator", ++ area->x - focus_width - focus_pad, ++ area->x + area->width + focus_width + focus_pad, ++ layout_height + separator_height * 2); ++ return; ++ } ++ + if (GTK_WIDGET_HAS_DEFAULT (widget) && + GTK_BUTTON (widget)->relief == GTK_RELIEF_NORMAL) + { +- gtk_paint_box (widget->style, widget->window, ++ /* This comment is here because it's part of the ++ * normal GtkButton ++ */ ++ /* gtk_paint_box (widget->style, widget->window, + GTK_STATE_NORMAL, GTK_SHADOW_IN, + area, widget, "buttondefault", +- x, y, width, height); ++ x, y, width, height); */ + + x += default_border.left; + y += default_border.top; +@@ -1116,7 +1368,7 @@ + GTK_WIDGET_STATE(widget) == GTK_STATE_PRELIGHT) + gtk_paint_box (widget->style, widget->window, + state_type, +- shadow_type, area, widget, "button", ++ shadow_type, area, widget, priv->detail, + x, y, width, height); + + if (GTK_WIDGET_HAS_FOCUS (widget)) +@@ -1151,10 +1403,14 @@ + x += child_displacement_x; + y += child_displacement_y; + } +- ++ /* Comment exists, because it is part of normal GtkButton + gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget), + area, widget, "button", + x, y, width, height); ++ */ ++ gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget), ++ area, widget, priv->detail, ++ x, y, width, height); + } + } + } +@@ -1786,5 +2042,13 @@ + + return priv->image; + } +- +- ++void osso_gtk_button_set_detail_from_attach_flags (GtkButton *button,OssoGtkButtonAttachFlags flags) ++{ ++ g_return_if_fail (GTK_IS_BUTTON (button)); ++ g_object_set (G_OBJECT (button), ++ "automatic_detail", ++ FALSE, ++ "detail", ++ osso_gtk_button_attach_details[flags], ++ NULL); ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkbutton.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkbutton.h.diff new file mode 100644 index 0000000000..4c233f905b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkbutton.h.diff @@ -0,0 +1,23 @@ +--- gtk+-2.6.4/gtk/gtkbutton.h 2004-11-15 22:56:28.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkbutton.h 2005-04-06 16:19:36.264025392 +0300 +@@ -134,6 +134,20 @@ + const gchar *main_detail, + const gchar *default_detail); + ++/* Osso addition : Button attach flags */ ++typedef enum { ++ OSSO_GTK_BUTTON_ATTACH_NORTH = 1 << 0, ++ OSSO_GTK_BUTTON_ATTACH_EAST = 1 << 1, ++ OSSO_GTK_BUTTON_ATTACH_SOUTH = 1 << 2, ++ OSSO_GTK_BUTTON_ATTACH_WEST = 1 << 3, ++ OSSO_GTK_BUTTON_ATTACH_ENUM_END = 1 << 4 ++} OssoGtkButtonAttachFlags; ++ ++extern const gchar *osso_gtk_button_attach_details [OSSO_GTK_BUTTON_ATTACH_ENUM_END]; ++ ++void osso_gtk_button_set_detail_from_attach_flags (GtkButton *button, ++ OssoGtkButtonAttachFlags flags); ++ + #ifdef __cplusplus + } + #endif /* __cplusplus */ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcalendar.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcalendar.c.diff new file mode 100644 index 0000000000..e32c05452d --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcalendar.c.diff @@ -0,0 +1,2464 @@ +--- gtk+-2.6.4/gtk/gtkcalendar.c 2004-11-12 19:51:58.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkcalendar.c 2005-04-06 16:19:36.267024936 +0300 +@@ -169,14 +169,23 @@ + + /*** END OF lib_date routines ********************************************/ + ++/* HILDON: Spacings modified */ ++ ++#define HILDON_ARROW_WIDTH 20 ++#define HILDON_ARROW_HEIGHT 27 ++#define HILDON_ARROW_SEP 5 /* Space between arrows and data */ ++ ++#define HILDON_DAY_WIDTH 26 ++#define HILDON_DAY_HEIGHT 25 ++ + /* Spacing around day/week headers and main area, inside those windows */ + #define CALENDAR_MARGIN 0 + /* Spacing around day/week headers and main area, outside those windows */ +-#define INNER_BORDER 4 ++#define INNER_BORDER 0 /* 4 */ + /* Separation between day headers and main area */ +-#define CALENDAR_YSEP 4 ++#define CALENDAR_YSEP 3 /* 4 */ + /* Separation between week headers and main area */ +-#define CALENDAR_XSEP 4 ++#define CALENDAR_XSEP 6 /* 4 */ + + #define DAY_XSEP 0 /* not really good for small calendar */ + #define DAY_YSEP 0 /* not really good for small calendar */ +@@ -193,6 +202,10 @@ + #define BACKGROUND_COLOR(widget) (& (widget)->style->base[GTK_WIDGET_STATE (widget)]) + #define HIGHLIGHT_BACK_COLOR(widget) (& (widget)->style->mid[GTK_WIDGET_STATE (widget)]) + ++/* Default Min/Max years for hildon calendar */ ++#define HILDON_MIN_YEAR 0 ++#define HILDON_MAX_YEAR 2999 ++ + enum { + ARROW_YEAR_LEFT, + ARROW_YEAR_RIGHT, +@@ -214,6 +227,8 @@ + NEXT_MONTH_SIGNAL, + PREV_YEAR_SIGNAL, + NEXT_YEAR_SIGNAL, ++ ERRONEOUS_DATE_SIGNAL, ++ SELECTED_DATE_SIGNAL, + LAST_SIGNAL + }; + +@@ -238,16 +253,19 @@ + struct _GtkCalendarPrivateData + { + GdkWindow *header_win; ++ GdkWindow *footer_win; /* HILDON: Added below calendar */ + GdkWindow *day_name_win; + GdkWindow *main_win; + GdkWindow *week_win; + GdkWindow *arrow_win[4]; + ++ gint year_before; + guint header_h; + guint day_name_h; + guint main_h; + + guint arrow_state[4]; ++ /* guint arrow_width; This is now defined constant. Even normal Gtk don't allow to change this */ + guint arrow_width; + guint max_month_width; + guint max_year_width; +@@ -271,7 +289,7 @@ + guint dirty_main : 1; + guint dirty_week : 1; + +- guint year_before : 1; ++/* guint year_before : 1;*/ + + guint need_timer : 1; + +@@ -281,6 +299,27 @@ + guint32 timer; + gint click_child; + ++ /* Following variables are for current date */ ++ guint current_day; ++ guint current_month; ++ guint current_year; ++ ++ /* Keep track of day and month ++ * where mouse button was pressed ++ */ ++ guint pressed_day; ++ guint pressed_month; ++ ++ /* Boolean value to indicate if ++ * out of bound day was selected ++ */ ++ gboolean is_bad_day; ++ ++ /* Must check if we are sliding stylus */ ++ gboolean slide_stylus; ++ gint prev_row; ++ gint prev_col; ++ + gint week_start; + + gint drag_start_x; +@@ -336,6 +375,8 @@ + static void gtk_calendar_style_set (GtkWidget *widget, + GtkStyle *previous_style); + static void gtk_calendar_paint_header (GtkWidget *widget); ++static void gtk_calendar_paint_footer (GtkWidget *widget); ++ + static void gtk_calendar_paint_day_names (GtkWidget *widget); + static void gtk_calendar_paint_week_numbers (GtkWidget *widget); + static void gtk_calendar_paint_main (GtkWidget *widget); +@@ -381,7 +422,13 @@ + gint x, + gint y, + guint time); +- ++ ++/* This function was added because we need to mark current day according to ++ * specifications ++ */ ++static void ++gtk_calendar_check_current_date (GtkCalendar *calendar, gint x, gint y); ++ + static char *default_abbreviated_dayname[7]; + static char *default_monthname[12]; + +@@ -461,6 +508,8 @@ + class->next_month = NULL; + class->prev_year = NULL; + class->next_year = NULL; ++ class->erroneous_date = NULL; ++ class->selected_date = NULL; + + g_object_class_install_property (gobject_class, + PROP_YEAR, +@@ -543,6 +592,31 @@ + FALSE, + G_PARAM_READWRITE)); + ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("min-year", ++ P_("Minimum year for calendar"), ++ P_("Set minimum year calendar accepts"), ++ 0, ++ G_MAXINT, ++ HILDON_MIN_YEAR, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("max-year", ++ P_("Maximum year for calendar"), ++ P_("Set max year that calendar accepts"), ++ 0, ++ G_MAXINT, ++ HILDON_MAX_YEAR, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("hildonlike", ++ _("Size request"), ++ _("Size allocate"), ++ FALSE, ++ G_PARAM_READABLE)); ++ + gtk_calendar_signals[MONTH_CHANGED_SIGNAL] = + g_signal_new ("month_changed", + G_OBJECT_CLASS_TYPE (gobject_class), +@@ -599,6 +673,22 @@ + NULL, NULL, + _gtk_marshal_VOID__VOID, + G_TYPE_NONE, 0); ++ gtk_calendar_signals[ERRONEOUS_DATE_SIGNAL] = ++ g_signal_new ("erroneous_date", ++ G_OBJECT_CLASS_TYPE(gobject_class), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET (GtkCalendarClass, erroneous_date), ++ NULL, NULL, ++ _gtk_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ gtk_calendar_signals[SELECTED_DATE_SIGNAL] = ++ g_signal_new ("selected_date", ++ G_OBJECT_CLASS_TYPE(gobject_class), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET (GtkCalendarClass, selected_date), ++ NULL, NULL, ++ _gtk_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); + } + + static void +@@ -611,8 +701,10 @@ + time_t tmp_time; + GtkWidget *widget; + GtkCalendarPrivateData *private_data; +- gchar *year_before; ++/* gchar *year_before;*/ + gchar *week_start; ++/* gint row; ++ gint col; */ + + widget = GTK_WIDGET (calendar); + GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS); +@@ -645,16 +737,29 @@ + for (i=0;i<31;i++) + calendar->marked_date[i] = FALSE; + calendar->num_marked_dates = 0; +- calendar->selected_day = tm->tm_mday; +- ++ calendar->selected_day = tm->tm_mday; ++ + calendar->display_flags = ( GTK_CALENDAR_SHOW_HEADING | + GTK_CALENDAR_SHOW_DAY_NAMES ); + ++ /* Hildon: we should mark current day and we need to store current date */ ++ private_data->current_day = tm->tm_mday; ++ private_data->current_month = tm->tm_mon; ++ private_data->current_year = tm->tm_year + 1900; ++ ++ /* Hildon: following lines are for stylus sliding */ ++ private_data->slide_stylus = FALSE; ++ private_data->prev_row = -1; ++ private_data->prev_col = -1; ++ ++ /* Hildon: is_bad_day indicate if day was selected out of legal range */ ++ private_data->is_bad_day = FALSE; ++ + calendar->highlight_row = -1; +- calendar->highlight_col = -1; ++ calendar->highlight_col = -1; + + calendar->focus_row = -1; +- calendar->focus_col = -1; ++ calendar->focus_col = -1; + calendar->xor_gc = NULL; + + private_data->max_year_width = 0; +@@ -667,7 +772,7 @@ + private_data->max_label_char_ascent = 0; + private_data->max_label_char_descent = 0; + +- private_data->arrow_width = 10; ++/* private_data->arrow_width = 10;*/ + + private_data->freeze_count = 0; + +@@ -686,6 +791,7 @@ + gtk_drag_dest_set (widget, 0, NULL, 0, GDK_ACTION_COPY); + gtk_drag_dest_add_text_targets (widget); + ++#if 0 + private_data->year_before = 0; + + /* Translate to calendar:YM if you want years to be displayed +@@ -702,11 +808,13 @@ + private_data->year_before = 1; + else if (strcmp (year_before, "calendar:MY") != 0) + g_warning ("Whoever translated calendar:MY did so wrongly.\n"); ++#endif + + /* Translate to calendar:week_start:0 if you want Sunday to be the + * first day of the week to calendar:week_start:1 if you want Monday + * to be the first day of the week, and so on. + */ ++ + week_start = _("calendar:week_start:0"); + + if (strncmp (week_start, "calendar:week_start:", 20) == 0) +@@ -752,7 +860,7 @@ + + return column; + } +- ++#if 0 + static gint + row_height (GtkCalendar *calendar) + { +@@ -760,7 +868,7 @@ + - ((calendar->display_flags & GTK_CALENDAR_SHOW_DAY_NAMES) + ? CALENDAR_YSEP : CALENDAR_MARGIN)) / 6; + } +- ++#endif + + /* row_from_y: returns the row 0-5 that the + * y pixel of the xwindow is in */ +@@ -769,16 +877,15 @@ + gint event_y) + { + gint r, row; +- gint height; ++ /*gint height;*/ + gint y_top, y_bottom; + +- height = row_height (calendar); + row = -1; + + for (r = 0; r < 6; r++) + { + y_top = top_y_for_row (calendar, r); +- y_bottom = y_top + height; ++ y_bottom = y_top + HILDON_DAY_HEIGHT /*height*/; + + if (event_y >= y_top && event_y < y_bottom) + { +@@ -796,16 +903,16 @@ + { + gint width; + gint x_left; +- ++ + if (gtk_widget_get_direction (GTK_WIDGET (calendar)) == GTK_TEXT_DIR_RTL) + column = 6 - column; +- ++ + width = GTK_CALENDAR_PRIVATE_DATA (calendar)->day_width; + if (calendar->display_flags & GTK_CALENDAR_SHOW_WEEK_NUMBERS) + x_left = CALENDAR_XSEP + (width + DAY_XSEP) * column; + else + x_left = CALENDAR_MARGIN + (width + DAY_XSEP) * column; +- ++ + return x_left; + } + +@@ -818,25 +925,41 @@ + + return (GTK_CALENDAR_PRIVATE_DATA (calendar)->main_h + - (CALENDAR_MARGIN + (6 - row) +- * row_height (calendar))); ++ * HILDON_DAY_HEIGHT)); + } + + static void + gtk_calendar_set_month_prev (GtkCalendar *calendar) + { + gint month_len; +- ++ gint min_year; ++ gboolean hildonlike; ++ ++ gtk_widget_style_get (GTK_WIDGET (calendar), "hildonlike", &hildonlike, ++ "min-year", &min_year, NULL); ++ + if (calendar->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE) + return; + + if (calendar->month == 0) +- { +- calendar->month = 11; +- calendar->year--; +- } +- else +- calendar->month--; +- ++ { ++ if (hildonlike) ++ { ++ if (calendar->year > min_year) ++ { ++ calendar->month = 11; ++ calendar->year--; ++ } ++ } ++ else ++ { ++ calendar->month = 11; ++ calendar->year--; ++ } ++ } ++ else ++ calendar->month--; ++ + month_len = month_length[leap (calendar->year)][calendar->month + 1]; + + gtk_calendar_freeze (calendar); +@@ -870,17 +993,32 @@ + gtk_calendar_set_month_next (GtkCalendar *calendar) + { + gint month_len; ++ gint max_year; ++ gboolean hildonlike; + + g_return_if_fail (GTK_IS_WIDGET (calendar)); + ++ gtk_widget_style_get (GTK_WIDGET (calendar), "hildonlike", &hildonlike, ++ "max-year", &max_year, NULL); ++ + if (calendar->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE) + return; + +- + if (calendar->month == 11) + { +- calendar->month = 0; +- calendar->year++; ++ if (hildonlike) ++ { ++ if (calendar->year < max_year) ++ { ++ calendar->month = 0; ++ calendar->year++; ++ } ++ } ++ else ++ { ++ calendar->month = 0; ++ calendar->year++; ++ } + } + else + calendar->month++; +@@ -912,10 +1050,22 @@ + gtk_calendar_set_year_prev (GtkCalendar *calendar) + { + gint month_len; +- ++ gint min_year; ++ gboolean hildonlike; ++ + g_return_if_fail (GTK_IS_WIDGET (calendar)); + +- calendar->year--; ++ gtk_widget_style_get (GTK_WIDGET (calendar), "hildonlike", &hildonlike, ++ "min-year", &min_year, NULL); ++ ++ if (hildonlike) ++ { ++ if (calendar->year > min_year) ++ calendar->year--; ++ } ++ else ++ calendar->year--; ++ + gtk_calendar_freeze (calendar); + gtk_calendar_compute_days (calendar); + g_signal_emit (calendar, +@@ -944,14 +1094,26 @@ + { + gint month_len; + GtkWidget *widget; ++ gint max_year; ++ gboolean hildonlike; + + g_return_if_fail (GTK_IS_WIDGET (calendar)); + + widget = GTK_WIDGET (calendar); ++ ++ gtk_widget_style_get(widget, "hildonlike", &hildonlike, ++ "max-year", &max_year, NULL); + + gtk_calendar_freeze (calendar); + +- calendar->year++; ++ if (hildonlike) ++ { ++ if (calendar->year < max_year) ++ calendar->year++; ++ } ++ else ++ calendar->year++; ++ + gtk_calendar_compute_days (calendar); + g_signal_emit (calendar, + gtk_calendar_signals[NEXT_YEAR_SIGNAL], +@@ -969,7 +1131,6 @@ + } + else + gtk_calendar_select_day (calendar, calendar->selected_day); +- + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); + } +@@ -984,6 +1145,8 @@ + gint row, col; + gint day_month; + gint day; ++ gint max_year, min_year; ++ gboolean hildonlike; + + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); +@@ -997,20 +1160,36 @@ + /* If row or column isn't found, just return. */ + if (row == -1 || col == -1) + return; +- +- day_month = calendar->day_month[row][col]; + +- if (event->type == GDK_BUTTON_PRESS) ++ gtk_widget_style_get (GTK_WIDGET (calendar), "hildonlike", &hildonlike, ++ "max-year", &max_year, "min-year", &min_year, NULL); ++ day_month = calendar->day_month[row][col]; ++ ++ if (hildonlike) ++ { ++ if ((calendar->year == min_year && calendar->month == 0 && day_month == MONTH_PREV) ++ || (calendar->year == max_year && calendar->month == 11 && day_month == MONTH_NEXT)) ++ { ++ private_data->is_bad_day = TRUE; ++ g_signal_emit (calendar, gtk_calendar_signals[ERRONEOUS_DATE_SIGNAL], 0); ++ return; ++ } ++ } ++ if (event->type == (hildonlike ? GDK_BUTTON_RELEASE : GDK_BUTTON_PRESS)) + { + day = calendar->day[row][col]; + + if (day_month == MONTH_PREV) +- gtk_calendar_set_month_prev (calendar); ++ { ++ gtk_calendar_set_month_prev (calendar); ++ } + else if (day_month == MONTH_NEXT) +- gtk_calendar_set_month_next (calendar); ++ { ++ gtk_calendar_set_month_next (calendar); ++ } + + if (!GTK_WIDGET_HAS_FOCUS (widget)) +- gtk_widget_grab_focus (widget); ++ gtk_widget_grab_focus (widget); + + if (event->button == 1) + { +@@ -1025,9 +1204,8 @@ + { + private_data->in_drag = 0; + if (day_month == MONTH_CURRENT) +- g_signal_emit (calendar, +- gtk_calendar_signals[DAY_SELECTED_DOUBLE_CLICK_SIGNAL], +- 0); ++ g_signal_emit (calendar, ++ gtk_calendar_signals[DAY_SELECTED_DOUBLE_CLICK_SIGNAL], 0); + } + } + +@@ -1039,18 +1217,18 @@ + GdkWindowAttr attributes; + gint attributes_mask; + gint i; +- gboolean year_left; ++ /*gboolean year_left;*/ + + g_return_if_fail (GTK_IS_CALENDAR (widget)); + + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); +- ++/* + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) + year_left = private_data->year_before; + else + year_left = !private_data->year_before; +- ++*/ + /* Arrow windows ------------------------------------- */ + if (! (calendar->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE) + && (calendar->display_flags & GTK_CALENDAR_SHOW_HEADING)) +@@ -1063,10 +1241,26 @@ + | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); + attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; +- attributes.y = 3; +- attributes.width = private_data->arrow_width; +- attributes.height = private_data->header_h - 7; +- for (i = 0; i < 4; i++) ++ attributes.y = 0; ++ attributes.width = HILDON_ARROW_WIDTH; ++ attributes.height = HILDON_ARROW_HEIGHT; ++ ++ attributes.x = (widget->allocation.width - private_data->max_year_width) / 2 - HILDON_ARROW_WIDTH - HILDON_ARROW_SEP; ++ private_data->arrow_win[ARROW_YEAR_LEFT] = gdk_window_new (private_data->header_win, ++ &attributes, attributes_mask); ++ ++ attributes.x = (widget->allocation.width + private_data->max_year_width) / 2 + HILDON_ARROW_SEP; ++ private_data->arrow_win[ARROW_YEAR_RIGHT] = gdk_window_new (private_data->header_win, ++ &attributes, attributes_mask); ++ attributes.x = (widget->allocation.width - private_data->max_month_width) / 2 - HILDON_ARROW_WIDTH - HILDON_ARROW_SEP; ++ private_data->arrow_win[ARROW_MONTH_LEFT] = gdk_window_new (private_data->footer_win, ++ &attributes, attributes_mask); ++ attributes.x = (widget->allocation.width + private_data->max_month_width) / 2 + HILDON_ARROW_SEP; ++ private_data->arrow_win[ARROW_MONTH_RIGHT] = gdk_window_new (private_data->footer_win, ++ &attributes, attributes_mask); ++ ++/* ++for (i = 0; i < 4; i++) + { + switch (i) + { +@@ -1105,7 +1299,10 @@ + } + private_data->arrow_win[i] = gdk_window_new (private_data->header_win, + &attributes, +- attributes_mask); ++ attributes_mask);*/ ++ ++ for (i = 0; i < 4; i++) ++ { + if (GTK_WIDGET_IS_SENSITIVE (widget)) + private_data->arrow_state[i] = GTK_STATE_NORMAL; + else +@@ -1145,23 +1342,33 @@ + attributes.colormap = gtk_widget_get_colormap (widget); + attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK; + attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; +- attributes.x = widget->style->xthickness; +- attributes.y = widget->style->ythickness; +- attributes.width = widget->allocation.width - 2 * attributes.x; +- attributes.height = private_data->header_h - 2 * attributes.y; ++ attributes.x = 0 /*widget->style->xthickness*/; ++ attributes.y = 0 /*widget->style->ythickness*/; ++ attributes.width = widget->allocation.width; /* - 2 * attributes.x */; ++ attributes.height = HILDON_ARROW_HEIGHT /*private_data->header_h - 2 * attributes.y*/; + private_data->header_win = gdk_window_new (widget->window, + &attributes, attributes_mask); +- ++ ++ attributes.y = HILDON_ARROW_HEIGHT + 2 * CALENDAR_YSEP + private_data->main_h + private_data->day_name_h; ++ ++ private_data->footer_win = gdk_window_new(widget->window, ++ &attributes, attributes_mask); ++ + gdk_window_set_background (private_data->header_win, +- HEADER_BG_COLOR (GTK_WIDGET (calendar))); ++ HEADER_BG_COLOR (widget)); ++ gdk_window_set_background (private_data->footer_win, ++ HEADER_BG_COLOR (widget)); ++ + gdk_window_show (private_data->header_win); ++ gdk_window_show (private_data->footer_win); + gdk_window_set_user_data (private_data->header_win, widget); +- ++ gdk_window_set_user_data (private_data->footer_win, widget); + } + else + { + private_data->header_win = NULL; +- } ++ private_data->footer_win = NULL; ++ } + gtk_calendar_realize_arrows (widget); + } + +@@ -1172,7 +1379,7 @@ + GtkCalendarPrivateData *private_data; + GdkWindowAttr attributes; + gint attributes_mask; +- ++ + g_return_if_fail (GTK_IS_CALENDAR (widget)); + + calendar = GTK_CALENDAR (widget); +@@ -1187,18 +1394,16 @@ + attributes.colormap = gtk_widget_get_colormap (widget); + attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK; + attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; +- attributes.x = (widget->style->xthickness + INNER_BORDER); +- attributes.y = private_data->header_h + (widget->style->ythickness +- + INNER_BORDER); +- attributes.width = (widget->allocation.width +- - (widget->style->xthickness + INNER_BORDER) +- * 2); ++ attributes.x = /*private_data->week_width*/ (widget->style->xthickness + INNER_BORDER); ++ attributes.y = private_data->header_h; ++ attributes.width = widget->allocation.width - attributes.x; + attributes.height = private_data->day_name_h; + private_data->day_name_win = gdk_window_new (widget->window, + &attributes, + attributes_mask); + gdk_window_set_background (private_data->day_name_win, +- BACKGROUND_COLOR ( GTK_WIDGET ( calendar))); ++ BACKGROUND_COLOR ( GTK_WIDGET (calendar))); ++ + gdk_window_show (private_data->day_name_win); + gdk_window_set_user_data (private_data->day_name_win, widget); + } +@@ -1215,7 +1420,7 @@ + GtkCalendarPrivateData *private_data; + GdkWindowAttr attributes; + gint attributes_mask; +- ++ + g_return_if_fail (GTK_IS_CALENDAR (widget)); + + calendar = GTK_CALENDAR (widget); +@@ -1231,15 +1436,15 @@ + attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK; + + attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; +- attributes.x = widget->style->xthickness + INNER_BORDER; +- attributes.y = (private_data->header_h + private_data->day_name_h +- + (widget->style->ythickness + INNER_BORDER)); +- attributes.width = private_data->week_width; +- attributes.height = private_data->main_h; ++ attributes.x = 0 /*widget->style->xthickness + INNER_BORDER*/; ++ attributes.y = private_data->header_h; ++ /*+ (widget->style->ythickness + INNER_BORDER))*/; ++ attributes.width = HILDON_DAY_WIDTH; ++ attributes.height = private_data->main_h + private_data->day_name_h; + private_data->week_win = gdk_window_new (widget->window, +- &attributes, attributes_mask); ++ &attributes, attributes_mask); + gdk_window_set_background (private_data->week_win, +- BACKGROUND_COLOR (GTK_WIDGET (calendar))); ++ BACKGROUND_COLOR (GTK_WIDGET (calendar))); + gdk_window_show (private_data->week_win); + gdk_window_set_user_data (private_data->week_win, widget); + } +@@ -1318,7 +1523,6 @@ + GDK_GC_FOREGROUND | + GDK_GC_FUNCTION); + } +- + static void + gtk_calendar_unrealize (GtkWidget *widget) + { +@@ -1343,7 +1547,10 @@ + gdk_window_set_user_data (private_data->header_win, NULL); + gdk_window_destroy (private_data->header_win); + private_data->header_win = NULL; +- } ++ gdk_window_set_user_data (private_data->footer_win, NULL); ++ gdk_window_destroy (private_data->footer_win); ++ private_data->footer_win = NULL; ++ } + + if (private_data->week_win) + { +@@ -1382,10 +1589,10 @@ + PangoLayout *layout; + PangoRectangle logical_rect; + +- gint height; ++ /*gint height;*/ + gint i; + gchar buffer[255]; +- gint calendar_margin = CALENDAR_MARGIN; ++ /*gint calendar_margin = CALENDAR_MARGIN;*/ + gint header_width, main_width; + gint max_header_height = 0; + gint focus_width; +@@ -1401,20 +1608,20 @@ + layout = gtk_widget_create_pango_layout (widget, NULL); + + /* +- * Calculate the requisition width for the widget. ++ * Calculate the requisition width for the widget. + */ + + /* Header width */ +- ++ + if (calendar->display_flags & GTK_CALENDAR_SHOW_HEADING) +- { ++ { + private_data->max_month_width = 0; + for (i = 0; i < 12; i++) + { + pango_layout_set_text (layout, default_monthname[i], -1); + pango_layout_get_pixel_extents (layout, NULL, &logical_rect); + private_data->max_month_width = MAX (private_data->max_month_width, +- logical_rect.width + 8); ++ logical_rect.width +8 ); + max_header_height = MAX (max_header_height, logical_rect.height); + } + private_data->max_year_width = 0; +@@ -1427,13 +1634,13 @@ + logical_rect.width + 8); + max_header_height = MAX (max_header_height, logical_rect.height); + } +- } ++ } + else + { + private_data->max_month_width = 0; + private_data->max_year_width = 0; + } +- ++ + if (calendar->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE) + header_width = (private_data->max_month_width + + private_data->max_year_width +@@ -1494,45 +1701,30 @@ + + (private_data->max_week_char_width + ? private_data->max_week_char_width * 2 + (focus_padding + focus_width) * 2 + CALENDAR_XSEP * 2 + : 0)); +- +- ++ + requisition->width = MAX (header_width, main_width + INNER_BORDER * 2) + widget->style->xthickness * 2; ++ /* FIXME: header_width is broken, when Calendar is themed ! ++ * Next line is workaround for this bug ++ */ ++ requisition->width = (main_width + INNER_BORDER * 2) + widget->style->xthickness * 2; + + /* + * Calculate the requisition height for the widget. ++ * This is Hildon calculation + */ +- ++ + if (calendar->display_flags & GTK_CALENDAR_SHOW_HEADING) +- { +- private_data->header_h = (max_header_height + CALENDAR_YSEP * 2); +- } ++ private_data->header_h = HILDON_ARROW_HEIGHT + CALENDAR_YSEP; + else +- { + private_data->header_h = 0; +- } +- ++ + if (calendar->display_flags & GTK_CALENDAR_SHOW_DAY_NAMES) +- { +- private_data->day_name_h = (private_data->max_label_char_ascent +- + private_data->max_label_char_descent +- + 2 * (focus_padding + focus_width) + calendar_margin); +- calendar_margin = CALENDAR_YSEP; +- } ++ private_data->day_name_h = HILDON_DAY_HEIGHT; + else +- { + private_data->day_name_h = 0; +- } + +- private_data->main_h = (CALENDAR_MARGIN + calendar_margin +- + 6 * (private_data->max_day_char_ascent +- + private_data->max_day_char_descent +- + 2 * (focus_padding + focus_width)) +- + DAY_YSEP * 5); +- +- height = (private_data->header_h + private_data->day_name_h +- + private_data->main_h); +- +- requisition->height = height + (widget->style->ythickness + INNER_BORDER) * 2; ++ private_data->main_h = 6 * HILDON_DAY_HEIGHT; ++ requisition->height = 2 * private_data->header_h + private_data->day_name_h + private_data->main_h; + + g_object_unref (layout); + } +@@ -1544,7 +1736,7 @@ + GtkCalendar *calendar; + GtkCalendarPrivateData *private_data; + gint xthickness = widget->style->xthickness; +- gint ythickness = widget->style->xthickness; ++ /*gint ythickness = widget->style->xthickness;*/ + gboolean year_left; + + widget->allocation = *allocation; +@@ -1569,58 +1761,24 @@ + } + else + { +- private_data->day_width = (allocation->width ++ private_data->day_width = (allocation->width + - (xthickness + INNER_BORDER) * 2 + - (CALENDAR_MARGIN * 2) + - (DAY_XSEP * 6))/7; + private_data->week_width = 0; + } +- ++ + if (GTK_WIDGET_REALIZED (widget)) + { + gdk_window_move_resize (widget->window, +- allocation->x, allocation->y, +- allocation->width, allocation->height); ++ widget->allocation.x, widget->allocation.y, ++ widget->allocation.width, widget->allocation.height); + if (private_data->header_win) + gdk_window_move_resize (private_data->header_win, +- xthickness, ythickness, +- allocation->width - 2 * xthickness, private_data->header_h); +- if (private_data->arrow_win[ARROW_MONTH_LEFT]) +- { +- if (year_left) +- gdk_window_move_resize (private_data->arrow_win[ARROW_MONTH_LEFT], +- (allocation->width - 2 * xthickness +- - (3 + 2*private_data->arrow_width +- + private_data->max_month_width)), +- 3, +- private_data->arrow_width, +- private_data->header_h - 7); +- else +- gdk_window_move_resize (private_data->arrow_win[ARROW_MONTH_LEFT], +- 3, 3, +- private_data->arrow_width, +- private_data->header_h - 7); +- } +- if (private_data->arrow_win[ARROW_MONTH_RIGHT]) +- { +- if (year_left) +- gdk_window_move_resize (private_data->arrow_win[ARROW_MONTH_RIGHT], +- (allocation->width - 2 * xthickness +- - 3 - private_data->arrow_width), +- 3, +- private_data->arrow_width, +- private_data->header_h - 7); +- else +- gdk_window_move_resize (private_data->arrow_win[ARROW_MONTH_RIGHT], +- (private_data->arrow_width +- + private_data->max_month_width), +- 3, +- private_data->arrow_width, +- private_data->header_h - 7); +- } ++ 0, 0, widget->allocation.width, HILDON_ARROW_HEIGHT); + if (private_data->arrow_win[ARROW_YEAR_LEFT]) + { +- if (year_left) ++ /* if (year_left) + gdk_window_move_resize (private_data->arrow_win[ARROW_YEAR_LEFT], + 3, 3, + private_data->arrow_width, +@@ -1632,11 +1790,14 @@ + + private_data->max_year_width)), + 3, + private_data->arrow_width, +- private_data->header_h - 7); ++ private_data->header_h - 7);*/ ++ ++ gdk_window_move (private_data->arrow_win[ARROW_YEAR_LEFT], ++ (widget->allocation.width - private_data->max_year_width) / 2 - HILDON_ARROW_WIDTH - HILDON_ARROW_SEP, 0); + } + if (private_data->arrow_win[ARROW_YEAR_RIGHT]) + { +- if (year_left) ++/* if (year_left) + gdk_window_move_resize (private_data->arrow_win[ARROW_YEAR_RIGHT], + (private_data->arrow_width + + private_data->max_year_width), +@@ -1649,55 +1810,102 @@ + - 3 - private_data->arrow_width), + 3, + private_data->arrow_width, ++ private_data->header_h - 7);*/ ++ gdk_window_move (private_data->arrow_win[ARROW_YEAR_RIGHT], ++ (widget->allocation.width + private_data->max_year_width) / 2 + HILDON_ARROW_SEP, 0); ++ } ++ if (private_data->footer_win) ++ gdk_window_move_resize (private_data->footer_win, ++ 0, private_data->header_h + private_data->day_name_h + private_data->main_h + CALENDAR_YSEP, ++ widget->allocation.width, HILDON_ARROW_HEIGHT); ++ ++ if (private_data->arrow_win[ARROW_MONTH_LEFT]) ++ { ++/* if (year_left) ++ gdk_window_move_resize (private_data->arrow_win[ARROW_MONTH_LEFT], ++ (allocation->width - 2 * xthickness ++ - (3 + 2*private_data->arrow_width ++ + private_data->max_month_width)), ++ 3, ++ private_data->arrow_width, + private_data->header_h - 7); ++ else ++ gdk_window_move_resize (private_data->arrow_win[ARROW_MONTH_LEFT], ++ 3, 3, ++ private_data->arrow_width, ++ private_data->header_h - 7); ++*/ ++ ++ gdk_window_move (private_data->arrow_win[ARROW_MONTH_LEFT], ++ (widget->allocation.width - private_data->max_month_width) / 2 - HILDON_ARROW_WIDTH - HILDON_ARROW_SEP, 0); ++ } ++ if (private_data->arrow_win[ARROW_MONTH_RIGHT]) ++ { ++/* if (year_left) ++ gdk_window_move_resize (private_data->arrow_win[ARROW_MONTH_RIGHT], ++ (allocation->width - 2 * xthickness ++ - 3 - private_data->arrow_width), ++ 3, ++ private_data->arrow_width, ++ private_data->header_h - 7); ++ else ++ gdk_window_move_resize (private_data->arrow_win[ARROW_MONTH_RIGHT], ++ (private_data->arrow_width ++ + private_data->max_month_width), ++ 3, ++ private_data->arrow_width, ++ private_data->header_h - 7);*/ ++ gdk_window_move (private_data->arrow_win[ARROW_MONTH_RIGHT], ++ (widget->allocation.width + private_data->max_month_width) / 2 + HILDON_ARROW_SEP, 0); + } ++ ++ + if (private_data->day_name_win) + gdk_window_move_resize (private_data->day_name_win, +- xthickness + INNER_BORDER, +- private_data->header_h + (widget->style->ythickness + INNER_BORDER), +- allocation->width - (xthickness + INNER_BORDER) * 2, ++ private_data->week_width, /*xthickness + INNER_BORDER*/ ++ private_data->header_h /*+ (widget->style->ythickness + INNER_BORDER)*/, ++ widget->allocation.width - private_data->week_width /*- (xthickness + INNER_BORDER) * 2*/, + private_data->day_name_h); + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) + { + if (private_data->week_win) + gdk_window_move_resize (private_data->week_win, +- (xthickness + INNER_BORDER), +- private_data->header_h + private_data->day_name_h +- + (widget->style->ythickness + INNER_BORDER), +- private_data->week_width, +- private_data->main_h); ++ 0 /*(xthickness + INNER_BORDER)*/, ++ private_data->header_h /*+ (widget->style->ythickness + INNER_BORDER)*/, ++ HILDON_DAY_WIDTH, ++ private_data->main_h + private_data->day_name_h); + gdk_window_move_resize (private_data->main_win, +- private_data->week_width + (xthickness + INNER_BORDER), ++ private_data->week_width /* + (xthickness + INNER_BORDER)*/, + private_data->header_h + private_data->day_name_h +- + (widget->style->ythickness + INNER_BORDER), +- allocation->width +- - private_data->week_width +- - (xthickness + INNER_BORDER) * 2, ++ /*+ (widget->style->ythickness + INNER_BORDER)*/, ++ widget->allocation.width - private_data->week_width ++ /*- (xthickness + INNER_BORDER) * 2*/, + private_data->main_h); + } + else + { + gdk_window_move_resize (private_data->main_win, +- (xthickness + INNER_BORDER), ++ 0 /*(xthickness + INNER_BORDER)*/, + private_data->header_h + private_data->day_name_h +- + (widget->style->ythickness + INNER_BORDER), +- allocation->width ++ /*+ (widget->style->ythickness + INNER_BORDER)*/, ++ widget->allocation.width + - private_data->week_width +- - (xthickness + INNER_BORDER) * 2, ++ /*- (xthickness + INNER_BORDER) * 2*/, + private_data->main_h); + if (private_data->week_win) + gdk_window_move_resize (private_data->week_win, +- allocation->width ++ widget->allocation.width + - private_data->week_width +- - (xthickness + INNER_BORDER), ++ /*- (xthickness + INNER_BORDER)*/, + private_data->header_h + private_data->day_name_h +- + (widget->style->ythickness + INNER_BORDER), ++ /*+ (widget->style->ythickness + INNER_BORDER)*/, + private_data->week_width, + private_data->main_h); + } + } + } + ++ + static gboolean + gtk_calendar_expose (GtkWidget *widget, + GdkEventExpose *event) +@@ -1711,22 +1919,24 @@ + if (GTK_WIDGET_DRAWABLE (widget)) + { + if (event->window == private_data->main_win) +- gtk_calendar_paint_main (widget); ++ gtk_calendar_paint_main (widget); + + if (event->window == private_data->header_win) +- gtk_calendar_paint_header (widget); +- +- if (event->window == private_data->day_name_win) +- gtk_calendar_paint_day_names (widget); +- +- if (event->window == private_data->week_win) +- gtk_calendar_paint_week_numbers (widget); +- if (event->window == widget->window) ++ gtk_calendar_paint_header (widget); ++ if (event->window == private_data->footer_win) ++ gtk_calendar_paint_footer(widget); ++ ++ if (event->window == private_data->day_name_win) ++ gtk_calendar_paint_day_names (widget); ++ ++ if (event->window == private_data->week_win) ++ gtk_calendar_paint_week_numbers (widget); ++/* if (event->window == widget->window) + { + gtk_paint_shadow (widget->style, widget->window, GTK_WIDGET_STATE (widget), + GTK_SHADOW_IN, NULL, widget, "calendar", + 0, 0, widget->allocation.width, widget->allocation.height); +- } ++ }*/ + } + + return FALSE; +@@ -1740,12 +1950,12 @@ + char buffer[255]; + int x, y; + gint header_width, cal_height; +- gint max_month_width; ++/* gint max_month_width;*/ + gint max_year_width; + GtkCalendarPrivateData *private_data; + PangoLayout *layout; + PangoRectangle logical_rect; +- gboolean year_left; ++/* gboolean year_left;*/ + + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); +@@ -1755,29 +1965,29 @@ + private_data->dirty_header = 1; + return; + } +- ++/* + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) + year_left = private_data->year_before; + else + year_left = !private_data->year_before; +- ++*/ + private_data->dirty_header = 0; + gc = calendar->gc; + + /* Clear window */ + gdk_window_clear (private_data->header_win); + +- header_width = widget->allocation.width - 2 * widget->style->xthickness; ++ header_width = widget->allocation.width /*- 2 * widget->style->xthickness*/; + cal_height = widget->allocation.height; + +- max_month_width = private_data->max_month_width; ++ /*max_month_width = private_data->max_month_width;*/ + max_year_width = private_data->max_year_width; + +- gdk_gc_set_foreground (gc, BACKGROUND_COLOR (GTK_WIDGET (calendar))); +- gtk_paint_shadow (widget->style, private_data->header_win, ++/* gdk_gc_set_foreground (gc, BACKGROUND_COLOR (GTK_WIDGET (calendar)));*/ ++ /*gtk_paint_shadow (widget->style, private_data->header_win, + GTK_STATE_NORMAL, GTK_SHADOW_OUT, + NULL, widget, "calendar", +- 0, 0, header_width, private_data->header_h); ++ 0, 0, header_width, private_data->header_h);*/ + + + g_snprintf (buffer, sizeof (buffer), "%d", calendar->year); +@@ -1785,55 +1995,118 @@ + pango_layout_get_pixel_extents (layout, NULL, &logical_rect); + + /* Draw title */ +- y = (private_data->header_h - logical_rect.height) / 2; +- ++ y = (HILDON_ARROW_HEIGHT /*private_data->header_h*/ - logical_rect.height) / 2; ++ x = (widget->allocation.width - logical_rect.width) / 2; ++ + /* Draw year and its arrows */ +- ++#if 0 + if (calendar->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE) +- if (year_left) +- x = 3 + (max_year_width - logical_rect.width)/2; +- else ++/* if (year_left) */ ++ x = /*3+*/(widget->allocation.width - logical_rect.width)/2; ++/* else + x = header_width - (3 + max_year_width +- - (max_year_width - logical_rect.width)/2); ++ - (max_year_width - logical_rect.width)/2);*/ + else +- if (year_left) +- x = 3 + private_data->arrow_width + (max_year_width - logical_rect.width)/2; +- else ++/* if (year_left)*/ ++ x = 3 + HILDON_ARROW_WIDTH /*private_data->arrow_width*/ + (max_year_width - logical_rect.width)/2; ++ /* else + x = header_width - (3 + private_data->arrow_width + max_year_width + - (max_year_width - logical_rect.width)/2); ++ */ ++ #endif ++ gdk_gc_set_foreground (gc, HEADER_FG_COLOR (GTK_WIDGET (calendar))); ++ gdk_draw_layout (private_data->header_win, gc, x, y, layout); ++ ++ gtk_calendar_paint_arrow (widget, ARROW_YEAR_LEFT); ++ gtk_calendar_paint_arrow (widget, ARROW_YEAR_RIGHT); ++ ++ g_object_unref (layout); ++} ++ ++static void ++gtk_calendar_paint_footer (GtkWidget *widget) ++{ ++GtkCalendar *calendar; ++ GdkGC *gc; ++ char buffer[255]; ++ int x, y; ++ gint header_width, cal_height; ++/* gint max_month_width; ++ gint max_year_width;*/ ++ GtkCalendarPrivateData *private_data; ++ PangoLayout *layout; ++ PangoRectangle logical_rect; ++/* gboolean year_left;*/ ++ ++ calendar = GTK_CALENDAR (widget); ++ private_data = GTK_CALENDAR_PRIVATE_DATA (widget); ++ ++ if (private_data->freeze_count) ++ { ++ private_data->dirty_header = 1; ++ return; ++ } ++/* ++ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) ++ year_left = private_data->year_before; ++ else ++ year_left = !private_data->year_before; ++*/ ++ private_data->dirty_header = 0; ++ gc = calendar->gc; + ++ /* Clear window */ ++ gdk_window_clear (private_data->footer_win); ++ ++ header_width = widget->allocation.width - 2 * widget->style->xthickness; ++ cal_height = widget->allocation.height; ++ ++ /*max_month_width = private_data->max_month_width;*/ ++ /*max_year_width = private_data->max_year_width;*/ ++ ++ /*gdk_gc_set_foreground (gc, BACKGROUND_COLOR (GTK_WIDGET (calendar)));*/ ++ /*gtk_paint_shadow (widget->style, private_data->footer_win, ++ GTK_STATE_NORMAL, GTK_SHADOW_OUT, ++ NULL, widget, "calendar", ++ 0, 0, header_width, private_data->header_h);*/ + +- gdk_gc_set_foreground (gc, HEADER_FG_COLOR (GTK_WIDGET (calendar))); +- gdk_draw_layout (private_data->header_win, gc, x, y, layout); + ++ /*g_snprintf (buffer, sizeof (buffer), "%d", calendar->year);*/ ++ ++/* pango_layout_get_pixel_extents (layout, NULL, &logical_rect);*/ ++ ++ /* Draw title */ ++ ++ + /* Draw month */ + g_snprintf (buffer, sizeof (buffer), "%s", default_monthname[calendar->month]); +- pango_layout_set_text (layout, buffer, -1); ++ layout = gtk_widget_create_pango_layout (widget, buffer); + pango_layout_get_pixel_extents (layout, NULL, &logical_rect); +- ++#if 0 + if (calendar->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE) +- if (year_left) ++/* if (year_left)*/ + x = header_width - (3 + max_month_width + - (max_month_width - logical_rect.width)/2); +- else +- x = 3 + (max_month_width - logical_rect.width) / 2; ++ /* else ++ x = 3 + (max_month_width - logical_rect.width) / 2;*/ + else +- if (year_left) +- x = header_width - (3 + private_data->arrow_width + max_month_width ++/* if (year_left)*/ ++ x = header_width - (3 + HILDON_ARROW_WIDTH /*private_data->arrow_width*/ + max_month_width + - (max_month_width - logical_rect.width)/2); +- else ++/* else + x = 3 + private_data->arrow_width + (max_month_width - logical_rect.width)/2; ++*/ ++#endif ++ x = (widget->allocation.width - logical_rect.width) / 2; ++ y = (HILDON_ARROW_HEIGHT - logical_rect.height) / 2; ++ ++ gdk_gc_set_foreground (gc, HEADER_FG_COLOR(GTK_WIDGET (calendar))); ++ gdk_draw_layout (private_data->footer_win, gc, x, y, layout); + +- gdk_draw_layout (private_data->header_win, gc, x, y, layout); +- +- gdk_gc_set_foreground (gc, BACKGROUND_COLOR (GTK_WIDGET (calendar))); +- + gtk_calendar_paint_arrow (widget, ARROW_MONTH_LEFT); + gtk_calendar_paint_arrow (widget, ARROW_MONTH_RIGHT); +- gtk_calendar_paint_arrow (widget, ARROW_YEAR_LEFT); +- gtk_calendar_paint_arrow (widget, ARROW_YEAR_RIGHT); + +- g_object_unref (layout); ++ g_object_unref(layout); + } + + static void +@@ -1851,15 +2124,17 @@ + GtkCalendarPrivateData *private_data; + gint focus_padding; + gint focus_width; ++ gboolean hildonlike; + + g_return_if_fail (GTK_IS_CALENDAR (widget)); + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); + gc = calendar->gc; +- ++ + gtk_widget_style_get (GTK_WIDGET (widget), + "focus-line-width", &focus_width, + "focus-padding", &focus_padding, ++ "hildonlike", &hildonlike, + NULL); + /* + * Handle freeze/thaw functionality +@@ -1887,18 +2162,22 @@ + * Draw rectangles as inverted background for the labels. + */ + +- gdk_gc_set_foreground (gc, SELECTED_BG_COLOR (widget)); +- gdk_draw_rectangle (private_data->day_name_win, gc, TRUE, +- CALENDAR_MARGIN, CALENDAR_MARGIN, +- cal_width-CALENDAR_MARGIN * 2, +- private_data->day_name_h - CALENDAR_MARGIN); +- +- if (calendar->display_flags & GTK_CALENDAR_SHOW_WEEK_NUMBERS) +- gdk_draw_rectangle (private_data->day_name_win, gc, TRUE, +- CALENDAR_MARGIN, +- private_data->day_name_h - CALENDAR_YSEP, +- private_data->week_width - CALENDAR_YSEP - CALENDAR_MARGIN, +- CALENDAR_YSEP); ++ /* Hildon: don't paint dayname window */ ++ if (!hildonlike) ++ { ++ gdk_gc_set_foreground (gc, SELECTED_BG_COLOR (widget)); ++ gdk_draw_rectangle (private_data->day_name_win, gc, TRUE, ++ CALENDAR_MARGIN, CALENDAR_MARGIN, ++ cal_width-CALENDAR_MARGIN * 2, ++ private_data->day_name_h - CALENDAR_MARGIN); ++ ++ if (calendar->display_flags & GTK_CALENDAR_SHOW_WEEK_NUMBERS) ++ gdk_draw_rectangle (private_data->day_name_win, gc, TRUE, ++ CALENDAR_MARGIN, ++ private_data->day_name_h - CALENDAR_YSEP, ++ private_data->week_width - CALENDAR_YSEP - CALENDAR_MARGIN, ++ CALENDAR_YSEP); ++ } + + /* + * Write the labels +@@ -1908,28 +2187,43 @@ + + gdk_gc_set_foreground (gc, SELECTED_FG_COLOR (widget)); + for (i = 0; i < 7; i++) +- { ++ { + if (gtk_widget_get_direction (GTK_WIDGET (calendar)) == GTK_TEXT_DIR_RTL) +- day = 6 - i; ++ day = 6 - i; + else +- day = i; +- day = (day + private_data->week_start) % 7; +- g_snprintf (buffer, sizeof (buffer), "%s", default_abbreviated_dayname[day]); ++ day = i; ++ day = (day + private_data->week_start) % 7; ++ g_snprintf (buffer, sizeof (buffer), "%s", default_abbreviated_dayname[day]); ++ ++ pango_layout_set_text (layout, buffer, -1); ++ pango_layout_get_pixel_extents (layout, NULL, &logical_rect); + +- pango_layout_set_text (layout, buffer, -1); +- pango_layout_get_pixel_extents (layout, NULL, &logical_rect); ++ /* Hildon: draw passive focus for day name */ ++ if (hildonlike && calendar->focus_col == i) ++ { ++ guint x = left_x_for_column (calendar, calendar->focus_col); + +- gdk_draw_layout (private_data->day_name_win, gc, +- (CALENDAR_MARGIN + +- + (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR ? +- (private_data->week_width + (private_data->week_width ? CALENDAR_XSEP : 0)) +- : 0) +- + day_wid_sep * i +- + (day_width - logical_rect.width)/2), +- CALENDAR_MARGIN + focus_width + focus_padding + logical_rect.y, +- layout); ++ gtk_paint_box( GTK_WIDGET (calendar)->style, ++ private_data->day_name_win, ++ GTK_STATE_NORMAL, ++ GTK_SHADOW_OUT, NULL, ++ GTK_WIDGET (calendar), "passive-focus", ++ (x + 4) + HILDON_DAY_WIDTH, 0, ++ day_wid_sep + 2, ++ HILDON_DAY_HEIGHT); ++ } ++ gdk_draw_layout (private_data->day_name_win, gc, ++ (CALENDAR_MARGIN + ++ + (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR ? ++ (private_data->week_width + (private_data->week_width ? CALENDAR_XSEP : 0)) ++ : 0) ++ + day_wid_sep * i ++ + (day_width - logical_rect.width)/2), ++ CALENDAR_MARGIN + focus_width + focus_padding + logical_rect.y, ++ layout); ++ ++ + } +- + g_object_unref (layout); + } + +@@ -1940,14 +2234,15 @@ + GdkGC *gc; + gint row, week = 0, year; + gint x_loc; +- char buffer[3]; +- gint y_loc, day_height; ++ char buffer[10]; ++ gint y_loc /*, day_height*/; + GtkCalendarPrivateData *private_data; + PangoLayout *layout; + PangoRectangle logical_rect; + gint focus_padding; + gint focus_width; +- ++ gboolean hildonlike; ++ + g_return_if_fail (GTK_IS_CALENDAR (widget)); + g_return_if_fail (widget->window != NULL); + calendar = GTK_CALENDAR (widget); +@@ -1968,6 +2263,7 @@ + gtk_widget_style_get (GTK_WIDGET (widget), + "focus-line-width", &focus_width, + "focus-padding", &focus_padding, ++ "hildonlike", &hildonlike, + NULL); + + /* +@@ -1981,18 +2277,23 @@ + */ + + gdk_gc_set_foreground (gc, SELECTED_BG_COLOR (widget)); +- if (private_data->day_name_win) +- gdk_draw_rectangle (private_data->week_win, gc, TRUE, +- CALENDAR_MARGIN, +- 0, +- private_data->week_width - CALENDAR_MARGIN, +- private_data->main_h - CALENDAR_MARGIN); +- else +- gdk_draw_rectangle (private_data->week_win, gc, TRUE, +- CALENDAR_MARGIN, +- CALENDAR_MARGIN, +- private_data->week_width - CALENDAR_MARGIN, +- private_data->main_h - 2 * CALENDAR_MARGIN); ++ ++ /* Hildon: don't paint background for weekday window */ ++ if (!hildonlike) ++ { ++ if (private_data->day_name_win) ++ gdk_draw_rectangle (private_data->week_win, gc, TRUE, ++ CALENDAR_MARGIN, ++ 0, ++ private_data->week_width - CALENDAR_MARGIN, ++ private_data->main_h + private_data->day_name_h- CALENDAR_MARGIN); ++ else ++ gdk_draw_rectangle (private_data->week_win, gc, TRUE, ++ CALENDAR_MARGIN, ++ CALENDAR_MARGIN, ++ private_data->week_width - CALENDAR_MARGIN, ++ private_data->main_h - 2 * CALENDAR_MARGIN); ++ } + + /* + * Write the labels +@@ -2001,10 +2302,13 @@ + layout = gtk_widget_create_pango_layout (widget, NULL); + + gdk_gc_set_foreground (gc, SELECTED_FG_COLOR (widget)); +- day_height = row_height (calendar); ++ gdk_draw_line(private_data->week_win, gc, ++ HILDON_DAY_WIDTH - 1, 0, HILDON_DAY_WIDTH - 1, private_data->main_h + private_data->day_name_h); ++ ++ /*day_height = row_height (calendar)*/; + for (row = 0; row < 6; row++) + { +- year = calendar->year; ++ year = calendar->year; + if (calendar->day[row][6] < 15 && row > 3 && calendar->month == 11) + year++; + +@@ -2012,15 +2316,30 @@ + ((calendar->day[row][6] < 15 && row > 3 ? 1 : 0) + + calendar->month) % 12 + 1, calendar->day[row][6])); + +- g_snprintf (buffer, sizeof (buffer), "%d", week); +- pango_layout_set_text (layout, buffer, -1); +- pango_layout_get_pixel_extents (layout, NULL, &logical_rect); +- +- y_loc = top_y_for_row (calendar, row) + (day_height - logical_rect.height) / 2; +- +- x_loc = (private_data->week_width ++ g_snprintf (buffer, sizeof (buffer), "%d", week); ++ pango_layout_set_text (layout, buffer, -1); ++ pango_layout_get_pixel_extents (layout, NULL, &logical_rect); ++ ++ /* Hildon: draw passive focus for week */ ++ if (hildonlike && calendar->focus_row == row) ++ { ++ guint y = top_y_for_row (calendar, calendar->focus_row + 1); ++ ++ gtk_paint_box( GTK_WIDGET (calendar)->style, ++ private_data->week_win, ++ GTK_STATE_NORMAL, ++ GTK_SHADOW_OUT, NULL, ++ GTK_WIDGET (calendar), "passive-focus", ++ 0, y, ++ private_data->week_width - 4, ++ HILDON_DAY_HEIGHT); ++ } ++ ++ y_loc = private_data->day_name_h + top_y_for_row (calendar, row) + (HILDON_DAY_HEIGHT - logical_rect.height) / 2; ++ x_loc = (HILDON_DAY_WIDTH - logical_rect.width) / 2; ++ /*(private_data->week_width + - logical_rect.width +- - CALENDAR_XSEP - focus_padding - focus_width); ++ - CALENDAR_XSEP - focus_padding - focus_width);*/ + + gdk_draw_layout (private_data->week_win, gc, x_loc, y_loc, layout); + } +@@ -2034,11 +2353,13 @@ + { + GtkCalendar *calendar; + gint r, c, row, col; +- ++ GtkCalendarPrivateData *private_data; + g_return_if_fail (GTK_IS_CALENDAR (widget)); + + calendar = GTK_CALENDAR (widget); +- ++ ++ private_data = GTK_CALENDAR_PRIVATE_DATA (widget); ++ + row = -1; + col = -1; + for (r = 0; r < 6; r++) +@@ -2054,6 +2375,7 @@ + g_return_if_fail (col != -1); + + gtk_calendar_paint_day (widget, row, col); ++ + } + + static void +@@ -2065,13 +2387,14 @@ + GdkGC *gc; + gchar buffer[255]; + gint day; +- gint day_height; ++ /*gint day_height;*/ + gint x_left; + gint x_loc; + gint y_top; + gint y_loc; +- gint day_xspace; ++ /*gint day_xspace;*/ + gint focus_width; ++ gboolean hildonlike; + + GtkCalendarPrivateData *private_data; + PangoLayout *layout; +@@ -2083,6 +2406,8 @@ + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); + ++ if (private_data->main_win == NULL) return; ++ + /* + * Handle freeze/thaw functionality + */ +@@ -2092,25 +2417,25 @@ + private_data->dirty_main = 1; + return; + } +- +- gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL); + +- day_height = row_height (calendar); +- +- day_xspace = private_data->day_width - private_data->max_day_char_width*2; ++ gtk_widget_style_get (widget, "focus-line-width", &focus_width, ++ "hildonlike", &hildonlike, NULL); ++ ++ /*day_height = row_height (calendar)*/; ++ /*day_xspace = HILDON_DAY_WIDTH private_data->day_width - private_data->max_day_char_width*2*/; + + day = calendar->day[row][col]; +- ++ + x_left = left_x_for_column (calendar, col); +- x_loc = x_left + private_data->day_width / 2 + private_data->max_day_char_width; ++ /*x_loc = x_left + private_data->day_width / 2 + private_data->max_day_char_width;*/ + + y_top = top_y_for_row (calendar, row); + + gdk_window_clear_area (private_data->main_win, x_left, y_top, +- private_data->day_width, day_height); ++ HILDON_DAY_WIDTH, HILDON_DAY_HEIGHT); + + gc = calendar->gc; +- ++ + if (calendar->day_month[row][col] == MONTH_PREV) + { + gdk_gc_set_foreground (gc, PREV_MONTH_COLOR (GTK_WIDGET (calendar))); +@@ -2123,44 +2448,43 @@ + { + /* + if (calendar->highlight_row == row && calendar->highlight_col == col) +- { +- gdk_gc_set_foreground (gc, HIGHLIGHT_BACK_COLOR (GTK_WIDGET (calendar))); +- gdk_draw_rectangle (private_data->main_win, gc, TRUE, x_left, y_top, ++ { ++ gdk_gc_set_foreground (gc, HIGHLIGHT_BACK_COLOR (GTK_WIDGET (calendar))); ++ gdk_draw_rectangle (private_data->main_win, gc, TRUE, x_left, y_top, + private_data->day_width, day_height); +- } ++ } + */ + if (calendar->selected_day == day) +- { +- gdk_gc_set_foreground (gc, SELECTED_BG_COLOR (GTK_WIDGET (calendar))); +- gdk_draw_rectangle (private_data->main_win, gc, TRUE, x_left, y_top, +- private_data->day_width, day_height); +- } +- ++ { ++ /* Hildon: use custom graphics */ ++ if (hildonlike) ++ { ++ gtk_paint_box( GTK_WIDGET (calendar)->style, ++ private_data->main_win, ++ GTK_STATE_NORMAL, ++ GTK_SHADOW_NONE, NULL, ++ GTK_WIDGET (calendar), "active-day", ++ x_left, y_top, ++ HILDON_DAY_WIDTH, ++ HILDON_DAY_HEIGHT); ++ } ++ else ++ { ++ gdk_gc_set_foreground (gc, SELECTED_BG_COLOR (GTK_WIDGET (calendar))); ++ gdk_draw_rectangle (private_data->main_win, gc, TRUE, x_left, y_top, ++ HILDON_DAY_WIDTH, HILDON_DAY_HEIGHT); ++ } ++ } + if (calendar->marked_date[day-1]) +- gdk_gc_set_foreground (gc, MARKED_COLOR (GTK_WIDGET (calendar))); ++ gdk_gc_set_foreground (gc, MARKED_COLOR (GTK_WIDGET (calendar))); + else +- gdk_gc_set_foreground (gc, NORMAL_DAY_COLOR (GTK_WIDGET (calendar))); +- ++ gdk_gc_set_foreground (gc, NORMAL_DAY_COLOR (GTK_WIDGET (calendar))); + if (calendar->selected_day == day) +- gdk_gc_set_foreground (gc, SELECTED_FG_COLOR (GTK_WIDGET (calendar))); ++ gdk_gc_set_foreground (gc, SELECTED_FG_COLOR (GTK_WIDGET (calendar))); + else +- gdk_gc_set_foreground (gc, & (GTK_WIDGET (calendar)->style->fg[GTK_WIDGET_STATE (calendar)])); +- } +- +- +- g_snprintf (buffer, sizeof (buffer), "%d", day); +- layout = gtk_widget_create_pango_layout (widget, buffer); +- pango_layout_get_pixel_extents (layout, NULL, &logical_rect); ++ gdk_gc_set_foreground (gc, & (GTK_WIDGET (calendar)->style->fg[GTK_WIDGET_STATE (calendar)])); + +- x_loc -= logical_rect.width; +- +- y_loc = y_top + (day_height - logical_rect.height) / 2; +- gdk_draw_layout (private_data->main_win, gc, +- x_loc, y_loc, layout); +- if (calendar->marked_date[day-1] +- && calendar->day_month[row][col] == MONTH_CURRENT) +- gdk_draw_layout (private_data->main_win, gc, +- x_loc-1, y_loc, layout); ++ } + + if (GTK_WIDGET_HAS_FOCUS (calendar) + && calendar->focus_row == row && calendar->focus_col == col) +@@ -2168,9 +2492,9 @@ + GtkStateType state; + + if (calendar->selected_day == day) +- state = GTK_WIDGET_HAS_FOCUS (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE; ++ state = GTK_WIDGET_HAS_FOCUS (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE; + else +- state = GTK_STATE_NORMAL; ++ state = GTK_STATE_NORMAL; + + gtk_paint_focus (widget->style, + private_data->main_win, +@@ -2178,10 +2502,29 @@ + ? GTK_STATE_SELECTED : GTK_STATE_NORMAL, + NULL, widget, "calendar-day", + x_left, y_top, +- private_data->day_width, +- day_height); ++ HILDON_DAY_WIDTH, ++ HILDON_DAY_HEIGHT); + } + ++ /* Hildon: paint green indicator for current day */ ++ if (hildonlike && (day == private_data->current_day && calendar->selected_day != ++ private_data->current_day) && (calendar->day_month[row][col] == MONTH_CURRENT)) ++ gtk_calendar_check_current_date (calendar, x_left, y_top); ++ ++ g_snprintf (buffer, sizeof (buffer), "%d", day); ++ layout = gtk_widget_create_pango_layout (widget, buffer); ++ pango_layout_get_pixel_extents (layout, NULL, &logical_rect); ++ ++ x_loc = x_left + (HILDON_DAY_WIDTH - logical_rect.width) / 2; ++ y_loc = y_top + (HILDON_DAY_HEIGHT - logical_rect.height) / 2; ++ ++ gdk_draw_layout (private_data->main_win, gc, ++ x_loc, y_loc, layout); ++ if (calendar->marked_date[day-1] ++ && calendar->day_month[row][col] == MONTH_CURRENT) ++ gdk_draw_layout (private_data->main_win, gc, ++ x_loc-1, y_loc, layout); ++ + g_object_unref (layout); + } + +@@ -2195,7 +2538,7 @@ + + g_return_if_fail (GTK_IS_CALENDAR (widget)); + g_return_if_fail (widget->window != NULL); +- ++ + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); + +@@ -2208,7 +2551,7 @@ + gdk_window_clear (private_data->main_win); + + /* gtk_calendar_compute_days (calendar); */ /* REMOVE later */ +- ++ + for (col = 0; col < 7; col++) + for (row = 0; row < 6; row++) + gtk_calendar_paint_day (widget, row, col); +@@ -2453,9 +2796,24 @@ + guint month, + guint year) + { ++ gboolean hildonlike; ++ guint min_year, max_year; ++ + g_return_val_if_fail (GTK_IS_CALENDAR (calendar), FALSE); + g_return_val_if_fail (month <= 11, FALSE); + ++ gtk_widget_style_get(GTK_WIDGET (calendar), "hildonlike", &hildonlike, ++ "max-year", &max_year, "min-year", ++ &min_year, NULL); ++ ++ if (hildonlike) ++ { ++ if (year >= max_year) ++ year = max_year; ++ else if (year <= min_year) ++ year = min_year; ++ } ++ + calendar->month = month; + calendar->year = year; + +@@ -2478,12 +2836,30 @@ + gtk_calendar_select_day (GtkCalendar *calendar, + guint day) + { +- g_return_if_fail (GTK_IS_CALENDAR (calendar)); +- g_return_if_fail (day <= 31); +- +- /* gtk_calendar_compute_days (calendar); */ +- +- /* Deselect the old day */ ++ gint row, col; ++ GtkCalendarPrivateData *priv; ++ g_return_if_fail (GTK_IS_CALENDAR (calendar)); ++ g_return_if_fail (day <= 31); ++ priv = GTK_CALENDAR_PRIVATE_DATA (calendar); ++ ++ for (row = 0; row < 6; row ++) ++ for (col = 0; col < 7; col++) ++ { ++ if (calendar->day_month[row][col] == MONTH_CURRENT ++ && calendar->day[row][col] == day) ++ { ++ calendar->focus_row = row; ++ calendar->focus_col = col; ++ } ++ } ++ ++ /* gtk_calendar_compute_days (calendar); */ ++ ++ if (calendar->month != priv->current_month || ++ calendar->year != priv->current_year) ++ gtk_calendar_unmark_day (calendar, priv->current_day); ++ ++ /* Deselect the old day */ + if (calendar->selected_day > 0) + { + gint selected_day; +@@ -2491,20 +2867,25 @@ + selected_day = calendar->selected_day; + calendar->selected_day = 0; + if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar))) +- gtk_calendar_paint_day_num (GTK_WIDGET (calendar), selected_day); ++ { ++ gtk_calendar_paint_day_num (GTK_WIDGET (calendar), selected_day); ++ } + } + + calendar->selected_day = day; + ++ /*printf("Selected day = %d\n", day);*/ ++ + /* Select the new day */ + if (day != 0) + { + if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar))) +- gtk_calendar_paint_day_num (GTK_WIDGET (calendar), day); ++ { ++ gtk_calendar_paint_day_num (GTK_WIDGET (calendar), day); ++ } + } +- ++ + g_object_notify (G_OBJECT (calendar), "day"); +- + g_signal_emit (calendar, + gtk_calendar_signals[DAY_SELECTED_SIGNAL], + 0); +@@ -2560,17 +2941,16 @@ + gtk_calendar_mark_day (GtkCalendar *calendar, + guint day) + { +- g_return_val_if_fail (GTK_IS_CALENDAR (calendar), FALSE); +- +- if (day >= 1 && day <= 31 && calendar->marked_date[day-1] == FALSE) +- { +- calendar->marked_date[day - 1] = TRUE; +- calendar->num_marked_dates++; +- } +- if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar))) +- { +- gtk_calendar_paint_main (GTK_WIDGET (calendar)); +- } ++ g_return_val_if_fail (GTK_IS_CALENDAR (calendar), FALSE); ++ if (day >= 1 && day <= 31 && calendar->marked_date[day-1] == FALSE) ++ { ++ calendar->marked_date[day - 1] = TRUE; ++ calendar->num_marked_dates++; ++ } ++ if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar))) ++ { ++ gtk_calendar_paint_main (GTK_WIDGET (calendar)); ++ } + + return TRUE; + } +@@ -2629,14 +3009,15 @@ + gtk_calendar_set_year_next (calendar); + break; + case ARROW_MONTH_LEFT: +- gtk_calendar_set_month_prev (calendar); +- break; ++ gtk_calendar_set_month_prev (calendar); ++ break; + case ARROW_MONTH_RIGHT: + gtk_calendar_set_month_next (calendar); + break; + default:; + /* do nothing */ + } ++ gtk_calendar_select_and_focus_day(calendar, calendar->selected_day); + } + + static gboolean +@@ -2645,6 +3026,11 @@ + GtkCalendar *calendar = data; + GtkCalendarPrivateData *private_data = GTK_CALENDAR_PRIVATE_DATA (calendar); + gboolean retval = FALSE; ++ GtkSettings *settings; ++ guint timeout; ++ ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-update-timeout", &timeout, NULL); + + GDK_THREADS_ENTER (); + +@@ -2655,7 +3041,7 @@ + if (private_data->need_timer) + { + private_data->need_timer = FALSE; +- private_data->timer = g_timeout_add (CALENDAR_TIMER_DELAY, ++ private_data->timer = g_timeout_add (/*CALENDAR_TIMER_DELAY*/timeout, + (GSourceFunc) calendar_timer, + (gpointer) calendar); + } +@@ -2673,13 +3059,18 @@ + gint click_child) + { + GtkCalendarPrivateData *private_data = GTK_CALENDAR_PRIVATE_DATA (widget); ++ GtkSettings *settings; ++ guint timeout; + ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-initial-timeout", &timeout, NULL); ++ + private_data->click_child = click_child; + + if (!private_data->timer) + { + private_data->need_timer = TRUE; +- private_data->timer = g_timeout_add (CALENDAR_INITIAL_TIMER_DELAY, ++ private_data->timer = g_timeout_add (/*CALENDAR_INITIAL_TIMER_DELAY*/timeout, + calendar_timer, + (gpointer) widget); + } +@@ -2738,12 +3129,38 @@ + GtkCalendar *calendar; + GtkCalendarPrivateData *private_data; + gint arrow = -1; +- ++ gboolean hildonlike; ++ gint min_year, max_year; ++ + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); ++ ++ gtk_widget_style_get(widget, "hildonlike", &hildonlike, ++ "min-year", &min_year, "max-year", &max_year, NULL); + +- if (event->window == private_data->main_win) +- gtk_calendar_main_button (widget, event); ++ if (!hildonlike) ++ { ++ if (event->window == private_data->main_win) ++ gtk_calendar_main_button (widget, event); ++ } ++ else if (hildonlike && (event->window == private_data->main_win)) ++ { ++ gint x = (gint) (event->x); ++ gint y = (gint) (event->y); ++ gint row = row_from_y (calendar, y); ++ gint col = column_from_x (calendar, x); ++ private_data->pressed_day = calendar->day[row][col]; ++ ++ if ((calendar->year == min_year && calendar->month == 0 && calendar->day_month[row][col] == MONTH_PREV) || ++ (calendar->year == max_year && calendar->month == 11 && calendar->day_month[row][col] == MONTH_NEXT)) ++ {} ++ else if (calendar->day_month[row][col] == MONTH_CURRENT) ++ gtk_calendar_select_and_focus_day (calendar, private_data->pressed_day); ++ ++ /* Remember month where button was pressed */ ++ private_data->pressed_month = calendar->month; ++ private_data->slide_stylus = TRUE; ++ } + + if (!GTK_WIDGET_HAS_FOCUS (widget)) + gtk_widget_grab_focus (widget); +@@ -2766,7 +3183,7 @@ + } + } + +- return FALSE; ++ return TRUE; + } + + static gboolean +@@ -2775,16 +3192,45 @@ + { + GtkCalendar *calendar; + GtkCalendarPrivateData *private_data; ++ gboolean hildonlike; + + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); + ++ gtk_widget_style_get(widget, "hildonlike", &hildonlike, ++ NULL); ++ ++ if (hildonlike && (event->window == private_data->main_win)) ++ { ++ gtk_calendar_main_button (widget, event); ++ gint x = (gint) (event->x); ++ gint y = (gint) (event->y); ++ gint row = row_from_y (calendar, y); ++ gint col = column_from_x (calendar, x); ++ private_data->prev_col = -1; ++ private_data->prev_row = -1; ++ ++ if ((private_data->pressed_day == calendar->day[row][col]) && ++ (private_data->pressed_month == calendar->month)) ++ { ++ if (!private_data->is_bad_day) ++ { ++ g_signal_emit (calendar, gtk_calendar_signals[SELECTED_DATE_SIGNAL], 0); ++ } ++ else ++ { ++ private_data->is_bad_day = FALSE; ++ } ++ } ++ private_data->slide_stylus = FALSE; ++ } ++ + if (event->button == 1) + { + stop_spinning (widget); + + if (private_data->in_drag) +- private_data->in_drag = 0; ++ private_data->in_drag = 0; + } + + return TRUE; +@@ -2799,15 +3245,42 @@ + gint event_x, event_y; + gint row, col; + gint old_row, old_col; ++ gboolean hildonlike; + + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); + event_x = (gint) (event->x); + event_y = (gint) (event->y); +- ++ ++ gtk_widget_style_get(widget, "hildonlike", &hildonlike, ++ NULL); ++ + if (event->window == private_data->main_win) + { +- ++ if (hildonlike) ++ { ++ /* Hildon: make active day to move, when stylus is slided */ ++ if (private_data->slide_stylus) ++ { ++ gint c_row = row_from_y (calendar, event_y); ++ gint c_col = column_from_x (calendar, event_x); ++ ++ if (calendar->day_month[c_row][c_col] == MONTH_PREV || ++ calendar->day_month[c_row][c_col] == MONTH_NEXT) ++ { } ++ else if ((private_data->prev_row != c_row || private_data->prev_col != c_col) && ++ (calendar->highlight_row != -1 && calendar->highlight_col != -1)) ++ { ++ gtk_calendar_select_and_focus_day (calendar, ++ calendar->day[c_row][c_col]); ++ /* Update passive focus indicators work weekday number and name */ ++ gtk_calendar_paint_week_numbers (GTK_WIDGET (calendar)); ++ gtk_calendar_paint_day_names (GTK_WIDGET (calendar)); ++ } ++ private_data->prev_col = c_col; ++ private_data->prev_row = c_row; ++ } ++ } + if (private_data->in_drag) + { + if (gtk_drag_check_threshold (widget, +@@ -2847,7 +3320,7 @@ + calendar->highlight_col = col; + + if (row > -1 && col > -1) +- gtk_calendar_paint_day (widget, row, col); ++ gtk_calendar_paint_day (widget, row, col); + } + } + } +@@ -2863,7 +3336,7 @@ + + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); +- ++ + if (event->window == private_data->arrow_win[ARROW_MONTH_LEFT]) + { + private_data->arrow_state[ARROW_MONTH_LEFT] = GTK_STATE_PRELIGHT; +@@ -2902,7 +3375,7 @@ + + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); +- ++ + if (event->window == private_data->main_win) + { + row = calendar->highlight_row; +@@ -2910,7 +3383,7 @@ + calendar->highlight_row = -1; + calendar->highlight_col = -1; + if (row > -1 && col > -1) +- gtk_calendar_paint_day (widget, row, col); ++ gtk_calendar_paint_day (widget, row, col); + } + + if (event->window == private_data->arrow_win[ARROW_MONTH_LEFT]) +@@ -2949,10 +3422,14 @@ + GdkGC *gc; + GtkCalendar *calendar; + gint state; +- gint width, height; ++ gint max_year, min_year; ++ gboolean hildonlike; ++/* gint width, height;*/ + + calendar = GTK_CALENDAR (widget); + private_data = GTK_CALENDAR_PRIVATE_DATA (widget); ++ gtk_widget_style_get (widget, "hildonlike", &hildonlike, "max-year", ++ &max_year, "min-year", &min_year, NULL); + + if (private_data->freeze_count) + { +@@ -2965,23 +3442,81 @@ + state = private_data->arrow_state[arrow]; + gc = calendar->gc; + +- gdk_window_clear (window); ++/* gdk_window_clear (window);*/ + gdk_window_set_background (window, &(widget)->style->bg[state]); +- gdk_drawable_get_size (window, &width, &height); +- gdk_window_clear_area (window, ++/* gdk_drawable_get_size (window, &width, &height);*/ ++/* gdk_window_clear_area (window, + 0,0, +- width,height); +- if (arrow == ARROW_MONTH_LEFT || arrow == ARROW_YEAR_LEFT) +- gtk_paint_arrow (widget->style, window, state, ++ width,height);*/ ++ ++ gdk_window_clear(window); ++ ++ /* Hildon: added support for dimmed arrows */ ++ if (hildonlike && (calendar->year <= min_year || calendar->year >= max_year)) ++ { ++ if (calendar->year <= min_year) ++ { ++ if (arrow == ARROW_YEAR_LEFT) ++ gtk_paint_arrow (widget->style, window, GTK_STATE_INSENSITIVE, ++ GTK_SHADOW_OUT, NULL, widget, "calendar", ++ GTK_ARROW_LEFT, TRUE, ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ else if (arrow == ARROW_YEAR_RIGHT || arrow == ARROW_MONTH_RIGHT) ++ gtk_paint_arrow (widget->style, window, state, ++ GTK_SHADOW_OUT, NULL, widget, "calendar", ++ GTK_ARROW_RIGHT, TRUE, ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ else if (arrow == ARROW_MONTH_LEFT && calendar->month != 0) ++ gtk_paint_arrow (widget->style, window, state, ++ GTK_SHADOW_OUT, NULL, widget, "calendar", ++ GTK_ARROW_LEFT, TRUE, ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ else if (arrow == ARROW_MONTH_LEFT && !calendar->month) ++ gtk_paint_arrow (widget->style, window, GTK_STATE_INSENSITIVE, ++ GTK_SHADOW_OUT, NULL, widget, "calendar", ++ GTK_ARROW_LEFT, TRUE, ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ } ++ else if (calendar->year >= max_year) ++ { ++ if (arrow == ARROW_YEAR_RIGHT) ++ gtk_paint_arrow (widget->style, window, GTK_STATE_INSENSITIVE, ++ GTK_SHADOW_OUT, NULL, widget, "calendar", ++ GTK_ARROW_RIGHT, TRUE, ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ else if (arrow == ARROW_YEAR_LEFT || arrow == ARROW_MONTH_LEFT) ++ gtk_paint_arrow (widget->style, window, state, + GTK_SHADOW_OUT, NULL, widget, "calendar", + GTK_ARROW_LEFT, TRUE, +- width/2 - 3, height/2 - 4, 8, 8); +- else +- gtk_paint_arrow (widget->style, window, state, ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ else if (arrow == ARROW_MONTH_RIGHT && calendar->month != 11) ++ gtk_paint_arrow (widget->style, window, state, ++ GTK_SHADOW_OUT, NULL, widget, "calendar", ++ GTK_ARROW_RIGHT, TRUE, ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ else if (arrow == ARROW_MONTH_RIGHT && calendar->month == 11) ++ gtk_paint_arrow (widget->style, window, GTK_STATE_INSENSITIVE, ++ GTK_SHADOW_OUT, NULL, widget, "calendar", ++ GTK_ARROW_RIGHT, TRUE, ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ } ++ } ++ else ++ { ++ if (arrow == ARROW_MONTH_LEFT || arrow == ARROW_YEAR_LEFT) ++ gtk_paint_arrow (widget->style, window, state, ++ GTK_SHADOW_OUT, NULL, widget, "calendar", ++ GTK_ARROW_LEFT, TRUE, ++ /* width/2 - 3, height/2 - 4, 8, 8);*/ ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ else ++ gtk_paint_arrow (widget->style, window, state, + GTK_SHADOW_OUT, NULL, widget, "calendar", + GTK_ARROW_RIGHT, TRUE, +- width/2 - 2, height/2 - 4, 8, 8); +- } ++ /* width/2 - 2, height/2 - 4, 8, 8);*/ ++ 0, 0, HILDON_ARROW_WIDTH, HILDON_ARROW_HEIGHT); ++ } ++ } + } + + void +@@ -3159,17 +3694,26 @@ + GdkEventKey *event) + { + GtkCalendar *calendar; ++ GtkSettings *settings; + gint return_val; + gint old_focus_row; + gint old_focus_col; + gint row, col, day; +- ++ gint min_year, max_year; ++ gboolean knav; ++ + calendar = GTK_CALENDAR (widget); + return_val = FALSE; + + old_focus_row = calendar->focus_row; + old_focus_col = calendar->focus_col; + ++ gtk_widget_style_get (widget, "max-year", &max_year, ++ "min-year", &min_year, NULL); ++ ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "hildon-keyboard-navigation", &knav, NULL); ++ + switch (event->keyval) + { + case GDK_KP_Left: +@@ -3179,10 +3723,41 @@ + gtk_calendar_set_month_prev (calendar); + else + { +- move_focus (calendar, -1); +- gtk_calendar_paint_day (widget, old_focus_row, old_focus_col); +- gtk_calendar_paint_day (widget, calendar->focus_row, +- calendar->focus_col); ++ /* if we are at the first allowed day of the minimum year/month then do nothing */ ++ if (calendar->year == min_year && calendar->month == 0 && calendar->day_month[old_focus_row][old_focus_col-1] == MONTH_PREV) ++ { ++ g_signal_emit (calendar, gtk_calendar_signals[ERRONEOUS_DATE_SIGNAL], 0); ++ return TRUE; ++ } ++ else /* else normal */ ++ { ++ move_focus (calendar, -1); ++ if (!knav) ++ { ++ gtk_calendar_paint_day (widget, old_focus_row, old_focus_col); ++ gtk_calendar_paint_day (widget, calendar->focus_row, ++ calendar->focus_col); ++ } ++ else if (knav) ++ { ++ gint day_month = calendar->day_month[calendar->focus_row][calendar->focus_col]; ++ if (day_month == MONTH_CURRENT && calendar->selected_day != 1) ++ { ++ gtk_calendar_select_day(calendar, calendar->selected_day - 1); ++ } ++ else ++ { ++ if (calendar->month != 0) { ++ calendar->selected_day = month_length[leap (calendar->year)][calendar->month]; ++ } else { ++ calendar->selected_day = month_length[leap (calendar->year -1)][12]; ++ } ++ gtk_calendar_set_month_prev (calendar); ++ } ++ gtk_calendar_paint_week_numbers (GTK_WIDGET (calendar)); ++ gtk_calendar_paint_day_names (GTK_WIDGET (calendar)); ++ } ++ } + } + break; + case GDK_KP_Right: +@@ -3192,10 +3767,36 @@ + gtk_calendar_set_month_next (calendar); + else + { +- move_focus (calendar, 1); +- gtk_calendar_paint_day (widget, old_focus_row, old_focus_col); +- gtk_calendar_paint_day (widget, calendar->focus_row, +- calendar->focus_col); ++ if (calendar->year == max_year && calendar->month == 11 && calendar->day_month[old_focus_row][old_focus_col+1] == MONTH_NEXT) ++ { ++ g_signal_emit (calendar, gtk_calendar_signals[ERRONEOUS_DATE_SIGNAL], 0); ++ return TRUE; ++ } ++ else ++ { ++ move_focus (calendar, 1); ++ if (!knav) ++ { ++ gtk_calendar_paint_day (widget, old_focus_row, old_focus_col); ++ gtk_calendar_paint_day (widget, calendar->focus_row, ++ calendar->focus_col); ++ } ++ else if (knav) ++ { ++ gint day_month = calendar->day_month[calendar->focus_row][calendar->focus_col]; ++ if (day_month == MONTH_CURRENT) ++ { ++ gtk_calendar_select_day (calendar, calendar->selected_day + 1); ++ } ++ else ++ { ++ calendar->selected_day = 1; ++ gtk_calendar_set_month_next (calendar); ++ } ++ gtk_calendar_paint_week_numbers (GTK_WIDGET (calendar)); ++ gtk_calendar_paint_day_names (GTK_WIDGET (calendar)); ++ } ++ } + } + break; + case GDK_KP_Up: +@@ -3205,11 +3806,48 @@ + gtk_calendar_set_year_prev (calendar); + else + { +- if (calendar->focus_row > 0) +- calendar->focus_row--; +- gtk_calendar_paint_day (widget, old_focus_row, old_focus_col); +- gtk_calendar_paint_day (widget, calendar->focus_row, +- calendar->focus_col); ++ if (calendar->year == min_year && calendar->month == 0 && calendar->day_month[old_focus_row-1][old_focus_col] == MONTH_PREV) ++ { ++ g_signal_emit (calendar, gtk_calendar_signals[ERRONEOUS_DATE_SIGNAL], 0); ++ return TRUE; ++ } ++ else ++ { ++ if (calendar->focus_row > 0) ++ calendar->focus_row--; ++ if (!knav) ++ { ++ gtk_calendar_paint_day (widget, old_focus_row, old_focus_col); ++ gtk_calendar_paint_day (widget, calendar->focus_row, ++ calendar->focus_col); ++ } ++ else if (knav) ++ { ++ gint day_month = calendar->day_month[calendar->focus_row][calendar->focus_col]; ++ if (day_month == MONTH_CURRENT) ++ { ++ if ((calendar->selected_day - 7) <= 0) ++ { ++ if (calendar->month != 0) ++ calendar->selected_day = month_length[leap (calendar->year)][calendar->month]; ++ else ++ calendar->selected_day = month_length[leap (calendar->year - 1)][12]; ++ gtk_calendar_set_month_prev (calendar); ++ } ++ else ++ { ++ gtk_calendar_select_day (calendar, calendar->selected_day - 7); ++ } ++ } ++ else ++ { ++ calendar->selected_day = calendar->day[calendar->focus_row][calendar->focus_col]; ++ gtk_calendar_set_month_prev (calendar); ++ } ++ gtk_calendar_paint_week_numbers (GTK_WIDGET (calendar)); ++ gtk_calendar_paint_day_names (GTK_WIDGET (calendar)); ++ } ++ } + } + break; + case GDK_KP_Down: +@@ -3219,12 +3857,49 @@ + gtk_calendar_set_year_next (calendar); + else + { +- if (calendar->focus_row < 5) +- calendar->focus_row++; +- gtk_calendar_paint_day (widget, old_focus_row, old_focus_col); +- gtk_calendar_paint_day (widget, calendar->focus_row, +- calendar->focus_col); ++ if (calendar->year == max_year && calendar->month == 11 && calendar->day_month[old_focus_row+1][old_focus_col] == MONTH_NEXT) ++ { ++ g_signal_emit (calendar, gtk_calendar_signals[ERRONEOUS_DATE_SIGNAL], 0); ++ return TRUE; ++ } ++ else ++ { ++ ++ if (calendar->focus_row < 5) ++ calendar->focus_row++; ++ if (!knav) ++ { ++ gtk_calendar_paint_day (widget, old_focus_row, old_focus_col); ++ gtk_calendar_paint_day (widget, calendar->focus_row, ++ calendar->focus_col); ++ } ++ else if (knav) ++ { ++ gint day_month = calendar->day_month[calendar->focus_row][calendar->focus_col]; ++ if (day_month == MONTH_CURRENT) ++ { ++ if ((calendar->selected_day + 7) > ++ month_length[leap (calendar->year)][calendar->month + 1]) ++ { ++ calendar->selected_day = 1; ++ gtk_calendar_set_month_next (calendar); ++ } ++ else ++ { ++ gtk_calendar_select_day (calendar, calendar->selected_day + 7); ++ } ++ } ++ else ++ { ++ calendar->selected_day = calendar->day[calendar->focus_row][calendar->focus_col]; ++ gtk_calendar_set_month_next (calendar); ++ } ++ gtk_calendar_paint_week_numbers (GTK_WIDGET (calendar)); ++ gtk_calendar_paint_day_names (GTK_WIDGET (calendar)); ++ } ++ } + } ++ + break; + case GDK_KP_Space: + case GDK_space: +@@ -3545,3 +4220,27 @@ + gtk_calendar_select_day (calendar, day); + g_object_thaw_notify (G_OBJECT (calendar)); + } ++ ++/* This function return TRUE if we should mark date and FALSE ++ * otherwise ++ */ ++static void ++gtk_calendar_check_current_date (GtkCalendar *calendar, gint x, gint y) ++{ ++ GtkCalendarPrivateData *private_data; ++ ++ private_data = GTK_CALENDAR_PRIVATE_DATA (calendar); ++ ++ if (calendar->month == private_data->current_month && ++ calendar->year == private_data->current_year) ++ { ++ gtk_paint_box( GTK_WIDGET (calendar)->style, ++ private_data->main_win, ++ GTK_STATE_NORMAL, ++ GTK_SHADOW_NONE, NULL, ++ GTK_WIDGET (calendar), "current-day", ++ x, y, ++ HILDON_DAY_WIDTH, ++ HILDON_DAY_HEIGHT); ++ } ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcalendar.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcalendar.h.diff new file mode 100644 index 0000000000..185d27e8a2 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcalendar.h.diff @@ -0,0 +1,12 @@ +--- gtk+-2.6.4/gtk/gtkcalendar.h 2003-05-08 03:25:48.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkcalendar.h 2005-04-06 16:19:36.267024936 +0300 +@@ -111,6 +111,9 @@ + void (* next_month) (GtkCalendar *calendar); + void (* prev_year) (GtkCalendar *calendar); + void (* next_year) (GtkCalendar *calendar); ++ /* Hildon signals */ ++ void (* erroneous_date) (GtkCalendar *calendar); ++ void (* selected_date) (GtkCalendar *calendar); + + }; + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellrenderertext.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellrenderertext.c.diff new file mode 100644 index 0000000000..b24c26120a --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellrenderertext.c.diff @@ -0,0 +1,66 @@ +--- gtk+-2.6.4/gtk/gtkcellrenderertext.c 2005-01-09 19:32:25.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkcellrenderertext.c 2005-04-06 16:19:36.274023872 +0300 +@@ -182,8 +182,8 @@ + + GTK_CELL_RENDERER (celltext)->xalign = 0.0; + GTK_CELL_RENDERER (celltext)->yalign = 0.5; +- GTK_CELL_RENDERER (celltext)->xpad = 2; +- GTK_CELL_RENDERER (celltext)->ypad = 2; ++ GTK_CELL_RENDERER (celltext)->xpad = 0; ++ GTK_CELL_RENDERER (celltext)->ypad = 0; + celltext->fixed_height_rows = -1; + celltext->font = pango_font_description_new (); + +@@ -1429,7 +1429,7 @@ + /* The minimum size for ellipsized labels is ~ 3 chars */ + if (width) + { +- if (priv->ellipsize || priv->width_chars > 0) ++ /*if (priv->ellipsize || priv->width_chars > 0) + { + PangoContext *context; + PangoFontMetrics *metrics; +@@ -1444,9 +1444,9 @@ + *width += (PANGO_PIXELS (char_width) * MAX (priv->width_chars, 3)); + } + else +- { ++ {*/ + *width = GTK_CELL_RENDERER (celltext)->xpad * 2 + rect.width; +- } ++ /*} */ + } + + if (cell_area) +@@ -1501,6 +1501,7 @@ + gint x_offset; + gint y_offset; + GtkCellRendererTextPrivate *priv; ++ PangoRectangle logical_rect; + + priv = GTK_CELL_RENDERER_TEXT_GET_PRIVATE (cell); + +@@ -1521,7 +1522,7 @@ + else if ((flags & GTK_CELL_RENDERER_PRELIT) == GTK_CELL_RENDERER_PRELIT && + GTK_WIDGET_STATE (widget) == GTK_STATE_PRELIGHT) + { +- state = GTK_STATE_PRELIGHT; ++ state = GTK_STATE_NORMAL; + } + else + { +@@ -1559,6 +1560,14 @@ + g_object_unref (gc); + } + ++ /* Dirty Hildon hack to force ellipsation */ ++ pango_layout_get_extents (layout, NULL, &logical_rect); ++ if (PANGO_PIXELS (logical_rect.width) > MIN (background_area->width, expose_area->width)) ++ { ++ priv->ellipsize = PANGO_ELLIPSIZE_END; ++ priv->ellipsize_set = TRUE; ++ } ++ + if (priv->ellipsize) + pango_layout_set_width (layout, + (cell_area->width - x_offset - 2 * cell->xpad) * PANGO_SCALE); diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellrenderertoggle.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellrenderertoggle.c.diff new file mode 100644 index 0000000000..f6d47f2174 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellrenderertoggle.c.diff @@ -0,0 +1,11 @@ +--- gtk+-2.6.4/gtk/gtkcellrenderertoggle.c 2004-08-09 19:59:51.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkcellrenderertoggle.c 2005-04-06 16:19:36.274023872 +0300 +@@ -71,7 +71,7 @@ + PROP_INCONSISTENT + }; + +-#define TOGGLE_WIDTH 12 ++#define TOGGLE_WIDTH 26 + + static guint toggle_cell_signals[LAST_SIGNAL] = { 0 }; + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellview.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellview.c.diff new file mode 100644 index 0000000000..a6dbfc6a4a --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellview.c.diff @@ -0,0 +1,19 @@ +--- gtk+-2.6.4/gtk/gtkcellview.c 2004-12-15 18:27:30.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkcellview.c 2005-04-06 16:19:36.275023720 +0300 +@@ -82,7 +82,6 @@ + GValue *value); + static GtkCellViewCellInfo *gtk_cell_view_get_cell_info (GtkCellView *cellview, + GtkCellRenderer *renderer); +-static void gtk_cell_view_set_cell_data (GtkCellView *cell_view); + + + static void gtk_cell_view_cell_layout_pack_start (GtkCellLayout *layout, +@@ -536,7 +535,7 @@ + return NULL; + } + +-static void ++void + gtk_cell_view_set_cell_data (GtkCellView *cell_view) + { + GList *i; diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellview.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellview.h.diff new file mode 100644 index 0000000000..eb46720a90 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcellview.h.diff @@ -0,0 +1,10 @@ +--- gtk+-2.6.4/gtk/gtkcellview.h 2004-12-15 18:27:30.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkcellview.h 2005-04-06 16:19:36.317017336 +0300 +@@ -67,6 +67,7 @@ + + void gtk_cell_view_set_background_color (GtkCellView *cell_view, + const GdkColor *color); ++void gtk_cell_view_set_cell_data (GtkCellView *cellview); + GList *gtk_cell_view_get_cell_renderers (GtkCellView *cell_view); + + G_END_DECLS diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcheckbutton.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcheckbutton.c.diff new file mode 100644 index 0000000000..c6922ddc16 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcheckbutton.c.diff @@ -0,0 +1,520 @@ +--- gtk+-2.6.4/gtk/gtkcheckbutton.c 2004-08-09 19:59:51.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkcheckbutton.c 2005-04-06 16:19:36.317017336 +0300 +@@ -31,27 +31,44 @@ + #include "gtklabel.h" + + +-#define INDICATOR_SIZE 13 ++#define INDICATOR_SIZE 24 + #define INDICATOR_SPACING 2 + ++/* maJiK numbers for indicator */ ++#define INDICATOR_SIDE_PADDING 5 ++#define FOCUS_TOP_PADDING 7 ++#define FOCUS_DOWN_PADDING 1 ++ ++/* spacing to take account of the 1 pixel ++ transparency of the widgetfocus.png ++*/ ++#define HILDON_SPACING 1 ++ ++#define TOGGLE_ON_CLICK "toggle-on-click" + +-static void gtk_check_button_class_init (GtkCheckButtonClass *klass); +-static void gtk_check_button_init (GtkCheckButton *check_button); +-static void gtk_check_button_size_request (GtkWidget *widget, +- GtkRequisition *requisition); +-static void gtk_check_button_size_allocate (GtkWidget *widget, +- GtkAllocation *allocation); +-static gint gtk_check_button_expose (GtkWidget *widget, +- GdkEventExpose *event); +-static void gtk_check_button_paint (GtkWidget *widget, +- GdkRectangle *area); +-static void gtk_check_button_draw_indicator (GtkCheckButton *check_button, +- GdkRectangle *area); +-static void gtk_real_check_button_draw_indicator (GtkCheckButton *check_button, +- GdkRectangle *area); ++static void gtk_check_button_class_init (GtkCheckButtonClass *klass); ++static void gtk_check_button_init (GtkCheckButton *check_button); ++static void gtk_check_button_size_request (GtkWidget *widget, ++ GtkRequisition *requisition); ++static void gtk_check_button_size_allocate (GtkWidget *widget, ++ GtkAllocation *allocation); ++static gint gtk_check_button_expose (GtkWidget *widget, ++ GdkEventExpose *event); ++static void gtk_check_button_paint (GtkWidget *widget, ++ GdkRectangle *area); ++static void gtk_check_button_draw_indicator (GtkCheckButton *check_button, ++ GdkRectangle *area); ++static void gtk_real_check_button_draw_indicator ++ (GtkCheckButton *check_button, ++ GdkRectangle *area); + +-static GtkToggleButtonClass *parent_class = NULL; ++static void gtk_check_button_calc_indicator_size( GtkCheckButton *button, ++ GdkRectangle *rect ); ++ ++static void gtk_check_button_clicked (GtkButton *button); ++static void gtk_check_button_update_state (GtkButton *button); + ++static GtkToggleButtonClass *parent_class = NULL; + + GType + gtk_check_button_get_type (void) +@@ -85,32 +102,36 @@ + gtk_check_button_class_init (GtkCheckButtonClass *class) + { + GtkWidgetClass *widget_class; +- ++ GtkButtonClass *button_class; ++ + widget_class = (GtkWidgetClass*) class; ++ button_class = (GtkButtonClass*) class; + parent_class = g_type_class_peek_parent (class); + + widget_class->size_request = gtk_check_button_size_request; + widget_class->size_allocate = gtk_check_button_size_allocate; + widget_class->expose_event = gtk_check_button_expose; + ++ button_class->clicked = gtk_check_button_clicked; ++ + class->draw_indicator = gtk_real_check_button_draw_indicator; + + gtk_widget_class_install_style_property (widget_class, + g_param_spec_int ("indicator_size", +- P_("Indicator Size"), +- P_("Size of check or radio indicator"), +- 0, +- G_MAXINT, +- INDICATOR_SIZE, +- G_PARAM_READABLE)); ++ P_("Indicator Size"), ++ P_("Size of check or radio indicator"), ++ 0, ++ G_MAXINT, ++ INDICATOR_SIZE, ++ G_PARAM_READABLE)); + gtk_widget_class_install_style_property (widget_class, + g_param_spec_int ("indicator_spacing", +- P_("Indicator Spacing"), +- P_("Spacing around check or radio indicator"), +- 0, +- G_MAXINT, +- INDICATOR_SPACING, +- G_PARAM_READABLE)); ++ P_("Indicator Spacing"), ++ P_("Spacing around check or radio indicator"), ++ 0, ++ G_MAXINT, ++ INDICATOR_SPACING, ++ G_PARAM_READABLE)); + } + + static void +@@ -148,7 +169,8 @@ + GtkWidget* + gtk_check_button_new_with_mnemonic (const gchar *label) + { +- return g_object_new (GTK_TYPE_CHECK_BUTTON, "label", label, "use_underline", TRUE, NULL); ++ return g_object_new (GTK_TYPE_CHECK_BUTTON, "label", label, ++ "use_underline", TRUE, NULL); + } + + +@@ -163,39 +185,70 @@ + + if (GTK_WIDGET_DRAWABLE (widget)) + { +- gint border_width; +- gint interior_focus; +- gint focus_width; +- gint focus_pad; +- ++ gint border_width = 0; ++ gint interior_focus = 0; ++ gint focus_width = 0; ++ gint focus_pad = 0; ++ gint indicator_size = 0; ++ gint indicator_spacing = 0; ++ + gtk_widget_style_get (widget, + "interior-focus", &interior_focus, + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, ++ "indicator-size", &indicator_size, ++ "indicator-spacing", &indicator_spacing, + NULL); +- +- gtk_check_button_draw_indicator (check_button, area); + + border_width = GTK_CONTAINER (widget)->border_width; ++ ++ /* Hildon: change the focus so that it draws around the entire ++ * widget - including both the indicator *and* the label ++ */ + if (GTK_WIDGET_HAS_FOCUS (widget)) + { + GtkWidget *child = GTK_BIN (widget)->child; + ++ int w = indicator_size + 2 * indicator_spacing + ++ 2 * (focus_width + focus_pad); ++ int h = indicator_size + 2 * indicator_spacing + ++ 2 * (focus_width + focus_pad) + 2 * HILDON_SPACING ++ - FOCUS_TOP_PADDING; ++ int x = widget->allocation.x; ++ int y = widget->allocation.y + (widget->allocation.height - h)/2 ++ + FOCUS_DOWN_PADDING; ++ ++ if (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL) ++ x = widget->allocation.x + widget->allocation.width - ++ (2 * HILDON_SPACING) - (indicator_size + 2) - ++ (indicator_spacing + 2); ++ + if (interior_focus && child && GTK_WIDGET_VISIBLE (child)) +- gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget), +- NULL, widget, "checkbutton", +- child->allocation.x - focus_width - focus_pad, +- child->allocation.y - focus_width - focus_pad, +- child->allocation.width + 2 * (focus_width + focus_pad), +- child->allocation.height + 2 * (focus_width + focus_pad)); ++ { ++ if (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL) ++ { ++ /* Move the "x" to the left, and enlarge the width, ++ both accounting for the child ++ */ ++ x += - child->allocation.width - HILDON_SPACING - ++ (widget->style->xthickness); ++ w += child->allocation.width + HILDON_SPACING + ++ (widget->style->xthickness); ++ } else { ++ w = child->allocation.x + child->allocation.width + ++ 2 * widget->style->xthickness - x; ++ } ++ ++ gtk_paint_focus (widget->style, widget->window, ++ GTK_WIDGET_STATE (widget), ++ NULL, widget, "checkbutton", x, y, w, h); ++ } + else +- gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget), +- NULL, widget, "checkbutton", +- border_width + widget->allocation.x, +- border_width + widget->allocation.y, +- widget->allocation.width - 2 * border_width, +- widget->allocation.height - 2 * border_width); ++ gtk_paint_focus (widget->style, widget->window, ++ GTK_WIDGET_STATE (widget), ++ NULL, widget, "checkbutton", x, y, w, h); + } ++ gtk_check_button_draw_indicator (check_button, area); + } + } + +@@ -205,10 +258,10 @@ + gint *indicator_spacing) + { + GtkWidget *widget = GTK_WIDGET (check_button); +- ++ + if (indicator_size) + gtk_widget_style_get (widget, "indicator_size", indicator_size, NULL); +- ++ + if (indicator_spacing) + gtk_widget_style_get (widget, "indicator_spacing", indicator_spacing, NULL); + } +@@ -233,7 +286,7 @@ + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, + NULL); +- ++ + requisition->width = border_width * 2; + requisition->height = border_width * 2; + +@@ -246,15 +299,19 @@ + GtkRequisition child_requisition; + + gtk_widget_size_request (child, &child_requisition); +- +- requisition->width += child_requisition.width + indicator_spacing; ++ ++ requisition->width += child_requisition.width + ++ 2 * widget->style->xthickness; + requisition->height += child_requisition.height; ++ requisition->width += 2 * widget->style->xthickness; + } + +- requisition->width += (indicator_size + indicator_spacing * 2 + 2 * (focus_width + focus_pad)); ++ requisition->width += (indicator_size + indicator_spacing * 2 + ++ 2 * (focus_width + focus_pad)); + + temp = indicator_size + indicator_spacing * 2; +- requisition->height = MAX (requisition->height, temp) + 2 * (focus_width + focus_pad); ++ requisition->height = MAX (requisition->height, temp) + ++ 2 * (focus_width + focus_pad); + } + else + (* GTK_WIDGET_CLASS (parent_class)->size_request) (widget, requisition); +@@ -280,45 +337,59 @@ + gint focus_width; + gint focus_pad; + +- _gtk_check_button_get_props (check_button, &indicator_size, &indicator_spacing); ++ _gtk_check_button_get_props (check_button, ++ &indicator_size, &indicator_spacing); + gtk_widget_style_get (widget, + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, + NULL); +- ++ + widget->allocation = *allocation; + if (GTK_WIDGET_REALIZED (widget)) + gdk_window_move_resize (button->event_window, + allocation->x, allocation->y, + allocation->width, allocation->height); + +- if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child)) ++ if (GTK_BIN (button)->child && ++ GTK_WIDGET_VISIBLE (GTK_BIN (button)->child)) + { + GtkRequisition child_requisition; + gint border_width = GTK_CONTAINER (widget)->border_width; +- +- gtk_widget_get_child_requisition (GTK_BIN (button)->child, &child_requisition); ++ ++ gtk_widget_get_child_requisition (GTK_BIN (button)->child, ++ &child_requisition); + +- child_allocation.width = MIN (child_requisition.width, ++ child_allocation.width = MIN ( ++ child_requisition.width, + allocation->width - +- ((border_width + focus_width + focus_pad) * 2 +- + indicator_size + indicator_spacing * 3)); +- child_allocation.width = MAX (child_allocation.width, 1); ++ ((border_width + focus_width + ++ focus_pad) * 2 ++ - 2 * widget->style->xthickness + ++ indicator_size + ++ indicator_spacing * 2 ) ); + ++ child_allocation.width = MAX (child_allocation.width, 1); ++ + child_allocation.height = MIN (child_requisition.height, +- allocation->height - (border_width + focus_width + focus_pad) * 2); ++ allocation->height - ++ (border_width + focus_width + ++ focus_pad) * 2); + child_allocation.height = MAX (child_allocation.height, 1); + +- child_allocation.x = (border_width + indicator_size + indicator_spacing * 3 + +- widget->allocation.x + focus_width + focus_pad); ++ child_allocation.x = (border_width + indicator_size + ++ indicator_spacing * 2 + ++ widget->style->xthickness + ++ widget->allocation.x + ++ focus_width + focus_pad); + child_allocation.y = widget->allocation.y + +- (allocation->height - child_allocation.height) / 2; +- ++ (allocation->height - child_allocation.height) / 2; ++ + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) +- child_allocation.x = allocation->x + allocation->width +- - (child_allocation.x - allocation->x + child_allocation.width); ++ child_allocation.x = allocation->x + allocation->width - ++ (child_allocation.x - allocation->x + child_allocation.width); + +- gtk_widget_size_allocate (GTK_BIN (button)->child, &child_allocation); ++ gtk_widget_size_allocate (GTK_BIN (button)->child, ++ &child_allocation); + } + } + else +@@ -375,45 +446,33 @@ + GdkRectangle *area) + { + GtkWidget *widget; +- GtkWidget *child; + GtkButton *button; + GtkToggleButton *toggle_button; + GtkStateType state_type; + GtkShadowType shadow_type; +- gint x, y; +- gint indicator_size; +- gint indicator_spacing; +- gint focus_width; +- gint focus_pad; +- gboolean interior_focus; ++ ++ GdkRectangle indicator = {0, 0, 0, 0}; + + if (GTK_WIDGET_DRAWABLE (check_button)) + { + widget = GTK_WIDGET (check_button); + button = GTK_BUTTON (check_button); + toggle_button = GTK_TOGGLE_BUTTON (check_button); +- +- gtk_widget_style_get (widget, "interior_focus", &interior_focus, +- "focus-line-width", &focus_width, +- "focus-padding", &focus_pad, NULL); +- +- _gtk_check_button_get_props (check_button, &indicator_size, &indicator_spacing); +- +- x = widget->allocation.x + indicator_spacing + GTK_CONTAINER (widget)->border_width; +- y = widget->allocation.y + (widget->allocation.height - indicator_size) / 2; +- +- child = GTK_BIN (check_button)->child; +- if (!interior_focus || !(child && GTK_WIDGET_VISIBLE (child))) +- x += focus_width + focus_pad; +- ++ gtk_check_button_calc_indicator_size( check_button, &indicator ); ++ ++ /* move indicator to root coordinates */ ++ indicator.x += widget->allocation.x; ++ indicator.y += widget->allocation.y; ++ + if (toggle_button->inconsistent) + shadow_type = GTK_SHADOW_ETCHED_IN; + else if (toggle_button->active) + shadow_type = GTK_SHADOW_IN; + else + shadow_type = GTK_SHADOW_OUT; +- +- if (button->activate_timeout || (button->button_down && button->in_button)) ++ ++ if (button->activate_timeout || ++ (button->button_down && button->in_button)) + state_type = GTK_STATE_ACTIVE; + else if (button->in_button) + state_type = GTK_STATE_PRELIGHT; +@@ -422,32 +481,107 @@ + else + state_type = GTK_STATE_NORMAL; + +- if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) +- x = widget->allocation.x + widget->allocation.width - (indicator_size + x - widget->allocation.x); ++ /* Hildon change. We want to draw active image always when we have ++ * focus. */ ++ if (GTK_WIDGET_HAS_FOCUS (widget)) ++ state_type = GTK_STATE_ACTIVE; + +- if (GTK_WIDGET_STATE (toggle_button) == GTK_STATE_PRELIGHT) ++ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + { +- GdkRectangle restrict_area; +- GdkRectangle new_area; +- +- restrict_area.x = widget->allocation.x + GTK_CONTAINER (widget)->border_width; +- restrict_area.y = widget->allocation.y + GTK_CONTAINER (widget)->border_width; +- restrict_area.width = widget->allocation.width - (2 * GTK_CONTAINER (widget)->border_width); +- restrict_area.height = widget->allocation.height - (2 * GTK_CONTAINER (widget)->border_width); ++ indicator.x = widget->allocation.x + widget->allocation.width ++ - (indicator.width + indicator.x - widget->allocation.x); + +- if (gdk_rectangle_intersect (area, &restrict_area, &new_area)) +- { +- gtk_paint_flat_box (widget->style, widget->window, GTK_STATE_PRELIGHT, +- GTK_SHADOW_ETCHED_OUT, +- area, widget, "checkbutton", +- new_area.x, new_area.y, +- new_area.width, new_area.height); +- } + } + + gtk_paint_check (widget->style, widget->window, + state_type, shadow_type, + area, widget, "checkbutton", +- x, y, indicator_size, indicator_size); ++ indicator.x, indicator.y, ++ indicator.width, indicator.height); ++ } ++} ++ ++ ++/* calculates the size and position of the indicator ++ * relative to the origin of the check button. ++ */ ++static void gtk_check_button_calc_indicator_size( GtkCheckButton *button, ++ GdkRectangle *rect ) ++{ ++ gint indicator_size; ++ gint indicator_spacing; ++ gint focus_width; ++ gint focus_pad; ++ gboolean interior_focus; ++ GtkWidget *child; ++ GtkWidget *widget = GTK_WIDGET(button); ++ ++ ++ gtk_widget_style_get (widget, "interior_focus", &interior_focus, ++ "focus-line-width", &focus_width, ++ "focus-padding", &focus_pad, ++ "indicator-size", &indicator_size, ++ "indicator-spacing", &indicator_spacing, ++ NULL ++ ); ++ ++ ++ /* HILDON: We want the indicator to be positioned according to the spec. ++ * ++ * NOTE: INDICATOR_SIDE_PADDING and INDICATOR_TOP_PADDING ++ * are maJiKal numbers that make the indicator to be drawn ++ * to correct coordinates, 1337 \o/ ++ */ ++ rect->x = INDICATOR_SIDE_PADDING; ++ rect->y = ( widget->allocation.height - indicator_size ) / 2; ++ ++ /* Hildon: we always add space for the focus */ ++ rect->x += focus_width + focus_pad; ++ ++ child = GTK_BIN (widget)->child; ++ if (interior_focus && child && GTK_WIDGET_VISIBLE (child)) ++ { ++ rect->y += HILDON_SPACING; + } ++ ++ rect->width = indicator_size; ++ rect->height = indicator_size; + } ++ ++static void ++gtk_check_button_clicked (GtkButton *button) ++{ ++ GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button); ++ ++ toggle_button->active = !toggle_button->active; ++ gtk_toggle_button_toggled (toggle_button); ++ ++ gtk_check_button_update_state (button); ++ ++ g_object_notify (G_OBJECT (toggle_button), "active"); ++} ++ ++static void ++gtk_check_button_update_state (GtkButton *button) ++{ ++ GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button); ++ gboolean depressed; ++ GtkStateType new_state; ++ ++ if (toggle_button->inconsistent) ++ depressed = FALSE; ++ else if (button->in_button && button->button_down) ++ depressed = TRUE; ++ else ++ depressed = toggle_button->active; ++ ++ if (button->in_button && ++ (!button->button_down || toggle_button->draw_indicator)) ++ new_state = GTK_STATE_PRELIGHT; ++ else ++ new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL; ++ ++ _gtk_button_set_depressed (button, depressed); ++ gtk_widget_set_state (GTK_WIDGET (toggle_button), new_state); ++} ++ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcombobox.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcombobox.c.diff new file mode 100644 index 0000000000..2376beaeaa --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcombobox.c.diff @@ -0,0 +1,950 @@ +--- gtk+-2.6.4/gtk/gtkcombobox.c 2005-02-25 21:11:08.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkcombobox.c 2005-04-06 16:19:36.406003808 +0300 +@@ -17,6 +17,10 @@ + * Boston, MA 02111-1307, USA. + */ + ++/* ++ * Modified for Nokia Oyj during 2002-2004. ++ */ ++ + #include <config.h> + #include "gtkalias.h" + #include "gtkcombobox.h" +@@ -39,6 +43,8 @@ + #include "gtktreeselection.h" + #include "gtkvseparator.h" + #include "gtkwindow.h" ++#include "gtkcomboboxentry.h" ++#include "gtktoolbar.h" + + #include <gdk/gdkkeysyms.h> + +@@ -52,6 +58,13 @@ + + #include "gtktreeprivate.h" + ++#define HILDON_MAX_WIDTH 406 ++#define HILDON_MAX_HEIGHT 305 ++#define HILDON_MAX_ITEMS 8 ++/* this is also defined in gtkmenu.c and should be replaced with ++ a style property */ ++#define MENU_SCROLL_ARROW_HEIGHT 20 ++ + /* WELCOME, to THE house of evil code */ + + typedef struct _ComboCellInfo ComboCellInfo; +@@ -119,6 +132,9 @@ + GtkTreeViewRowSeparatorFunc row_separator_func; + gpointer row_separator_data; + GtkDestroyNotify row_separator_destroy; ++ ++ /* Hildon hack: state of our style property */ ++ gboolean autodimmed_button; + }; + + /* While debugging this evil code, I have learned that +@@ -201,6 +217,7 @@ + + #define BONUS_PADDING 4 + #define SCROLL_TIME 100 ++#define HILDON_PADDING 25 + + /* common */ + static void gtk_combo_box_class_init (GtkComboBoxClass *klass); +@@ -273,6 +290,14 @@ + gboolean include_internals, + GtkCallback callback, + gpointer callback_data); ++static gboolean gtk_combo_box_focus_in (GtkWidget *widget, ++ GdkEventFocus *event); ++static gint gtk_combo_box_focus (GtkWidget *widget, ++ GtkDirectionType dir); ++static void gtk_combo_box_child_focus_in (GtkWidget *widget, ++ GdkEventFocus *event); ++static void gtk_combo_box_child_focus_out (GtkWidget *widget, ++ GdkEventFocus *event); + static gboolean gtk_combo_box_expose_event (GtkWidget *widget, + GdkEventExpose *event); + static gboolean gtk_combo_box_scroll_event (GtkWidget *widget, +@@ -285,6 +310,12 @@ + + static void gtk_combo_box_check_appearance (GtkComboBox *combo_box); + ++/* <Hildon addition> */ ++extern void gtk_grab_combo_box_entry_focus (GtkComboBoxEntry *entry_box); ++ ++static void gtk_combo_box_grab_focus (GtkWidget *focus_widget); ++/* </hildon addition> */ ++ + /* listening to the model */ + static void gtk_combo_box_model_row_inserted (GtkTreeModel *model, + GtkTreePath *path, +@@ -424,6 +455,9 @@ + static void gtk_combo_box_start_editing (GtkCellEditable *cell_editable, + GdkEvent *event); + ++static void gtk_combo_box_menu_position_above (GtkMenu *menu, gint *x, ++ gint *y, gboolean *push_in, ++ gpointer user_data); + + GType + gtk_combo_box_get_type (void) +@@ -479,6 +513,25 @@ + return combo_box_type; + } + ++/* Hildon addition: Check if the button needs to be dimmed */ ++static void hildon_check_autodim(GtkComboBox *combo_box) ++{ ++ GtkWidget *widget; ++ GtkTreeModel *model; ++ GtkTreeIter iter; ++ ++ widget = combo_box->priv->button; ++ model = combo_box->priv->model; ++ ++ if (combo_box->priv->autodimmed_button && widget != NULL) ++ { ++ if (model && gtk_tree_model_get_iter_first(model, &iter)) ++ gtk_widget_set_sensitive(widget, TRUE); ++ else ++ gtk_widget_set_sensitive(widget, FALSE); ++ } ++} ++ + /* common */ + static void + gtk_combo_box_class_init (GtkComboBoxClass *klass) +@@ -504,6 +557,11 @@ + widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate; + widget_class->style_set = gtk_combo_box_style_set; + widget_class->state_changed = gtk_combo_box_state_changed; ++ ++ /* Hildon addition */ ++ widget_class->grab_focus = gtk_combo_box_grab_focus; ++ widget_class->focus_in_event = gtk_combo_box_focus_in; ++ widget_class->focus = gtk_combo_box_focus; + + gtk_object_class = (GtkObjectClass *)klass; + gtk_object_class->destroy = gtk_combo_box_destroy; +@@ -687,6 +745,41 @@ + FALSE, + G_PARAM_READABLE)); + ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("hildonlike", ++ _("Size request"), ++ _("Size allocate"), ++ FALSE, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("arrow-height", ++ P_("Arrow height for option menu"), ++ P_("Sets arrow height"), ++ 0, ++ G_MAXINT, ++ 28, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("arrow-width", ++ P_("Arrow width for option menu"), ++ P_("Sets arrow width"), ++ 0, ++ G_MAXINT, ++ 26, ++ G_PARAM_READWRITE)); ++ ++ ++ /* Hildon hack: style property for enabling the autodimming hack */ ++ gtk_widget_class_install_style_property ( ++ widget_class, ++ g_param_spec_boolean ("autodimmed_button", ++ _("Autodimmed button"), ++ _("Automatically dims the button if the list is empty"), ++ FALSE, ++ G_PARAM_READABLE)); ++ + g_type_class_add_private (object_class, sizeof (GtkComboBoxPrivate)); + } + +@@ -731,6 +824,11 @@ + combo_box->priv->editing_canceled = FALSE; + combo_box->priv->auto_scroll = FALSE; + combo_box->priv->focus_on_click = TRUE; ++ ++ /* Hildon hack: default value for our style property if it is queried before ++ * the style is set */ ++ combo_box->priv->autodimmed_button = FALSE; ++ GTK_WIDGET_SET_FLAGS ( combo_box, GTK_CAN_FOCUS ); + } + + static void +@@ -911,7 +1009,19 @@ + { + GtkComboBox *combo_box = GTK_COMBO_BOX (widget); + ++ /* Hildon hack: read the state of our style property */ ++ gtk_widget_style_get (GTK_WIDGET(combo_box), ++ "autodimmed_button", &(combo_box->priv->autodimmed_button), NULL); ++ + gtk_combo_box_check_appearance (combo_box); ++ ++ /* Hildon hack: handle the dimmed state of the button in regards whether ++ * the list is empty or not. This has to be done here because ++ * in the callback functions of GtkTreeModel the button widget ++ * may have not yet been set. However, we repeat this stuff in ++ * those functions, because later the button will be set and ++ * we want to update our state. */ ++ hildon_check_autodim(combo_box); + + if (combo_box->priv->tree_view && combo_box->priv->cell_view) + gtk_cell_view_set_background_color (GTK_CELL_VIEW (combo_box->priv->cell_view), +@@ -922,10 +1032,17 @@ + gtk_combo_box_button_toggled (GtkWidget *widget, + gpointer data) + { ++ gboolean hildonlike; + GtkComboBox *combo_box = GTK_COMBO_BOX (data); ++ ++ gtk_widget_style_get (GTK_WIDGET (combo_box), "hildonlike", &hildonlike, NULL); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) + { ++ if (hildonlike) { ++ gtk_combo_box_grab_focus(GTK_WIDGET(combo_box)); ++ } ++ + if (!combo_box->priv->popup_in_progress) + gtk_combo_box_popup (combo_box); + } +@@ -1103,7 +1220,7 @@ + { + gtk_container_remove (GTK_CONTAINER (combo_box->priv->popup_frame), + combo_box->priv->popup_widget); +- g_object_unref (combo_box->priv->popup_widget); ++ g_object_unref (G_OBJECT (combo_box->priv->popup_widget)); + combo_box->priv->popup_widget = NULL; + } + +@@ -1175,7 +1292,7 @@ + popup); + + gtk_widget_show (popup); +- g_object_ref (popup); ++ g_object_ref (G_OBJECT (popup)); + combo_box->priv->popup_widget = popup; + } + } +@@ -1250,9 +1367,13 @@ + GtkRequisition requisition; + GList *children; + gint screen_width; ++ gint screen_height; + gint menu_xpos; + gint menu_ypos; +- gint menu_width; ++ gint menu_width, menu_height; ++ gint counter = 0; ++ gint scroll_offset = 0; ++ gint max_items = 0; + + g_return_if_fail (GTK_IS_COMBO_BOX (user_data)); + +@@ -1261,6 +1382,7 @@ + + gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition); + menu_width = requisition.width; ++ menu_height = requisition.height; + + active = gtk_menu_get_active (GTK_MENU (combo_box->priv->popup_widget)); + gdk_window_get_origin (widget->window, &menu_xpos, &menu_ypos); +@@ -1275,6 +1397,11 @@ + } + + children = GTK_MENU_SHELL (combo_box->priv->popup_widget)->children; ++ child = children->data; ++ gtk_widget_get_child_requisition (child, &requisition); ++ max_items = (HILDON_MAX_HEIGHT-2*MENU_SCROLL_ARROW_HEIGHT)/requisition.height; ++ max_items -= 1; ++ + while (children) + { + child = children->data; +@@ -1284,27 +1411,119 @@ + + if (GTK_WIDGET_VISIBLE (child)) + { +- gtk_widget_get_child_requisition (child, &requisition); +- menu_ypos -= requisition.height; ++ if (counter < max_items - 2) ++ menu_ypos -= requisition.height; ++ if (counter > max_items - 3) ++ scroll_offset += requisition.height; + } +- ++ ++ counter++; + children = children->next; + } ++ gtk_widget_get_child_requisition (GTK_WIDGET(menu), &requisition); + ++ if ( requisition.height >= HILDON_MAX_HEIGHT ) ++ menu_ypos -= MENU_SCROLL_ARROW_HEIGHT; ++ + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + menu_xpos = menu_xpos + widget->allocation.width - menu_width; + ++ { ++ gint menu_xpad, menu_ypad; ++ gtk_widget_style_get (GTK_WIDGET (menu), ++ "horizontal-padding", &menu_xpad, ++ "vertical-padding", &menu_ypad, ++ NULL); ++ menu_xpos -= menu_xpad - 3; ++ menu_ypos -= menu_ypad - 1; ++ } ++ + /* Clamp the position on screen */ + screen_width = gdk_screen_get_width (gtk_widget_get_screen (widget)); ++ screen_height = gdk_screen_get_height (gtk_widget_get_screen (widget)); + + if (menu_xpos < 0) + menu_xpos = 0; + else if ((menu_xpos + menu_width) > screen_width) + menu_xpos -= ((menu_xpos + menu_width) - screen_width); + ++ if (menu_ypos + menu_height > screen_height) ++ { ++ menu_ypos = screen_height - menu_height; ++ } ++ if (menu_ypos < 0) ++ { ++ menu_ypos = 0; ++ } ++ ++ GTK_MENU(combo_box->priv->popup_widget)->scroll_offset = scroll_offset; ++ + *x = menu_xpos; + *y = menu_ypos; + ++ *push_in = FALSE; ++} ++ ++static void ++gtk_combo_box_menu_position_above (GtkMenu *menu, ++ gint *x, ++ gint *y, ++ gboolean *push_in, ++ gpointer user_data) ++{ ++ /* ++ * This function positiones the menu above widgets. ++ * This is a modified version of the position function ++ * gtk_combo_box_position_over. ++ * NB: This is only used when gtkcombobox is in toolbar! ++ */ ++ ++ GtkWidget *child; ++ GtkRequisition requisition; ++ GList *children; ++ gint screen_width; ++ gint menu_xpos; ++ gint menu_ypos; ++ gint gx,gy; ++ gint menu_width; ++ GtkWidget *widget; ++ ++ widget = GTK_WIDGET(user_data); ++ ++ gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition); ++ menu_width = requisition.width; ++ ++ gdk_window_get_position(GDK_WINDOW(widget->window), &gx, &gy); ++ gtk_widget_translate_coordinates (widget, gtk_widget_get_toplevel(widget), ++ gx, gy, &menu_xpos, &menu_ypos); ++ ++ menu_ypos -= GTK_WIDGET(menu)->style->ythickness * 2; ++ menu_ypos -= GTK_WIDGET(widget)->style->ythickness * 2; ++ ++ menu_ypos -= widget->allocation.height; ++ ++ children = GTK_MENU_SHELL (menu)->children; ++ while (children) { ++ child = children->data; ++ if (GTK_WIDGET_VISIBLE (child)){ ++ gtk_widget_get_child_requisition (child, &requisition); ++ menu_ypos -= requisition.height; ++ } ++ children = children->next; ++ } ++ ++ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ++ menu_xpos = menu_xpos + widget->allocation.width - menu_width; ++ ++ screen_width = gdk_screen_get_width (gtk_widget_get_screen (widget)); ++ ++ if (menu_xpos < 0) ++ menu_xpos = 0; ++ else if ((menu_xpos + menu_width) > screen_width) ++ menu_xpos -= ((menu_xpos + menu_width) - screen_width); ++ ++ *x = menu_xpos; ++ *y = menu_ypos; + *push_in = TRUE; + } + +@@ -1318,21 +1537,44 @@ + GtkComboBox *combo_box; + GtkWidget *menu_item; + ++ gboolean hildonlike; ++ + combo_box = GTK_COMBO_BOX (user_data); + +- if (combo_box->priv->wrap_width > 0 || combo_box->priv->cell_view == NULL) +- gtk_combo_box_menu_position_below (menu, x, y, push_in, user_data); +- else ++ gtk_widget_style_get (GTK_WIDGET (combo_box), "hildonlike", &hildonlike, NULL); ++ ++ if (!(combo_box->priv->wrap_width > 0 || combo_box->priv->cell_view == NULL)) + { + /* FIXME handle nested menus better */ + menu_item = gtk_menu_get_active (GTK_MENU (combo_box->priv->popup_widget)); + if (menu_item) + gtk_menu_shell_select_item (GTK_MENU_SHELL (combo_box->priv->popup_widget), + menu_item); ++ } + +- gtk_combo_box_menu_position_over (menu, x, y, push_in, user_data); ++ if (hildonlike) ++ { ++ /* HILDON: we check if combobox is in a toolbar */ ++ gboolean in_toolbar = gtk_widget_get_ancestor(GTK_WIDGET(combo_box), GTK_TYPE_TOOLBAR) != NULL; ++ if (in_toolbar) ++ { ++ /*due to limits in combo's sizes we use position_over here also*/ ++ gtk_combo_box_menu_position_over (menu, x, y, push_in, user_data); ++ return; ++ } + } + ++ if (combo_box->priv->wrap_width > 0 || combo_box->priv->cell_view == NULL) ++/* ++ * Changed because we always want the combo box position to be over ++ * the combo box, unless it's in toolbar. ++ * ++ gtk_combo_box_menu_position_below (menu, x, y, push_in, user_data); ++*/ ++ gtk_combo_box_menu_position_over (menu, x, y, push_in, user_data); ++ else ++ gtk_combo_box_menu_position_over (menu, x, y, push_in, user_data); ++ + } + + static void +@@ -1430,7 +1672,7 @@ + list = cells; + while (list) + { +- g_object_get (list->data, "sensitive", &sensitive, NULL); ++ g_object_get (G_OBJECT (list->data), "sensitive", &sensitive, NULL); + + if (sensitive) + break; +@@ -1469,7 +1711,7 @@ + list = cells; + while (list) + { +- g_object_get (list->data, "sensitive", &sensitive, NULL); ++ g_object_get (G_OBJECT (list->data), "sensitive", &sensitive, NULL); + + if (sensitive) + break; +@@ -1516,8 +1758,8 @@ + if (menu != combo_box->priv->popup_widget && child == children) + { + separator = GTK_WIDGET (child->next->data); +- g_object_set (item, "visible", sensitive, NULL); +- g_object_set (separator, "visible", sensitive, NULL); ++ g_object_set (G_OBJECT (item), "visible", sensitive, NULL); ++ g_object_set (G_OBJECT (separator), "visible", sensitive, NULL); + } + else + gtk_widget_set_sensitive (item, sensitive); +@@ -1543,16 +1785,19 @@ + if (gtk_tree_row_reference_valid (combo_box->priv->active_row)) + { + path = gtk_tree_row_reference_get_path (combo_box->priv->active_row); +- active_item = gtk_tree_path_get_indices (path)[0]; +- gtk_tree_path_free (path); +- +- if (combo_box->priv->add_tearoffs) +- active_item++; ++ if (path) ++ { ++ active_item = gtk_tree_path_get_indices (path)[0]; ++ gtk_tree_path_free (path); ++ ++ if (combo_box->priv->add_tearoffs) ++ active_item++; ++ } + } + + /* FIXME handle nested menus better */ +- gtk_menu_set_active (GTK_MENU (combo_box->priv->popup_widget), active_item); +- ++ gtk_menu_set_active (GTK_MENU (combo_box->priv->popup_widget), active_item); ++ + if (combo_box->priv->wrap_width == 0) + { + width = GTK_WIDGET (combo_box)->allocation.width; +@@ -1684,6 +1929,7 @@ + { + gint padding; + GtkRequisition req; ++ gboolean hildonlike; + + if (combo_box->priv->cell_view) + gtk_widget_style_get (combo_box->priv->cell_view, +@@ -1691,9 +1937,17 @@ + NULL); + else + padding = 0; ++ ++ gtk_widget_style_get (GTK_WIDGET (combo_box), "hildonlike", &hildonlike, ++ NULL); + + /* add some pixels for good measure */ +- padding += BONUS_PADDING; ++ /* Hildon: we need more padding because our theming ++ * Not elegent way to do it anyway ... */ ++ if (hildonlike) ++ padding += HILDON_PADDING; ++ else ++ padding += BONUS_PADDING; + + if (combo_box->priv->cell_view) + gtk_cell_view_get_size_of_row (GTK_CELL_VIEW (combo_box->priv->cell_view), +@@ -1709,6 +1963,7 @@ + { + GtkTreeIter iter; + GtkTreePath *path; ++ gboolean hildonlike; + + if (!combo_box->priv->model || + !gtk_tree_model_get_iter_first (combo_box->priv->model, &iter)) +@@ -1717,6 +1972,7 @@ + combo_box->priv->width = 0; + + path = gtk_tree_path_new_from_indices (0, -1); ++ gtk_widget_style_get (GTK_WIDGET (combo_box), "hildonlike", &hildonlike, NULL); + + do + { +@@ -1727,8 +1983,11 @@ + path, &req); + else + req.width = 0; ++ /* Hildon: we need more padding because our theming ++ * Not elegent way to do it anyway ... */ + +- combo_box->priv->width = MAX (combo_box->priv->width, req.width); ++ combo_box->priv->width = MAX (combo_box->priv->width, ++ req.width + (hildonlike == 1) ? HILDON_PADDING : 0 ); + + gtk_tree_path_next (path); + } +@@ -1744,10 +2003,19 @@ + gint width, height; + gint focus_width, focus_pad; + GtkRequisition bin_req; ++ gboolean hildonlike; ++ gint arrow_width; ++ gint arrow_height; + + GtkComboBox *combo_box = GTK_COMBO_BOX (widget); + + gtk_combo_box_check_appearance (combo_box); ++ ++ /* get hildonlike style property */ ++ gtk_widget_style_get (widget, "hildonlike", ++ &hildonlike, "arrow-width", ++ &arrow_width, "arrow-height", ++ &arrow_height, NULL); + + /* common */ + gtk_widget_size_request (GTK_BIN (widget)->child, &bin_req); +@@ -1829,6 +2097,13 @@ + requisition->height = MAX (requisition->height, button_req.height); + requisition->width += button_req.width; + } ++ ++ requisition->width = MIN (requisition->width, HILDON_MAX_WIDTH); ++ ++ /* HILDON quick fix: height forced to be 28px as specified by Hildon specs. */ ++ if (hildonlike) ++ if (requisition->height > arrow_height) ++ requisition->height = arrow_height; + } + + static void +@@ -1839,17 +2114,32 @@ + gint focus_width, focus_pad; + GtkAllocation child; + GtkRequisition req; ++ GtkRequisition child_req; + gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; ++ gboolean hildonlike; ++ gint arrow_width; ++ gint arrow_height; + + gtk_combo_box_check_appearance (combo_box); + +- widget->allocation = *allocation; +- + gtk_widget_style_get (GTK_WIDGET (widget), + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, ++ "hildonlike", &hildonlike, ++ "arrow-width", &arrow_width, ++ "arrow-height", &arrow_height, + NULL); + ++ /* HILDON: set height to fixed value */ ++ if (hildonlike) ++ if (allocation->height > arrow_height) ++ { ++ allocation->y += (allocation->height - arrow_height) / 2; ++ allocation->height = arrow_height; ++ } ++ ++ widget->allocation = *allocation; ++ + if (!combo_box->priv->tree_view) + { + if (combo_box->priv->cell_view) +@@ -1909,7 +2199,16 @@ + child.width = child.x; + child.x = allocation->x + + border_width + xthickness + focus_width + focus_pad; +- child.width -= child.x; ++ child.width -= child.x + xthickness; ++ } ++ ++ if (hildonlike) ++ { ++ gtk_widget_size_request(GTK_BIN(widget)->child, &child_req); ++ child.y += (child.height - child_req.height) / 2; ++ child.height = child_req.height; ++ gtk_widget_hide(combo_box->priv->separator); ++ gtk_widget_hide(combo_box->priv->arrow); + } + + child.width = MAX (1, child.width); +@@ -1928,6 +2227,11 @@ + child.height = allocation->height; + child.width = MAX (1, child.width); + child.height = MAX (1, child.height); ++ ++ /* HILDON quick fix */ ++ if (hildonlike) ++ child.width = arrow_width; ++ + gtk_widget_size_allocate (combo_box->priv->button, &child); + + if (is_rtl) +@@ -1938,6 +2242,13 @@ + child.width = allocation->width - req.width; + child.width = MAX (1, child.width); + child.height = MAX (1, child.height); ++ ++ if (hildonlike) ++ { ++ gtk_widget_size_request(GTK_BIN(widget)->child, &child_req); ++ child.y += (child.height - child_req.height) / 2; ++ child.height = child_req.height; ++ } + gtk_widget_size_allocate (GTK_BIN (widget)->child, &child); + } + } +@@ -1990,6 +2301,11 @@ + GTK_WIDGET (combo_box->priv->cell_view_frame)->style->ythickness); + } + } ++ ++ gtk_widget_size_request(GTK_BIN(widget)->child, &child_req); ++ ++ child.y += (child.height - child_req.height) / 2; ++ child.height = child_req.height; + + child.width = MAX (1, child.width); + child.height = MAX (1, child.height); +@@ -2036,6 +2352,8 @@ + gtk_cell_view_set_displayed_row (GTK_CELL_VIEW (combo_box->priv->cell_view), NULL); + } + ++ ++ + static void + gtk_combo_box_forall (GtkContainer *container, + gboolean include_internals, +@@ -2057,6 +2375,46 @@ + } + + static gboolean ++gtk_combo_box_focus_in (GtkWidget *widget, ++ GdkEventFocus *event) ++{ ++ g_return_val_if_fail( widget, FALSE ); ++ ++ if ( !GTK_CONTAINER( widget )->focus_child ) ++ { ++ gtk_combo_box_grab_focus ( GTK_WIDGET(widget) ); ++ return TRUE; ++ } ++ return FALSE; ++} ++ ++static gint ++gtk_combo_box_focus (GtkWidget *widget, ++ GtkDirectionType dir) ++{ ++ g_return_val_if_fail (widget, FALSE); ++ if (GTK_WIDGET_HAS_FOCUS(widget)||GTK_CONTAINER(widget)->focus_child) ++ return FALSE; ++ ++ gtk_widget_grab_focus (widget); ++ return TRUE; ++} ++ ++static void ++gtk_combo_box_child_focus_in (GtkWidget * widget, ++ GdkEventFocus *event) ++{ ++ gtk_widget_event( widget, (GdkEvent*)event ); ++} ++ ++static void ++gtk_combo_box_child_focus_out (GtkWidget * widget, ++ GdkEventFocus *event) ++{ ++ gtk_widget_event( widget, (GdkEvent*)event ); ++} ++ ++static gboolean + gtk_combo_box_expose_event (GtkWidget *widget, + GdkEventExpose *event) + { +@@ -2357,11 +2715,13 @@ + gboolean add_children) + { + GtkWidget *menu; ++ gboolean hildonlike; ++ ++ gtk_widget_style_get (GTK_WIDGET (combo_box), "hildonlike", &hildonlike, NULL); + + if (combo_box->priv->cell_view) + { + combo_box->priv->button = gtk_toggle_button_new (); +- + g_signal_connect (combo_box->priv->button, "toggled", + G_CALLBACK (gtk_combo_box_button_toggled), combo_box); + g_signal_connect_after (combo_box->priv->button, +@@ -2400,6 +2760,9 @@ + gtk_widget_show_all (combo_box->priv->button); + } + ++ g_signal_connect_swapped (combo_box->priv->button, "focus_in_event", G_CALLBACK (gtk_combo_box_child_focus_in), combo_box); ++ g_signal_connect_swapped (combo_box->priv->button, "focus_out_event", G_CALLBACK (gtk_combo_box_child_focus_out), combo_box); ++ + g_signal_connect (combo_box->priv->button, "button_press_event", + G_CALLBACK (gtk_combo_box_menu_button_press), + combo_box); +@@ -2749,6 +3112,9 @@ + { + GtkComboBox *combo_box = GTK_COMBO_BOX (user_data); + ++ /* Hildon hack: sets the popup button sensitive if we have items in the list */ ++ hildon_check_autodim(combo_box); ++ + gtk_tree_row_reference_inserted (G_OBJECT (user_data), path); + + if (combo_box->priv->tree_view) +@@ -2783,7 +3149,10 @@ + if (combo_box->priv->tree_view) + gtk_combo_box_list_popup_resize (combo_box); + else +- gtk_combo_box_menu_row_deleted (model, path, user_data); ++ gtk_combo_box_menu_row_deleted (model, path, user_data); ++ ++ /* Hildon hack: dim the popup button in case item count reaches 0 */ ++ hildon_check_autodim(combo_box); + } + + static void +@@ -3458,10 +3827,46 @@ + gboolean found; + GtkTreeIter iter; + GtkTreeIter new_iter; ++ gboolean hildonlike; ++ gint index = gtk_combo_box_get_active (combo_box); ++ gint new_index; ++ gint items = 0; + + if (combo_box->priv->model == NULL) + return FALSE; + ++ items = gtk_tree_model_iter_n_children (combo_box->priv->model, NULL); ++ ++ gtk_widget_style_get (GTK_WIDGET (combo_box), "hildonlike", ++ &hildonlike, NULL); ++ ++ /* Hildon select key */ ++ if (hildonlike) ++ { ++ if (event->keyval == GDK_KP_Enter || event->keyval == GDK_Return) ++ { ++ gtk_combo_box_popup (combo_box); ++ return TRUE; ++ } ++ else if (event->keyval == GDK_Left && items != 0) ++ { ++ new_index = (index == 0) ? items - 1 : index - 1; ++ gtk_combo_box_set_active (combo_box, new_index); ++ return TRUE; ++ } ++ else if (event->keyval == GDK_Right && items != 0) ++ { ++ new_index = (index == items - 1) ? 0 : index + 1; ++ gtk_combo_box_set_active (combo_box, new_index); ++ return TRUE; ++ } ++ else if ((event->keyval == GDK_Down || event->keyval == GDK_KP_Down) ++ || (event->keyval == GDK_Up || event->keyval == GDK_KP_Up)) ++ { ++ return FALSE; ++ } ++ } ++ + if ((event->keyval == GDK_Down || event->keyval == GDK_KP_Down) && + state == GDK_MOD1_MASK) + { +@@ -3714,7 +4119,7 @@ + + combo_box = GTK_COMBO_BOX (layout); + +- g_object_ref (cell); ++ g_object_ref (G_OBJECT (cell)); + gtk_object_sink (GTK_OBJECT (cell)); + + info = g_new0 (ComboCellInfo, 1); +@@ -3771,7 +4176,7 @@ + + combo_box = GTK_COMBO_BOX (layout); + +- g_object_ref (cell); ++ g_object_ref (G_OBJECT (cell)); + gtk_object_sink (GTK_OBJECT (cell)); + + info = g_new0 (ComboCellInfo, 1); +@@ -3833,7 +4238,7 @@ + ComboCellInfo *info = (ComboCellInfo *)i->data; + + gtk_combo_box_cell_layout_clear_attributes (layout, info->cell); +- g_object_unref (info->cell); ++ g_object_unref (G_OBJECT (info->cell)); + g_free (info); + i->data = NULL; + } +@@ -3922,7 +4327,7 @@ + + if (GTK_IS_MENU_ITEM (parent) && + gtk_menu_item_get_submenu (GTK_MENU_ITEM (parent))) +- g_object_set (cell, "sensitive", TRUE, NULL); ++ g_object_set (G_OBJECT (cell), "sensitive", TRUE, NULL); + } + + +@@ -4137,7 +4542,7 @@ + GtkWidget * + gtk_combo_box_new (void) + { +- return g_object_new (GTK_TYPE_COMBO_BOX, NULL); ++ return GTK_WIDGET (g_object_new (GTK_TYPE_COMBO_BOX, NULL)); + } + + /** +@@ -4157,7 +4562,9 @@ + + g_return_val_if_fail (GTK_IS_TREE_MODEL (model), NULL); + +- combo_box = g_object_new (GTK_TYPE_COMBO_BOX, "model", model, NULL); ++ combo_box = GTK_COMBO_BOX (g_object_new (GTK_TYPE_COMBO_BOX, ++ "model", model, ++ NULL)); + + return GTK_WIDGET (combo_box); + } +@@ -4512,6 +4919,7 @@ + if (!model) + { + gtk_combo_box_unset_model (combo_box); ++ hildon_check_autodim(combo_box); + return; + } + +@@ -4524,7 +4932,7 @@ + gtk_combo_box_unset_model (combo_box); + + combo_box->priv->model = model; +- g_object_ref (combo_box->priv->model); ++ g_object_ref (G_OBJECT (combo_box->priv->model)); + + combo_box->priv->inserted_id = + g_signal_connect (combo_box->priv->model, "row_inserted", +@@ -4561,6 +4969,8 @@ + if (combo_box->priv->cell_view) + gtk_cell_view_set_model (GTK_CELL_VIEW (combo_box->priv->cell_view), + combo_box->priv->model); ++ ++ hildon_check_autodim(combo_box); + } + + /** +@@ -5140,3 +5550,33 @@ + + return combo->priv->focus_on_click; + } ++/* Hildon addition: ++ * This is added, because we need to be able grab focus for our widget. ++ * Focus grabbing can happen it two ways: If we are using combobox entry ++ * we grab entry widget focus, otherwise togglebutton focus ++ */ ++static void gtk_combo_box_grab_focus (GtkWidget *focus_widget) ++{ ++ GtkComboBox *combo_box; ++ GtkComboBoxEntry *combo_entry; ++ gboolean hildonlike; ++ ++ combo_box = GTK_COMBO_BOX (focus_widget); ++ ++ gtk_widget_style_get (focus_widget, "hildonlike", ++ &hildonlike, NULL); ++ ++ if (hildonlike) ++ { ++ /* Are we in entry mode ? */ ++ if ( GTK_IS_COMBO_BOX_ENTRY(combo_box)) ++ { ++ combo_entry = GTK_COMBO_BOX_ENTRY (combo_box); ++ gtk_grab_combo_box_entry_focus (combo_entry); ++ } ++ else ++ { ++ gtk_widget_grab_focus (combo_box->priv->button); ++ } ++ } ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcomboboxentry.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcomboboxentry.c.diff new file mode 100644 index 0000000000..43a861abd6 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcomboboxentry.c.diff @@ -0,0 +1,24 @@ +--- gtk+-2.6.4/gtk/gtkcomboboxentry.c 2004-11-20 01:18:37.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkcomboboxentry.c 2005-04-06 16:19:36.407003656 +0300 +@@ -55,6 +55,8 @@ + gpointer user_data); + static gboolean gtk_combo_box_entry_mnemonic_activate (GtkWidget *entry, + gboolean group_cycling); ++/*static void gtk_grab_combo_box_entry_focus (GtkComboBoxEntry *entry_box);*/ ++ + static void has_frame_changed (GtkComboBoxEntry *entry_box, + GParamSpec *pspec, + gpointer data); +@@ -382,3 +384,12 @@ + + return entry_box; + } ++ ++/* Hildon: this is added because we need to grab focus from caption control ++ * to ComboBox entry. ++ */ ++void ++gtk_grab_combo_box_entry_focus (GtkComboBoxEntry *entry_box) ++{ ++ gtk_widget_grab_focus (entry_box->priv->entry); ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcontainer.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcontainer.c.diff new file mode 100644 index 0000000000..abd251bdcb --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkcontainer.c.diff @@ -0,0 +1,284 @@ +--- gtk+-2.6.4/gtk/gtkcontainer.c 2005-03-01 08:28:55.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkcontainer.c 2005-04-06 16:19:36.410003200 +0300 +@@ -37,10 +37,13 @@ + #include "gtkwindow.h" + #include "gtkintl.h" + #include "gtktoolbar.h" ++#include "gtkmenu.h" ++#include "gtkentry.h" ++#include "gtktextview.h" ++#include "gtkwidget.h" + #include <gobject/gobjectnotifyqueue.c> + #include <gobject/gvaluecollector.h> + +- + enum { + ADD, + REMOVE, +@@ -56,6 +59,19 @@ + PROP_CHILD + }; + ++enum { ++ FOCUS_MOVE_OK, ++ FOCUS_MOVE_OK_NO_MOVE, ++ FOCUS_MOVE_FAIL_NO_TEXT ++}; ++ ++typedef struct ++{ ++ GtkWidget *menu; ++ void *func; ++ GtkWidgetTapAndHoldFlags flags; ++} GtkContainerTAH; ++ + #define PARAM_SPEC_PARAM_ID(pspec) ((pspec)->param_id) + #define PARAM_SPEC_SET_PARAM_ID(pspec, id) ((pspec)->param_id = (id)) + +@@ -87,6 +103,9 @@ + static gboolean gtk_container_focus_move (GtkContainer *container, + GList *children, + GtkDirectionType direction); ++static gint gtk_container_focus_move_with_tab (GtkContainer *container, ++ GtkDirectionType direction, ++ GtkWidget **fallback); + static void gtk_container_children_callback (GtkWidget *widget, + gpointer client_data); + static void gtk_container_show_all (GtkWidget *widget); +@@ -95,10 +114,14 @@ + GdkEventExpose *event); + static void gtk_container_map (GtkWidget *widget); + static void gtk_container_unmap (GtkWidget *widget); +- ++static void gtk_container_tap_and_hold_setup (GtkWidget *widget, ++ GtkWidget *menu, GtkCallback func, GtkWidgetTapAndHoldFlags flags); + static gchar* gtk_container_child_default_composite_name (GtkContainer *container, + GtkWidget *child); ++static void gtk_container_tap_and_hold_setup_forall( GtkWidget *widget, ++ GtkContainerTAH *tah ); + ++static void gtk_container_grab_focus( GtkWidget *focus_widget ); + + /* --- variables --- */ + static const gchar vadjustment_key[] = "gtk-vadjustment"; +@@ -190,7 +213,9 @@ + widget_class->map = gtk_container_map; + widget_class->unmap = gtk_container_unmap; + widget_class->focus = gtk_container_focus; +- ++ widget_class->tap_and_hold_setup = gtk_container_tap_and_hold_setup; ++ widget_class->grab_focus = gtk_container_grab_focus; ++ + class->add = gtk_container_add_unimplemented; + class->remove = gtk_container_remove_unimplemented; + class->check_resize = gtk_container_real_check_resize; +@@ -2011,6 +2036,24 @@ + GtkWidget *focus_child; + GtkWidget *child; + ++ /* ++ * If there's an item focus already and tab was pressed, only go thru ++ * GtkEntries and GtkTextviews. Do _not_ jump from last widget to the first ++ * one and vice verca. ++ */ ++ if ((direction == GTK_DIR_TAB_FORWARD || direction == GTK_DIR_TAB_BACKWARD) && ++ container->focus_child != NULL) ++ { ++ GtkWidget *fallback; ++ fallback = NULL; ++ if (gtk_container_focus_move_with_tab (container, direction, &fallback) ++ != FOCUS_MOVE_FAIL_NO_TEXT) ++ return TRUE; ++ ++ if (fallback && gtk_widget_child_focus (fallback, direction)) ++ return TRUE; ++ } ++ + focus_child = container->focus_child; + + while (children) +@@ -2019,7 +2062,7 @@ + children = children->next; + + if (!child) +- continue; ++ continue; + + if (focus_child) + { +@@ -2027,8 +2070,8 @@ + { + focus_child = NULL; + +- if (gtk_widget_child_focus (child, direction)) +- return TRUE; ++ if (gtk_widget_child_focus (child, direction)) ++ return TRUE; + } + } + else if (GTK_WIDGET_DRAWABLE (child) && +@@ -2042,6 +2085,105 @@ + return FALSE; + } + ++static gint ++gtk_container_focus_move_with_tab (GtkContainer *container, ++ GtkDirectionType direction, ++ GtkWidget **fallback) ++{ ++ GList *children, *sorted_children; ++ GtkWidget *child; ++ GtkWidget *focus_child; ++ gboolean found_text; ++ gint ret; ++ ++ found_text = FALSE; ++ focus_child = container->focus_child; ++ ++ /* This part is copied from gtk_container_focus() */ ++ if (container->has_focus_chain) ++ children = g_list_copy (get_focus_chain (container)); ++ else ++ children = gtk_container_get_all_children (container); ++ ++ if (container->has_focus_chain && ++ (direction == GTK_DIR_TAB_FORWARD || ++ direction == GTK_DIR_TAB_BACKWARD)) ++ { ++ sorted_children = g_list_copy (children); ++ ++ if (direction == GTK_DIR_TAB_BACKWARD) ++ sorted_children = g_list_reverse (sorted_children); ++ } ++ else ++ sorted_children = _gtk_container_focus_sort (container, children, ++ direction, NULL); ++ g_list_free(children); ++ children = sorted_children; ++ ++ while (children) ++ { ++ child = children->data; ++ children = children->next; ++ ++ if (!child) ++ continue; ++ ++ if (GTK_IS_ENTRY (child) || GTK_IS_TEXT_VIEW (child)) ++ found_text = TRUE; ++ ++ if (focus_child) ++ { ++ if (child == focus_child) ++ { ++ focus_child = NULL; ++ if (GTK_IS_CONTAINER (child)) ++ { ++ ret = gtk_container_focus_move_with_tab (GTK_CONTAINER (child), ++ direction, ++ fallback); ++ if (ret == FOCUS_MOVE_OK) ++ { ++ g_list_free (sorted_children); ++ return FOCUS_MOVE_OK; ++ } ++ else if (ret == FOCUS_MOVE_OK_NO_MOVE) ++ found_text = TRUE; ++ } ++ } ++ } ++ else if (GTK_WIDGET_DRAWABLE (child) && ++ gtk_widget_is_ancestor (child, GTK_WIDGET (container))) ++ { ++ if (GTK_IS_ENTRY (child) || GTK_IS_TEXT_VIEW (child)) ++ { ++ if (gtk_widget_child_focus (child, direction)) ++ { ++ g_list_free (sorted_children); ++ return FOCUS_MOVE_OK; ++ } ++ } ++ else if (GTK_IS_CONTAINER (child)) ++ { ++ ret = gtk_container_focus_move_with_tab (GTK_CONTAINER (child), ++ direction, ++ fallback); ++ if (ret == FOCUS_MOVE_OK) ++ { ++ g_list_free (sorted_children); ++ return FOCUS_MOVE_OK; ++ } ++ else if (ret == FOCUS_MOVE_OK_NO_MOVE) ++ found_text = TRUE; ++ } ++ if (GTK_WIDGET_CAN_FOCUS (child) && *fallback == NULL) ++ *fallback = child; ++ } ++ } ++ ++ g_list_free (sorted_children); ++ ++ return found_text ? FOCUS_MOVE_OK_NO_MOVE : FOCUS_MOVE_FAIL_NO_TEXT; ++} + + static void + gtk_container_children_callback (GtkWidget *widget, +@@ -2463,3 +2605,58 @@ + gdk_event_free (child_event); + } + } ++ ++static void gtk_container_tap_and_hold_setup_forall( GtkWidget *widget, ++ GtkContainerTAH *tah ) ++{ ++ gtk_widget_tap_and_hold_setup( widget, tah->menu, tah->func, ++ tah->flags ); ++} ++ ++static void gtk_container_tap_and_hold_setup( GtkWidget *widget, ++ GtkWidget *menu, GtkCallback func, GtkWidgetTapAndHoldFlags flags ) ++{ ++ GtkContainerTAH tah; ++ g_return_if_fail( GTK_IS_WIDGET(widget)); ++ g_return_if_fail( menu == NULL || GTK_IS_MENU(menu) ); ++ tah.menu = menu; ++ tah.func = func; ++ tah.flags = flags; ++ if (flags & GTK_TAP_AND_HOLD_NO_INTERNALS) ++ gtk_container_foreach( GTK_CONTAINER(widget), ++ (GtkCallback)gtk_container_tap_and_hold_setup_forall, &tah ); ++ else ++ gtk_container_forall( GTK_CONTAINER(widget), ++ (GtkCallback)gtk_container_tap_and_hold_setup_forall, &tah ); ++ parent_class->tap_and_hold_setup (widget, menu, func, flags); ++} ++ ++static void gtk_container_grab_focus( GtkWidget *focus_widget ) ++{ ++ if( GTK_WIDGET_CAN_FOCUS(focus_widget) ) ++ parent_class->grab_focus( focus_widget ); ++ else ++ { ++ GList *first = NULL; ++ GList *children = NULL; ++ GtkWidget *old_focus = NULL; ++ GtkWidget *toplevel = NULL; ++ ++ toplevel = gtk_widget_get_toplevel( focus_widget ); ++ if( !GTK_IS_WINDOW(toplevel) ) ++ return; ++ ++ old_focus = GTK_WINDOW(toplevel)->focus_widget; ++ first = gtk_container_get_all_children( ++ GTK_CONTAINER(focus_widget) ); ++ children = g_list_last( first ); ++ ++ while( children && GTK_WINDOW(toplevel)->focus_widget == old_focus ) ++ { ++ gtk_widget_grab_focus( GTK_WIDGET(children->data) ); ++ children = children->prev; ++ } ++ g_list_free( first ); ++ } ++} ++ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkdialog.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkdialog.c.diff new file mode 100644 index 0000000000..39ecdf209b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkdialog.c.diff @@ -0,0 +1,451 @@ +--- gtk+-2.6.4/gtk/gtkdialog.c 2005-01-20 21:52:15.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkdialog.c 2005-04-06 16:19:36.416002288 +0300 +@@ -24,6 +24,9 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++/* Modified for Nokia Oyj during 2002-2003. See CHANGES file for list ++ * of changes. ++ */ + #include <config.h> + #include "gtkalias.h" + #include "gtkbutton.h" +@@ -37,11 +40,14 @@ + #include "gtkmain.h" + #include "gtkintl.h" + #include "gtkbindings.h" ++#include "gtkalignment.h" + + #define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_DIALOG, GtkDialogPrivate)) + + typedef struct { + guint ignore_separator : 1; ++ GtkWidget *first; ++ GtkWidget *last; + } GtkDialogPrivate; + + typedef struct _ResponseData ResponseData; +@@ -77,7 +83,18 @@ + static void gtk_dialog_close (GtkDialog *dialog); + + static ResponseData* get_response_data (GtkWidget *widget, +- gboolean create); ++ gboolean create); ++ ++static gboolean gtk_dialog_handle_focus (GtkWidget *widget, ++ GtkDirectionType dir, ++ gpointer user_data); ++ ++static gboolean gtk_dialog_move_to_next_active_button (GList *iter, ++ gboolean forward); ++ ++static GtkWidget *gtk_dialog_get_first_sensitive (GList *list); ++static GtkWidget *gtk_dialog_get_last_sensitive (GList *list); ++ + + enum { + PROP_0, +@@ -195,6 +212,23 @@ + 5, + G_PARAM_READABLE)); + ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("extended_left_border", ++ _("Content area extra left border"), ++ _("Width of extra left border around the main dialog area"), ++ 0, ++ G_MAXINT, ++ 0, ++ G_PARAM_READABLE)); ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("extended_right_border", ++ _("Content area extra right border"), ++ _("Width of extra right border around the main dialog area"), ++ 0, ++ G_MAXINT, ++ 0, ++ G_PARAM_READABLE)); ++ + binding_set = gtk_binding_set_by_class (class); + + gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, +@@ -205,9 +239,15 @@ + update_spacings (GtkDialog *dialog) + { + GtkWidget *widget; ++ GtkWidget *hbox; ++ GtkWidget *left_padding; ++ GtkWidget *right_padding; + gint content_area_border; + gint button_spacing; + gint action_area_border; ++ ++ gint extended_left_border; ++ gint extended_right_border; + + widget = GTK_WIDGET (dialog); + +@@ -218,6 +258,10 @@ + &button_spacing, + "action_area_border", + &action_area_border, ++ "extended_left_border", ++ &extended_left_border, ++ "extended_right_border", ++ &extended_right_border, + NULL); + + gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox), +@@ -226,12 +270,36 @@ + button_spacing); + gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), + action_area_border); ++ ++ if ((extended_left_border == 0) && (extended_right_border == 0)) ++ /* no extended borders, so we are done */ ++ return; ++ ++ /* extended borders are in use, so reconstruct dialog */ ++ hbox = gtk_hbox_new(FALSE, 0); ++ left_padding = gtk_alignment_new(0.0, 0.0, 0.0, 0.0); ++ right_padding = gtk_alignment_new(0.0, 0.0, 0.0, 0.0); ++ gtk_widget_set_size_request(left_padding, extended_left_border, 0); ++ gtk_widget_set_size_request(right_padding, extended_right_border, 0); ++ ++ gtk_widget_ref(dialog->vbox); ++ gtk_container_remove(GTK_CONTAINER(dialog), dialog->vbox); ++ gtk_container_add(GTK_CONTAINER(hbox), left_padding); ++ gtk_container_add(GTK_CONTAINER(hbox), dialog->vbox); ++ gtk_container_add(GTK_CONTAINER(hbox), right_padding); ++ gtk_container_add(GTK_CONTAINER(dialog), hbox); ++ gtk_widget_unref(dialog->vbox); ++ ++ gtk_widget_show(left_padding); ++ gtk_widget_show(right_padding); ++ gtk_widget_show(hbox); + } + + static void + gtk_dialog_init (GtkDialog *dialog) + { + GtkDialogPrivate *priv; ++ GtkWidget *alignment; + + priv = GET_PRIVATE (dialog); + priv->ignore_separator = FALSE; +@@ -250,14 +318,23 @@ + gtk_container_add (GTK_CONTAINER (dialog), dialog->vbox); + gtk_widget_show (dialog->vbox); + ++ /* Hildon : Here we add an alignment widget to gtk because ++ * we want that the dialog buttons are all centered. */ ++ alignment = gtk_alignment_new (0.5, 0.5, 0, 0); ++ gtk_box_pack_end (GTK_BOX (dialog->vbox), alignment, FALSE, TRUE, 0); ++ + dialog->action_area = gtk_hbutton_box_new (); + + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog->action_area), + GTK_BUTTONBOX_END); + +- gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->action_area, +- FALSE, TRUE, 0); ++ /* we need add-signal to allocate correct area for childs */ ++ gtk_container_add (GTK_CONTAINER (alignment), dialog->action_area); ++ /* gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->action_area, ++ FALSE, TRUE, 0); */ ++ + gtk_widget_show (dialog->action_area); ++ gtk_widget_show (alignment); + + dialog->separator = gtk_hseparator_new (); + gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->separator, FALSE, TRUE, 0); +@@ -616,9 +693,15 @@ + else + g_warning ("Only 'activatable' widgets can be packed into the action area of a GtkDialog"); + ++ gtk_container_add(GTK_CONTAINER(dialog->action_area), child); ++/* + gtk_box_pack_end (GTK_BOX (dialog->action_area), + child, + FALSE, TRUE, 0); ++*/ ++ ++ g_signal_connect (child, "focus", ++ (GCallback)gtk_dialog_handle_focus, (gpointer)dialog); + + if (response_id == GTK_RESPONSE_HELP) + gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (dialog->action_area), child, TRUE); +@@ -637,7 +720,7 @@ + * you don't need it. + * + * Return value: the button widget that was added +- **/ ++ **/ /*ROK*/ + GtkWidget* + gtk_dialog_add_button (GtkDialog *dialog, + const gchar *button_text, +@@ -653,7 +736,10 @@ + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + + gtk_widget_show (button); +- ++ ++ g_signal_connect (button, "focus", ++ (GCallback)gtk_dialog_handle_focus, ++ (gpointer)dialog); + gtk_dialog_add_action_widget (dialog, + button, + response_id); +@@ -990,6 +1076,8 @@ + gulong unmap_handler; + gulong destroy_handler; + gulong delete_handler; ++ GtkDialogPrivate *priv; ++ GList *list = NULL; + + g_return_val_if_fail (GTK_IS_DIALOG (dialog), -1); + +@@ -1001,6 +1089,27 @@ + + if (!GTK_WIDGET_VISIBLE (dialog)) + gtk_widget_show (GTK_WIDGET (dialog)); ++ ++ priv = GET_PRIVATE (dialog); ++ list = gtk_container_get_children (GTK_CONTAINER (dialog->vbox)); ++ priv->first = gtk_dialog_get_first_sensitive (list); ++ priv->last = gtk_dialog_get_last_sensitive (list); ++ ++ if (priv->first) ++ { ++ g_signal_connect (priv->first, "focus", ++ (GCallback)gtk_dialog_handle_focus, ++ (gpointer)dialog); ++ } ++ ++ if (priv->last) ++ { ++ g_signal_connect (priv->last, "focus", ++ (GCallback)gtk_dialog_handle_focus, ++ (gpointer)dialog); ++ } ++ ++ g_list_free (list); + + response_handler = + g_signal_connect (dialog, +@@ -1236,4 +1345,215 @@ + gtk_box_reorder_child (GTK_BOX (dialog->action_area), child, position); + } + } ++static gboolean ++gtk_dialog_handle_focus (GtkWidget *widget, ++ GtkDirectionType dir, ++ gpointer user_data) ++ { ++ GtkDialog *dialog = NULL; ++ GList *list = NULL; ++ GList *iter = NULL; ++ gint i = 0; ++ gint list_length = 0; ++ gboolean ret_val = FALSE; ++ GtkDialogPrivate *priv; ++ ++ dialog = GTK_DIALOG(user_data); ++ list = gtk_container_get_children (GTK_CONTAINER( ++ GTK_DIALOG(user_data)->action_area)); ++ iter = list; ++ priv = GET_PRIVATE (dialog); ++ ++ if (GTK_WIDGET_HAS_FOCUS (widget)) ++ if (widget == priv->first) ++ { ++ if (dir == GTK_DIR_UP) ++ { ++ ret_val = gtk_dialog_move_to_next_active_button (g_list_last (list), ++ FALSE); ++ } ++ else if (dir == GTK_DIR_DOWN && priv->first == priv->last) ++ ret_val = gtk_dialog_move_to_next_active_button (list, TRUE); ++ else if (dir == GTK_DIR_DOWN) ++ { ++ } ++ } ++ else if (widget == priv->last) ++ { ++ if (dir == GTK_DIR_DOWN) ++ { ++ ret_val = gtk_dialog_move_to_next_active_button (list, TRUE); ++ } ++ else if (dir == GTK_DIR_UP) ++ { ++ } ++ } ++ else ++ { ++ list_length = g_list_length(list); ++ while (iter != NULL) ++ { ++ ++i; ++ if (iter->data == widget) ++ { ++ switch (dir) { ++ case GTK_DIR_UP: ++ /* If in the first item -> the default works like it should */ ++ ++ if (i > 1) ++ { ++ /* If not in the first button, but in the first active ++ * button, the default should do, else handle movement ++ * by yourself ++ */ ++ ret_val = gtk_dialog_move_to_next_active_button ( ++ g_list_previous (iter), ++ FALSE); ++ } ++ else ++ { ++ /* gtk_widget_grab_focus (priv->last);*/ ++ g_signal_emit_by_name (dialog, "move-focus", ++ GTK_DIR_TAB_BACKWARD); ++ ret_val = TRUE; ++ } ++ break; ++ ++ /* If in the last item:jump to top, else select previous button */ ++ case GTK_DIR_DOWN: ++ if (i < list_length) ++ { ++ ret_val = gtk_dialog_move_to_next_active_button ( ++ g_list_next (iter), ++ TRUE); ++ if (!ret_val) ++ { ++ g_signal_emit_by_name (dialog, "move-focus", ++ GTK_DIR_TAB_FORWARD); ++ ret_val = TRUE; ++ } ++ } ++ else ++ { ++ g_signal_emit_by_name (dialog, "move-focus", ++ GTK_DIR_TAB_FORWARD); ++ ret_val = TRUE; ++ } ++ break; ++ ++ case GTK_DIR_TAB_BACKWARD: ++ case GTK_DIR_TAB_FORWARD: ++ case GTK_DIR_LEFT: ++ case GTK_DIR_RIGHT: ++ default: ++ break; ++ } ++ break; ++ } ++ iter = g_list_next(iter); ++ } ++ } ++ ++ g_list_free (list); ++ ++ return ret_val; ++ } ++static gboolean ++gtk_dialog_move_to_next_active_button (GList *iter, gboolean forward) ++{ ++ gboolean active; ++ gboolean visible; ++ ++ while (iter) ++ { ++ g_object_get (G_OBJECT (iter->data), "sensitive", &active, NULL); ++ g_object_get (G_OBJECT (iter->data), "visible", &visible, NULL); ++ if (active && visible) ++ { ++ gtk_widget_grab_focus (GTK_WIDGET (iter->data)); ++ return TRUE; ++ } ++ ++ if (forward) ++ iter = g_list_next (iter); ++ else ++ iter = g_list_previous (iter); ++ } ++ ++ return FALSE; ++} ++static GtkWidget* ++gtk_dialog_get_first_sensitive (GList *list) ++{ ++ GList *sublist = NULL; ++ GList *iter = NULL; ++ GtkWidget *widget = NULL; ++ gboolean active; ++ gboolean visible; ++ while (list) ++ { ++ widget = GTK_WIDGET (list->data); ++ if (GTK_IS_CONTAINER (widget)) ++ { ++ sublist = gtk_container_get_children (GTK_CONTAINER(widget)); ++ widget = gtk_dialog_get_first_sensitive (sublist); ++ g_list_free (sublist); ++ sublist = NULL; ++ ++ if (widget) ++ return widget; ++ } ++ else ++ { ++ g_object_get (G_OBJECT (widget), "sensitive", &active, NULL); ++ g_object_get (G_OBJECT (widget), "visible", &visible, NULL); ++ if (active && visible && GTK_WIDGET_CAN_FOCUS (widget)) ++ return widget; ++ } ++ ++ list = g_list_next (list); ++ } ++ ++ return NULL; ++} ++ ++static GtkWidget* ++gtk_dialog_get_last_sensitive (GList *list) ++{ ++ GList *sublist = NULL; ++ GtkWidget *widget = NULL; ++ gboolean active; ++ gboolean visible; ++ ++ list = g_list_last (list); ++ if (list && list->prev != NULL) ++ list = g_list_previous (list); ++ ++ while (list) ++ { ++ widget = GTK_WIDGET (list->data); ++ if (GTK_IS_CONTAINER (widget)) ++ { ++ sublist = gtk_container_get_children (GTK_CONTAINER(widget)); ++ widget = gtk_dialog_get_last_sensitive (sublist); ++ g_list_free (sublist); ++ sublist = NULL; ++ ++ if (widget) ++ return widget; ++ } ++ else ++ { ++ g_object_get (G_OBJECT (widget), "sensitive", &active, NULL); ++ g_object_get (G_OBJECT (widget), "visible", &visible, NULL); ++ if (active && visible && GTK_WIDGET_CAN_FOCUS (widget)) ++ return widget; ++ } ++ ++ list = g_list_previous (list); ++ } ++ ++ return NULL; ++} ++ + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkdnd.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkdnd.c.diff new file mode 100644 index 0000000000..247d3f9b46 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkdnd.c.diff @@ -0,0 +1,12 @@ +--- gtk+-2.6.4/gtk/gtkdnd.c 2005-02-01 20:07:40.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkdnd.c 2005-04-06 16:19:36.432999704 +0300 +@@ -2145,6 +2145,9 @@ + g_signal_connect (widget, "button_press_event", + G_CALLBACK (gtk_drag_source_event_cb), + site); ++ g_signal_connect (widget, "button_release_event", ++ G_CALLBACK (gtk_drag_source_event_cb), ++ site); + g_signal_connect (widget, "motion_notify_event", + G_CALLBACK (gtk_drag_source_event_cb), + site); diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkentry.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkentry.c.diff new file mode 100644 index 0000000000..fae911305c --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkentry.c.diff @@ -0,0 +1,1308 @@ +--- gtk+-2.6.4/gtk/gtkentry.c 2005-02-04 17:36:02.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkentry.c 2005-04-06 16:19:36.466994536 +0300 +@@ -24,6 +24,10 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++ /* Modified for Nokia Oyj during 2002-2003. See CHANGES file for list ++ * of changes. ++ */ ++ + #include <config.h> + #include <string.h> + +@@ -53,6 +57,7 @@ + #include "gtktreeselection.h" + #include "gtkentryprivate.h" + #include "gtkcelllayout.h" ++#include "gtkscrolledwindow.h" + + #define GTK_ENTRY_COMPLETION_KEY "gtk-entry-completion-key" + +@@ -60,6 +65,8 @@ + #define DRAW_TIMEOUT 20 + #define INNER_BORDER 2 + #define COMPLETION_TIMEOUT 300 ++#define HILDON_EDITED_CHARACTER_MAX 8 ++#define HILDON_EDITED_CHARACTER_MS 600 /* 0.6 seconds */ + + /* Initial size of buffer, in bytes */ + #define MIN_SIZE 16 +@@ -75,6 +82,18 @@ + { + gfloat xalign; + gint insert_pos; ++ /* Hildon additions: ++ * following variables are needed ++ * for Hildon password 'preview' ++ * functionality; last inputted character ++ * is showed for defined period, before it is ++ * rendered to '*' ++ */ ++ gchar hildon_edited_character[HILDON_EDITED_CHARACTER_MAX]; ++ gboolean hildon_edited_character_timeout; ++ gint hildon_edited_character_length; ++ gboolean keep_focus; ++ gboolean menu_popped; + }; + + enum { +@@ -104,7 +123,9 @@ + PROP_WIDTH_CHARS, + PROP_SCROLL_OFFSET, + PROP_TEXT, +- PROP_XALIGN ++ PROP_XALIGN, ++ PROP_AUTOCAP, ++ PROP_INPUT_MODE + }; + + static guint signals[LAST_SIGNAL] = { 0 }; +@@ -324,6 +345,23 @@ + gint *y, + gint *width, + gint *height); ++static void gtk_entry_update_scrolled_window (GtkEntry *entry); ++static void gtk_entry_set_autocap (GtkEntry *entry, ++ gboolean autocap); ++static gboolean gtk_entry_get_autocap (GtkEntry *entry); ++static void gtk_entry_set_input_mode (GtkEntry *entry, ++ gboolean mode); ++static gint gtk_entry_get_input_mode (GtkEntry *entry); ++ ++/*Change for Hildon ++ *returns an iterator to the character at position x,y of the ++ *layout ++ *returns NULL if no iterator was found at that position ++ *Caller must call pango_layout_free_iter on the returned iterator ++ */ ++static PangoLayoutIter *get_char_at_pos( PangoLayout *layout, gint x, gint y ); ++ ++static gboolean hildon_remove_visible_character( gpointer data ); + + /* Completion */ + static gint gtk_entry_completion_timeout (gpointer data); +@@ -523,7 +561,25 @@ + P_("FALSE displays the \"invisible char\" instead of the actual text (password mode)"), + TRUE, + G_PARAM_READABLE | G_PARAM_WRITABLE)); +- ++ ++ g_object_class_install_property (gobject_class, ++ PROP_AUTOCAP, ++ g_param_spec_boolean ("autocap", ++ P_("auto capitalization"), ++ P_("Enable autocap support"), ++ TRUE, ++ G_PARAM_READABLE | G_PARAM_WRITABLE)); ++ ++ g_object_class_install_property (gobject_class, ++ PROP_INPUT_MODE, ++ g_param_spec_int ("input_mode", ++ P_("input mode"), ++ P_("Define widget's input mode"), ++ 0, ++ 9, /* keep me updated */ ++ 0, ++ G_PARAM_READABLE | G_PARAM_WRITABLE)); ++ + g_object_class_install_property (gobject_class, + PROP_HAS_FRAME, + g_param_spec_boolean ("has_frame", +@@ -593,6 +649,40 @@ + 0.0, + G_PARAM_READABLE | G_PARAM_WRITABLE)); + ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("horizontal-border", ++ P_("Horizontal borders for entry"), ++ P_("Set left/right borders"), ++ 0, ++ G_MAXINT, ++ INNER_BORDER, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("vertical-border", ++ P_("Vertical borders for entry"), ++ P_("Set top/bottom borders"), ++ 0, ++ G_MAXINT, ++ INNER_BORDER, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("icon-width", ++ P_("Icon Width"), ++ P_("Size of the purpose icon."), ++ 0, ++ G_MAXINT, ++ 0, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("show-last-char", ++ P_("Show last char in invisible mode for a while"), ++ P_("Last char is shown before it is rendered to asterisk"), ++ FALSE, ++ G_PARAM_READABLE | G_PARAM_WRITABLE)); ++ + signals[POPULATE_POPUP] = + g_signal_new ("populate_popup", + G_OBJECT_CLASS_TYPE (gobject_class), +@@ -853,6 +943,22 @@ + iface->start_editing = gtk_entry_start_editing; + } + ++/* HILDON: Timed function to hide the most recently inputted character in password mode ++*/ ++static gboolean ++ hildon_remove_visible_character( gpointer data ) ++{ ++ g_return_val_if_fail (GTK_IS_WIDGET (data), FALSE); ++ ++ GtkEntry * entry = GTK_ENTRY( data ); ++ ++ /* Force the string to redrawn, but now without a visible character */ ++ gtk_entry_recompute( entry ); ++ ++ /* Return false so this timeout is not called again and destroyed */ ++ return FALSE; ++} ++ + static void + gtk_entry_set_property (GObject *object, + guint prop_id, +@@ -867,9 +973,10 @@ + { + gboolean new_value = g_value_get_boolean (value); + ++ gtk_widget_set_sensitive( GTK_WIDGET( entry ), entry->editable ); + if (new_value != entry->editable) + { +- if (!new_value) ++ if (!new_value) + { + gtk_entry_reset_im_context (entry); + if (GTK_WIDGET_HAS_FOCUS (entry)) +@@ -896,6 +1003,14 @@ + case PROP_VISIBILITY: + gtk_entry_set_visibility (entry, g_value_get_boolean (value)); + break; ++ ++ case PROP_AUTOCAP: ++ gtk_entry_set_autocap (entry, g_value_get_boolean (value)); ++ break; ++ ++ case PROP_INPUT_MODE: ++ gtk_entry_set_input_mode (entry, g_value_get_int (value)); ++ break; + + case PROP_HAS_FRAME: + gtk_entry_set_has_frame (entry, g_value_get_boolean (value)); +@@ -954,6 +1069,12 @@ + case PROP_VISIBILITY: + g_value_set_boolean (value, entry->visible); + break; ++ case PROP_AUTOCAP: ++ g_value_set_boolean (value, gtk_entry_get_autocap (entry)); ++ break; ++ case PROP_INPUT_MODE: ++ g_value_set_int (value, gtk_entry_get_input_mode (entry)); ++ break; + case PROP_HAS_FRAME: + g_value_set_boolean (value, entry->has_frame); + break; +@@ -1000,7 +1121,20 @@ + entry->width_chars = -1; + entry->is_cell_renderer = FALSE; + entry->editing_canceled = FALSE; +- entry->has_frame = TRUE; ++#ifdef HILDON_SINGLE_LINE_EDITOR ++ entry->has_frame = FALSE; ++#else ++ entry->has_frame = TRUE; ++#endif ++ ++ /* Hildon */ ++ memset( &priv->hildon_edited_character, 0x00, HILDON_EDITED_CHARACTER_MAX ); ++ priv->hildon_edited_character_length = 0; ++ priv->hildon_edited_character_timeout = FALSE; ++ ++ priv->keep_focus = FALSE; ++ priv->menu_popped = FALSE; ++ + priv->xalign = 0.0; + + gtk_drag_dest_set (GTK_WIDGET (entry), +@@ -1013,6 +1147,10 @@ + * to it; so we create it here and destroy it in finalize(). + */ + entry->im_context = gtk_im_multicontext_new (); ++ /* Set default stuff. */ ++ gtk_entry_set_autocap (entry, TRUE); ++ gtk_entry_set_input_mode (entry, 0); /* alpha-numeric-special */ ++ g_object_set (G_OBJECT (entry->im_context), "use-show-hide", TRUE, NULL); + + g_signal_connect (entry->im_context, "commit", + G_CALLBACK (gtk_entry_commit_cb), entry); +@@ -1058,7 +1196,8 @@ + gtk_entry_finalize (GObject *object) + { + GtkEntry *entry = GTK_ENTRY (object); +- ++ GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (GTK_WIDGET (entry)); ++ + gtk_entry_set_completion (entry, NULL); + + if (entry->cached_layout) +@@ -1072,6 +1211,9 @@ + if (entry->recompute_idle) + g_source_remove (entry->recompute_idle); + ++ if (priv->hildon_edited_character_timeout) ++ g_source_remove (priv->hildon_edited_character_timeout); ++ + entry->text_size = 0; + + if (entry->text) +@@ -1213,7 +1355,14 @@ + PangoFontMetrics *metrics; + gint xborder, yborder; + PangoContext *context; +- ++ gint border_x, border_y; ++ gint icon_width; ++ ++ gtk_widget_style_get (widget, ++ "horizontal-border", &border_x, ++ "vertical-border", &border_y, ++ "icon-width", &icon_width, NULL); ++ + gtk_widget_ensure_style (widget); + context = gtk_widget_get_pango_context (widget); + metrics = pango_context_get_metrics (context, +@@ -1225,21 +1374,22 @@ + + _gtk_entry_get_borders (entry, &xborder, &yborder); + +- xborder += INNER_BORDER; +- yborder += INNER_BORDER; ++ xborder += border_x<<1; ++ yborder += border_y<<1; + + if (entry->width_chars < 0) +- requisition->width = MIN_ENTRY_WIDTH + xborder * 2; ++ requisition->width = MIN_ENTRY_WIDTH + xborder; + else + { + gint char_width = pango_font_metrics_get_approximate_char_width (metrics); + gint digit_width = pango_font_metrics_get_approximate_digit_width (metrics); + gint char_pixels = (MAX (char_width, digit_width) + PANGO_SCALE - 1) / PANGO_SCALE; + +- requisition->width = char_pixels * entry->width_chars + xborder * 2; ++ requisition->width = char_pixels * entry->width_chars + xborder; + } +- +- requisition->height = PANGO_PIXELS (entry->ascent + entry->descent) + yborder * 2; ++ ++ requisition->width += icon_width; ++ requisition->height = PANGO_PIXELS (entry->ascent + entry->descent) + yborder; + + pango_font_metrics_unref (metrics); + } +@@ -1253,23 +1403,39 @@ + { + gint xborder, yborder; + GtkRequisition requisition; ++ gint icon_width; + GtkWidget *widget = GTK_WIDGET (entry); + ++ gtk_widget_style_get (widget, "icon-width", &icon_width, NULL); ++ + gtk_widget_get_child_requisition (widget, &requisition); + + _gtk_entry_get_borders (entry, &xborder, &yborder); + + if (x) +- *x = xborder; ++ *x = xborder + icon_width; + + if (y) ++ { + *y = yborder; ++ if( widget->allocation.height < requisition.height ) ++ *y += ((widget->allocation.height - requisition.height) / 2); ++ if( *y < yborder ) ++ *y = yborder; ++ } + + if (width) +- *width = GTK_WIDGET (entry)->allocation.width - xborder * 2; ++ *width = GTK_WIDGET (entry)->allocation.width - xborder * 2 - icon_width; + + if (height) +- *height = requisition.height - yborder * 2; ++ { ++ if( widget->allocation.height < requisition.height ) ++ *height = widget->allocation.height - yborder * 2; ++ else ++ *height = widget->requisition.height - yborder * 2; ++ if( *height <=0 ) ++ *height = 1; ++ } + } + + static void +@@ -1289,10 +1455,9 @@ + + if (y) + { +- if (entry->is_cell_renderer) +- *y = widget->allocation.y; +- else +- *y = widget->allocation.y + (widget->allocation.height - requisition.height) / 2; ++ *y = widget->allocation.y; ++ if( widget->allocation.height > requisition.height ) ++ *y += ((widget->allocation.height - requisition.height) / 2); + } + + if (width) +@@ -1300,10 +1465,10 @@ + + if (height) + { +- if (entry->is_cell_renderer) +- *height = widget->allocation.height; +- else ++ if( widget->allocation.height > requisition.height ) + *height = requisition.height; ++ else ++ *height = widget->allocation.height; + } + } + +@@ -1383,20 +1548,19 @@ + GdkEventExpose *event) + { + GtkEntry *entry = GTK_ENTRY (widget); ++ gint area_width, area_height; ++ ++ get_widget_window_size (entry, NULL, NULL, &area_width, &area_height); + + if (widget->window == event->window) +- gtk_entry_draw_frame (widget); ++ { ++ gtk_paint_box (widget->style, widget->window, ++ GTK_WIDGET_STATE (widget), GTK_SHADOW_NONE, ++ NULL, widget, "entry_frame", ++ 0, 0, area_width, area_height); ++ } + else if (entry->text_area == event->window) + { +- gint area_width, area_height; +- +- get_text_area_size (entry, NULL, NULL, &area_width, &area_height); +- +- gtk_paint_flat_box (widget->style, entry->text_area, +- GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE, +- NULL, widget, "entry_bg", +- 0, 0, area_width, area_height); +- + if ((entry->visible || entry->invisible_char != 0) && + GTK_WIDGET_HAS_FOCUS (widget) && + entry->selection_bound == entry->current_pos && entry->cursor_visible) +@@ -1490,16 +1654,19 @@ + return FALSE; + + entry->button = event->button; +- ++ + if (!GTK_WIDGET_HAS_FOCUS (widget)) + { + entry->in_click = TRUE; + gtk_widget_grab_focus (widget); + entry->in_click = FALSE; + } +- ++ ++ /* Hildon: we need to reset IM context so pre-edit string can be committed */ ++ gtk_entry_reset_im_context (entry); ++ + tmp_pos = gtk_entry_find_position (entry, event->x + entry->scroll_offset); +- ++ + if (event->button == 1) + { + gboolean have_selection = gtk_editable_get_selection_bounds (editable, &sel_start, &sel_end); +@@ -1509,8 +1676,6 @@ + + if (event->state & GDK_SHIFT_MASK) + { +- gtk_entry_reset_im_context (entry); +- + if (!have_selection) /* select from the current position to the clicked position */ + sel_start = sel_end = entry->current_pos; + +@@ -1575,9 +1740,20 @@ + entry->drag_start_x = event->x + entry->scroll_offset; + entry->drag_start_y = event->y + entry->scroll_offset; + } +- else +- gtk_editable_set_position (editable, tmp_pos); +- break; ++ else { ++ /* HILDON: do not move the cursor inside the textarea if invisible ++ * as per the specifications */ ++ if (!entry->visible) ++ if(tmp_pos == strlen(gtk_entry_get_text(entry))){ ++ gtk_editable_set_position( editable, entry->text_length); ++ } else { ++ gtk_editable_select_region (editable, 0, -1); ++ } ++ else ++ gtk_editable_set_position (editable, tmp_pos); ++ } ++ ++ break; + + case GDK_2BUTTON_PRESS: + /* We ALWAYS receive a GDK_BUTTON_PRESS immediately before +@@ -1614,8 +1790,16 @@ + } + else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) + { ++ /* Hildon: if we are in password mode selection and Cut & Copy should ++ be disabled. */ ++ if (!entry->visible) ++ { ++ gtk_editable_set_position (GTK_EDITABLE(entry), 0); ++ } ++ + gtk_entry_do_popup (entry, event); + entry->button = 0; /* Don't wait for release, since the menu will gtk_grab_add */ ++ priv->keep_focus = TRUE; + + return TRUE; + } +@@ -1632,11 +1816,23 @@ + if (event->window != entry->text_area || entry->button != event->button) + return FALSE; + ++ if (entry->editable) ++ gtk_im_context_show (entry->im_context); ++ + if (entry->in_drag) + { + gint tmp_pos = gtk_entry_find_position (entry, entry->drag_start_x); + +- gtk_editable_set_position (GTK_EDITABLE (entry), tmp_pos); ++ /* HILDON: If not visible, do not allow cursor to be positioned inside the string */ ++ if (!entry->visible){ ++ if(tmp_pos == strlen(gtk_entry_get_text(entry))){ ++ gtk_editable_set_position( GTK_EDITABLE(entry), entry->text_length); ++ } else { ++ gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1); ++ } ++ } else { ++ gtk_editable_set_position (GTK_EDITABLE (entry), tmp_pos); ++ } + + entry->in_drag = 0; + } +@@ -1822,6 +2018,13 @@ + } + } + ++ if (event->keyval == GDK_Return) ++ return FALSE; ++ if (event->keyval == GDK_KP_Enter) ++ g_signal_emit_by_name (G_OBJECT(gtk_widget_get_ancestor (widget, ++ GTK_TYPE_WINDOW)), "move-focus", ++ GTK_DIR_TAB_FORWARD); ++ + if (GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event)) + /* Activate key bindings + */ +@@ -1835,6 +2038,8 @@ + GdkEventKey *event) + { + GtkEntry *entry = GTK_ENTRY (widget); ++ ++ gtk_entry_update_scrolled_window( entry ); + + if (entry->editable) + { +@@ -1853,7 +2058,35 @@ + GdkEventFocus *event) + { + GtkEntry *entry = GTK_ENTRY (widget); +- ++ GtkEntryPrivate *priv; ++ ++ priv = GTK_ENTRY_GET_PRIVATE (widget); ++ /* Hildon : If the text doesn't fit the entry, upon focusing ++ * to an text field, move the caret to the end of the entry. ++ * Force the entry to recompute, otherwise it doesn't update ++ * if the cursor is currently at the end*/ ++ /* hildon : If the text has no selection and focus returned with ++ other means than pointer click, set cursor before first ++ character of the text, otherwise behave normally */ ++ ++ if (!entry->in_click) ++ { ++ /*gboolean has_selection; ++ has_selection = gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), NULL, NULL); ++ if (!has_selection) ++ { ++ gtk_editable_set_position (GTK_EDITABLE (entry), -1); ++ }*//*FIXME need a better hack here*/ ++ /* Hildon: If in SecretEditor mode highlight selection if entry got focus ++ * otherways than mouse/stylus */ ++ if (!entry->visible && priv->keep_focus) ++ { ++ gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1); ++ } ++ } ++ ++ gtk_entry_recompute (GTK_ENTRY (entry)); ++ + gtk_widget_queue_draw (widget); + + if (entry->editable) +@@ -1876,6 +2109,8 @@ + GdkEventFocus *event) + { + GtkEntry *entry = GTK_ENTRY (widget); ++ GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (widget); ++ guint tmp_pos; + GtkEntryCompletion *completion; + + gtk_widget_queue_draw (widget); +@@ -1886,6 +2121,20 @@ + gtk_im_context_focus_out (entry->im_context); + } + ++ tmp_pos = gtk_editable_get_position (GTK_EDITABLE (widget)); ++ if (priv->keep_focus){ ++ if (!entry->visible) ++ gtk_editable_set_position (GTK_EDITABLE (widget), tmp_pos); ++ priv->keep_focus = FALSE; ++ } ++ else { ++ if (priv->menu_popped) ++ priv->menu_popped = FALSE; ++ else gtk_editable_set_position (GTK_EDITABLE (widget), tmp_pos); ++ } ++ ++ gtk_widget_queue_draw(widget); ++ + gtk_entry_check_cursor_blink (entry); + + g_signal_handlers_disconnect_by_func (gdk_keymap_get_for_display (gtk_widget_get_display (widget)), +@@ -1902,7 +2151,6 @@ + static void + gtk_entry_grab_focus (GtkWidget *widget) + { +- GtkEntry *entry = GTK_ENTRY (widget); + gboolean select_on_focus; + + GTK_WIDGET_CLASS (parent_class)->grab_focus (widget); +@@ -1912,8 +2160,8 @@ + &select_on_focus, + NULL); + +- if (select_on_focus && entry->editable && !entry->in_click) +- gtk_editable_select_region (GTK_EDITABLE (widget), 0, -1); ++/* Hildon : When focusing to an entry, it shouldn't become ++ * highlighted. */ + } + + static void +@@ -1987,7 +2235,7 @@ + + if (new_text_length > 63) + g_free (text); +- ++ gtk_entry_update_scrolled_window( entry ); + g_object_unref (editable); + } + +@@ -2074,7 +2322,7 @@ + if (end < 0) + end = entry->text_length; + +- gtk_entry_reset_im_context (entry); ++ /*gtk_entry_reset_im_context (entry);*//*FIXME tmp kludge, might break something*/ + + gtk_entry_set_positions (entry, + MIN (end, entry->text_length), +@@ -2168,13 +2416,19 @@ + { + gint index; + gint n_chars; ++ gboolean show_last_char = FALSE; + + GtkEntry *entry = GTK_ENTRY (editable); +- ++ GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (GTK_WIDGET (entry)); + if (new_text_length < 0) + new_text_length = strlen (new_text); + + n_chars = g_utf8_strlen (new_text, new_text_length); ++ ++ ++ gtk_widget_style_get (GTK_WIDGET (entry), "show-last-char", ++ &show_last_char, NULL); ++ + if (entry->text_max_length > 0 && n_chars + entry->text_length > entry->text_max_length) + { + gdk_display_beep (gtk_widget_get_display (GTK_WIDGET (entry))); +@@ -2238,6 +2492,14 @@ + + if (entry->selection_bound > *position) + entry->selection_bound += n_chars; ++ ++ /* Hildon: store this addition IF it was only 1 char (user inputted) and we are currently in secret mode (invisible) */ ++ ++ if (show_last_char && n_chars == 1 && !entry->visible && (new_text_length < HILDON_EDITED_CHARACTER_MAX)) { ++ memset( &priv->hildon_edited_character, 0x00, HILDON_EDITED_CHARACTER_MAX ); ++ priv->hildon_edited_character_length = new_text_length; ++ memcpy( &priv->hildon_edited_character, new_text, new_text_length ); /* Guaranteed to be < total length */ ++ } + + *position += n_chars; + +@@ -2339,6 +2601,11 @@ + + gtk_entry_reset_im_context (entry); + ++ /* Hildon, if not visible set the position to the end */ ++ /* New SecretEditor specs say that with cursor should move ++ * With left/right arrows ++ */ ++ + if (entry->current_pos != entry->selection_bound && !extend_selection) + { + /* If we have a current selection and aren't extending it, move to the +@@ -2445,7 +2712,7 @@ + gint start_pos = entry->current_pos; + gint end_pos = entry->current_pos; + +- gtk_entry_reset_im_context (entry); ++ /* Hildon: code removed - backspace should not clear the word completion */ + + if (!entry->editable) + return; +@@ -2515,7 +2782,8 @@ + GtkEditable *editable = GTK_EDITABLE (entry); + gint prev_pos; + +- gtk_entry_reset_im_context (entry); ++/* gtk_entry_reset_im_context (entry); */ /*backspace should not clear ++ the word completion*/ + + if (!entry->editable || !entry->text) + return; +@@ -2883,21 +3151,28 @@ + ++i; + } + } +- ++ ++#define HILDON_EDITED_CHARACTER_MS 600 /* 0.6 seconds */ ++ + static PangoLayout * + gtk_entry_create_layout (GtkEntry *entry, + gboolean include_preedit) + { + GtkWidget *widget = GTK_WIDGET (entry); ++ GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (entry); + PangoLayout *layout = gtk_widget_create_pango_layout (widget, NULL); + PangoAttrList *tmp_attrs = pango_attr_list_new (); + + gchar *preedit_string = NULL; + gint preedit_length = 0; + PangoAttrList *preedit_attrs = NULL; ++ gboolean show_last_char = FALSE; + + pango_layout_set_single_paragraph_mode (layout, TRUE); + ++ gtk_widget_style_get (widget, "show-last-char", ++ &show_last_char, NULL); ++ + if (include_preedit) + { + gtk_im_context_get_preedit_string (entry->im_context, +@@ -3003,7 +3278,49 @@ + else + invisible_char = ' '; /* just pick a char */ + +- append_char (str, invisible_char, entry->text_length); ++ if (!show_last_char) ++ append_char (str, invisible_char, entry->text_length); ++ else if (show_last_char) ++ { ++ /* Hildon */ ++ if (priv->hildon_edited_character_length > 0) ++ { ++ ++ /* If we have an outstanding timeout, remove it, because the character it is set to hide ++ * is already hidden now. We do this first to prevent possible race conditions if the timout ++ * were to trigger while in here ++ */ ++ ++ if (priv->hildon_edited_character_timeout) ++ { ++ g_source_remove( priv->hildon_edited_character_timeout ); ++ priv->hildon_edited_character_timeout = FALSE; ++ } ++ ++ /* Draw the secret character length-1 times, because the last char will be visible */ ++ append_char (str, invisible_char, entry->text_length > 1 ? entry->text_length - 1 : 0); ++ ++ /* Add our visible char, the most recently inputted one */ ++ g_string_append_len (str, (char *)&priv->hildon_edited_character, priv->hildon_edited_character_length); ++ ++ /* Now remove this last inputted character, don't need it anymore */ ++ ++ memset( priv->hildon_edited_character, 0x00, HILDON_EDITED_CHARACTER_MAX ); ++ priv->hildon_edited_character_length = 0; ++ ++ priv->hildon_edited_character_timeout = g_timeout_add( HILDON_EDITED_CHARACTER_MS, (GSourceFunc) ++ hildon_remove_visible_character, entry ); ++ ++ } ++ else ++ { ++ /* No last character known. This could be for example because the application has filled ++ * in the password already. In that case we of course don't want to view it ++ */ ++ append_char (str, invisible_char, entry->text_length); ++ } ++ } ++ + pango_layout_set_text (layout, str->str, str->len); + g_string_free (str, TRUE); + } +@@ -3048,12 +3365,17 @@ + gint area_width, area_height; + gint y_pos; + PangoLayoutLine *line; +- ++ gint border_x, border_y; ++ ++ gtk_widget_style_get (GTK_WIDGET (entry), "horizontal-border", &border_x, ++ "vertical-border", &border_y, ++ NULL); ++ + layout = gtk_entry_ensure_layout (entry, TRUE); + + get_text_area_size (entry, NULL, NULL, &area_width, &area_height); + +- area_height = PANGO_SCALE * (area_height - 2 * INNER_BORDER); ++ area_height = PANGO_SCALE * (area_height - 2 * border_y); + + line = pango_layout_get_lines (layout)->data; + pango_layout_line_get_extents (line, NULL, &logical_rect); +@@ -3070,10 +3392,10 @@ + else if (y_pos + logical_rect.height > area_height) + y_pos = area_height - logical_rect.height; + +- y_pos = INNER_BORDER + y_pos / PANGO_SCALE; ++ y_pos = border_y + y_pos / PANGO_SCALE; + + if (x) +- *x = INNER_BORDER - entry->scroll_offset; ++ *x = border_x - entry->scroll_offset; + + if (y) + *y = y_pos; +@@ -3083,6 +3405,10 @@ + gtk_entry_draw_text (GtkEntry *entry) + { + GtkWidget *widget; ++ gint border_y, border_x; ++ ++ gtk_widget_style_get (GTK_WIDGET (entry), "horizontal-border", &border_x, ++ "vertical-border", &border_y, NULL); + + if (!entry->visible && entry->invisible_char == 0) + return; +@@ -3092,14 +3418,76 @@ + PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE); + gint x, y; + gint start_pos, end_pos; ++ GdkRectangle clip_rect; + + widget = GTK_WIDGET (entry); + + get_layout_position (entry, &x, &y); + ++ /* Use a clipping rectangle so that we always get enough empty space around ++ * the text. ++ */ ++ clip_rect.x = border_x; ++ clip_rect.y = 0; ++ ++ gdk_drawable_get_size (entry->text_area, &clip_rect.width, &clip_rect.height); ++ clip_rect.width -= border_x * 2; ++ ++ /*changes for Hildon ++ *Reduce the size of the clip rect, so that only full characters are displayed ++ */ ++ ++ /* NOTE: Commented out because it does not work with bidi text where ++the indexes are in random ++ * left-right or right-left order. Code causes Pango assert aborts. Because gtkentry itself ++ * is broken with regard to bidi anyway (bug #478) we ignore this requirement of the spec ++ * until gtkentry itself is fixed. (bug #477) ++ */ ++ ++ /* Better yet, let's enable this only when not in RTL mode */ ++ ++ /* Note: BUG #857. patched gtkentry crashed when pasting scalable fonts. This is pango problem ++ * and we tested patched gtkentry with pango version 1.3.2 and it appears to be fixed. Section is commented ++ out until we upgrade to new version of pango ++ if (gtk_widget_get_direction( entry ) != GTK_TEXT_DIR_RTL) ++ { ++ PangoRectangle char_rect; // used for getting character's onscreen pos ++ PangoLayoutIter *iter; // used to iterate over the text ++ ++ // get the position of the character currently at the clip border ++ iter = get_char_at_pos( layout, (clip_rect.x + clip_rect.width + entry->scroll_offset), 0 ); ++ if ( iter ) ++ { ++ // get the position of that character on the screen ++ pango_layout_iter_get_char_extents( iter, &char_rect ); ++ char_rect.x /= PANGO_SCALE; ++ char_rect.x -= entry->scroll_offset; ++ char_rect.width /= PANGO_SCALE; ++ ++ // if the ending position is > the clip rectangle, then the ++ // character is only partially visible, and we should ++ // clip the entire character. ++ ++ if ( char_rect.x + char_rect.width > clip_rect.x + clip_rect.width ) ++ { ++ clip_rect.width = char_rect.x; ++ } ++ ++ pango_layout_iter_free( iter ); ++ } ++ ++ } ++ */ ++ /******************************************************************/ ++ ++ gdk_gc_set_clip_rectangle (widget->style->text_gc [widget->state], &clip_rect); ++ + gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state], + x, y, + layout); ++ ++ gdk_gc_set_clip_rectangle (widget->style->text_gc [widget->state], NULL); ++ + + if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start_pos, &end_pos)) + { +@@ -3128,7 +3516,7 @@ + { + GdkRectangle rect; + +- rect.x = INNER_BORDER - entry->scroll_offset + ranges[2 * i]; ++ rect.x = border_x - entry->scroll_offset + ranges[2 * i]; + rect.y = y; + rect.width = ranges[2 * i + 1]; + rect.height = logical_rect.height; +@@ -3177,14 +3565,18 @@ + { + GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (entry))); + PangoDirection keymap_direction = gdk_keymap_get_direction (keymap); ++ gint border_x, border_y; + ++ gtk_widget_style_get (GTK_WIDGET (entry), "horizontal-border", &border_x, ++ "vertical-border", &border_y, ++ NULL); + if (GTK_WIDGET_DRAWABLE (entry)) + { + GtkWidget *widget = GTK_WIDGET (entry); + GdkRectangle cursor_location; + gboolean split_cursor; + +- gint xoffset = INNER_BORDER - entry->scroll_offset; ++ gint xoffset = border_x - entry->scroll_offset; + gint strong_x, weak_x; + gint text_area_height; + PangoDirection dir1 = PANGO_DIRECTION_NEUTRAL; +@@ -3221,9 +3613,9 @@ + } + + cursor_location.x = xoffset + x1; +- cursor_location.y = INNER_BORDER; ++ cursor_location.y = border_y; + cursor_location.width = 0; +- cursor_location.height = text_area_height - 2 * INNER_BORDER ; ++ cursor_location.height = text_area_height - 2 * border_y; + + draw_insertion_cursor (entry, + &cursor_location, TRUE, dir1, +@@ -3249,11 +3641,8 @@ + static void + gtk_entry_reset_im_context (GtkEntry *entry) + { +- if (entry->need_im_reset) +- { +- entry->need_im_reset = 0; +- gtk_im_context_reset (entry->im_context); +- } ++ /* Hildon: We want reset to be sent more often */ ++ gtk_im_context_reset (entry->im_context); + } + + static gint +@@ -3266,8 +3655,12 @@ + gint pos; + gboolean trailing; + const gchar *text; +- gint cursor_index; +- ++ gint border_x, cursor_index; ++ ++ gtk_widget_style_get (GTK_WIDGET (entry), "horizontal-border", &border_x, ++ NULL); ++ x -= border_x; ++ + layout = gtk_entry_ensure_layout (entry, TRUE); + text = pango_layout_get_text (layout); + cursor_index = g_utf8_offset_to_pointer (text, entry->current_pos) - text; +@@ -3355,12 +3748,17 @@ + PangoLayout *layout; + PangoLayoutLine *line; + PangoRectangle logical_rect; ++ gint border_x, border_y; ++ ++ gtk_widget_style_get (GTK_WIDGET (entry), "horizontal-border", &border_x, ++ "vertical-border", &border_y, ++ NULL); + + if (!GTK_WIDGET_REALIZED (entry)) + return; + + gdk_drawable_get_size (entry->text_area, &text_area_width, NULL); +- text_area_width -= 2 * INNER_BORDER; ++ text_area_width -= 2 * border_x; + + layout = gtk_entry_ensure_layout (entry, TRUE); + line = pango_layout_get_lines (layout)->data; +@@ -3390,13 +3788,13 @@ + entry->scroll_offset = CLAMP (entry->scroll_offset, min_offset, max_offset); + + /* And make sure cursors are on screen. Note that the cursor is +- * actually drawn one pixel into the INNER_BORDER space on ++ * actually drawn one pixel into the border_x space on + * the right, when the scroll is at the utmost right. This + * looks better to to me than confining the cursor inside the + * border entirely, though it means that the cursor gets one + * pixel closer to the edge of the widget on the right than + * on the left. This might need changing if one changed +- * INNER_BORDER from 2 to 1, as one would do on a ++ * border_x from 2 to 1, as one would do on a + * small-screen-real-estate display. + * + * We always make sure that the strong cursor is on screen, and +@@ -3430,6 +3828,52 @@ + entry->scroll_offset += weak_xoffset - text_area_width; + } + ++ /*Changes for Hildon ++ * now we make it so that if a character is partially visible, ++ * then we also scroll that off the screen. ++ */ ++ ++ /* NOTE: Commented out because it does not work with bidi text where the indexes are in random ++ * left-right or right-left order. Code causes Pango assert aborts. Because gtkentry itself ++ * is broken with regard to bidi anyway (bug #478) we ignore this requirement of the spec ++ * until gtkentry itself is fixed. (bug #477) ++ */ ++ ++ /* Better yet, let's disable this (for now) only when using RTL text */ ++ ++/*Note: BUG #857. patched gtkentry crashed when pasting scalable fonts. This is pango problem ++ * and we tested patched gtkentry with pango version 1.3.2 and it appears to be fixed. Section is comment ed out until we upgrade to new version of pango ++ if (gtk_widget_get_direction( entry ) != GTK_TEXT_DIR_RTL) ++ { ++ PangoLayoutIter *iter = get_char_at_pos( layout, entry->scroll_offset, 0 ); ++ // if we found the char we were looking for ++ if ( iter ) ++ { ++ PangoRectangle char_rect; // used for getting character's onscreen pos ++ ++ // get the position of that character on the screen ++ pango_layout_iter_get_char_extents( iter, &char_rect ); ++ char_rect.x /= PANGO_SCALE; ++ ++ // if the starting position is < the current scroll offset, then the ++ // character is only partially visible, and we should scroll to the ++ // start of the next character instead ++ ++ if ( char_rect.x < entry->scroll_offset ) ++ { ++ if ( pango_layout_iter_next_char( iter ) ) ++ { ++ pango_layout_iter_get_char_extents( iter, &char_rect); ++ entry->scroll_offset = char_rect.x / PANGO_SCALE; ++ } ++ } ++ ++ pango_layout_iter_free( iter ); ++ } ++ ++ ++ }*/ ++ + g_object_notify (G_OBJECT (entry), "scroll_offset"); + } + +@@ -3552,8 +3996,9 @@ + pango_layout_get_log_attrs (layout, &log_attrs, &n_attrs); + + /* Find the next word end */ ++ /*Hildon: cursor should seek to the start of the next word*/ + new_pos++; +- while (new_pos < n_attrs && !log_attrs[new_pos].is_word_end) ++ while (new_pos < n_attrs && !log_attrs[new_pos].is_word_start) + new_pos++; + + g_free (log_attrs); +@@ -3648,14 +4093,9 @@ + + if (entry->visible) + return gtk_editable_get_chars (GTK_EDITABLE (entry), start, end); +- else if (!entry->invisible_char) ++ /*Hildon: when not visible, no chars are public*/ ++ else + return g_strdup (""); +- else +- { +- GString *str = g_string_new (NULL); +- append_char (str, entry->invisible_char, end - start); +- return g_string_free (str, FALSE); +- } + } + + static void +@@ -3678,9 +4118,12 @@ + + if (text) + { +- gint pos, start, end; ++ gint pos, start, end, index; + GtkEntryCompletion *completion = gtk_entry_get_completion (entry); + ++ /* when pasting multiline text, ignore everything but the first line */ ++ for (index = 0; text[index] != 0 && text[index] != '\n'; index++); ++ + if (completion) + { + g_signal_handler_block (entry, completion->priv->changed_id); +@@ -3692,7 +4135,7 @@ + gtk_editable_delete_text (editable, start, end); + + pos = entry->current_pos; +- gtk_editable_insert_text (editable, text, -1, &pos); ++ gtk_editable_insert_text (editable, text, index, &pos); + gtk_editable_set_position (editable, pos); + + if (completion) +@@ -3888,6 +4331,7 @@ + { + g_return_if_fail (GTK_IS_ENTRY (entry)); + ++ g_object_set(G_OBJECT(entry->im_context), "visibility", visible, NULL); + entry->visible = visible ? TRUE : FALSE; + g_object_notify (G_OBJECT (entry), "visibility"); + gtk_entry_recompute (entry); +@@ -4569,6 +5013,7 @@ + GdkEventButton *event) + { + PopupInfo *info = g_new (PopupInfo, 1); ++ GtkEntryPrivate *priv; + + /* In order to know what entries we should make sensitive, we + * ask for the current targets of the clipboard, and when +@@ -4576,6 +5021,8 @@ + */ + info->entry = g_object_ref (entry); + ++ priv = GTK_ENTRY_GET_PRIVATE (entry); ++ + if (event) + { + info->button = event->button; +@@ -4591,6 +5038,8 @@ + gdk_atom_intern ("TARGETS", FALSE), + popup_targets_received, + info); ++ ++ priv->menu_popped = TRUE; + } + + static gboolean +@@ -5389,3 +5838,156 @@ + + return completion; + } ++ ++static PangoLayoutIter *get_char_at_pos( PangoLayout *layout, gint x, gint y ) ++{ ++ gint index = 0; /*the index of the first character */ ++ gint trailing = 0; /*not used*/ ++ PangoLayoutIter *iter; /*used to iterate over the text*/ ++ gboolean valid_char = TRUE; ++ ++ /*get the position of the character currently at the scroll offset*/ ++ pango_layout_xy_to_index( layout, x * PANGO_SCALE, y * PANGO_SCALE, &index, &trailing ); ++ iter = pango_layout_get_iter( layout ); ++ ++ /*iterate until we get to the character at the same index*/ ++ while ( valid_char && pango_layout_iter_get_index( iter ) != index ) ++ { ++ valid_char = pango_layout_iter_next_char( iter ); ++ } ++ ++ if ( valid_char == FALSE ) ++ iter = NULL; ++ ++ return iter; ++} ++ ++static void gtk_entry_update_scrolled_window( GtkEntry *entry) ++{ ++ GtkWidget *parent; ++ GtkWidget *widget; ++ GtkWidget *direct_parent = NULL; ++ GtkScrolledWindow *sw = NULL; ++ gboolean need_update = FALSE; ++ GtkAdjustment *vadjustment; ++ gdouble value; ++ ++ widget = parent = GTK_WIDGET(entry); ++ if(parent->parent != NULL) ++ direct_parent = parent->parent; ++ while(parent && !GTK_WIDGET_TOPLEVEL(parent)) ++ { ++ if(GTK_IS_SCROLLED_WINDOW(parent)) ++ { ++ need_update = TRUE; ++ sw = GTK_SCROLLED_WINDOW(parent); ++ break; ++ } ++ parent = parent->parent; ++ } ++ ++ if(need_update) ++ { ++ gint x=0, y=0; ++ vadjustment = gtk_scrolled_window_get_vadjustment(sw); ++ value = gtk_adjustment_get_value(vadjustment); ++ ++ if(direct_parent != NULL) ++ gtk_widget_translate_coordinates( direct_parent, parent, ++ widget->allocation.x, widget->allocation.y, &x, &y ); ++ ++ if( (gdouble) y < 0 ) ++ { ++ value = value + (gdouble) y; ++ if (value < vadjustment->lower) ++ value = vadjustment->lower; ++ } ++ else if( (gdouble )y + widget->allocation.height > vadjustment->page_size) ++ { ++ value = value + (gdouble)y + widget->allocation.height ++ - vadjustment->page_size; ++ if(value > vadjustment->upper - vadjustment->page_size) ++ value = vadjustment->upper - vadjustment->page_size; ++ } ++ gtk_adjustment_set_value(vadjustment, value); ++ gtk_scrolled_window_set_vadjustment(sw, GTK_ADJUSTMENT(vadjustment)); ++ } ++} ++ ++/* ++ * gtk_entry_set_autocap: ++ * @entry: a #GtkEntry ++ * @autocap: autocap ++ * ++ * Sets autocapitalization of the widget. ++ */ ++static void ++gtk_entry_set_autocap (GtkEntry *entry, ++ gboolean autocap) ++{ ++ g_return_if_fail (GTK_IS_ENTRY (entry)); ++ ++ if (gtk_entry_get_autocap (entry) != autocap) ++ { ++ g_object_set (G_OBJECT (entry->im_context), "autocap", autocap, NULL); ++ g_object_notify (G_OBJECT (entry), "autocap"); ++ } ++} ++ ++/* ++ * gtk_entry_get_autocap: ++ * @entry: a #GtkEntry ++ * ++ * Gets autocapitalization state of the widget. ++ * ++ * Return value: a state ++ */ ++static gboolean ++gtk_entry_get_autocap (GtkEntry *entry) ++{ ++ gboolean autocap; ++ g_return_val_if_fail (GTK_IS_ENTRY (entry), FALSE); ++ ++ g_object_get (G_OBJECT (entry->im_context), "autocap", &autocap, NULL); ++ ++ return autocap; ++} ++ ++/* ++ * gtk_entry_set_input_mode: ++ * @entry: a #GtkEntry ++ * @autocap: input mode ++ * ++ * Sets autocapitalization of the widget. ++ */ ++static void ++gtk_entry_set_input_mode (GtkEntry *entry, ++ gint mode) ++{ ++ g_return_if_fail (GTK_IS_ENTRY (entry)); ++ ++ if (gtk_entry_get_input_mode (entry) != mode) ++ { ++ g_object_set (G_OBJECT (entry->im_context), "input_mode", mode, NULL); ++ g_object_notify (G_OBJECT (entry), "input_mode"); ++ } ++} ++ ++/* ++ * gtk_entry_get_input_mode: ++ * @entry: a #GtkEntry ++ * ++ * Gets input mode of the widget. ++ * ++ * Return value: input mode ++ */ ++static gint ++gtk_entry_get_input_mode (GtkEntry *entry) ++{ ++ gint mode; ++ g_return_val_if_fail (GTK_IS_ENTRY (entry), FALSE); ++ ++ g_object_get (G_OBJECT (entry->im_context), "input_mode", &mode, NULL); ++ ++ return mode; ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkenums.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkenums.h.diff new file mode 100644 index 0000000000..5978100c97 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkenums.h.diff @@ -0,0 +1,15 @@ +--- gtk+-2.6.4/gtk/gtkenums.h 2003-07-18 21:52:02.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkenums.h 2005-04-06 16:19:36.500989368 +0300 +@@ -133,7 +133,11 @@ + GTK_ICON_SIZE_LARGE_TOOLBAR, + GTK_ICON_SIZE_BUTTON, + GTK_ICON_SIZE_DND, +- GTK_ICON_SIZE_DIALOG ++ GTK_ICON_SIZE_DIALOG, ++ HILDON_ICON_SIZE_26, ++ HILDON_ICON_SIZE_40, ++ HILDON_ICON_SIZE_50, ++ HILDON_ICON_SIZE_64 + } GtkIconSize; + + #ifndef GTK_DISABLE_DEPRECATED diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkfilesystem.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkfilesystem.c.diff new file mode 100644 index 0000000000..87346c0260 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkfilesystem.c.diff @@ -0,0 +1,12 @@ +--- gtk+-2.6.4/gtk/gtkfilesystem.c 2004-09-13 19:00:00.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkfilesystem.c 2005-04-06 16:19:36.518986632 +0300 +@@ -1147,4 +1147,9 @@ + return fs; + } + ++/* In Hildon we need to publish the previous symbol */ ++GtkFileSystem *hildon_gtk_file_system_create(const char *file_system_name) ++{ ++ return _gtk_file_system_create (file_system_name); ++} + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkfilesystem.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkfilesystem.h.diff new file mode 100644 index 0000000000..a555ca230b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkfilesystem.h.diff @@ -0,0 +1,12 @@ +--- gtk+-2.6.4/gtk/gtkfilesystem.h 2005-01-03 01:15:21.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkfilesystem.h 2005-04-06 16:19:36.518986632 +0300 +@@ -364,6 +364,9 @@ + + GtkFileSystem *_gtk_file_system_create (const char *file_system_name); + ++/* In Hildon we need to publish the previous symbol */ ++GtkFileSystem *hildon_gtk_file_system_create(const char *file_system_name); ++ + G_END_DECLS + + #endif /* __GTK_FILE_SYSTEM_H__ */ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkframe.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkframe.c.diff new file mode 100644 index 0000000000..6ca54c0c99 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkframe.c.diff @@ -0,0 +1,82 @@ +--- gtk+-2.6.4/gtk/gtkframe.c 2004-08-17 22:10:24.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkframe.c 2005-04-06 16:19:36.583976752 +0300 +@@ -24,6 +24,10 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++/* Modified for Nokia Oyj during 2002-2003. See CHANGES file for list ++ * of changes. ++ */ ++ + #include <config.h> + #include <string.h> + #include "gtkalias.h" +@@ -33,6 +37,7 @@ + + #define LABEL_PAD 1 + #define LABEL_SIDE_PAD 2 ++#define FRAME_BORDER_WIDTH 3 + + enum { + PROP_0, +@@ -172,6 +177,14 @@ + P_("A widget to display in place of the usual frame label"), + GTK_TYPE_WIDGET, + G_PARAM_READABLE | G_PARAM_WRITABLE)); ++ ++ /* draw hildonlike frame */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("hildonlike", ++ _("hildonlike looks"), ++ _("Draw frame, 1/0"), ++ FALSE, ++ G_PARAM_READABLE)); + + widget_class->expose_event = gtk_frame_expose; + widget_class->size_request = gtk_frame_size_request; +@@ -276,7 +289,7 @@ + GtkWidget* + gtk_frame_new (const gchar *label) + { +- return g_object_new (GTK_TYPE_FRAME, "label", label, NULL); ++ return g_object_new (GTK_TYPE_FRAME, "label", label, "border-width", FRAME_BORDER_WIDTH, NULL); + } + + static void +@@ -533,6 +546,9 @@ + { + GtkFrame *frame; + gint x, y, width, height; ++ gboolean hildonlike; ++ ++ gtk_widget_style_get ( widget, "hildonlike", &hildonlike, NULL ); + + if (GTK_WIDGET_DRAWABLE (widget)) + { +@@ -543,7 +559,16 @@ + width = frame->child_allocation.width + 2 * widget->style->xthickness; + height = frame->child_allocation.height + 2 * widget->style->ythickness; + +- if (frame->label_widget) ++ if (hildonlike) { ++ /* draw hildon application borders */ ++ gtk_paint_box (widget->style, ++ widget->window, ++ GTK_WIDGET_STATE( widget ), ++ GTK_SHADOW_OUT, ++ NULL, widget, "frame", ++ x, y, width, height); ++ } ++ else if (frame->label_widget) + { + GtkRequisition child_requisition; + gfloat xalign; +@@ -586,7 +611,7 @@ + { + if (GTK_WIDGET_DRAWABLE (widget)) + { +- gtk_frame_paint (widget, &event->area); ++ gtk_frame_paint (widget, &event->area); + + (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event); + } diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhashtable.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhashtable.c.diff new file mode 100644 index 0000000000..fc6e15810b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhashtable.c.diff @@ -0,0 +1,102 @@ +--- gtk+-2.6.4/gtk/gtkhashtable.c 1970-01-01 02:00:00.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkhashtable.c 2005-04-06 16:19:36.596974776 +0300 +@@ -0,0 +1,99 @@ ++/* GTK - The GIMP Toolkit ++ * Copyright (C) 2005 Nokia ++ * Author: Jorn Baayen <jbaayen@gnome.org> ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++#include <config.h> ++#include "gtkhashtable.h" ++ ++static gpointer parent_class = NULL; ++ ++static void _gtk_hash_table_init (GtkHashTable *hash_table); ++static void _gtk_hash_table_class_init (GtkHashTableClass *klass); ++static void _gtk_hash_table_finalize (GObject *object); ++ ++GType ++_gtk_hash_table_get_type (void) ++{ ++ static GType hash_table_type = 0; ++ ++ if (!hash_table_type) ++ { ++ static const GTypeInfo hash_table_info = ++ { ++ sizeof (GtkHashTableClass), ++ NULL, /* base_init */ ++ NULL, /* base_finalize */ ++ (GClassInitFunc) _gtk_hash_table_class_init, ++ NULL, /* class_finalize */ ++ NULL, /* class_data */ ++ sizeof (GtkHashTable), ++ 0, /* n_preallocs */ ++ (GInstanceInitFunc) _gtk_hash_table_init, ++ }; ++ ++ hash_table_type = ++ g_type_register_static (G_TYPE_OBJECT, "GtkHashTable", ++ &hash_table_info, 0); ++ } ++ ++ return hash_table_type; ++} ++ ++static void ++_gtk_hash_table_init (GtkHashTable *hash_table) ++{ ++ hash_table->hash = g_hash_table_new_full (g_str_hash, g_str_equal, ++ g_free, g_free); ++} ++ ++static void ++_gtk_hash_table_class_init (GtkHashTableClass *klass) ++{ ++ GObjectClass *object_class = G_OBJECT_CLASS (klass); ++ ++ parent_class = g_type_class_peek_parent (klass); ++ ++ object_class->finalize = _gtk_hash_table_finalize; ++} ++ ++static void ++_gtk_hash_table_finalize (GObject *object) ++{ ++ GtkHashTable *hash_table = GTK_HASH_TABLE (object); ++ ++ g_hash_table_destroy (hash_table->hash); ++ ++ G_OBJECT_CLASS (parent_class)->finalize (object); ++} ++ ++/** ++ * _gtk_hash_table_new: ++ * ++ * Creates a new #GtkHashTable. This is a #GHashTable wrapped in a GObject, ++ * thereby supporting refcounting. ++ * ++ * Return value: a new #GtkHashTable ++ **/ ++GtkHashTable* ++_gtk_hash_table_new (void) ++{ ++ return g_object_new (GTK_TYPE_HASH_TABLE, NULL); ++} ++ ++ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhashtable.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhashtable.h.diff new file mode 100644 index 0000000000..733d68c35a --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhashtable.h.diff @@ -0,0 +1,64 @@ +--- gtk+-2.6.4/gtk/gtkhashtable.h 1970-01-01 02:00:00.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkhashtable.h 2005-04-06 16:19:36.606973256 +0300 +@@ -0,0 +1,61 @@ ++/* GTK - The GIMP Toolkit ++ * Copyright (C) 2005 Nokia ++ * Author: Jorn Baayen <jbaayen@gnome.org> ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++#ifndef __GTK_HASH_TABLE_H__ ++#define __GTK_HASH_TABLE_H__ ++ ++#include <glib-object.h> ++ ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ ++typedef struct _GtkHashTable GtkHashTable; ++typedef struct _GtkHashTableClass GtkHashTableClass; ++ ++#define GTK_TYPE_HASH_TABLE (_gtk_hash_table_get_type ()) ++#define GTK_HASH_TABLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_HASH_TABLE, GtkHashTable)) ++#define GTK_HASH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HASH_TABLE, GtkHashTableClass)) ++#define GTK_IS_HASH_TABLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_HASH_TABLE)) ++#define GTK_IS_HASH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HASH_TABLE)) ++#define GTK_HASH_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HASH_TABLE, GtkHashTableClass)) ++ ++struct _GtkHashTable ++{ ++ GObject parent_instance; ++ ++ GHashTable *hash; ++}; ++ ++struct _GtkHashTableClass ++{ ++ GObjectClass parent_class; ++}; ++ ++GType _gtk_hash_table_get_type (void) G_GNUC_CONST; ++GtkHashTable* _gtk_hash_table_new (void); ++ ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++ ++#endif /* __GTK_HASH_TABLE_H__ */ ++ ++ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhbbox.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhbbox.c.diff new file mode 100644 index 0000000000..e43db37f5c --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhbbox.c.diff @@ -0,0 +1,344 @@ +--- gtk+-2.6.4/gtk/gtkhbbox.c 2004-08-09 19:59:52.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkhbbox.c 2005-04-06 16:19:36.644967480 +0300 +@@ -24,10 +24,20 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++/* Modified for Nokia Oyj during 2002-2005. See CHANGES file for list ++ * of changes. ++ */ ++ ++/* Hildon : Button spacing according to the spec. */ ++#define HILDON_BUTTON_SPACING 5 ++/* Selecting hetefogenous mode for a childlayout */ ++#define GTK_BUTTONBOX_HETEROGENOUS 6 ++ + #include <config.h> + #include "gtkalias.h" + #include "gtkhbbox.h" +- ++/* Hildon : We need this to mess with buttons graphics. */ ++#include "gtkbutton.h" + + static void gtk_hbutton_box_class_init (GtkHButtonBoxClass *klass); + static void gtk_hbutton_box_init (GtkHButtonBox *box); +@@ -36,6 +46,15 @@ + static void gtk_hbutton_box_size_allocate (GtkWidget *widget, + GtkAllocation *allocation); + ++static void osso_gtk_hbutton_child_showhide_handler (GtkWidget *widget, ++ gpointer user_data); ++static void osso_gtk_hbutton_box_remove_child_signal_handlers (GtkHButtonBox *hbbox, ++ GtkWidget *removed_widget, ++ gpointer data); ++static void osso_gtk_hbutton_box_find_button_detail (GtkHButtonBox *hbbox, ++ GtkWidget *addremovewidget, ++ gpointer data); ++ + static gint default_spacing = 30; + static gint default_layout_style = GTK_BUTTONBOX_EDGE; + +@@ -76,12 +95,23 @@ + + widget_class->size_request = gtk_hbutton_box_size_request; + widget_class->size_allocate = gtk_hbutton_box_size_allocate; ++ ++ /* HILDON: ++ * Name buttons only if hildon like style property is set ++ */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ++ ( "hildonlike", ++ "hildonlike looks", ++ "Name buttons, 1/0", ++ FALSE, ++ G_PARAM_READABLE) ); + } + + static void + gtk_hbutton_box_init (GtkHButtonBox *hbutton_box) + { +- /* button_box_init has done everything allready */ ++ /* button_box_init has done everything allready */ + } + + GtkWidget* +@@ -91,6 +121,24 @@ + + hbutton_box = g_object_new (GTK_TYPE_HBUTTON_BOX, NULL); + ++ /* Attach signal handler for 'hildonizing' buttons. ++ * gtk_hbutton_box_hildonize_buttons will check the name ++ * and if it is something we're interested in i.e. ++ * ++ * hildon_dialogbuttons ++ * hildon_viewbuttons ++ * ++ * it will do the hildonizing ++ */ ++ g_signal_connect_after (G_OBJECT (hbutton_box), "remove", ++ G_CALLBACK (osso_gtk_hbutton_box_remove_child_signal_handlers), ++ NULL); ++ g_signal_connect_after( G_OBJECT( hbutton_box ), "add", ++ G_CALLBACK( osso_gtk_hbutton_box_find_button_detail ), ++ NULL ); ++ g_signal_connect_after( G_OBJECT( hbutton_box ), "remove", ++ G_CALLBACK( osso_gtk_hbutton_box_find_button_detail ), ++ NULL ); + return GTK_WIDGET (hbutton_box); + } + +@@ -145,6 +193,11 @@ + gint child_height; + gint spacing; + GtkButtonBoxStyle layout; ++ gint child_xpad=0; ++ GtkBoxChild *child_req; ++ GList *children_req; ++ GtkRequisition treq; ++ + + box = GTK_BOX (widget); + bbox = GTK_BUTTON_BOX (widget); +@@ -159,6 +212,12 @@ + &child_width, + &child_height); + ++ /* should GTK_BUTTONBOX_HETEROGENOUS add into the GtkButtonBoxStyle ++ enum struct ++ */ ++ if( !box->homogeneous ) ++ layout = GTK_BUTTONBOX_HETEROGENOUS; ++ + if (nvis_children == 0) + { + requisition->width = 0; +@@ -177,11 +236,36 @@ + case GTK_BUTTONBOX_END: + requisition->width = nvis_children*child_width + ((nvis_children-1)*spacing); + break; ++ case GTK_BUTTONBOX_HETEROGENOUS: ++ children_req = GTK_BOX (box)->children; ++ child_req = children_req->data; ++ requisition->width = 0; ++ ++ while (children_req) ++ { ++ child_req = children_req->data; ++ children_req = children_req->next; ++ ++ if (GTK_WIDGET_VISIBLE (child_req->widget)) ++ { ++ gtk_widget_get_child_requisition( child_req->widget, ++ &(treq) ); ++ requisition->width += treq.width; ++ ++ gtk_widget_style_get(widget, ++ "child-internal-pad-x", ++ &(child_xpad), NULL); ++ requisition->width += (child_xpad*2); ++ } ++ } ++ requisition->width += ((nvis_children-1)*spacing); ++ ++ break; + default: + g_assert_not_reached(); + break; + } +- ++ + requisition->height = child_height; + } + +@@ -227,6 +311,10 @@ + &child_height); + widget->allocation = *allocation; + width = allocation->width - GTK_CONTAINER (box)->border_width*2; ++ ++ if( !base_box->homogeneous ) ++ layout = GTK_BUTTONBOX_HETEROGENOUS; ++ + switch (layout) + { + case GTK_BUTTONBOX_SPREAD: +@@ -264,6 +352,39 @@ + - GTK_CONTAINER (box)->border_width; + secondary_x = allocation->x + GTK_CONTAINER (box)->border_width; + break; ++ case GTK_BUTTONBOX_HETEROGENOUS: ++ { ++ gint sumwidth = 0; ++ GtkBoxChild *child_h; ++ GList *children_h = GTK_BOX (box)->children; ++ /* heterogenous sized childs onto center */ ++ childspacing = spacing; ++ child_h = children_h->data; ++ ++ while (children_h ) ++ { ++ if ( g_list_length (children_h) == 0 ) break; ++ ++ child_h = children_h->data; ++ children_h = children_h->next; ++ ++ if (GTK_WIDGET_VISIBLE (child_h->widget)) ++ { ++ gint child_xpad = 0; ++ GtkRequisition treq; ++ gtk_widget_get_child_requisition( child_h->widget, &(treq) ); ++ sumwidth += treq.width; ++ ++ gtk_widget_style_get(widget, ++ "child-internal-pad-x", ++ &(child_xpad), NULL); ++ sumwidth += (child_xpad*2); ++ } ++ } ++ x = secondary_x = allocation->x + ++ ( (allocation->width - sumwidth - (spacing * (nvis_children - 1)))/2 ); ++ break; ++ } + default: + g_assert_not_reached(); + break; +@@ -282,10 +403,33 @@ + + if (GTK_WIDGET_VISIBLE (child->widget)) + { +- child_allocation.width = child_width; + child_allocation.height = child_height; + child_allocation.y = y; + ++ if(layout != GTK_BUTTONBOX_HETEROGENOUS) ++ { ++ child_allocation.width = child_width; ++ } ++ else /* if layout will be hetergenous */ ++ { ++ gint child_hwidth = 0; ++ GtkRequisition treq; ++ gint child_xpad = 0; ++ ++ gtk_widget_get_child_requisition( child->widget, &(treq) ); ++ child_hwidth += treq.width; ++ ++ gtk_widget_style_get(widget, ++ "child-internal-pad-x", ++ &child_xpad, NULL); ++ child_hwidth += (child_xpad*2); ++ ++ child_allocation.width = child_hwidth; ++ childspace = child_hwidth + childspacing; ++ ++ } ++ ++ /* calculate the horizontal location */ + if (child->is_secondary) + { + child_allocation.x = secondary_x; +@@ -304,4 +448,104 @@ + } + } + } ++ ++/* Function to wrap "hide" and "show" signals to call ++ * osso_gtk_hbutton_box_find_button_detail -function.*/ ++static void osso_gtk_hbutton_child_showhide_handler (GtkWidget *widget, ++ gpointer user_data) ++{ ++ osso_gtk_hbutton_box_find_button_detail (widget, GTK_WIDGET (user_data), NULL); ++} + ++/* Function to remove "show"&"hide" signal handlers ++ * from a child when it's removed. */ ++static void osso_gtk_hbutton_box_remove_child_signal_handlers (GtkHButtonBox *hbbox, ++ GtkWidget *removed_widget, ++ gpointer data) ++{ ++ g_signal_handlers_disconnect_by_func (G_OBJECT (removed_widget), osso_gtk_hbutton_box_find_button_detail, hbbox); ++} ++ ++/* Signal handler called when we have to set ++ * painting detail values for buttons in this ++ * gtk_horizontal_button_box. ++ */ ++static void osso_gtk_hbutton_box_find_button_detail (GtkHButtonBox *hbbox, ++ GtkWidget *addremovewidget, ++ gpointer data) ++{ ++ GList *child; ++ gint visible_buttons = 0; ++ gint secondary_buttons = 0; ++ GtkWidget *leftmost_button = NULL; ++ GtkWidget *rightmost_button = NULL; ++ ++ for( child = GTK_BOX (hbbox)->children ; child ; child = child->next ) ++ { ++ GtkBoxChild *box_child = child->data; ++ GtkWidget *child_widget = box_child->widget; ++ gulong signal_handler = g_signal_handler_find ( G_OBJECT( child_widget ), ++ G_SIGNAL_MATCH_FUNC, ++ 0, 0, NULL, ++ G_CALLBACK (osso_gtk_hbutton_child_showhide_handler), ++ NULL); ++ ++ if (signal_handler == 0) ++ { ++ g_signal_connect_object ( G_OBJECT( child_widget ), ++ "hide", ++ G_CALLBACK ( osso_gtk_hbutton_child_showhide_handler ), ++ hbbox, G_CONNECT_SWAPPED); ++ g_signal_connect_object ( G_OBJECT( child_widget ), ++ "show", ++ G_CALLBACK ( osso_gtk_hbutton_child_showhide_handler ), ++ hbbox, G_CONNECT_SWAPPED); ++ } ++ ++ if ((GTK_WIDGET_VISIBLE (child_widget)) && ++ (GTK_IS_BUTTON (child_widget))) ++ visible_buttons++; ++ else ++ continue; ++ ++ if (leftmost_button == NULL) ++ leftmost_button = child_widget; ++ ++ if (secondary_buttons == 0) ++ rightmost_button = child_widget; ++ else ++ if (box_child->is_secondary) ++ { ++ rightmost_button = child_widget; ++ secondary_buttons++; ++ } ++ ++ if (box_child->is_secondary) ++ rightmost_button = child_widget; ++ } ++ ++ if (visible_buttons == 0) ++ return; ++ ++ for( child = GTK_BOX (hbbox)->children ; child ; child = child->next ) ++ { ++ GtkBoxChild *box_child = child->data; ++ GtkWidget *child_widget = box_child->widget; ++ OssoGtkButtonAttachFlags attachflags = OSSO_GTK_BUTTON_ATTACH_NORTH | OSSO_GTK_BUTTON_ATTACH_SOUTH; ++ gboolean automatic_detail; ++ ++ if (!((GTK_WIDGET_VISIBLE (child_widget)) && ++ (GTK_IS_BUTTON (child_widget)))) ++ continue; ++ ++ if (child_widget == leftmost_button) ++ attachflags |= OSSO_GTK_BUTTON_ATTACH_WEST; ++ ++ if (child_widget == rightmost_button) ++ attachflags |= OSSO_GTK_BUTTON_ATTACH_EAST; ++ ++ g_object_get (G_OBJECT (child_widget), "automatic_detail", &automatic_detail, NULL); ++ if (automatic_detail == TRUE) ++ g_object_set (G_OBJECT (child_widget), "detail", osso_gtk_button_attach_details[attachflags], NULL); ++ } ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhseparator.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhseparator.c.diff new file mode 100644 index 0000000000..814c6ae5c7 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkhseparator.c.diff @@ -0,0 +1,40 @@ +--- gtk+-2.6.4/gtk/gtkhseparator.c 2004-08-09 19:59:52.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkhseparator.c 2005-04-06 16:19:36.667963984 +0300 +@@ -91,13 +91,29 @@ + gtk_hseparator_expose (GtkWidget *widget, + GdkEventExpose *event) + { +- if (GTK_WIDGET_DRAWABLE (widget)) +- gtk_paint_hline (widget->style, widget->window, GTK_WIDGET_STATE (widget), +- &event->area, widget, "hseparator", +- widget->allocation.x, +- widget->allocation.x + widget->allocation.width - 1, +- widget->allocation.y + (widget->allocation.height - +- widget->style->ythickness) / 2); ++ gboolean hildonlike_drawing = FALSE; ++ gtk_widget_style_get ( widget, "hildonlike-drawing", &hildonlike_drawing, NULL ); + +- return FALSE; ++ if (GTK_WIDGET_DRAWABLE (widget)) ++ { ++ if(hildonlike_drawing) ++ gtk_paint_box (widget->style, widget->window, GTK_STATE_NORMAL, ++ GTK_SHADOW_NONE, &event->area, widget, "hseparator", ++ widget->allocation.x, ++ widget->allocation.y + (widget->allocation.height - ++ widget->style->ythickness) / 2, ++ widget->allocation.width - 1, ++ widget->style->ythickness); ++ else ++ gtk_paint_hline (widget->style, widget->window, GTK_STATE_NORMAL, ++ &event->area, widget, "hseparator", ++ widget->allocation.x, ++ widget->allocation.x + widget->allocation.width - 1, ++ widget->allocation.y + (widget->allocation.height - ++ widget->style->ythickness) / 2); ++ } ++ ++ ++ ++ return FALSE; + } diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkiconfactory.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkiconfactory.c.diff new file mode 100644 index 0000000000..91874b9ce4 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkiconfactory.c.diff @@ -0,0 +1,69 @@ +--- gtk+-2.6.4/gtk/gtkiconfactory.c 2005-01-03 16:44:33.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkiconfactory.c 2005-04-06 16:19:36.804943160 +0300 +@@ -813,7 +813,7 @@ + { + if (icon_sizes == NULL) + { +-#define NUM_BUILTIN_SIZES 7 ++#define NUM_BUILTIN_SIZES 11 + gint i; + + icon_aliases = g_hash_table_new (g_str_hash, g_str_equal); +@@ -863,7 +863,27 @@ + icon_sizes[GTK_ICON_SIZE_DIALOG].width = 48; + icon_sizes[GTK_ICON_SIZE_DIALOG].height = 48; + +- g_assert ((GTK_ICON_SIZE_DIALOG + 1) == NUM_BUILTIN_SIZES); ++ icon_sizes[HILDON_ICON_SIZE_26].size = HILDON_ICON_SIZE_26; ++ icon_sizes[HILDON_ICON_SIZE_26].name = "hildon-26"; ++ icon_sizes[HILDON_ICON_SIZE_26].width = 26; ++ icon_sizes[HILDON_ICON_SIZE_26].height = 26; ++ ++ icon_sizes[HILDON_ICON_SIZE_40].size = HILDON_ICON_SIZE_40; ++ icon_sizes[HILDON_ICON_SIZE_40].name = "hildon-40"; ++ icon_sizes[HILDON_ICON_SIZE_40].width = 40; ++ icon_sizes[HILDON_ICON_SIZE_40].height = 40; ++ ++ icon_sizes[HILDON_ICON_SIZE_50].size = HILDON_ICON_SIZE_50; ++ icon_sizes[HILDON_ICON_SIZE_50].name = "hildon-50"; ++ icon_sizes[HILDON_ICON_SIZE_50].width = 50; ++ icon_sizes[HILDON_ICON_SIZE_50].height = 50; ++ ++ icon_sizes[HILDON_ICON_SIZE_64].size = HILDON_ICON_SIZE_64; ++ icon_sizes[HILDON_ICON_SIZE_64].name = "hildon-64"; ++ icon_sizes[HILDON_ICON_SIZE_64].width = 54; ++ icon_sizes[HILDON_ICON_SIZE_64].height = 64; ++ ++ g_assert ((HILDON_ICON_SIZE_64 + 1) == NUM_BUILTIN_SIZES); + + /* Alias everything to itself. */ + i = 1; /* skip invalid size */ +@@ -1658,7 +1678,7 @@ + gint width, height, pixel_size; + gint *sizes, *s, dist; + GError *error = NULL; +- ++ + if (widget && gtk_widget_has_screen (widget)) + screen = gtk_widget_get_screen (widget); + else if (style && style->colormap) +@@ -1734,8 +1754,10 @@ + tmp_source.type = GTK_ICON_SOURCE_PIXBUF; + tmp_source.source.pixbuf = tmp_pixbuf; + ++ /* Hildon: no scaling allowed for Hildon icons */ + pixbuf = gtk_style_render_icon (style, &tmp_source, +- direction, state, -1, ++ direction, state, ++ (size < HILDON_ICON_SIZE_26) ? -1 : size, + widget, detail); + + if (!pixbuf) +@@ -1818,7 +1840,6 @@ + { + /* This icon can be used for any direction/state/size */ + static GtkIconSource fallback_source = GTK_ICON_SOURCE_INIT (TRUE, TRUE, TRUE); +- + if (fallback_source.type == GTK_ICON_SOURCE_EMPTY) + { + GdkPixbuf *pixbuf = gdk_pixbuf_new_from_inline (-1, stock_missing_image_24, FALSE, NULL); diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkicontheme.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkicontheme.c.diff new file mode 100644 index 0000000000..ff9cf71096 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkicontheme.c.diff @@ -0,0 +1,48 @@ +--- gtk+-2.6.4/gtk/gtkicontheme.c 2005-03-01 17:24:48.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkicontheme.c 2005-04-06 16:19:36.807942704 +0300 +@@ -64,7 +64,8 @@ + ICON_SUFFIX_XPM = 1 << 0, + ICON_SUFFIX_SVG = 1 << 1, + ICON_SUFFIX_PNG = 1 << 2, +- HAS_ICON_FILE = 1 << 3 ++ HAS_ICON_FILE = 1 << 3, ++ ICON_SUFFIX_ANI = 1 << 4 + } IconSuffix; + + +@@ -1743,6 +1744,8 @@ + return ".svg"; + case ICON_SUFFIX_PNG: + return ".png"; ++ case ICON_SUFFIX_ANI: ++ return ".ani"; + default: + g_assert_not_reached(); + } +@@ -1760,6 +1763,8 @@ + retval = ICON_SUFFIX_SVG; + else if (g_str_has_suffix (name, ".xpm")) + retval = ICON_SUFFIX_XPM; ++ else if (g_str_has_suffix (name, ".ani")) ++ retval = ICON_SUFFIX_ANI; + else + retval = ICON_SUFFIX_NONE; + +@@ -1776,6 +1781,8 @@ + return ICON_SUFFIX_SVG; + else if ((suffix & ICON_SUFFIX_XPM) != 0) + return ICON_SUFFIX_XPM; ++ else if ((suffix & ICON_SUFFIX_ANI) != 0) ++ return ICON_SUFFIX_ANI; + else + return ICON_SUFFIX_NONE; + } +@@ -2558,7 +2565,7 @@ + icon_info->pixbuf = gdk_pixbuf_scale_simple (source_pixbuf, + 0.5 + image_width * icon_info->scale, + 0.5 + image_height * icon_info->scale, +- GDK_INTERP_BILINEAR); ++ GDK_INTERP_NEAREST); + g_object_unref (source_pixbuf); + } + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkimcontext.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkimcontext.c.diff new file mode 100644 index 0000000000..03d990c6dd --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkimcontext.c.diff @@ -0,0 +1,52 @@ +--- gtk+-2.6.4/gtk/gtkimcontext.c 2004-09-26 07:23:56.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkimcontext.c 2005-04-06 16:19:36.814941640 +0300 +@@ -360,6 +360,44 @@ + } + + /** ++ * gtk_im_context_show: ++ * @context: a #GtkIMContext ++ * ++ * Notify the input method that widget thinks the actual ++ * input method show be opened. ++ **/ ++void ++gtk_im_context_show (GtkIMContext *context) ++{ ++ GtkIMContextClass *klass; ++ ++ g_return_if_fail (GTK_IS_IM_CONTEXT (context)); ++ ++ klass = GTK_IM_CONTEXT_GET_CLASS (context); ++ if (klass->show) ++ klass->show (context); ++} ++ ++/** ++ * gtk_im_context_hide: ++ * @context: a #GtkIMContext ++ * ++ * Notify the input method that widget thinks the actual ++ * input method show be closed. ++ **/ ++void ++gtk_im_context_hide (GtkIMContext *context) ++{ ++ GtkIMContextClass *klass; ++ ++ g_return_if_fail (GTK_IS_IM_CONTEXT (context)); ++ ++ klass = GTK_IM_CONTEXT_GET_CLASS (context); ++ if (klass->hide) ++ klass->hide (context); ++} ++ ++/** + * gtk_im_context_reset: + * @context: a #GtkIMContext + * +@@ -553,4 +591,3 @@ + + return result; + } +- diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkimcontext.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkimcontext.h.diff new file mode 100644 index 0000000000..068d18a7d3 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkimcontext.h.diff @@ -0,0 +1,29 @@ +--- gtk+-2.6.4/gtk/gtkimcontext.h 2002-10-11 01:18:36.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkimcontext.h 2005-04-06 16:19:36.815941488 +0300 +@@ -85,14 +85,15 @@ + gboolean (*get_surrounding) (GtkIMContext *context, + gchar **text, + gint *cursor_index); ++ void (*show) (GtkIMContext *context); ++ void (*hide) (GtkIMContext *context); ++ + + /* Padding for future expansion */ + void (*_gtk_reserved1) (void); + void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); + void (*_gtk_reserved4) (void); +- void (*_gtk_reserved5) (void); +- void (*_gtk_reserved6) (void); + }; + + GType gtk_im_context_get_type (void) G_GNUC_CONST; +@@ -122,6 +123,8 @@ + gboolean gtk_im_context_delete_surrounding (GtkIMContext *context, + gint offset, + gint n_chars); ++void gtk_im_context_show (GtkIMContext *context); ++void gtk_im_context_hide (GtkIMContext *context); + + #ifdef __cplusplus + } diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkimmulticontext.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkimmulticontext.c.diff new file mode 100644 index 0000000000..4332a9c318 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkimmulticontext.c.diff @@ -0,0 +1,155 @@ +--- gtk+-2.6.4/gtk/gtkimmulticontext.c 2004-08-09 19:59:52.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkimmulticontext.c 2005-04-06 16:19:36.818941032 +0300 +@@ -59,6 +59,8 @@ + static void gtk_im_multicontext_focus_in (GtkIMContext *context); + static void gtk_im_multicontext_focus_out (GtkIMContext *context); + static void gtk_im_multicontext_reset (GtkIMContext *context); ++static void gtk_im_multicontext_show (GtkIMContext *context); ++static void gtk_im_multicontext_hide (GtkIMContext *context); + static void gtk_im_multicontext_set_cursor_location (GtkIMContext *context, + GdkRectangle *area); + static void gtk_im_multicontext_set_use_preedit (GtkIMContext *context, +@@ -118,6 +120,67 @@ + return im_multicontext_type; + } + ++static GtkIMContext * ++gtk_im_multicontext_get_slave (GtkIMMulticontext *multicontext); ++ ++enum { ++ PROP_INPUT_MODE = 1, ++ PROP_AUTOCAP, ++ PROP_VISIBILITY, ++ PROP_USE_SHOW_HIDE ++}; ++ ++static void gtk_im_multicontext_set_property(GObject * object, ++ guint property_id, ++ const GValue * value, ++ GParamSpec * pspec) ++{ ++ GtkIMContext *slave = gtk_im_multicontext_get_slave (GTK_IM_MULTICONTEXT(object)); ++ ++ GParamSpec *param_spec = g_object_class_find_property ++ (G_OBJECT_GET_CLASS(slave), ++ pspec->name); ++ ++ if(param_spec != NULL) ++ g_object_set_property(G_OBJECT(slave), pspec->name, value); ++} ++ ++static void gtk_im_multicontext_get_property(GObject * object, ++ guint property_id, ++ GValue * value, ++ GParamSpec * pspec) ++{ ++ GtkIMContext *slave = gtk_im_multicontext_get_slave (GTK_IM_MULTICONTEXT(object)); ++ GParamSpec *param_spec = g_object_class_find_property ++ (G_OBJECT_GET_CLASS(slave), ++ pspec->name); ++ ++ if(param_spec != NULL) ++ g_object_get_property(G_OBJECT(slave), pspec->name, value); ++ else ++ { ++ switch (property_id) ++ { ++ case PROP_INPUT_MODE: ++ /* return 0 */ ++ g_value_set_int(value, 0); ++ break; ++ case PROP_AUTOCAP: ++ /* return FALSE */ ++ g_value_set_boolean(value, FALSE); ++ break; ++ case PROP_VISIBILITY: ++ /* return TRUE */ ++ g_value_set_boolean(value, TRUE); ++ break; ++ case PROP_USE_SHOW_HIDE: ++ default: ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); ++ break; ++ } ++ } ++} ++ + static void + gtk_im_multicontext_class_init (GtkIMMulticontextClass *class) + { +@@ -132,12 +195,38 @@ + im_context_class->focus_in = gtk_im_multicontext_focus_in; + im_context_class->focus_out = gtk_im_multicontext_focus_out; + im_context_class->reset = gtk_im_multicontext_reset; ++ im_context_class->show = gtk_im_multicontext_show; ++ im_context_class->hide = gtk_im_multicontext_hide; + im_context_class->set_cursor_location = gtk_im_multicontext_set_cursor_location; + im_context_class->set_use_preedit = gtk_im_multicontext_set_use_preedit; + im_context_class->set_surrounding = gtk_im_multicontext_set_surrounding; + im_context_class->get_surrounding = gtk_im_multicontext_get_surrounding; + + gobject_class->finalize = gtk_im_multicontext_finalize; ++ ++ gobject_class->set_property = gtk_im_multicontext_set_property; ++ gobject_class->get_property = gtk_im_multicontext_get_property; ++ ++ g_object_class_install_property(gobject_class, PROP_INPUT_MODE, ++ g_param_spec_int("input-mode", "Input mode", ++ "Specifies the set of allowed characters", ++ 0, 9, 0, /* We don't move symbolic definitions here. See hildon-input-mode.h */ ++ G_PARAM_READWRITE)); ++ ++ g_object_class_install_property(gobject_class, PROP_AUTOCAP, ++ g_param_spec_boolean("autocap", "Autocap", ++ "Whether the client wants the first character in a sentense to be automatic upper case", ++ FALSE, G_PARAM_READWRITE)); ++ ++ g_object_class_install_property(gobject_class, PROP_VISIBILITY, ++ g_param_spec_boolean("visibility", "Visibility", ++ "FALSE displays the \"invisible char\"instead of the actual text (password mode)", ++ TRUE, G_PARAM_READABLE | G_PARAM_WRITABLE)); ++ ++ g_object_class_install_property(gobject_class, PROP_VISIBILITY, ++ g_param_spec_boolean("use-show-hide", "Use show/hide functions", ++ "Use show/hide functions to show/hide IM instead of focus_in/focus_out", ++ FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE)); + } + + static void +@@ -567,3 +656,36 @@ + g_free (contexts); + } + ++static void ++gtk_im_multicontext_show (GtkIMContext *context) ++{ ++ GtkIMMulticontext *multicontext = GTK_IM_MULTICONTEXT (context); ++ GtkIMContext *slave; ++ ++ /* If the global context type is different from the context we were ++ * using before, get rid of the old slave and create a new one ++ * for the new global context type. ++ */ ++ if (!multicontext->context_id || ++ strcmp (global_context_id, multicontext->context_id) != 0) ++ gtk_im_multicontext_set_slave (multicontext, NULL, FALSE); ++ ++ slave = gtk_im_multicontext_get_slave (multicontext); ++ ++ multicontext->priv->focus_in = TRUE; ++ ++ if (slave) ++ gtk_im_context_show (slave); ++} ++ ++static void ++gtk_im_multicontext_hide (GtkIMContext *context) ++{ ++ GtkIMMulticontext *multicontext = GTK_IM_MULTICONTEXT (context); ++ GtkIMContext *slave = gtk_im_multicontext_get_slave (multicontext); ++ ++ multicontext->priv->focus_in = FALSE; ++ ++ if (slave) ++ gtk_im_context_hide (slave); ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtklabel-resize-patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtklabel-resize-patch new file mode 100644 index 0000000000..df29656343 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtklabel-resize-patch @@ -0,0 +1,10 @@ +--- gtk+-2.4.3/gtk/gtklabel.c~ 2004-06-11 13:50:34.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtklabel.c 2004-07-05 13:33:57.000000000 +0100 +@@ -1623,6 +1623,7 @@ + + /* We have to clear the layout, fonts etc. may have changed */ + gtk_label_clear_layout (label); ++ gtk_widget_queue_resize (GTK_WIDGET (label)); + } + + static void diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtklabel.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtklabel.c.diff new file mode 100644 index 0000000000..e730b66b7f --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtklabel.c.diff @@ -0,0 +1,390 @@ +--- gtk+-2.6.4/gtk/gtklabel.c 2005-02-28 06:32:03.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtklabel.c 2005-04-06 16:19:36.878931912 +0300 +@@ -23,6 +23,11 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++ ++/* Modified for Nokia Oyj during 2004. See CHANGES file for list ++ * of changes. ++ */ ++ + #include <config.h> + #include <math.h> + #include <string.h> +@@ -52,6 +57,7 @@ + guint single_line_mode : 1; + guint have_transform : 1; + gdouble angle; ++ gboolean request_full_width; + } + GtkLabelPrivate; + +@@ -75,6 +81,9 @@ + LAST_SIGNAL + }; + ++/* Hildon mod. ++ A property PROP_TRANSLATABLE has been added here. If new Gtk+ ++ versions add items here, the compability will break. */ + enum { + PROP_0, + PROP_LABEL, +@@ -89,6 +98,7 @@ + PROP_MNEMONIC_WIDGET, + PROP_CURSOR_POSITION, + PROP_SELECTION_BOUND, ++ PROP_TRANSLATABLE, + PROP_ELLIPSIZE, + PROP_WIDTH_CHARS, + PROP_SINGLE_LINE_MODE, +@@ -96,6 +106,12 @@ + PROP_MAX_WIDTH_CHARS + }; + ++/* Hildon mod. A few keys. These are used to store data for label ++ * without changing the private structures. */ ++#define LABEL_KEY_TRANSLATABLE "label_translatable" ++#define LABEL_KEY_TRANSLATABLETEXT "label_translatabletext" ++#define LABEL_KEY_ORIGINAL_LAYOUT "label_original_layout" ++ + static guint signals[LAST_SIGNAL] = { 0 }; + + static void gtk_label_class_init (GtkLabelClass *klass); +@@ -149,7 +165,7 @@ + static void gtk_label_set_uline_text_internal (GtkLabel *label, + const gchar *str); + static void gtk_label_set_pattern_internal (GtkLabel *label, +- const gchar *pattern); ++ const gchar *pattern); + static void set_markup (GtkLabel *label, + const gchar *str, + gboolean with_uline); +@@ -516,6 +532,24 @@ + G_MAXINT, + -1, + G_PARAM_READWRITE)); ++ /* Hildon mod. Add property for a widget - whether it supports run-time ++ + locale change. Please note that this functionality is not yet ++ + completed and may change. */ ++ g_object_class_install_property (gobject_class, ++ PROP_TRANSLATABLE, ++ g_param_spec_boolean ("translatable", ++ _("Is translatable"), ++ _("Whether label should be translatable."), ++ FALSE, ++ G_PARAM_READWRITE)); ++ ++ /* Hildonlike class property */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("hildonlike", ++ _("hildonlike looks"), ++ _("Changes wrapping etc behaviour, 1/0"), ++ FALSE, ++ G_PARAM_READABLE)); + /* + * Key bindings + */ +@@ -650,6 +684,10 @@ + case PROP_MAX_WIDTH_CHARS: + gtk_label_set_max_width_chars (label, g_value_get_int (value)); + break; ++/* Hildon add. */ ++ case PROP_TRANSLATABLE: ++ gtk_label_set_translatable (label, g_value_get_boolean (value)); ++ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; +@@ -730,6 +768,10 @@ + case PROP_MAX_WIDTH_CHARS: + g_value_set_int (value, gtk_label_get_max_width_chars (label)); + break; ++/* Hildon mod. */ ++ case PROP_TRANSLATABLE: ++ g_value_set_boolean (value, gtk_label_get_translatable (label)); ++ break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); +@@ -748,6 +790,7 @@ + priv->width_chars = -1; + priv->angle = 0.0; + priv->max_width_chars = -1; ++ priv->request_full_width = FALSE; + label->label = NULL; + + label->jtype = GTK_JUSTIFY_LEFT; +@@ -766,6 +809,15 @@ + label->mnemonic_window = NULL; + + gtk_label_set_text (label, ""); ++ ++/* Hildon Addition. */ ++ ++ g_object_set_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLE, FALSE); ++ g_object_set_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT, NULL); ++ g_object_set_data (G_OBJECT (label), LABEL_KEY_ORIGINAL_LAYOUT, NULL); ++ ++/* /Hildon Addition. */ ++ + } + + /** +@@ -822,7 +874,7 @@ + + if (str && *str) + gtk_label_set_text_with_mnemonic (label, str); +- ++ + return GTK_WIDGET (label); + } + +@@ -1257,7 +1309,7 @@ + GError *error = NULL; + PangoAttrList *attrs = NULL; + gunichar accel_char = 0; +- ++ + if (!pango_parse_markup (str, + -1, + with_uline ? '_' : 0, +@@ -1340,12 +1392,14 @@ + g_return_if_fail (GTK_IS_LABEL (label)); + + last_keyval = label->mnemonic_keyval; ++ + gtk_label_set_label_internal (label, g_strdup (str ? str : "")); + gtk_label_set_use_markup_internal (label, TRUE); + gtk_label_set_use_underline_internal (label, TRUE); +- + gtk_label_recalculate (label); ++ + gtk_label_setup_mnemonic (label, last_keyval); ++ + } + + /** +@@ -1409,7 +1463,7 @@ + + static void + gtk_label_set_pattern_internal (GtkLabel *label, +- const gchar *pattern) ++ const gchar *pattern) + { + PangoAttrList *attrs; + g_return_if_fail (GTK_IS_LABEL (label)); +@@ -1421,7 +1475,16 @@ + + if (label->effective_attrs) + pango_attr_list_unref (label->effective_attrs); ++/* Following will disable undercores from ++ keyboard shortcuts if DISABLE_KEYBOARD_SHORTCUTS ++ is enabled during compile time ++ */ ++#ifndef DISABLE_KEYBOARD_SHORTCUTS + label->effective_attrs = attrs; ++#else ++ pango_attr_list_unref (attrs); ++#endif /* DISABLE_KEYBOARD_SHORTCUTS */ ++ + } + + void +@@ -1742,8 +1805,13 @@ + { + PangoLayout *layout; + GtkStyle *style = GTK_WIDGET (label)->style; +- ++ ++ gboolean hildonlike; + LabelWrapWidth *wrap_width = g_object_get_data (G_OBJECT (style), "gtk-label-wrap-width"); ++ ++ /* Hildon: get hildonlike property */ ++ gtk_widget_style_get (GTK_WIDGET (label), "hildonlike", &hildonlike, NULL); ++ + if (!wrap_width) + { + wrap_width = g_new0 (LabelWrapWidth, 1); +@@ -1763,7 +1831,12 @@ + "This long string gives a good enough length for any line to have."); + pango_layout_get_size (layout, &wrap_width->width, NULL); + g_object_unref (layout); +- ++ /* A hildon mod for "fixing line wrapping". Remember to remove this ++ when GtkLabel will implement width for height size negotiation.*/ ++ if (hildonlike) ++ { ++ wrap_width->width = wrap_width->width * 1.25; ++ } + return wrap_width->width; + } + +@@ -1774,8 +1847,12 @@ + PangoRectangle logical_rect; + gint rwidth, rheight; + gboolean rtl; ++ gboolean hildonlike; + + widget = GTK_WIDGET (label); ++ ++ /* Hildon: get hildonlike property */ ++ gtk_widget_style_get (widget, "hildonlike", &hildonlike, NULL); + + rtl = gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL; + rwidth = label->misc.xpad * 2; +@@ -1864,8 +1941,18 @@ + + wrap_width = get_label_wrap_width (label); + width = MIN (width, wrap_width); +- width = MIN (width, ++ ++ if (!hildonlike) ++ { ++ width = MIN (width, + PANGO_SCALE * (gdk_screen_get_width (screen) + 1) / 2); ++ } ++ else ++ { ++ width = MIN (width, ++ PANGO_SCALE * (gdk_screen_get_width (screen) + 1)); ++ } ++ + + pango_layout_set_width (label->layout, width); + pango_layout_get_extents (label->layout, NULL, &logical_rect); +@@ -1910,6 +1997,7 @@ + else /* !label->wrap */ + pango_layout_set_width (label->layout, -1); + } ++ + } + + /* Gets the bounds of a layout in device coordinates. Note cut-and-paste +@@ -2017,7 +2105,8 @@ + priv->width_chars > 0 || priv->max_width_chars > 0) && + aux_info && aux_info->width > 0) + width += aux_info->width; +- else if (label->ellipsize || priv->width_chars > 0 || priv->max_width_chars > 0) ++ else if ((label->ellipsize || priv->width_chars > 0 || priv->max_width_chars > 0) && ++ !priv->request_full_width) + { + PangoContext *context; + PangoFontMetrics *metrics; +@@ -2081,11 +2170,24 @@ + GtkAllocation *allocation) + { + GtkLabel *label; ++ GtkRequisition req; ++ GtkLabelPrivate *priv; + + label = GTK_LABEL (widget); ++ priv = GTK_LABEL_GET_PRIVATE (label); + + (* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation); + ++ gtk_widget_get_child_requisition (widget, &req); ++ ++ if (allocation->width < req.width && !label->wrap) ++ { ++ gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END); ++ priv->request_full_width = TRUE; ++ } ++ else ++ priv->request_full_width = FALSE; ++ + if (label->ellipsize) + { + if (label->layout) +@@ -2479,7 +2581,7 @@ + } + *dest = 0; + *pattern_dest = 0; +- ++ + gtk_label_set_text_internal (label, new_str); + gtk_label_set_pattern_internal (label, pattern); + +@@ -2541,13 +2643,11 @@ + last_keyval = label->mnemonic_keyval; + + g_object_freeze_notify (G_OBJECT (label)); +- + gtk_label_set_label_internal (label, g_strdup (str ? str : "")); + gtk_label_set_use_markup_internal (label, FALSE); + gtk_label_set_use_underline_internal (label, TRUE); +- +- gtk_label_recalculate (label); + ++ gtk_label_recalculate (label); + gtk_label_setup_mnemonic (label, last_keyval); + + g_object_thaw_notify (G_OBJECT (label)); +@@ -3948,3 +4048,67 @@ + popup_position_func, label, + 0, gtk_get_current_event_time ()); + } ++ ++/* Hildon mod. ++ * Functions for run-time locale changing. Beware though that this ++ functionality is not yet completed. Therefore it's suggested ++ that these functions shouldn't be used yet outside testing. */ ++ ++void gtk_label_set_translatable (GtkLabel *label, gboolean newstatus) ++{ ++ if (newstatus == gtk_label_get_translatable (label)) return; ++ ++ if (newstatus == TRUE) ++ { ++ if (g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT) != NULL) ++ g_free (g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT)); ++ g_object_set_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT, g_strdup (label->label)); ++ g_object_set_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLE, (void*) TRUE); ++ if (label->text != NULL) ++ g_free (label->text); ++ if (label->label != NULL) ++ g_free (label->label); ++ label->text = g_strdup(_(g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT))); ++ label->label = g_strdup(_(g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT))); ++ } ++ else ++ { ++ if (label->text != NULL) ++ g_free (label->text); ++ if (label->label != NULL) ++ g_free (label->label); ++ label->text = g_strdup (g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT)); ++ label->label = g_strdup (g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT)); ++ g_object_set_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLE, FALSE); ++ if (g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT) != NULL) ++ g_free (g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT)); ++ g_object_set_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT, NULL); ++ } ++ gtk_label_recalculate (label); ++} ++ ++gboolean gtk_label_get_translatable (GtkLabel *label) ++{ ++ return (gboolean) (g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLE)); ++} ++ ++ ++void gtk_label_retranslate (GtkLabel *label) ++{ ++ g_object_freeze_notify (G_OBJECT (label)); ++ if (gtk_label_get_translatable (label) == TRUE) ++ { ++ if (label->label != NULL) ++ g_free (label->label); ++ label->label = g_strdup(gettext(g_object_get_data (G_OBJECT (label), LABEL_KEY_TRANSLATABLETEXT))); ++ } ++ if (g_object_get_data (G_OBJECT (label), LABEL_KEY_ORIGINAL_LAYOUT)) g_object_unref (g_object_get_data (G_OBJECT (label), LABEL_KEY_ORIGINAL_LAYOUT)); ++ g_object_set_data (G_OBJECT (label), LABEL_KEY_ORIGINAL_LAYOUT, NULL); ++ g_object_notify (G_OBJECT (label), "label"); ++ gtk_label_recalculate (label); ++ g_object_thaw_notify (G_OBJECT (label)); ++ gtk_label_set_text (label, label->label); ++} ++ ++/* End of hildon mods for run-time locale change. */ ++ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtklabel.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtklabel.h.diff new file mode 100644 index 0000000000..5aef5e5a62 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtklabel.h.diff @@ -0,0 +1,29 @@ +--- gtk+-2.6.4/gtk/gtklabel.h 2004-12-13 08:34:54.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtklabel.h 2005-04-06 16:19:36.889930240 +0300 +@@ -23,6 +23,10 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++/* Modified for Nokia Oyj during 2004. See CHANGES file for list ++ * of changes. ++ */ ++ + #ifndef __GTK_LABEL_H__ + #define __GTK_LABEL_H__ + +@@ -165,6 +169,15 @@ + gboolean single_line_mode); + gboolean gtk_label_get_single_line_mode (GtkLabel *label); + ++/* Additional Hildon functions for run-time locale change */ ++ ++void gtk_label_set_translatable (GtkLabel *label, gboolean newstatus); ++gboolean gtk_label_get_translatable (GtkLabel *label); ++ ++void gtk_label_retranslate (GtkLabel *label); ++ ++/* ----- */ ++ + #ifndef GTK_DISABLE_DEPRECATED + + #define gtk_label_set gtk_label_set_text diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmain.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmain.c.diff new file mode 100644 index 0000000000..2132487bdf --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmain.c.diff @@ -0,0 +1,35 @@ +--- gtk+-2.6.4/gtk/gtkmain.c 2004-12-27 07:25:15.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmain.c 2005-04-06 16:19:36.897929024 +0300 +@@ -68,6 +68,7 @@ + #include "gtkwindow.h" + #include "gtkprivate.h" + #include "gtkdebug.h" ++#include "gtkwidget.h" + + /* Private type definitions + */ +@@ -1297,6 +1298,15 @@ + { + grab_widget = event_widget; + } ++ ++ /* Hildon: insensitive press handling is moved here */ ++ if (event->type == GDK_BUTTON_PRESS) ++ { ++ if (!GTK_WIDGET_IS_SENSITIVE (event_widget)) ++ { ++ gtk_widget_insensitive_press(event_widget); ++ } ++ } + + /* Not all events get sent to the grabbing widget. + * The delete, destroy, expose, focus change and resize +@@ -2090,7 +2100,7 @@ + handled_event = FALSE; + + g_object_ref (widget); +- ++ + if ((event->type == GDK_KEY_PRESS) || + (event->type == GDK_KEY_RELEASE)) + { diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshal.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshal.c.diff new file mode 100644 index 0000000000..80c0618bf9 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshal.c.diff @@ -0,0 +1,266 @@ +--- gtk+-2.6.4/gtk/gtkmarshal.c 2005-03-01 17:58:15.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmarshal.c 2005-04-06 16:19:36.898928872 +0300 +@@ -48,7 +48,7 @@ + #endif /* !G_ENABLE_DEBUG */ + + +-/* BOOL:NONE (./gtkmarshal.list:1) */ ++/* BOOL:NONE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:1) */ + void + gtk_marshal_BOOLEAN__VOID (GClosure *closure, + GValue *return_value, +@@ -85,7 +85,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOL:POINTER (./gtkmarshal.list:2) */ ++/* BOOL:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:2) */ + void + gtk_marshal_BOOLEAN__POINTER (GClosure *closure, + GValue *return_value, +@@ -124,7 +124,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOL:POINTER,POINTER,INT,INT (./gtkmarshal.list:3) */ ++/* BOOL:POINTER,POINTER,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:3) */ + void + gtk_marshal_BOOLEAN__POINTER_POINTER_INT_INT (GClosure *closure, + GValue *return_value, +@@ -169,7 +169,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOL:POINTER,INT,INT (./gtkmarshal.list:4) */ ++/* BOOL:POINTER,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:4) */ + void + gtk_marshal_BOOLEAN__POINTER_INT_INT (GClosure *closure, + GValue *return_value, +@@ -212,7 +212,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOL:POINTER,INT,INT,UINT (./gtkmarshal.list:5) */ ++/* BOOL:POINTER,INT,INT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:5) */ + void + gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT (GClosure *closure, + GValue *return_value, +@@ -257,7 +257,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOL:POINTER,STRING,STRING,POINTER (./gtkmarshal.list:6) */ ++/* BOOL:POINTER,STRING,STRING,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:6) */ + void + gtk_marshal_BOOLEAN__POINTER_STRING_STRING_POINTER (GClosure *closure, + GValue *return_value, +@@ -302,7 +302,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* ENUM:ENUM (./gtkmarshal.list:7) */ ++/* ENUM:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:7) */ + void + gtk_marshal_ENUM__ENUM (GClosure *closure, + GValue *return_value, +@@ -341,7 +341,7 @@ + g_value_set_enum (return_value, v_return); + } + +-/* INT:POINTER (./gtkmarshal.list:8) */ ++/* INT:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:8) */ + void + gtk_marshal_INT__POINTER (GClosure *closure, + GValue *return_value, +@@ -380,7 +380,7 @@ + g_value_set_int (return_value, v_return); + } + +-/* INT:POINTER,CHAR,CHAR (./gtkmarshal.list:9) */ ++/* INT:POINTER,CHAR,CHAR (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:9) */ + void + gtk_marshal_INT__POINTER_CHAR_CHAR (GClosure *closure, + GValue *return_value, +@@ -423,13 +423,13 @@ + g_value_set_int (return_value, v_return); + } + +-/* NONE:BOOL (./gtkmarshal.list:10) */ ++/* NONE:BOOL (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:10) */ + +-/* NONE:BOXED (./gtkmarshal.list:11) */ ++/* NONE:BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:11) */ + +-/* NONE:ENUM (./gtkmarshal.list:12) */ ++/* NONE:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:12) */ + +-/* NONE:ENUM,FLOAT (./gtkmarshal.list:13) */ ++/* NONE:ENUM,FLOAT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:13) */ + void + gtk_marshal_VOID__ENUM_FLOAT (GClosure *closure, + GValue *return_value, +@@ -466,7 +466,7 @@ + data2); + } + +-/* NONE:ENUM,FLOAT,BOOL (./gtkmarshal.list:14) */ ++/* NONE:ENUM,FLOAT,BOOL (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:14) */ + void + gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -505,9 +505,9 @@ + data2); + } + +-/* NONE:INT (./gtkmarshal.list:15) */ ++/* NONE:INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:15) */ + +-/* NONE:INT,INT (./gtkmarshal.list:16) */ ++/* NONE:INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:16) */ + void + gtk_marshal_VOID__INT_INT (GClosure *closure, + GValue *return_value, +@@ -544,7 +544,7 @@ + data2); + } + +-/* NONE:INT,INT,POINTER (./gtkmarshal.list:17) */ ++/* NONE:INT,INT,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:17) */ + void + gtk_marshal_VOID__INT_INT_POINTER (GClosure *closure, + GValue *return_value, +@@ -583,13 +583,13 @@ + data2); + } + +-/* NONE:NONE (./gtkmarshal.list:18) */ ++/* NONE:NONE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:18) */ + +-/* NONE:OBJECT (./gtkmarshal.list:19) */ ++/* NONE:OBJECT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:19) */ + +-/* NONE:POINTER (./gtkmarshal.list:20) */ ++/* NONE:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:20) */ + +-/* NONE:POINTER,INT (./gtkmarshal.list:21) */ ++/* NONE:POINTER,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:21) */ + void + gtk_marshal_VOID__POINTER_INT (GClosure *closure, + GValue *return_value, +@@ -626,7 +626,7 @@ + data2); + } + +-/* NONE:POINTER,POINTER (./gtkmarshal.list:22) */ ++/* NONE:POINTER,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:22) */ + void + gtk_marshal_VOID__POINTER_POINTER (GClosure *closure, + GValue *return_value, +@@ -663,7 +663,7 @@ + data2); + } + +-/* NONE:POINTER,POINTER,POINTER (./gtkmarshal.list:23) */ ++/* NONE:POINTER,POINTER,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:23) */ + void + gtk_marshal_VOID__POINTER_POINTER_POINTER (GClosure *closure, + GValue *return_value, +@@ -702,7 +702,7 @@ + data2); + } + +-/* NONE:POINTER,STRING,STRING (./gtkmarshal.list:24) */ ++/* NONE:POINTER,STRING,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:24) */ + void + gtk_marshal_VOID__POINTER_STRING_STRING (GClosure *closure, + GValue *return_value, +@@ -741,7 +741,7 @@ + data2); + } + +-/* NONE:POINTER,UINT (./gtkmarshal.list:25) */ ++/* NONE:POINTER,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:25) */ + void + gtk_marshal_VOID__POINTER_UINT (GClosure *closure, + GValue *return_value, +@@ -778,7 +778,7 @@ + data2); + } + +-/* NONE:POINTER,UINT,ENUM (./gtkmarshal.list:26) */ ++/* NONE:POINTER,UINT,ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:26) */ + void + gtk_marshal_VOID__POINTER_UINT_ENUM (GClosure *closure, + GValue *return_value, +@@ -817,7 +817,7 @@ + data2); + } + +-/* NONE:POINTER,POINTER,UINT,UINT (./gtkmarshal.list:27) */ ++/* NONE:POINTER,POINTER,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:27) */ + void + gtk_marshal_VOID__POINTER_POINTER_UINT_UINT (GClosure *closure, + GValue *return_value, +@@ -858,7 +858,7 @@ + data2); + } + +-/* NONE:POINTER,INT,INT,POINTER,UINT,UINT (./gtkmarshal.list:28) */ ++/* NONE:POINTER,INT,INT,POINTER,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:28) */ + void + gtk_marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT (GClosure *closure, + GValue *return_value, +@@ -903,7 +903,7 @@ + data2); + } + +-/* NONE:POINTER,UINT,UINT (./gtkmarshal.list:29) */ ++/* NONE:POINTER,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:29) */ + void + gtk_marshal_VOID__POINTER_UINT_UINT (GClosure *closure, + GValue *return_value, +@@ -942,11 +942,11 @@ + data2); + } + +-/* NONE:POINTER,UINT,UINT (./gtkmarshal.list:30) */ ++/* NONE:POINTER,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:30) */ + +-/* NONE:STRING (./gtkmarshal.list:31) */ ++/* NONE:STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:31) */ + +-/* NONE:STRING,INT,POINTER (./gtkmarshal.list:32) */ ++/* NONE:STRING,INT,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:32) */ + void + gtk_marshal_VOID__STRING_INT_POINTER (GClosure *closure, + GValue *return_value, +@@ -985,9 +985,9 @@ + data2); + } + +-/* NONE:UINT (./gtkmarshal.list:33) */ ++/* NONE:UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:33) */ + +-/* NONE:UINT,POINTER,UINT,ENUM,ENUM,POINTER (./gtkmarshal.list:34) */ ++/* NONE:UINT,POINTER,UINT,ENUM,ENUM,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:34) */ + void + gtk_marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER (GClosure *closure, + GValue *return_value, +@@ -1032,7 +1032,7 @@ + data2); + } + +-/* NONE:UINT,POINTER,UINT,UINT,ENUM (./gtkmarshal.list:35) */ ++/* NONE:UINT,POINTER,UINT,UINT,ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:35) */ + void + gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM (GClosure *closure, + GValue *return_value, +@@ -1075,7 +1075,7 @@ + data2); + } + +-/* NONE:UINT,STRING (./gtkmarshal.list:36) */ ++/* NONE:UINT,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:36) */ + void + gtk_marshal_VOID__UINT_STRING (GClosure *closure, + GValue *return_value, diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshal.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshal.h.diff new file mode 100644 index 0000000000..9740129005 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshal.h.diff @@ -0,0 +1,284 @@ +--- gtk+-2.6.4/gtk/gtkmarshal.h 2005-03-01 17:58:16.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmarshal.h 2005-04-06 16:19:36.899928720 +0300 +@@ -7,7 +7,7 @@ + + G_BEGIN_DECLS + +-/* BOOL:NONE (./gtkmarshal.list:1) */ ++/* BOOL:NONE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:1) */ + extern void gtk_marshal_BOOLEAN__VOID (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -16,7 +16,7 @@ + gpointer marshal_data); + #define gtk_marshal_BOOL__NONE gtk_marshal_BOOLEAN__VOID + +-/* BOOL:POINTER (./gtkmarshal.list:2) */ ++/* BOOL:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:2) */ + extern void gtk_marshal_BOOLEAN__POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -25,7 +25,7 @@ + gpointer marshal_data); + #define gtk_marshal_BOOL__POINTER gtk_marshal_BOOLEAN__POINTER + +-/* BOOL:POINTER,POINTER,INT,INT (./gtkmarshal.list:3) */ ++/* BOOL:POINTER,POINTER,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:3) */ + extern void gtk_marshal_BOOLEAN__POINTER_POINTER_INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -34,7 +34,7 @@ + gpointer marshal_data); + #define gtk_marshal_BOOL__POINTER_POINTER_INT_INT gtk_marshal_BOOLEAN__POINTER_POINTER_INT_INT + +-/* BOOL:POINTER,INT,INT (./gtkmarshal.list:4) */ ++/* BOOL:POINTER,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:4) */ + extern void gtk_marshal_BOOLEAN__POINTER_INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -43,7 +43,7 @@ + gpointer marshal_data); + #define gtk_marshal_BOOL__POINTER_INT_INT gtk_marshal_BOOLEAN__POINTER_INT_INT + +-/* BOOL:POINTER,INT,INT,UINT (./gtkmarshal.list:5) */ ++/* BOOL:POINTER,INT,INT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:5) */ + extern void gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -52,7 +52,7 @@ + gpointer marshal_data); + #define gtk_marshal_BOOL__POINTER_INT_INT_UINT gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT + +-/* BOOL:POINTER,STRING,STRING,POINTER (./gtkmarshal.list:6) */ ++/* BOOL:POINTER,STRING,STRING,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:6) */ + extern void gtk_marshal_BOOLEAN__POINTER_STRING_STRING_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -61,7 +61,7 @@ + gpointer marshal_data); + #define gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER gtk_marshal_BOOLEAN__POINTER_STRING_STRING_POINTER + +-/* ENUM:ENUM (./gtkmarshal.list:7) */ ++/* ENUM:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:7) */ + extern void gtk_marshal_ENUM__ENUM (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -69,7 +69,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* INT:POINTER (./gtkmarshal.list:8) */ ++/* INT:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:8) */ + extern void gtk_marshal_INT__POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -77,7 +77,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* INT:POINTER,CHAR,CHAR (./gtkmarshal.list:9) */ ++/* INT:POINTER,CHAR,CHAR (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:9) */ + extern void gtk_marshal_INT__POINTER_CHAR_CHAR (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -85,19 +85,19 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* NONE:BOOL (./gtkmarshal.list:10) */ ++/* NONE:BOOL (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:10) */ + #define gtk_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN + #define gtk_marshal_NONE__BOOL gtk_marshal_VOID__BOOLEAN + +-/* NONE:BOXED (./gtkmarshal.list:11) */ ++/* NONE:BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:11) */ + #define gtk_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED + #define gtk_marshal_NONE__BOXED gtk_marshal_VOID__BOXED + +-/* NONE:ENUM (./gtkmarshal.list:12) */ ++/* NONE:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:12) */ + #define gtk_marshal_VOID__ENUM g_cclosure_marshal_VOID__ENUM + #define gtk_marshal_NONE__ENUM gtk_marshal_VOID__ENUM + +-/* NONE:ENUM,FLOAT (./gtkmarshal.list:13) */ ++/* NONE:ENUM,FLOAT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:13) */ + extern void gtk_marshal_VOID__ENUM_FLOAT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -106,7 +106,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__ENUM_FLOAT gtk_marshal_VOID__ENUM_FLOAT + +-/* NONE:ENUM,FLOAT,BOOL (./gtkmarshal.list:14) */ ++/* NONE:ENUM,FLOAT,BOOL (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:14) */ + extern void gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -115,11 +115,11 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__ENUM_FLOAT_BOOL gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN + +-/* NONE:INT (./gtkmarshal.list:15) */ ++/* NONE:INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:15) */ + #define gtk_marshal_VOID__INT g_cclosure_marshal_VOID__INT + #define gtk_marshal_NONE__INT gtk_marshal_VOID__INT + +-/* NONE:INT,INT (./gtkmarshal.list:16) */ ++/* NONE:INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:16) */ + extern void gtk_marshal_VOID__INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -128,7 +128,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__INT_INT gtk_marshal_VOID__INT_INT + +-/* NONE:INT,INT,POINTER (./gtkmarshal.list:17) */ ++/* NONE:INT,INT,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:17) */ + extern void gtk_marshal_VOID__INT_INT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -137,19 +137,19 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__INT_INT_POINTER gtk_marshal_VOID__INT_INT_POINTER + +-/* NONE:NONE (./gtkmarshal.list:18) */ ++/* NONE:NONE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:18) */ + #define gtk_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID + #define gtk_marshal_NONE__NONE gtk_marshal_VOID__VOID + +-/* NONE:OBJECT (./gtkmarshal.list:19) */ ++/* NONE:OBJECT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:19) */ + #define gtk_marshal_VOID__OBJECT g_cclosure_marshal_VOID__OBJECT + #define gtk_marshal_NONE__OBJECT gtk_marshal_VOID__OBJECT + +-/* NONE:POINTER (./gtkmarshal.list:20) */ ++/* NONE:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:20) */ + #define gtk_marshal_VOID__POINTER g_cclosure_marshal_VOID__POINTER + #define gtk_marshal_NONE__POINTER gtk_marshal_VOID__POINTER + +-/* NONE:POINTER,INT (./gtkmarshal.list:21) */ ++/* NONE:POINTER,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:21) */ + extern void gtk_marshal_VOID__POINTER_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -158,7 +158,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__POINTER_INT gtk_marshal_VOID__POINTER_INT + +-/* NONE:POINTER,POINTER (./gtkmarshal.list:22) */ ++/* NONE:POINTER,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:22) */ + extern void gtk_marshal_VOID__POINTER_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -167,7 +167,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__POINTER_POINTER gtk_marshal_VOID__POINTER_POINTER + +-/* NONE:POINTER,POINTER,POINTER (./gtkmarshal.list:23) */ ++/* NONE:POINTER,POINTER,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:23) */ + extern void gtk_marshal_VOID__POINTER_POINTER_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -176,7 +176,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__POINTER_POINTER_POINTER gtk_marshal_VOID__POINTER_POINTER_POINTER + +-/* NONE:POINTER,STRING,STRING (./gtkmarshal.list:24) */ ++/* NONE:POINTER,STRING,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:24) */ + extern void gtk_marshal_VOID__POINTER_STRING_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -185,7 +185,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__POINTER_STRING_STRING gtk_marshal_VOID__POINTER_STRING_STRING + +-/* NONE:POINTER,UINT (./gtkmarshal.list:25) */ ++/* NONE:POINTER,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:25) */ + extern void gtk_marshal_VOID__POINTER_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -194,7 +194,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__POINTER_UINT gtk_marshal_VOID__POINTER_UINT + +-/* NONE:POINTER,UINT,ENUM (./gtkmarshal.list:26) */ ++/* NONE:POINTER,UINT,ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:26) */ + extern void gtk_marshal_VOID__POINTER_UINT_ENUM (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -203,7 +203,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__POINTER_UINT_ENUM gtk_marshal_VOID__POINTER_UINT_ENUM + +-/* NONE:POINTER,POINTER,UINT,UINT (./gtkmarshal.list:27) */ ++/* NONE:POINTER,POINTER,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:27) */ + extern void gtk_marshal_VOID__POINTER_POINTER_UINT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -212,7 +212,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__POINTER_POINTER_UINT_UINT gtk_marshal_VOID__POINTER_POINTER_UINT_UINT + +-/* NONE:POINTER,INT,INT,POINTER,UINT,UINT (./gtkmarshal.list:28) */ ++/* NONE:POINTER,INT,INT,POINTER,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:28) */ + extern void gtk_marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -221,7 +221,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__POINTER_INT_INT_POINTER_UINT_UINT gtk_marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT + +-/* NONE:POINTER,UINT,UINT (./gtkmarshal.list:29) */ ++/* NONE:POINTER,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:29) */ + extern void gtk_marshal_VOID__POINTER_UINT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -230,13 +230,13 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__POINTER_UINT_UINT gtk_marshal_VOID__POINTER_UINT_UINT + +-/* NONE:POINTER,UINT,UINT (./gtkmarshal.list:30) */ ++/* NONE:POINTER,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:30) */ + +-/* NONE:STRING (./gtkmarshal.list:31) */ ++/* NONE:STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:31) */ + #define gtk_marshal_VOID__STRING g_cclosure_marshal_VOID__STRING + #define gtk_marshal_NONE__STRING gtk_marshal_VOID__STRING + +-/* NONE:STRING,INT,POINTER (./gtkmarshal.list:32) */ ++/* NONE:STRING,INT,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:32) */ + extern void gtk_marshal_VOID__STRING_INT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -245,11 +245,11 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__STRING_INT_POINTER gtk_marshal_VOID__STRING_INT_POINTER + +-/* NONE:UINT (./gtkmarshal.list:33) */ ++/* NONE:UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:33) */ + #define gtk_marshal_VOID__UINT g_cclosure_marshal_VOID__UINT + #define gtk_marshal_NONE__UINT gtk_marshal_VOID__UINT + +-/* NONE:UINT,POINTER,UINT,ENUM,ENUM,POINTER (./gtkmarshal.list:34) */ ++/* NONE:UINT,POINTER,UINT,ENUM,ENUM,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:34) */ + extern void gtk_marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -258,7 +258,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__UINT_POINTER_UINT_ENUM_ENUM_POINTER gtk_marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER + +-/* NONE:UINT,POINTER,UINT,UINT,ENUM (./gtkmarshal.list:35) */ ++/* NONE:UINT,POINTER,UINT,UINT,ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:35) */ + extern void gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -267,7 +267,7 @@ + gpointer marshal_data); + #define gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM + +-/* NONE:UINT,STRING (./gtkmarshal.list:36) */ ++/* NONE:UINT,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshal.list:36) */ + extern void gtk_marshal_VOID__UINT_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshalers.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshalers.c.diff new file mode 100644 index 0000000000..7f22a0e5d9 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshalers.c.diff @@ -0,0 +1,606 @@ +--- gtk+-2.6.4/gtk/gtkmarshalers.c 2005-03-01 17:58:15.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmarshalers.c 2005-04-06 16:19:36.902928264 +0300 +@@ -48,7 +48,7 @@ + #endif /* !G_ENABLE_DEBUG */ + + +-/* BOOLEAN:BOXED (./gtkmarshalers.list:24) */ ++/* BOOLEAN:BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:24) */ + void + _gtk_marshal_BOOLEAN__BOXED (GClosure *closure, + GValue *return_value, +@@ -87,7 +87,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:BOXED,BOXED (./gtkmarshalers.list:25) */ ++/* BOOLEAN:BOXED,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:25) */ + void + _gtk_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, + GValue *return_value, +@@ -128,7 +128,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:ENUM (./gtkmarshalers.list:26) */ ++/* BOOLEAN:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:26) */ + void + _gtk_marshal_BOOLEAN__ENUM (GClosure *closure, + GValue *return_value, +@@ -167,7 +167,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:ENUM,DOUBLE (./gtkmarshalers.list:27) */ ++/* BOOLEAN:ENUM,DOUBLE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:27) */ + void + _gtk_marshal_BOOLEAN__ENUM_DOUBLE (GClosure *closure, + GValue *return_value, +@@ -208,7 +208,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:ENUM,INT (./gtkmarshalers.list:28) */ ++/* BOOLEAN:ENUM,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:28) */ + void + _gtk_marshal_BOOLEAN__ENUM_INT (GClosure *closure, + GValue *return_value, +@@ -249,7 +249,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:OBJECT,UINT,FLAGS (./gtkmarshalers.list:29) */ ++/* BOOLEAN:OBJECT,UINT,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:29) */ + void + _gtk_marshal_BOOLEAN__OBJECT_UINT_FLAGS (GClosure *closure, + GValue *return_value, +@@ -292,7 +292,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:OBJECT,INT,INT,UINT (./gtkmarshalers.list:30) */ ++/* BOOLEAN:OBJECT,INT,INT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:30) */ + void + _gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINT (GClosure *closure, + GValue *return_value, +@@ -337,7 +337,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:OBJECT,STRING,STRING,BOXED (./gtkmarshalers.list:31) */ ++/* BOOLEAN:OBJECT,STRING,STRING,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:31) */ + void + _gtk_marshal_BOOLEAN__OBJECT_STRING_STRING_BOXED (GClosure *closure, + GValue *return_value, +@@ -382,7 +382,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:OBJECT,BOXED (./gtkmarshalers.list:32) */ ++/* BOOLEAN:OBJECT,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:32) */ + void + _gtk_marshal_BOOLEAN__OBJECT_BOXED (GClosure *closure, + GValue *return_value, +@@ -423,7 +423,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:OBJECT,BOXED,BOXED (./gtkmarshalers.list:33) */ ++/* BOOLEAN:OBJECT,BOXED,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:33) */ + void + _gtk_marshal_BOOLEAN__OBJECT_BOXED_BOXED (GClosure *closure, + GValue *return_value, +@@ -466,7 +466,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:OBJECT,STRING,STRING (./gtkmarshalers.list:34) */ ++/* BOOLEAN:OBJECT,STRING,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:34) */ + void + _gtk_marshal_BOOLEAN__OBJECT_STRING_STRING (GClosure *closure, + GValue *return_value, +@@ -509,7 +509,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:INT,INT (./gtkmarshalers.list:35) */ ++/* BOOLEAN:INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:35) */ + void + _gtk_marshal_BOOLEAN__INT_INT (GClosure *closure, + GValue *return_value, +@@ -550,7 +550,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:INT,INT,INT (./gtkmarshalers.list:36) */ ++/* BOOLEAN:INT,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:36) */ + void + _gtk_marshal_BOOLEAN__INT_INT_INT (GClosure *closure, + GValue *return_value, +@@ -593,7 +593,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:UINT (./gtkmarshalers.list:37) */ ++/* BOOLEAN:UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:37) */ + void + _gtk_marshal_BOOLEAN__UINT (GClosure *closure, + GValue *return_value, +@@ -632,7 +632,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:VOID (./gtkmarshalers.list:38) */ ++/* BOOLEAN:VOID (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:38) */ + void + _gtk_marshal_BOOLEAN__VOID (GClosure *closure, + GValue *return_value, +@@ -669,7 +669,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:BOOLEAN (./gtkmarshalers.list:39) */ ++/* BOOLEAN:BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:39) */ + void + _gtk_marshal_BOOLEAN__BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -708,9 +708,9 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:NONE (./gtkmarshalers.list:40) */ ++/* BOOLEAN:NONE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:40) */ + +-/* BOOLEAN:BOOLEAN,BOOLEAN,BOOLEAN (./gtkmarshalers.list:41) */ ++/* BOOLEAN:BOOLEAN,BOOLEAN,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:41) */ + void + _gtk_marshal_BOOLEAN__BOOLEAN_BOOLEAN_BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -753,7 +753,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* BOOLEAN:STRING (./gtkmarshalers.list:42) */ ++/* BOOLEAN:STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:42) */ + void + _gtk_marshal_BOOLEAN__STRING (GClosure *closure, + GValue *return_value, +@@ -792,7 +792,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* ENUM:ENUM (./gtkmarshalers.list:43) */ ++/* ENUM:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:43) */ + void + _gtk_marshal_ENUM__ENUM (GClosure *closure, + GValue *return_value, +@@ -831,7 +831,7 @@ + g_value_set_enum (return_value, v_return); + } + +-/* INT:POINTER (./gtkmarshalers.list:44) */ ++/* INT:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:44) */ + void + _gtk_marshal_INT__POINTER (GClosure *closure, + GValue *return_value, +@@ -870,13 +870,13 @@ + g_value_set_int (return_value, v_return); + } + +-/* NONE:BOOLEAN (./gtkmarshalers.list:45) */ ++/* NONE:BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:45) */ + +-/* NONE:ENUM (./gtkmarshalers.list:46) */ ++/* NONE:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:46) */ + +-/* NONE:INT (./gtkmarshalers.list:47) */ ++/* NONE:INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:47) */ + +-/* NONE:INT,BOOL (./gtkmarshalers.list:48) */ ++/* NONE:INT,BOOL (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:48) */ + void + _gtk_marshal_VOID__INT_BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -913,7 +913,7 @@ + data2); + } + +-/* NONE:INT,INT (./gtkmarshalers.list:49) */ ++/* NONE:INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:49) */ + void + _gtk_marshal_VOID__INT_INT (GClosure *closure, + GValue *return_value, +@@ -950,9 +950,9 @@ + data2); + } + +-/* NONE:NONE (./gtkmarshalers.list:50) */ ++/* NONE:NONE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:50) */ + +-/* NONE:STRING,INT,POINTER (./gtkmarshalers.list:51) */ ++/* NONE:STRING,INT,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:51) */ + void + _gtk_marshal_VOID__STRING_INT_POINTER (GClosure *closure, + GValue *return_value, +@@ -991,7 +991,7 @@ + data2); + } + +-/* STRING:DOUBLE (./gtkmarshalers.list:52) */ ++/* STRING:DOUBLE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:52) */ + void + _gtk_marshal_STRING__DOUBLE (GClosure *closure, + GValue *return_value, +@@ -1030,11 +1030,11 @@ + g_value_take_string (return_value, v_return); + } + +-/* VOID:DOUBLE (./gtkmarshalers.list:53) */ ++/* VOID:DOUBLE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:53) */ + +-/* VOID:BOOLEAN (./gtkmarshalers.list:54) */ ++/* VOID:BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:54) */ + +-/* VOID:BOOLEAN,BOOLEAN,BOOLEAN (./gtkmarshalers.list:55) */ ++/* VOID:BOOLEAN,BOOLEAN,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:55) */ + void + _gtk_marshal_VOID__BOOLEAN_BOOLEAN_BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -1073,9 +1073,9 @@ + data2); + } + +-/* VOID:BOXED (./gtkmarshalers.list:56) */ ++/* VOID:BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:56) */ + +-/* VOID:BOXED,BOXED (./gtkmarshalers.list:57) */ ++/* VOID:BOXED,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:57) */ + void + _gtk_marshal_VOID__BOXED_BOXED (GClosure *closure, + GValue *return_value, +@@ -1112,7 +1112,7 @@ + data2); + } + +-/* VOID:BOXED,BOXED,POINTER (./gtkmarshalers.list:58) */ ++/* VOID:BOXED,BOXED,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:58) */ + void + _gtk_marshal_VOID__BOXED_BOXED_POINTER (GClosure *closure, + GValue *return_value, +@@ -1151,7 +1151,7 @@ + data2); + } + +-/* VOID:BOXED,OBJECT (./gtkmarshalers.list:59) */ ++/* VOID:BOXED,OBJECT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:59) */ + void + _gtk_marshal_VOID__BOXED_OBJECT (GClosure *closure, + GValue *return_value, +@@ -1188,7 +1188,7 @@ + data2); + } + +-/* VOID:BOXED,STRING,INT (./gtkmarshalers.list:60) */ ++/* VOID:BOXED,STRING,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:60) */ + void + _gtk_marshal_VOID__BOXED_STRING_INT (GClosure *closure, + GValue *return_value, +@@ -1227,7 +1227,7 @@ + data2); + } + +-/* VOID:BOXED,UINT (./gtkmarshalers.list:61) */ ++/* VOID:BOXED,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:61) */ + void + _gtk_marshal_VOID__BOXED_UINT (GClosure *closure, + GValue *return_value, +@@ -1264,7 +1264,7 @@ + data2); + } + +-/* VOID:BOXED,UINT,FLAGS (./gtkmarshalers.list:62) */ ++/* VOID:BOXED,UINT,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:62) */ + void + _gtk_marshal_VOID__BOXED_UINT_FLAGS (GClosure *closure, + GValue *return_value, +@@ -1303,7 +1303,7 @@ + data2); + } + +-/* VOID:BOXED,UINT,UINT (./gtkmarshalers.list:63) */ ++/* VOID:BOXED,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:63) */ + void + _gtk_marshal_VOID__BOXED_UINT_UINT (GClosure *closure, + GValue *return_value, +@@ -1342,9 +1342,9 @@ + data2); + } + +-/* VOID:ENUM (./gtkmarshalers.list:64) */ ++/* VOID:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:64) */ + +-/* VOID:ENUM,BOOLEAN (./gtkmarshalers.list:65) */ ++/* VOID:ENUM,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:65) */ + void + _gtk_marshal_VOID__ENUM_BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -1381,7 +1381,7 @@ + data2); + } + +-/* VOID:ENUM,ENUM (./gtkmarshalers.list:66) */ ++/* VOID:ENUM,ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:66) */ + void + _gtk_marshal_VOID__ENUM_ENUM (GClosure *closure, + GValue *return_value, +@@ -1418,7 +1418,7 @@ + data2); + } + +-/* VOID:ENUM,FLOAT (./gtkmarshalers.list:67) */ ++/* VOID:ENUM,FLOAT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:67) */ + void + _gtk_marshal_VOID__ENUM_FLOAT (GClosure *closure, + GValue *return_value, +@@ -1455,7 +1455,7 @@ + data2); + } + +-/* VOID:ENUM,FLOAT,BOOLEAN (./gtkmarshalers.list:68) */ ++/* VOID:ENUM,FLOAT,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:68) */ + void + _gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -1494,7 +1494,7 @@ + data2); + } + +-/* VOID:ENUM,INT (./gtkmarshalers.list:69) */ ++/* VOID:ENUM,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:69) */ + void + _gtk_marshal_VOID__ENUM_INT (GClosure *closure, + GValue *return_value, +@@ -1531,7 +1531,7 @@ + data2); + } + +-/* VOID:ENUM,INT,BOOLEAN (./gtkmarshalers.list:70) */ ++/* VOID:ENUM,INT,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:70) */ + void + _gtk_marshal_VOID__ENUM_INT_BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -1570,11 +1570,11 @@ + data2); + } + +-/* VOID:INT (./gtkmarshalers.list:71) */ ++/* VOID:INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:71) */ + +-/* VOID:INT,INT (./gtkmarshalers.list:72) */ ++/* VOID:INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:72) */ + +-/* VOID:INT,INT,BOXED (./gtkmarshalers.list:73) */ ++/* VOID:INT,INT,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:73) */ + void + _gtk_marshal_VOID__INT_INT_BOXED (GClosure *closure, + GValue *return_value, +@@ -1613,7 +1613,7 @@ + data2); + } + +-/* VOID:INT,INT,INT (./gtkmarshalers.list:74) */ ++/* VOID:INT,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:74) */ + void + _gtk_marshal_VOID__INT_INT_INT (GClosure *closure, + GValue *return_value, +@@ -1652,9 +1652,9 @@ + data2); + } + +-/* VOID:OBJECT (./gtkmarshalers.list:75) */ ++/* VOID:OBJECT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:75) */ + +-/* VOID:OBJECT,BOOLEAN (./gtkmarshalers.list:76) */ ++/* VOID:OBJECT,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:76) */ + void + _gtk_marshal_VOID__OBJECT_BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -1691,7 +1691,7 @@ + data2); + } + +-/* VOID:OBJECT,BOXED,BOXED (./gtkmarshalers.list:77) */ ++/* VOID:OBJECT,BOXED,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:77) */ + void + _gtk_marshal_VOID__OBJECT_BOXED_BOXED (GClosure *closure, + GValue *return_value, +@@ -1730,7 +1730,7 @@ + data2); + } + +-/* VOID:OBJECT,BOXED,UINT,UINT (./gtkmarshalers.list:78) */ ++/* VOID:OBJECT,BOXED,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:78) */ + void + _gtk_marshal_VOID__OBJECT_BOXED_UINT_UINT (GClosure *closure, + GValue *return_value, +@@ -1771,7 +1771,7 @@ + data2); + } + +-/* VOID:OBJECT,INT,INT (./gtkmarshalers.list:79) */ ++/* VOID:OBJECT,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:79) */ + void + _gtk_marshal_VOID__OBJECT_INT_INT (GClosure *closure, + GValue *return_value, +@@ -1810,7 +1810,7 @@ + data2); + } + +-/* VOID:OBJECT,INT,INT,BOXED,UINT,UINT (./gtkmarshalers.list:80) */ ++/* VOID:OBJECT,INT,INT,BOXED,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:80) */ + void + _gtk_marshal_VOID__OBJECT_INT_INT_BOXED_UINT_UINT (GClosure *closure, + GValue *return_value, +@@ -1855,7 +1855,7 @@ + data2); + } + +-/* VOID:OBJECT,OBJECT (./gtkmarshalers.list:81) */ ++/* VOID:OBJECT,OBJECT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:81) */ + void + _gtk_marshal_VOID__OBJECT_OBJECT (GClosure *closure, + GValue *return_value, +@@ -1892,7 +1892,7 @@ + data2); + } + +-/* VOID:OBJECT,STRING (./gtkmarshalers.list:82) */ ++/* VOID:OBJECT,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:82) */ + void + _gtk_marshal_VOID__OBJECT_STRING (GClosure *closure, + GValue *return_value, +@@ -1929,7 +1929,7 @@ + data2); + } + +-/* VOID:OBJECT,STRING,STRING (./gtkmarshalers.list:83) */ ++/* VOID:OBJECT,STRING,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:83) */ + void + _gtk_marshal_VOID__OBJECT_STRING_STRING (GClosure *closure, + GValue *return_value, +@@ -1968,7 +1968,7 @@ + data2); + } + +-/* VOID:OBJECT,UINT (./gtkmarshalers.list:84) */ ++/* VOID:OBJECT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:84) */ + void + _gtk_marshal_VOID__OBJECT_UINT (GClosure *closure, + GValue *return_value, +@@ -2005,7 +2005,7 @@ + data2); + } + +-/* VOID:OBJECT,UINT,FLAGS (./gtkmarshalers.list:85) */ ++/* VOID:OBJECT,UINT,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:85) */ + void + _gtk_marshal_VOID__OBJECT_UINT_FLAGS (GClosure *closure, + GValue *return_value, +@@ -2044,11 +2044,11 @@ + data2); + } + +-/* VOID:OBJECT,STRING (./gtkmarshalers.list:86) */ ++/* VOID:OBJECT,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:86) */ + +-/* VOID:POINTER (./gtkmarshalers.list:87) */ ++/* VOID:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:87) */ + +-/* VOID:POINTER,INT (./gtkmarshalers.list:88) */ ++/* VOID:POINTER,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:88) */ + void + _gtk_marshal_VOID__POINTER_INT (GClosure *closure, + GValue *return_value, +@@ -2085,7 +2085,7 @@ + data2); + } + +-/* VOID:POINTER,BOOLEAN (./gtkmarshalers.list:89) */ ++/* VOID:POINTER,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:89) */ + void + _gtk_marshal_VOID__POINTER_BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -2122,7 +2122,7 @@ + data2); + } + +-/* VOID:POINTER,POINTER,POINTER (./gtkmarshalers.list:90) */ ++/* VOID:POINTER,POINTER,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:90) */ + void + _gtk_marshal_VOID__POINTER_POINTER_POINTER (GClosure *closure, + GValue *return_value, +@@ -2161,7 +2161,7 @@ + data2); + } + +-/* VOID:POINTER,UINT (./gtkmarshalers.list:91) */ ++/* VOID:POINTER,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:91) */ + void + _gtk_marshal_VOID__POINTER_UINT (GClosure *closure, + GValue *return_value, +@@ -2198,9 +2198,9 @@ + data2); + } + +-/* VOID:STRING (./gtkmarshalers.list:92) */ ++/* VOID:STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:92) */ + +-/* VOID:STRING,STRING (./gtkmarshalers.list:93) */ ++/* VOID:STRING,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:93) */ + void + _gtk_marshal_VOID__STRING_STRING (GClosure *closure, + GValue *return_value, +@@ -2237,9 +2237,9 @@ + data2); + } + +-/* VOID:STRING,INT,POINTER (./gtkmarshalers.list:94) */ ++/* VOID:STRING,INT,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:94) */ + +-/* VOID:STRING,UINT,FLAGS (./gtkmarshalers.list:95) */ ++/* VOID:STRING,UINT,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:95) */ + void + _gtk_marshal_VOID__STRING_UINT_FLAGS (GClosure *closure, + GValue *return_value, +@@ -2278,7 +2278,7 @@ + data2); + } + +-/* VOID:UINT,FLAGS,BOXED (./gtkmarshalers.list:96) */ ++/* VOID:UINT,FLAGS,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:96) */ + void + _gtk_marshal_VOID__UINT_FLAGS_BOXED (GClosure *closure, + GValue *return_value, +@@ -2317,7 +2317,7 @@ + data2); + } + +-/* VOID:UINT,UINT (./gtkmarshalers.list:97) */ ++/* VOID:UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:97) */ + void + _gtk_marshal_VOID__UINT_UINT (GClosure *closure, + GValue *return_value, +@@ -2354,7 +2354,7 @@ + data2); + } + +-/* VOID:UINT,STRING (./gtkmarshalers.list:98) */ ++/* VOID:UINT,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:98) */ + void + _gtk_marshal_VOID__UINT_STRING (GClosure *closure, + GValue *return_value, +@@ -2391,7 +2391,7 @@ + data2); + } + +-/* VOID:UINT,BOXED,UINT,FLAGS,FLAGS (./gtkmarshalers.list:99) */ ++/* VOID:UINT,BOXED,UINT,FLAGS,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:99) */ + void + _gtk_marshal_VOID__UINT_BOXED_UINT_FLAGS_FLAGS (GClosure *closure, + GValue *return_value, +@@ -2434,7 +2434,7 @@ + data2); + } + +-/* VOID:UINT,OBJECT,UINT,FLAGS,FLAGS (./gtkmarshalers.list:100) */ ++/* VOID:UINT,OBJECT,UINT,FLAGS,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:100) */ + void + _gtk_marshal_VOID__UINT_OBJECT_UINT_FLAGS_FLAGS (GClosure *closure, + GValue *return_value, +@@ -2477,5 +2477,5 @@ + data2); + } + +-/* VOID:VOID (./gtkmarshalers.list:101) */ ++/* VOID:VOID (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:101) */ + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshalers.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshalers.h.diff new file mode 100644 index 0000000000..e6941631e4 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmarshalers.h.diff @@ -0,0 +1,622 @@ +--- gtk+-2.6.4/gtk/gtkmarshalers.h 2005-03-01 17:58:15.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmarshalers.h 2005-04-06 16:19:36.903928112 +0300 +@@ -6,7 +6,7 @@ + + G_BEGIN_DECLS + +-/* BOOLEAN:BOXED (./gtkmarshalers.list:24) */ ++/* BOOLEAN:BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:24) */ + extern void _gtk_marshal_BOOLEAN__BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -14,7 +14,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:BOXED,BOXED (./gtkmarshalers.list:25) */ ++/* BOOLEAN:BOXED,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:25) */ + extern void _gtk_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -22,7 +22,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:ENUM (./gtkmarshalers.list:26) */ ++/* BOOLEAN:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:26) */ + extern void _gtk_marshal_BOOLEAN__ENUM (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -30,7 +30,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:ENUM,DOUBLE (./gtkmarshalers.list:27) */ ++/* BOOLEAN:ENUM,DOUBLE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:27) */ + extern void _gtk_marshal_BOOLEAN__ENUM_DOUBLE (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -38,7 +38,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:ENUM,INT (./gtkmarshalers.list:28) */ ++/* BOOLEAN:ENUM,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:28) */ + extern void _gtk_marshal_BOOLEAN__ENUM_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -46,7 +46,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:OBJECT,UINT,FLAGS (./gtkmarshalers.list:29) */ ++/* BOOLEAN:OBJECT,UINT,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:29) */ + extern void _gtk_marshal_BOOLEAN__OBJECT_UINT_FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -54,7 +54,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:OBJECT,INT,INT,UINT (./gtkmarshalers.list:30) */ ++/* BOOLEAN:OBJECT,INT,INT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:30) */ + extern void _gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -62,7 +62,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:OBJECT,STRING,STRING,BOXED (./gtkmarshalers.list:31) */ ++/* BOOLEAN:OBJECT,STRING,STRING,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:31) */ + extern void _gtk_marshal_BOOLEAN__OBJECT_STRING_STRING_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -70,7 +70,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:OBJECT,BOXED (./gtkmarshalers.list:32) */ ++/* BOOLEAN:OBJECT,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:32) */ + extern void _gtk_marshal_BOOLEAN__OBJECT_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -78,7 +78,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:OBJECT,BOXED,BOXED (./gtkmarshalers.list:33) */ ++/* BOOLEAN:OBJECT,BOXED,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:33) */ + extern void _gtk_marshal_BOOLEAN__OBJECT_BOXED_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -86,7 +86,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:OBJECT,STRING,STRING (./gtkmarshalers.list:34) */ ++/* BOOLEAN:OBJECT,STRING,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:34) */ + extern void _gtk_marshal_BOOLEAN__OBJECT_STRING_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -94,7 +94,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:INT,INT (./gtkmarshalers.list:35) */ ++/* BOOLEAN:INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:35) */ + extern void _gtk_marshal_BOOLEAN__INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -102,7 +102,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:INT,INT,INT (./gtkmarshalers.list:36) */ ++/* BOOLEAN:INT,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:36) */ + extern void _gtk_marshal_BOOLEAN__INT_INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -110,7 +110,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:UINT (./gtkmarshalers.list:37) */ ++/* BOOLEAN:UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:37) */ + extern void _gtk_marshal_BOOLEAN__UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -118,7 +118,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:VOID (./gtkmarshalers.list:38) */ ++/* BOOLEAN:VOID (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:38) */ + extern void _gtk_marshal_BOOLEAN__VOID (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -126,7 +126,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:BOOLEAN (./gtkmarshalers.list:39) */ ++/* BOOLEAN:BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:39) */ + extern void _gtk_marshal_BOOLEAN__BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -134,10 +134,10 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:NONE (./gtkmarshalers.list:40) */ ++/* BOOLEAN:NONE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:40) */ + #define _gtk_marshal_BOOLEAN__NONE _gtk_marshal_BOOLEAN__VOID + +-/* BOOLEAN:BOOLEAN,BOOLEAN,BOOLEAN (./gtkmarshalers.list:41) */ ++/* BOOLEAN:BOOLEAN,BOOLEAN,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:41) */ + extern void _gtk_marshal_BOOLEAN__BOOLEAN_BOOLEAN_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -145,7 +145,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* BOOLEAN:STRING (./gtkmarshalers.list:42) */ ++/* BOOLEAN:STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:42) */ + extern void _gtk_marshal_BOOLEAN__STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -153,7 +153,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* ENUM:ENUM (./gtkmarshalers.list:43) */ ++/* ENUM:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:43) */ + extern void _gtk_marshal_ENUM__ENUM (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -161,7 +161,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* INT:POINTER (./gtkmarshalers.list:44) */ ++/* INT:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:44) */ + extern void _gtk_marshal_INT__POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -169,19 +169,19 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* NONE:BOOLEAN (./gtkmarshalers.list:45) */ ++/* NONE:BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:45) */ + #define _gtk_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN + #define _gtk_marshal_NONE__BOOLEAN _gtk_marshal_VOID__BOOLEAN + +-/* NONE:ENUM (./gtkmarshalers.list:46) */ ++/* NONE:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:46) */ + #define _gtk_marshal_VOID__ENUM g_cclosure_marshal_VOID__ENUM + #define _gtk_marshal_NONE__ENUM _gtk_marshal_VOID__ENUM + +-/* NONE:INT (./gtkmarshalers.list:47) */ ++/* NONE:INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:47) */ + #define _gtk_marshal_VOID__INT g_cclosure_marshal_VOID__INT + #define _gtk_marshal_NONE__INT _gtk_marshal_VOID__INT + +-/* NONE:INT,BOOL (./gtkmarshalers.list:48) */ ++/* NONE:INT,BOOL (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:48) */ + extern void _gtk_marshal_VOID__INT_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -190,7 +190,7 @@ + gpointer marshal_data); + #define _gtk_marshal_NONE__INT_BOOL _gtk_marshal_VOID__INT_BOOLEAN + +-/* NONE:INT,INT (./gtkmarshalers.list:49) */ ++/* NONE:INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:49) */ + extern void _gtk_marshal_VOID__INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -199,11 +199,11 @@ + gpointer marshal_data); + #define _gtk_marshal_NONE__INT_INT _gtk_marshal_VOID__INT_INT + +-/* NONE:NONE (./gtkmarshalers.list:50) */ ++/* NONE:NONE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:50) */ + #define _gtk_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID + #define _gtk_marshal_NONE__NONE _gtk_marshal_VOID__VOID + +-/* NONE:STRING,INT,POINTER (./gtkmarshalers.list:51) */ ++/* NONE:STRING,INT,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:51) */ + extern void _gtk_marshal_VOID__STRING_INT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -212,7 +212,7 @@ + gpointer marshal_data); + #define _gtk_marshal_NONE__STRING_INT_POINTER _gtk_marshal_VOID__STRING_INT_POINTER + +-/* STRING:DOUBLE (./gtkmarshalers.list:52) */ ++/* STRING:DOUBLE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:52) */ + extern void _gtk_marshal_STRING__DOUBLE (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -220,12 +220,12 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:DOUBLE (./gtkmarshalers.list:53) */ ++/* VOID:DOUBLE (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:53) */ + #define _gtk_marshal_VOID__DOUBLE g_cclosure_marshal_VOID__DOUBLE + +-/* VOID:BOOLEAN (./gtkmarshalers.list:54) */ ++/* VOID:BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:54) */ + +-/* VOID:BOOLEAN,BOOLEAN,BOOLEAN (./gtkmarshalers.list:55) */ ++/* VOID:BOOLEAN,BOOLEAN,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:55) */ + extern void _gtk_marshal_VOID__BOOLEAN_BOOLEAN_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -233,10 +233,10 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:BOXED (./gtkmarshalers.list:56) */ ++/* VOID:BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:56) */ + #define _gtk_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED + +-/* VOID:BOXED,BOXED (./gtkmarshalers.list:57) */ ++/* VOID:BOXED,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:57) */ + extern void _gtk_marshal_VOID__BOXED_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -244,7 +244,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:BOXED,BOXED,POINTER (./gtkmarshalers.list:58) */ ++/* VOID:BOXED,BOXED,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:58) */ + extern void _gtk_marshal_VOID__BOXED_BOXED_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -252,7 +252,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:BOXED,OBJECT (./gtkmarshalers.list:59) */ ++/* VOID:BOXED,OBJECT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:59) */ + extern void _gtk_marshal_VOID__BOXED_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -260,7 +260,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:BOXED,STRING,INT (./gtkmarshalers.list:60) */ ++/* VOID:BOXED,STRING,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:60) */ + extern void _gtk_marshal_VOID__BOXED_STRING_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -268,7 +268,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:BOXED,UINT (./gtkmarshalers.list:61) */ ++/* VOID:BOXED,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:61) */ + extern void _gtk_marshal_VOID__BOXED_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -276,7 +276,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:BOXED,UINT,FLAGS (./gtkmarshalers.list:62) */ ++/* VOID:BOXED,UINT,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:62) */ + extern void _gtk_marshal_VOID__BOXED_UINT_FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -284,7 +284,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:BOXED,UINT,UINT (./gtkmarshalers.list:63) */ ++/* VOID:BOXED,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:63) */ + extern void _gtk_marshal_VOID__BOXED_UINT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -292,9 +292,9 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:ENUM (./gtkmarshalers.list:64) */ ++/* VOID:ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:64) */ + +-/* VOID:ENUM,BOOLEAN (./gtkmarshalers.list:65) */ ++/* VOID:ENUM,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:65) */ + extern void _gtk_marshal_VOID__ENUM_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -302,7 +302,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:ENUM,ENUM (./gtkmarshalers.list:66) */ ++/* VOID:ENUM,ENUM (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:66) */ + extern void _gtk_marshal_VOID__ENUM_ENUM (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -310,7 +310,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:ENUM,FLOAT (./gtkmarshalers.list:67) */ ++/* VOID:ENUM,FLOAT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:67) */ + extern void _gtk_marshal_VOID__ENUM_FLOAT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -318,7 +318,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:ENUM,FLOAT,BOOLEAN (./gtkmarshalers.list:68) */ ++/* VOID:ENUM,FLOAT,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:68) */ + extern void _gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -326,7 +326,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:ENUM,INT (./gtkmarshalers.list:69) */ ++/* VOID:ENUM,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:69) */ + extern void _gtk_marshal_VOID__ENUM_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -334,7 +334,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:ENUM,INT,BOOLEAN (./gtkmarshalers.list:70) */ ++/* VOID:ENUM,INT,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:70) */ + extern void _gtk_marshal_VOID__ENUM_INT_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -342,11 +342,11 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:INT (./gtkmarshalers.list:71) */ ++/* VOID:INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:71) */ + +-/* VOID:INT,INT (./gtkmarshalers.list:72) */ ++/* VOID:INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:72) */ + +-/* VOID:INT,INT,BOXED (./gtkmarshalers.list:73) */ ++/* VOID:INT,INT,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:73) */ + extern void _gtk_marshal_VOID__INT_INT_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -354,7 +354,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:INT,INT,INT (./gtkmarshalers.list:74) */ ++/* VOID:INT,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:74) */ + extern void _gtk_marshal_VOID__INT_INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -362,10 +362,10 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT (./gtkmarshalers.list:75) */ ++/* VOID:OBJECT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:75) */ + #define _gtk_marshal_VOID__OBJECT g_cclosure_marshal_VOID__OBJECT + +-/* VOID:OBJECT,BOOLEAN (./gtkmarshalers.list:76) */ ++/* VOID:OBJECT,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:76) */ + extern void _gtk_marshal_VOID__OBJECT_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -373,7 +373,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,BOXED,BOXED (./gtkmarshalers.list:77) */ ++/* VOID:OBJECT,BOXED,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:77) */ + extern void _gtk_marshal_VOID__OBJECT_BOXED_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -381,7 +381,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,BOXED,UINT,UINT (./gtkmarshalers.list:78) */ ++/* VOID:OBJECT,BOXED,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:78) */ + extern void _gtk_marshal_VOID__OBJECT_BOXED_UINT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -389,7 +389,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,INT,INT (./gtkmarshalers.list:79) */ ++/* VOID:OBJECT,INT,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:79) */ + extern void _gtk_marshal_VOID__OBJECT_INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -397,7 +397,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,INT,INT,BOXED,UINT,UINT (./gtkmarshalers.list:80) */ ++/* VOID:OBJECT,INT,INT,BOXED,UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:80) */ + extern void _gtk_marshal_VOID__OBJECT_INT_INT_BOXED_UINT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -405,7 +405,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,OBJECT (./gtkmarshalers.list:81) */ ++/* VOID:OBJECT,OBJECT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:81) */ + extern void _gtk_marshal_VOID__OBJECT_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -413,7 +413,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,STRING (./gtkmarshalers.list:82) */ ++/* VOID:OBJECT,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:82) */ + extern void _gtk_marshal_VOID__OBJECT_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -421,7 +421,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,STRING,STRING (./gtkmarshalers.list:83) */ ++/* VOID:OBJECT,STRING,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:83) */ + extern void _gtk_marshal_VOID__OBJECT_STRING_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -429,7 +429,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,UINT (./gtkmarshalers.list:84) */ ++/* VOID:OBJECT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:84) */ + extern void _gtk_marshal_VOID__OBJECT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -437,7 +437,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,UINT,FLAGS (./gtkmarshalers.list:85) */ ++/* VOID:OBJECT,UINT,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:85) */ + extern void _gtk_marshal_VOID__OBJECT_UINT_FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -445,12 +445,12 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:OBJECT,STRING (./gtkmarshalers.list:86) */ ++/* VOID:OBJECT,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:86) */ + +-/* VOID:POINTER (./gtkmarshalers.list:87) */ ++/* VOID:POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:87) */ + #define _gtk_marshal_VOID__POINTER g_cclosure_marshal_VOID__POINTER + +-/* VOID:POINTER,INT (./gtkmarshalers.list:88) */ ++/* VOID:POINTER,INT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:88) */ + extern void _gtk_marshal_VOID__POINTER_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -458,7 +458,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:POINTER,BOOLEAN (./gtkmarshalers.list:89) */ ++/* VOID:POINTER,BOOLEAN (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:89) */ + extern void _gtk_marshal_VOID__POINTER_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -466,7 +466,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:POINTER,POINTER,POINTER (./gtkmarshalers.list:90) */ ++/* VOID:POINTER,POINTER,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:90) */ + extern void _gtk_marshal_VOID__POINTER_POINTER_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -474,7 +474,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:POINTER,UINT (./gtkmarshalers.list:91) */ ++/* VOID:POINTER,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:91) */ + extern void _gtk_marshal_VOID__POINTER_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -482,10 +482,10 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:STRING (./gtkmarshalers.list:92) */ ++/* VOID:STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:92) */ + #define _gtk_marshal_VOID__STRING g_cclosure_marshal_VOID__STRING + +-/* VOID:STRING,STRING (./gtkmarshalers.list:93) */ ++/* VOID:STRING,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:93) */ + extern void _gtk_marshal_VOID__STRING_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -493,9 +493,9 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:STRING,INT,POINTER (./gtkmarshalers.list:94) */ ++/* VOID:STRING,INT,POINTER (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:94) */ + +-/* VOID:STRING,UINT,FLAGS (./gtkmarshalers.list:95) */ ++/* VOID:STRING,UINT,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:95) */ + extern void _gtk_marshal_VOID__STRING_UINT_FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -503,7 +503,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:UINT,FLAGS,BOXED (./gtkmarshalers.list:96) */ ++/* VOID:UINT,FLAGS,BOXED (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:96) */ + extern void _gtk_marshal_VOID__UINT_FLAGS_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -511,7 +511,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:UINT,UINT (./gtkmarshalers.list:97) */ ++/* VOID:UINT,UINT (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:97) */ + extern void _gtk_marshal_VOID__UINT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -519,7 +519,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:UINT,STRING (./gtkmarshalers.list:98) */ ++/* VOID:UINT,STRING (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:98) */ + extern void _gtk_marshal_VOID__UINT_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -527,7 +527,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:UINT,BOXED,UINT,FLAGS,FLAGS (./gtkmarshalers.list:99) */ ++/* VOID:UINT,BOXED,UINT,FLAGS,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:99) */ + extern void _gtk_marshal_VOID__UINT_BOXED_UINT_FLAGS_FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -535,7 +535,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:UINT,OBJECT,UINT,FLAGS,FLAGS (./gtkmarshalers.list:100) */ ++/* VOID:UINT,OBJECT,UINT,FLAGS,FLAGS (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:100) */ + extern void _gtk_marshal_VOID__UINT_OBJECT_UINT_FLAGS_FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, +@@ -543,7 +543,7 @@ + gpointer invocation_hint, + gpointer marshal_data); + +-/* VOID:VOID (./gtkmarshalers.list:101) */ ++/* VOID:VOID (/home/jlehto/teema4/3rdparty/gtk+2.0-2.6/gtk/gtkmarshalers.list:101) */ + + G_END_DECLS + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenu.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenu.c.diff new file mode 100644 index 0000000000..16fac1b155 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenu.c.diff @@ -0,0 +1,1223 @@ +--- gtk+-2.6.4/gtk/gtkmenu.c 2005-03-01 08:28:56.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmenu.c 2005-04-06 16:19:36.921925376 +0300 +@@ -24,10 +24,16 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++/* Modified for Nokia Oyj during 2002-2005. See CHANGES file for list ++ * of changes. ++ */ ++ + #define GTK_MENU_INTERNALS + + #include <config.h> + #include <string.h> /* memset */ ++#include <math.h> ++#include <stdlib.h> + #include "gdk/gdkkeysyms.h" + #include "gtkalias.h" + #include "gtkaccellabel.h" +@@ -44,7 +50,11 @@ + #include "gtkvscrollbar.h" + #include "gtksettings.h" + #include "gtkintl.h" ++#include "gtkcombobox.h" + ++/* Hildon : We need this to figure out if menu should have ++ * corners etc. */ ++#include "gtkmenubar.h" + + #define MENU_ITEM_CLASS(w) GTK_MENU_ITEM_GET_CLASS (w) + +@@ -55,16 +65,43 @@ + * extends below the submenu + */ + ++/* HILDON: ++ * Urgh, nasty thing to hard-code things like these :p ++ * One should really do some rewriting here... ++ */ ++ + #define MENU_SCROLL_STEP1 8 + #define MENU_SCROLL_STEP2 15 +-#define MENU_SCROLL_ARROW_HEIGHT 16 +-#define MENU_SCROLL_FAST_ZONE 8 ++#define MENU_SCROLL_ARROW_HEIGHT 20 /* This used to be: 23; This hard-coding should be ++ * changed. Add arrow_height style property into ++ * commongtkrc and read it from there everywhere ++ * where a reference to MENU_SCROLL_ARROW_HEIGHT ++ * is made. ++ * If these changes are made, please modify also ++ * gtkcombobox.c. ++ */ ++#define MENU_SCROLL_FAST_ZONE MENU_SCROLL_ARROW_HEIGHT /* Was originally 8 */ + #define MENU_SCROLL_TIMEOUT1 50 + #define MENU_SCROLL_TIMEOUT2 20 + + #define ATTACH_INFO_KEY "gtk-menu-child-attach-info-key" + #define ATTACHED_MENUS "gtk-attached-menus" + ++/* HILDON: */ ++#define HILDON_MENU_NAME_SHARP "menu_with_corners" ++ ++/* needed to allow different themeing for first level menus */ ++#define HILDON_MENU_NAME_ROUND_FIRST_LEVEL "menu_without_corners_first_level" ++#define HILDON_MENU_NAME_ROUND "menu_without_corners" ++#define HILDON_MENU_NAME_FORCE_SHARP "menu_force_with_corners" ++#define HILDON_MENU_NAME_FORCE_ROUND "menu_force_without_corners" ++ ++/* maximum sizes for menus when attached to comboboxes */ ++#define HILDON_MENU_COMBO_MAX_WIDTH 406 ++#define HILDON_MENU_COMBO_MIN_WIDTH 66 ++#define HILDON_MENU_COMBO_MAX_HEIGHT 305 ++#define HILDON_MENU_COMBO_MIN_HEIGHT 70 ++ + typedef struct _GtkMenuAttachData GtkMenuAttachData; + typedef struct _GtkMenuPrivate GtkMenuPrivate; + +@@ -92,6 +129,15 @@ + gboolean have_layout; + gint n_rows; + gint n_columns; ++ ++ /* Arrow states */ ++ GtkStateType lower_arrow_state; ++ GtkStateType upper_arrow_state; ++ ++ /* For context menu behavior */ ++ gboolean context_menu; ++ int popup_pointer_x; ++ int popup_pointer_y; + }; + + typedef struct +@@ -108,6 +154,7 @@ + + enum { + MOVE_SCROLL, ++ CLOSE_CURRENT, + LAST_SIGNAL + }; + +@@ -191,7 +238,8 @@ + static void gtk_menu_handle_scrolling (GtkMenu *menu, + gint event_x, + gint event_y, +- gboolean enter); ++ gboolean enter, ++ gboolean motion); + static void gtk_menu_set_tearoff_hints (GtkMenu *menu, + gint width); + static void gtk_menu_style_set (GtkWidget *widget, +@@ -232,6 +280,9 @@ + guint signal_id); + static void _gtk_menu_refresh_accel_paths (GtkMenu *menu, + gboolean group_changed); ++static gboolean gtk_menu_check_name (GtkWidget *widget); ++ ++static void _gtk_menu_close_current (GtkMenu *menu); + + static GtkMenuShellClass *parent_class = NULL; + static const gchar attach_data_key[] = "gtk-menu-attach-data"; +@@ -496,7 +547,6 @@ + widget_class->hide_all = gtk_menu_hide_all; + widget_class->enter_notify_event = gtk_menu_enter_notify; + widget_class->leave_notify_event = gtk_menu_leave_notify; +- widget_class->motion_notify_event = gtk_menu_motion_notify; + widget_class->style_set = gtk_menu_style_set; + widget_class->focus = gtk_menu_focus; + widget_class->can_activate_accel = gtk_menu_real_can_activate_accel; +@@ -521,6 +571,15 @@ + _gtk_marshal_VOID__ENUM, + G_TYPE_NONE, 1, + GTK_TYPE_SCROLL_TYPE); ++ ++ menu_signals[CLOSE_CURRENT] = ++ _gtk_binding_signal_new ("close_current", ++ G_OBJECT_CLASS_TYPE (object_class), ++ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, ++ G_CALLBACK (_gtk_menu_close_current), ++ NULL, NULL, ++ _gtk_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); + + g_object_class_install_property (gobject_class, + PROP_TEAROFF_TITLE, +@@ -606,6 +665,11 @@ + G_PARAM_READWRITE)); + + binding_set = gtk_binding_set_by_class (class); ++ /* Hildon : We moved handling of escape-key here because we need it to ++ * work like closing a submenu, not closing all the menus. */ ++ gtk_binding_entry_add_signal (binding_set, ++ GDK_Escape, 0, ++ "close_current", 0); + gtk_binding_entry_add_signal (binding_set, + GDK_Up, 0, + "move_current", 1, +@@ -709,6 +773,25 @@ + DEFAULT_POPDOWN_DELAY, + G_PARAM_READWRITE)); + ++ /* Hildon addition : border width was ++ replaced with horizontal-padding and ++ vertical-padding (which already is an style ++ property for GtkMenu). */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("horizontal-padding", ++ P_("Horizontal Padding"), ++ P_("Extra space at the left and right edges of the menu"), ++ 0, ++ G_MAXINT, ++ 0, /* 1, */ ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("double_arrows", ++ P_("Double Arrows"), ++ P_("When scrolling, always show both arrows."), ++ FALSE, ++ G_PARAM_READABLE)); + } + + +@@ -884,13 +967,14 @@ + menu->toggle_size = 0; + + menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW, +- "type", GTK_WINDOW_POPUP, +- "child", menu, +- NULL), ++ "type", GTK_WINDOW_POPUP, ++ "child", menu, ++ NULL), + "signal::event", gtk_menu_window_event, menu, + "signal::size_request", gtk_menu_window_size_request, menu, + "signal::destroy", gtk_widget_destroyed, &menu->toplevel, + NULL); ++ + gtk_window_set_resizable (GTK_WINDOW (menu->toplevel), FALSE); + gtk_window_set_mnemonic_modifier (GTK_WINDOW (menu->toplevel), 0); + +@@ -919,6 +1003,15 @@ + menu->lower_arrow_visible = FALSE; + menu->upper_arrow_prelight = FALSE; + menu->lower_arrow_prelight = FALSE; ++ ++ /* <Hildon> */ ++ priv->upper_arrow_state = GTK_STATE_NORMAL; ++ priv->lower_arrow_state = GTK_STATE_NORMAL; ++ ++ priv->context_menu = FALSE; ++ priv->popup_pointer_x = -1; ++ priv->popup_pointer_y = -1; ++ /* </hildon */ + + priv->have_layout = FALSE; + } +@@ -1220,7 +1313,8 @@ + + static gboolean + popup_grab_on_window (GdkWindow *window, +- guint32 activate_time) ++ guint32 activate_time, ++ gboolean grab_keyboard) + { + if ((gdk_pointer_grab (window, TRUE, + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | +@@ -1228,7 +1322,8 @@ + GDK_POINTER_MOTION_MASK, + NULL, NULL, activate_time) == 0)) + { +- if (gdk_keyboard_grab (window, TRUE, ++ if (!grab_keyboard || ++ gdk_keyboard_grab (window, TRUE, + activate_time) == 0) + return TRUE; + else +@@ -1282,6 +1377,7 @@ + GtkWidget *parent; + GdkEvent *current_event; + GtkMenuShell *menu_shell; ++ gboolean grab_keyboard; + GtkMenuPrivate *priv = gtk_menu_get_private (menu); + + g_return_if_fail (GTK_IS_MENU (menu)); +@@ -1333,10 +1429,28 @@ + * probably could just leave the grab on the other window, with a + * little reorganization of the code in gtkmenu*). + */ ++ ++ grab_keyboard = gtk_menu_shell_get_take_focus (menu_shell); ++ gtk_window_set_accept_focus (GTK_WINDOW (menu->toplevel), grab_keyboard); ++ + if (xgrab_shell && xgrab_shell != widget) + { +- if (popup_grab_on_window (xgrab_shell->window, activate_time)) ++ if (popup_grab_on_window (xgrab_shell->window, activate_time, grab_keyboard)) + GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE; ++ ++ /* HILDON: ++ * Check wheter parent is GtkMenuBar. If so, ++ * then we need sharp upper corners for this menu. ++ */ ++ if (gtk_menu_check_name (widget)) ++ { ++ if (GTK_IS_MENU_BAR (parent_menu_shell)) ++ gtk_widget_set_name (widget, HILDON_MENU_NAME_SHARP); ++ else if (GTK_IS_MENU (parent_menu_shell)) ++ gtk_widget_set_name( widget, HILDON_MENU_NAME_ROUND); ++ else ++ gtk_widget_set_name (widget, HILDON_MENU_NAME_ROUND_FIRST_LEVEL); ++ } + } + else + { +@@ -1344,8 +1458,14 @@ + + xgrab_shell = widget; + transfer_window = menu_grab_transfer_window_get (menu); +- if (popup_grab_on_window (transfer_window, activate_time)) ++ if (popup_grab_on_window (transfer_window, activate_time, grab_keyboard)) + GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE; ++ ++ /* HILDON: ++ * We want this menu to have round corners (Used by default) ++ */ ++ if (gtk_menu_check_name (widget)) ++ gtk_widget_set_name (widget, HILDON_MENU_NAME_ROUND_FIRST_LEVEL); + } + + if (!GTK_MENU_SHELL (xgrab_shell)->have_xgrab) +@@ -1409,6 +1529,23 @@ + + /* Position the menu, possibly changing the size request + */ ++ if (GTK_IS_COMBO_BOX (gtk_menu_get_attach_widget (menu))) ++ { ++ /* Hildon - limit the size if the menu is attached to a ComboBox */ ++ GtkRequisition req; ++ gint width, height; ++ ++ gtk_widget_set_size_request (widget, -1, -1); ++ gtk_widget_size_request (widget, &req); ++ ++ width = MAX (MIN (req.width, HILDON_MENU_COMBO_MAX_WIDTH), ++ HILDON_MENU_COMBO_MIN_WIDTH); ++ height = MAX (MIN (req.height, HILDON_MENU_COMBO_MAX_HEIGHT), ++ HILDON_MENU_COMBO_MIN_HEIGHT); ++ ++ gtk_widget_set_size_request (widget, width, height); ++ } ++ + gtk_menu_position (menu); + + /* Compute the size of the toplevel and realize it so we +@@ -1430,13 +1567,29 @@ + + gtk_menu_scroll_to (menu, menu->scroll_offset); + ++ if (priv->context_menu) ++ { ++ /* Save position of the pointer during popup */ ++ /* currently not-multihead safe */ ++ GdkScreen *screen; ++ GdkDisplay *display; ++ ++ screen = gtk_widget_get_screen (widget); ++ display = gdk_screen_get_display (screen); ++ ++ gdk_display_get_pointer (display, NULL, ++ &priv->popup_pointer_x, ++ &priv->popup_pointer_y, ++ NULL); ++ } ++ + /* Once everything is set up correctly, map the toplevel window on + the screen. + */ + gtk_widget_show (menu->toplevel); + + if (xgrab_shell == widget) +- popup_grab_on_window (widget->window, activate_time); /* Should always succeed */ ++ popup_grab_on_window (widget->window, activate_time, grab_keyboard); /* Should always succeed */ + gtk_grab_add (GTK_WIDGET (menu)); + } + +@@ -1996,6 +2149,7 @@ + GtkWidget *child; + GList *children; + guint vertical_padding; ++ guint horizontal_padding; + + g_return_if_fail (GTK_IS_MENU (widget)); + +@@ -2025,9 +2179,10 @@ + + gtk_widget_style_get (GTK_WIDGET (menu), + "vertical-padding", &vertical_padding, ++ "horizontal-padding", &horizontal_padding, + NULL); + +- attributes.x = border_width + widget->style->xthickness; ++ attributes.x = border_width + widget->style->xthickness + horizontal_padding; + attributes.y = border_width + widget->style->ythickness + vertical_padding; + attributes.width = MAX (1, widget->allocation.width - attributes.x * 2); + attributes.height = MAX (1, widget->allocation.height - attributes.y * 2); +@@ -2040,11 +2195,14 @@ + if (menu->lower_arrow_visible) + attributes.height -= MENU_SCROLL_ARROW_HEIGHT; + ++ attributes.window_type = GDK_WINDOW_CHILD; ++ + menu->view_window = gdk_window_new (widget->window, &attributes, attributes_mask); + gdk_window_set_user_data (menu->view_window, menu); + + attributes.x = 0; + attributes.y = 0; ++ attributes.width = MAX (1, widget->requisition.width - (border_width + widget->style->xthickness + horizontal_padding) * 2); + attributes.height = MAX (1, widget->requisition.height - (border_width + widget->style->ythickness + vertical_padding) * 2); + + menu->bin_window = gdk_window_new (menu->view_window, &attributes, attributes_mask); +@@ -2164,6 +2322,10 @@ + guint vertical_padding; + GtkRequisition child_requisition; + GtkMenuPrivate *priv; ++ guint horizontal_padding; ++ GdkScreen *screen; ++ GdkRectangle monitor; ++ gint monitor_num; + + g_return_if_fail (GTK_IS_MENU (widget)); + g_return_if_fail (requisition != NULL); +@@ -2182,6 +2344,16 @@ + priv->heights = g_new0 (guint, gtk_menu_get_n_rows (menu)); + priv->heights_length = gtk_menu_get_n_rows (menu); + ++/* Hildon addition to find out the monitor width */ ++ screen = gtk_widget_get_screen (widget); ++ if (widget->window != NULL) ++ monitor_num = gdk_screen_get_monitor_at_window (screen, widget->window); ++ else ++ monitor_num = 0; ++ if (monitor_num < 0) ++ monitor_num = 0; ++ gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor); ++ + children = menu_shell->children; + while (children) + { +@@ -2223,15 +2395,18 @@ + + requisition->width += max_toggle_size + max_accel_width; + requisition->width *= gtk_menu_get_n_columns (menu); +- requisition->width += (GTK_CONTAINER (menu)->border_width + +- widget->style->xthickness) * 2; + + gtk_widget_style_get (GTK_WIDGET (menu), ++ "horizontal-padding", &horizontal_padding, + "vertical-padding", &vertical_padding, + NULL); ++ requisition->width += (GTK_CONTAINER (menu)->border_width + horizontal_padding + ++ widget->style->xthickness) * 2; + requisition->height += (GTK_CONTAINER (menu)->border_width + vertical_padding + + widget->style->ythickness) * 2; + ++/* Hildon addition to not make the menu too wide for the screen. */ ++ requisition->width = MIN (requisition->width, monitor.width); + menu->toggle_size = max_toggle_size; + + /* Don't resize the tearoff if it is not active, because it won't redraw (it is only a background pixmap). +@@ -2253,6 +2428,7 @@ + GList *children; + gint x, y; + gint width, height; ++ guint horizontal_padding; + guint vertical_padding; + + g_return_if_fail (GTK_IS_MENU (widget)); +@@ -2266,10 +2442,11 @@ + gtk_widget_get_child_requisition (GTK_WIDGET (menu), &child_requisition); + + gtk_widget_style_get (GTK_WIDGET (menu), ++ "horizontal-padding", &horizontal_padding, + "vertical-padding", &vertical_padding, + NULL); + +- x = GTK_CONTAINER (menu)->border_width + widget->style->xthickness; ++ x = GTK_CONTAINER (menu)->border_width + widget->style->xthickness + horizontal_padding; + y = GTK_CONTAINER (menu)->border_width + widget->style->ythickness + vertical_padding; + + width = MAX (1, allocation->width - x * 2); +@@ -2407,27 +2584,32 @@ + GdkEventExpose *event) + { + GtkMenu *menu; +- gint width, height; +- gint border_x, border_y; +- guint vertical_padding; + + g_return_if_fail (GTK_IS_MENU (widget)); + + menu = GTK_MENU (widget); + +- gtk_widget_style_get (GTK_WIDGET (menu), +- "vertical-padding", &vertical_padding, +- NULL); +- +- border_x = GTK_CONTAINER (widget)->border_width + widget->style->xthickness; +- border_y = GTK_CONTAINER (widget)->border_width + widget->style->ythickness + vertical_padding; +- gdk_drawable_get_size (widget->window, &width, &height); +- + if (event->window == widget->window) + { ++ gint width, height; ++ gint border_x, border_y; ++ guint vertical_padding; ++ guint horizontal_padding; ++ GtkMenuPrivate *priv; + gint arrow_space = MENU_SCROLL_ARROW_HEIGHT - 2 * widget->style->ythickness; + gint arrow_size = 0.7 * arrow_space; + ++ priv = gtk_menu_get_private (menu); ++ ++ gtk_widget_style_get (GTK_WIDGET (menu), ++ "vertical-padding", &vertical_padding, ++ "horizontal-padding", &horizontal_padding, ++ NULL); ++ ++ border_x = GTK_CONTAINER (widget)->border_width + widget->style->xthickness + horizontal_padding; ++ border_y = GTK_CONTAINER (widget)->border_width + widget->style->ythickness + vertical_padding; ++ gdk_drawable_get_size (widget->window, &width, &height); ++ + gtk_paint_box (widget->style, + widget->window, + GTK_STATE_NORMAL, +@@ -2436,21 +2618,9 @@ + 0, 0, -1, -1); + if (menu->upper_arrow_visible && !menu->tearoff_active) + { +- gtk_paint_box (widget->style, +- widget->window, +- menu->upper_arrow_prelight ? +- GTK_STATE_PRELIGHT : GTK_STATE_NORMAL, +- GTK_SHADOW_OUT, +- NULL, widget, "menu", +- border_x, +- border_y, +- width - 2 * border_x, +- MENU_SCROLL_ARROW_HEIGHT); +- + gtk_paint_arrow (widget->style, + widget->window, +- menu->upper_arrow_prelight ? +- GTK_STATE_PRELIGHT : GTK_STATE_NORMAL, ++ priv->upper_arrow_state, + GTK_SHADOW_OUT, + NULL, widget, "menu_scroll_arrow_up", + GTK_ARROW_UP, +@@ -2462,21 +2632,9 @@ + + if (menu->lower_arrow_visible && !menu->tearoff_active) + { +- gtk_paint_box (widget->style, +- widget->window, +- menu->lower_arrow_prelight ? +- GTK_STATE_PRELIGHT : GTK_STATE_NORMAL, +- GTK_SHADOW_OUT, +- NULL, widget, "menu", +- border_x, +- height - border_y - MENU_SCROLL_ARROW_HEIGHT, +- width - 2*border_x, +- MENU_SCROLL_ARROW_HEIGHT); +- + gtk_paint_arrow (widget->style, + widget->window, +- menu->lower_arrow_prelight ? +- GTK_STATE_PRELIGHT : GTK_STATE_NORMAL, ++ priv->lower_arrow_state, + GTK_SHADOW_OUT, + NULL, widget, "menu_scroll_arrow_down", + GTK_ARROW_DOWN, +@@ -2516,18 +2674,82 @@ + GTK_WIDGET_CLASS (parent_class)->show (widget); + } + ++static GtkWidget * ++find_active_menu_item (GdkEventButton *event) ++{ ++ GtkWidget *menu_item; ++ ++ menu_item = gtk_get_event_widget ((GdkEvent*) event); ++ while (menu_item && !GTK_IS_MENU_ITEM (menu_item)) ++ menu_item = menu_item->parent; ++ ++ return menu_item; ++} ++ ++static gboolean ++pointer_in_menu_tree (GtkWidget *widget) ++{ ++ GtkMenuShell *mshell; ++ int width, height, x, y; ++ ++ mshell = GTK_MENU_SHELL (widget); ++ ++ gdk_window_get_pointer (widget->window, &x, &y, NULL); ++ gdk_drawable_get_size (widget->window, &width, &height); ++ ++ if ((x <= width) && (x >= 0) && (y <= height) && (y >= 0)) ++ return TRUE; ++ ++ if ((mshell->parent_menu_shell != NULL) && ++ GTK_IS_MENU (mshell->parent_menu_shell)) ++ return pointer_in_menu_tree (mshell->parent_menu_shell); ++ ++ return FALSE; ++} ++ ++static int ++distance_traveled (GtkWidget *widget) ++{ ++ GtkMenuPrivate *priv; ++ GdkScreen *screen; ++ GdkDisplay *display; ++ int x, y, dx, dy; ++ ++ priv = gtk_menu_get_private (GTK_MENU (widget)); ++ ++ screen = gtk_widget_get_screen (widget); ++ display = gdk_screen_get_display (screen); ++ ++ gdk_display_get_pointer (display, NULL, &x, &y, NULL); ++ ++ dx = (priv->popup_pointer_x - x); ++ dy = (priv->popup_pointer_y - y); ++ ++ return abs ((int) sqrt ((double) (dx * dx + dy * dy))); ++} ++ + static gboolean + gtk_menu_button_press (GtkWidget *widget, +- GdkEventButton *event) ++ GdkEventButton *event) + { +- /* Don't pop down the menu for releases over scroll arrows +- */ +- if (GTK_IS_MENU (widget)) ++ GtkWidget *menu_item; ++ ++ menu_item = find_active_menu_item (event); ++ if (menu_item == NULL) + { + GtkMenu *menu = GTK_MENU (widget); + +- if (menu->upper_arrow_prelight || menu->lower_arrow_prelight) +- return TRUE; ++ if (menu->upper_arrow_prelight || menu->lower_arrow_prelight) ++ { ++ gtk_menu_handle_scrolling (GTK_MENU (widget), event->x_root, event->y_root, TRUE, FALSE); ++ ++ return TRUE; ++ } ++ ++ /* Don't pass down to menu shell if a non-menuitem part ++ * of the menu was clicked. */ ++ if (pointer_in_menu_tree (widget)) ++ return TRUE; + } + + return GTK_WIDGET_CLASS (parent_class)->button_press_event (widget, event); +@@ -2537,14 +2759,44 @@ + gtk_menu_button_release (GtkWidget *widget, + GdkEventButton *event) + { +- /* Don't pop down the menu for releases over scroll arrows +- */ +- if (GTK_IS_MENU (widget)) ++ GtkMenuPrivate *priv; ++ GtkWidget *menu_item; ++ ++ priv = gtk_menu_get_private (GTK_MENU (widget)); ++ ++ menu_item = find_active_menu_item (event); ++ if (menu_item == NULL) + { + GtkMenu *menu = GTK_MENU (widget); + +- if (menu->upper_arrow_prelight || menu->lower_arrow_prelight) +- return TRUE; ++ if (menu->upper_arrow_prelight || menu->lower_arrow_prelight) ++ { ++ gtk_menu_handle_scrolling (GTK_MENU (widget), event->x_root, event->y_root, FALSE, FALSE); ++ ++ return TRUE; ++ } ++ ++ if (priv->context_menu && ++ (priv->popup_pointer_x >= 0) && ++ (priv->popup_pointer_y >= 0)) ++ { ++ int distance; ++ ++ distance = distance_traveled (widget); ++ ++ priv->popup_pointer_x = -1; ++ priv->popup_pointer_y = -1; ++ ++ /* Don't popdown if we traveled less than 20px since popup point, ++ * as per the specs. */ ++ if (distance < 20) ++ return TRUE; ++ } ++ ++ /* Don't pass down to menu shell if a non-menuitem part ++ * of the menu was clicked. */ ++ if (pointer_in_menu_tree (widget)) ++ return TRUE; + } + + return GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, event); +@@ -2765,7 +3017,7 @@ + gboolean need_enter; + + if (GTK_IS_MENU (widget)) +- gtk_menu_handle_scrolling (GTK_MENU (widget), event->x_root, event->y_root, TRUE); ++ gtk_menu_handle_scrolling (GTK_MENU (widget), event->x_root, event->y_root, TRUE, TRUE); + + /* We received the event for one of two reasons: + * +@@ -2779,7 +3031,27 @@ + menu_item = gtk_get_event_widget ((GdkEvent*) event); + if (!menu_item || !GTK_IS_MENU_ITEM (menu_item) || + !GTK_IS_MENU (menu_item->parent)) +- return FALSE; ++ { ++ GtkMenuPrivate *priv; ++ ++ priv = gtk_menu_get_private (GTK_MENU (widget)); ++ ++ if (priv->context_menu) ++ { ++ /* Context menu mode. If we dragged out of the menu, ++ * close the menu, as by the specs. */ ++ if (!pointer_in_menu_tree (widget) && ++ (distance_traveled (widget) >= 20) && ++ (event->state & GDK_BUTTON1_MASK)) ++ { ++ gtk_menu_deactivate (GTK_MENU_SHELL (widget)); ++ ++ return TRUE; ++ } ++ } ++ ++ return FALSE; ++ } + + menu_shell = GTK_MENU_SHELL (menu_item->parent); + menu = GTK_MENU (menu_shell); +@@ -2795,6 +3067,11 @@ + */ + if (gtk_menu_navigating_submenu (menu, event->x_root, event->y_root)) + return TRUE; ++/* HILDON MOD. ++ * Close the submenus that are two levels down from the currently selected. ++ * This ensures that the focus is correct all the time.*/ ++ if (GTK_MENU_ITEM(menu_item)->submenu != NULL) ++ gtk_menu_shell_deselect (GTK_MENU_SHELL(&(GTK_MENU(GTK_MENU_ITEM(menu_item)->submenu)->menu_shell))); + + /* Make sure we pop down if we enter a non-selectable menu item, so we + * don't show a submenu when the cursor is outside the stay-up triangle. +@@ -2828,6 +3105,7 @@ + send_event->crossing.y_root = event->y_root; + send_event->crossing.x = event->x; + send_event->crossing.y = event->y; ++ send_event->crossing.state = event->state; + + /* We send the event to 'widget', the currently active menu, + * instead of 'menu', the menu that the pointer is in. This +@@ -2852,17 +3130,24 @@ + GtkWidget *widget; + gint offset; + gint view_width, view_height; ++ gboolean double_arrows; + + widget = GTK_WIDGET (menu); + offset = menu->scroll_offset + step; + ++ /* get double_arrows style property */ ++ gtk_widget_style_get (widget, ++ "double_arrows", &double_arrows, ++ NULL); ++ + /* If we scroll upward and the non-visible top part + * is smaller than the scroll arrow it would be + * pretty stupid to show the arrow and taking more + * screen space than just scrolling to the top. + */ +- if ((step < 0) && (offset < MENU_SCROLL_ARROW_HEIGHT)) +- offset = 0; ++ if (!double_arrows) ++ if ((step < 0) && (offset < MENU_SCROLL_ARROW_HEIGHT)) ++ offset = 0; + + /* Don't scroll over the top if we weren't before: */ + if ((menu->scroll_offset >= 0) && (offset < 0)) +@@ -2874,6 +3159,12 @@ + if (menu->scroll_offset > 0) + view_height -= MENU_SCROLL_ARROW_HEIGHT; + ++ /* When both arrows are always shown, reduce ++ * view height even more. ++ */ ++ if (double_arrows) ++ view_height -= MENU_SCROLL_ARROW_HEIGHT; ++ + if ((menu->scroll_offset + view_height <= widget->requisition.height) && + (offset + view_height > widget->requisition.height)) + offset = widget->requisition.height - view_height; +@@ -2922,18 +3213,21 @@ + gtk_menu_handle_scrolling (GtkMenu *menu, + gint x, + gint y, +- gboolean enter) ++ gboolean enter, ++ gboolean motion) + { + GtkMenuShell *menu_shell; ++ GtkMenuPrivate *priv; + gint width, height; + gint border; + GdkRectangle rect; +- gboolean in_arrow; + gboolean scroll_fast = FALSE; + guint vertical_padding; + gint top_x, top_y; + gint win_x, win_y; + ++ priv = gtk_menu_get_private (menu); ++ + menu_shell = GTK_MENU_SHELL (menu); + + gdk_drawable_get_size (GTK_WIDGET (menu)->window, &width, &height); +@@ -2946,10 +3240,11 @@ + GTK_WIDGET (menu)->style->ythickness + vertical_padding; + + gdk_window_get_position (menu->toplevel->window, &top_x, &top_y); ++ x -= top_x; ++ y -= top_y; ++ + gdk_window_get_position (GTK_WIDGET (menu)->window, &win_x, &win_y); +- win_x += top_x; +- win_y += top_y; +- ++ + if (menu->upper_arrow_visible && !menu->tearoff_active) + { + rect.x = win_x; +@@ -2957,35 +3252,49 @@ + rect.width = width; + rect.height = MENU_SCROLL_ARROW_HEIGHT + border; + +- in_arrow = FALSE; ++ menu->upper_arrow_prelight = FALSE; + if ((x >= rect.x) && (x < rect.x + rect.width) && + (y >= rect.y) && (y < rect.y + rect.height)) +- { +- in_arrow = TRUE; +- scroll_fast = (y < rect.y + MENU_SCROLL_FAST_ZONE); +- } +- +- if (enter && in_arrow && +- (!menu->upper_arrow_prelight || menu->scroll_fast != scroll_fast)) +- { +- menu->upper_arrow_prelight = TRUE; +- menu->scroll_fast = scroll_fast; +- gdk_window_invalidate_rect (GTK_WIDGET (menu)->window, &rect, FALSE); +- +- /* Deselect the active item so that any submenus are poped down */ +- gtk_menu_shell_deselect (menu_shell); ++ menu->upper_arrow_prelight = TRUE; + +- gtk_menu_remove_scroll_timeout (menu); +- menu->scroll_step = (scroll_fast) ? -MENU_SCROLL_STEP2 : -MENU_SCROLL_STEP1; +- menu->timeout_id = g_timeout_add ((scroll_fast) ? MENU_SCROLL_TIMEOUT2 : MENU_SCROLL_TIMEOUT1, +- gtk_menu_scroll_timeout, +- menu); +- } +- else if (!enter && !in_arrow && menu->upper_arrow_prelight) ++ if (priv->upper_arrow_state != GTK_STATE_INSENSITIVE) + { +- gdk_window_invalidate_rect (GTK_WIDGET (menu)->window, &rect, FALSE); +- +- gtk_menu_stop_scrolling (menu); ++ if (enter && menu->upper_arrow_prelight && ++ (menu->timeout_id == 0 || menu->scroll_fast != scroll_fast)) ++ { ++ menu->scroll_fast = scroll_fast; ++ ++ /* Deselect the active item so that any submenus are poped down */ ++ gtk_menu_shell_deselect (menu_shell); ++ ++ gtk_menu_remove_scroll_timeout (menu); ++ menu->scroll_step = (scroll_fast) ? -MENU_SCROLL_STEP2 : -MENU_SCROLL_STEP1; ++ ++ if (!motion) ++ { ++ /* Only do stuff on click. */ ++ GtkSettings *settings; ++ guint timeout; ++ ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-update-timeout", &timeout, NULL); ++ ++ menu->timeout_id = g_timeout_add (timeout / 2, gtk_menu_scroll_timeout, menu); ++ ++ priv->upper_arrow_state = GTK_STATE_ACTIVE; ++ } ++ ++ gdk_window_invalidate_rect (GTK_WIDGET (menu)->window, &rect, FALSE); ++ } ++ else if (!enter) ++ { ++ gtk_menu_stop_scrolling (menu); ++ ++ priv->upper_arrow_state = menu->upper_arrow_prelight ? ++ GTK_STATE_PRELIGHT : GTK_STATE_NORMAL; ++ ++ gdk_window_invalidate_rect (GTK_WIDGET (menu)->window, &rect, FALSE); ++ } + } + } + +@@ -2996,36 +3305,50 @@ + rect.width = width; + rect.height = MENU_SCROLL_ARROW_HEIGHT + border; + +- in_arrow = FALSE; ++ menu->lower_arrow_prelight = FALSE; + if ((x >= rect.x) && (x < rect.x + rect.width) && + (y >= rect.y) && (y < rect.y + rect.height)) +- { +- in_arrow = TRUE; +- scroll_fast = (y > rect.y + rect.height - MENU_SCROLL_FAST_ZONE); +- } ++ menu->lower_arrow_prelight = TRUE; + +- if (enter && in_arrow && +- (!menu->lower_arrow_prelight || menu->scroll_fast != scroll_fast)) ++ if (priv->lower_arrow_state != GTK_STATE_INSENSITIVE) + { +- menu->lower_arrow_prelight = TRUE; +- menu->scroll_fast = scroll_fast; +- gdk_window_invalidate_rect (GTK_WIDGET (menu)->window, &rect, FALSE); ++ if (enter && menu->lower_arrow_prelight && ++ (menu->timeout_id == 0 || menu->scroll_fast != scroll_fast)) ++ { ++ menu->scroll_fast = scroll_fast; + +- /* Deselect the active item so that any submenus are poped down */ +- gtk_menu_shell_deselect (menu_shell); ++ /* Deselect the active item so that any submenus are poped down */ ++ gtk_menu_shell_deselect (menu_shell); + +- gtk_menu_remove_scroll_timeout (menu); +- menu->scroll_step = (scroll_fast) ? MENU_SCROLL_STEP2 : MENU_SCROLL_STEP1; +- menu->timeout_id = g_timeout_add ((scroll_fast) ? MENU_SCROLL_TIMEOUT2 : MENU_SCROLL_TIMEOUT1, +- gtk_menu_scroll_timeout, +- menu); +- } +- else if (!enter && !in_arrow && menu->lower_arrow_prelight) +- { +- gdk_window_invalidate_rect (GTK_WIDGET (menu)->window, &rect, FALSE); +- +- gtk_menu_stop_scrolling (menu); +- } ++ gtk_menu_remove_scroll_timeout (menu); ++ menu->scroll_step = (scroll_fast) ? MENU_SCROLL_STEP2 : MENU_SCROLL_STEP1; ++ ++ if (!motion) ++ { ++ /* Only do stuff on click. */ ++ GtkSettings *settings; ++ guint timeout; ++ ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-update-timeout", &timeout, NULL); ++ ++ menu->timeout_id = g_timeout_add (timeout / 2, gtk_menu_scroll_timeout, menu); ++ ++ priv->lower_arrow_state = GTK_STATE_ACTIVE; ++ } ++ ++ gdk_window_invalidate_rect (GTK_WIDGET (menu)->window, &rect, FALSE); ++ } ++ else if (!enter) ++ { ++ gtk_menu_stop_scrolling (menu); ++ ++ priv->lower_arrow_state = menu->lower_arrow_prelight ? ++ GTK_STATE_PRELIGHT : GTK_STATE_NORMAL; ++ ++ gdk_window_invalidate_rect (GTK_WIDGET (menu)->window, &rect, FALSE); ++ } ++ } + } + } + +@@ -3041,7 +3364,7 @@ + GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget); + + if (!menu_shell->ignore_enter) +- gtk_menu_handle_scrolling (GTK_MENU (widget), event->x_root, event->y_root, TRUE); ++ gtk_menu_handle_scrolling (GTK_MENU (widget), event->x_root, event->y_root, TRUE, TRUE); + } + + if (menu_item && GTK_IS_MENU_ITEM (menu_item)) +@@ -3106,7 +3429,7 @@ + if (gtk_menu_navigating_submenu (menu, event->x_root, event->y_root)) + return TRUE; + +- gtk_menu_handle_scrolling (menu, event->x_root, event->y_root, FALSE); ++ gtk_menu_handle_scrolling (menu, event->x_root, event->y_root, FALSE, TRUE); + + event_widget = gtk_get_event_widget ((GdkEvent*) event); + +@@ -3611,7 +3934,13 @@ + requisition.width, requisition.height); + } + +- menu->scroll_offset = scroll_offset; ++ /* Hildon hack for menu in comboboxes: ++ * in case the menu in attached to a ComboBox, the scroll_offset is ++ * calculated in the positioning function so we dont't overwrite it ++ * with the value calculated above (in this function) */ ++ if ( !GTK_IS_COMBO_BOX(gtk_menu_get_attach_widget(menu)) ) ++ menu->scroll_offset = scroll_offset; ++ + } + + static void +@@ -3628,9 +3957,6 @@ + gtk_menu_stop_scrolling (GtkMenu *menu) + { + gtk_menu_remove_scroll_timeout (menu); +- +- menu->upper_arrow_prelight = FALSE; +- menu->lower_arrow_prelight = FALSE; + } + + static void +@@ -3644,6 +3970,8 @@ + gboolean last_visible; + gint menu_height; + guint vertical_padding; ++ guint horizontal_padding; ++ gboolean double_arrows; + + widget = GTK_WIDGET (menu); + +@@ -3663,19 +3991,93 @@ + + gtk_widget_style_get (GTK_WIDGET (menu), + "vertical-padding", &vertical_padding, ++ "horizontal-padding", &horizontal_padding, ++ "double_arrows", &double_arrows, + NULL); + + border_width = GTK_CONTAINER (menu)->border_width; +- view_width -= (border_width + widget->style->xthickness) * 2; ++ view_width -= (border_width + widget->style->xthickness + horizontal_padding) * 2; + view_height -= (border_width + widget->style->ythickness + vertical_padding) * 2; + menu_height = widget->requisition.height - + (border_width + widget->style->ythickness + vertical_padding) * 2; + +- x = border_width + widget->style->xthickness; ++ x = border_width + widget->style->xthickness + horizontal_padding; + y = border_width + widget->style->ythickness + vertical_padding; + ++ if (double_arrows && !menu->tearoff_active && (view_height < menu_height)) ++ { ++ GtkMenuPrivate *priv; ++ GtkStateType upper_arrow_previous_state, lower_arrow_previous_state; ++ ++ priv = gtk_menu_get_private (menu); ++ ++ upper_arrow_previous_state = priv->upper_arrow_state; ++ lower_arrow_previous_state = priv->lower_arrow_state; ++ ++ if (!menu->upper_arrow_visible || !menu->lower_arrow_visible) ++ gtk_widget_queue_draw (GTK_WIDGET (menu)); ++ ++ view_height -= 2*MENU_SCROLL_ARROW_HEIGHT; ++ y += MENU_SCROLL_ARROW_HEIGHT; ++ ++ menu->upper_arrow_visible = menu->lower_arrow_visible = TRUE; ++ if (priv->upper_arrow_state == GTK_STATE_INSENSITIVE) ++ { ++ priv->upper_arrow_state = menu->upper_arrow_prelight ? ++ GTK_STATE_PRELIGHT : GTK_STATE_NORMAL; ++ } ++ if (priv->lower_arrow_state == GTK_STATE_INSENSITIVE) ++ { ++ priv->lower_arrow_state = menu->lower_arrow_prelight ? ++ GTK_STATE_PRELIGHT : GTK_STATE_NORMAL; ++ } ++ ++ if (offset <= 0) ++ { ++ offset = 0; ++ priv->upper_arrow_state = GTK_STATE_INSENSITIVE; ++ } ++ if (offset >= menu_height - view_height) ++ { ++ offset = menu_height - view_height; ++ priv->lower_arrow_state = GTK_STATE_INSENSITIVE; ++ } ++ ++ if ((priv->upper_arrow_state != upper_arrow_previous_state) || ++ (priv->lower_arrow_state != lower_arrow_previous_state)) ++ gtk_widget_queue_draw (GTK_WIDGET (menu)); ++ ++ if (upper_arrow_previous_state != GTK_STATE_INSENSITIVE && ++ priv->upper_arrow_state == GTK_STATE_INSENSITIVE) ++ { ++ /* If we hid the upper arrow, possibly remove timeout */ ++ if (menu->scroll_step < 0) ++ { ++ gtk_menu_stop_scrolling (menu); ++ gtk_widget_queue_draw (GTK_WIDGET (menu)); ++ } ++ } ++ ++ if (lower_arrow_previous_state != GTK_STATE_INSENSITIVE && ++ priv->lower_arrow_state == GTK_STATE_INSENSITIVE) ++ { ++ /* If we hid the lower arrow, possibly remove timeout */ ++ if (menu->scroll_step > 0) ++ { ++ gtk_menu_stop_scrolling (menu); ++ gtk_widget_queue_draw (GTK_WIDGET (menu)); ++ } ++ } ++ } ++ else + if (!menu->tearoff_active) + { ++ if (offset <= 0) ++ offset = 0; ++ ++ if (offset >= menu_height - view_height) ++ offset = menu_height - view_height; ++ + last_visible = menu->upper_arrow_visible; + menu->upper_arrow_visible = offset > 0; + +@@ -3685,8 +4087,6 @@ + if ( (last_visible != menu->upper_arrow_visible) && + !menu->upper_arrow_visible) + { +- menu->upper_arrow_prelight = FALSE; +- + /* If we hid the upper arrow, possibly remove timeout */ + if (menu->scroll_step < 0) + { +@@ -3704,8 +4104,6 @@ + if ( (last_visible != menu->lower_arrow_visible) && + !menu->lower_arrow_visible) + { +- menu->lower_arrow_prelight = FALSE; +- + /* If we hid the lower arrow, possibly remove timeout */ + if (menu->scroll_step > 0) + { +@@ -3792,12 +4190,14 @@ + &child_offset, &child_height, &last_child)) + { + guint vertical_padding; ++ gboolean double_arrows; + + y = menu->scroll_offset; + gdk_drawable_get_size (GTK_WIDGET (menu)->window, &width, &height); + + gtk_widget_style_get (GTK_WIDGET (menu), + "vertical-padding", &vertical_padding, ++ "double_arrows", &double_arrows, + NULL); + + height -= 2*GTK_CONTAINER (menu)->border_width + 2*GTK_WIDGET (menu)->style->ythickness + 2*vertical_padding; +@@ -3820,11 +4220,11 @@ + if (child_offset + child_height > y + height - arrow_height) + { + arrow_height = 0; +- if (!last_child && !menu->tearoff_active) ++ if ((!last_child && !menu->tearoff_active) || (double_arrows)) + arrow_height += MENU_SCROLL_ARROW_HEIGHT; + + y = child_offset + child_height - height + arrow_height; +- if ((y > 0) && !menu->tearoff_active) ++ if (((y > 0) && !menu->tearoff_active) || (double_arrows)) + { + /* Need upper arrow */ + arrow_height += MENU_SCROLL_ARROW_HEIGHT; +@@ -4374,3 +4774,60 @@ + return list; + } + ++/* Little help function for making some sanity tests on this menu. ++ * Checks that given widget really is a menu and that it has no name ++ * assigned to it yet. ++ * Names used to do hildon theming: ++ * HILDON_MENU_NAME_SHARP for menu with sharp upper corners ++ * HILDON_MENU_NAME_ROUND for menu with round corners ++ */ ++static gboolean ++gtk_menu_check_name (GtkWidget *widget) ++{ ++ gboolean legal_name = FALSE; ++ gchar **tmp = NULL; ++ const gchar *name = NULL; ++ static gchar *menu_names[] = { "GtkMenu", ++ HILDON_MENU_NAME_SHARP, ++ HILDON_MENU_NAME_ROUND, ++ HILDON_MENU_NAME_ROUND_FIRST_LEVEL, ++ NULL }; ++ if (GTK_IS_MENU (widget) && ++ (name = gtk_widget_get_name (widget))) ++ { ++ if (!g_ascii_strcasecmp (name, HILDON_MENU_NAME_FORCE_SHARP) || !g_ascii_strcasecmp (name, HILDON_MENU_NAME_FORCE_ROUND)) ++ return FALSE; ++ for (tmp = menu_names; *tmp; tmp++) ++ if (!g_ascii_strcasecmp (name, *tmp )) ++ { ++ legal_name = TRUE; ++ break; ++ } ++ } ++ ++ return legal_name; ++} ++ ++/* A function called when esc-key is pressed. */ ++static void ++_gtk_menu_close_current (GtkMenu * menu) ++{ ++ GtkMenuShell * shell = GTK_MENU_SHELL (menu); ++ ++ /* Check is a submenu of current menu item is visible. ++ * If it is, close that first. */ ++ if (shell->active_menu_item && (GTK_MENU_ITEM (shell->active_menu_item)->submenu) && GTK_WIDGET_VISIBLE (GTK_MENU_ITEM (shell->active_menu_item)->submenu)) ++ gtk_menu_popdown (GTK_MENU (GTK_MENU_ITEM (shell->active_menu_item)->submenu)); ++ else ++ gtk_menu_popdown (menu); ++ ++} ++ ++/* Hildon function to make context menus behave according to spec */ ++void ++_gtk_menu_enable_context_menu_behavior (GtkMenu *menu) ++{ ++ GtkMenuPrivate *priv = gtk_menu_get_private (menu); ++ ++ priv->context_menu = TRUE; ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenu.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenu.h.diff new file mode 100644 index 0000000000..fc29e7965e --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenu.h.diff @@ -0,0 +1,12 @@ +--- gtk+-2.6.4/gtk/gtkmenu.h 2004-05-06 10:35:26.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkmenu.h 2005-04-06 16:19:36.943922032 +0300 +@@ -200,6 +200,9 @@ + gint monitor_num); + GList* gtk_menu_get_for_attach_widget (GtkWidget *widget); + ++/* Private functions */ ++void _gtk_menu_enable_context_menu_behavior (GtkMenu *menu); ++ + #ifndef GTK_DISABLE_DEPRECATED + #define gtk_menu_append(menu,child) gtk_menu_shell_append ((GtkMenuShell *)(menu),(child)) + #define gtk_menu_prepend(menu,child) gtk_menu_shell_prepend ((GtkMenuShell *)(menu),(child)) diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenuitem.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenuitem.c.diff new file mode 100644 index 0000000000..7d8133e891 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenuitem.c.diff @@ -0,0 +1,457 @@ +--- gtk+-2.6.4/gtk/gtkmenuitem.c 2004-12-28 09:39:31.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmenuitem.c 2005-04-06 16:19:36.973917472 +0300 +@@ -24,6 +24,10 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++/* Modified for Nokia Oyj during 2002-2003. See CHANGES file for list ++ * of changes. ++ */ ++ + #define GTK_MENU_INTERNALS + + #include <config.h> +@@ -38,6 +42,9 @@ + #include "gtkmenuitem.h" + #include "gtkseparatormenuitem.h" + ++#define HILDON_HEIGHT_INCREMENT 1 ++#define HILDON_ARROW_SPACE 6 ++ + #define MENU_ITEM_CLASS(w) GTK_MENU_ITEM_CLASS (GTK_OBJECT (w)->klass) + + enum { +@@ -95,6 +102,8 @@ + guint signal_id); + + ++static void _gtk_menu_item_activate_submenus (GtkMenuItem *item); ++ + static GtkItemClass *parent_class; + static guint menu_item_signals[LAST_SIGNAL] = { 0 }; + +@@ -158,7 +167,9 @@ + item_class->select = gtk_real_menu_item_select; + item_class->deselect = gtk_real_menu_item_deselect; + +- klass->activate = NULL; ++ /* Hildon addition : Added this to catch the ++ * activation of meuuitems with submenus. */ ++ klass->activate = _gtk_menu_item_activate_submenus; + klass->activate_item = gtk_real_menu_item_activate_item; + klass->toggle_size_request = gtk_real_menu_item_toggle_size_request; + klass->toggle_size_allocate = gtk_real_menu_item_toggle_size_allocate; +@@ -239,6 +250,16 @@ + G_MAXINT, + 10, + G_PARAM_READABLE)); ++ ++ /* Hildon modification - allow themeing of separator height */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("separator_height", ++ "Separator height", ++ "Draw a separator graphics with height of x pixels.", ++ 0, ++ G_MAXINT, ++ 5, ++ G_PARAM_READABLE)); + } + + static void +@@ -415,6 +436,13 @@ + g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); + + gtk_item_select (GTK_ITEM (menu_item)); ++ /* HILDON MOD. This is required as changed focus isn't drawn automatically ++ * and drawing it must be requested. */ ++ if ((GTK_WIDGET(menu_item)->parent) && GTK_IS_MENU (GTK_WIDGET(menu_item)->parent)) ++ { ++ GtkMenu *menu = GTK_MENU (GTK_WIDGET(menu_item)->parent); ++ if (menu->parent_menu_item) gtk_widget_queue_draw(GTK_WIDGET(menu->parent_menu_item)); ++ } + } + + void +@@ -423,6 +451,13 @@ + g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); + + gtk_item_deselect (GTK_ITEM (menu_item)); ++ /* HILDON MOD. This is required as changed focus isn't drawn automatically ++ * and drawing it must be requested. */ ++ if ((GTK_WIDGET(menu_item)->parent) && GTK_IS_MENU (GTK_WIDGET(menu_item)->parent)) ++ { ++ GtkMenu *menu = GTK_MENU (GTK_WIDGET(menu_item)->parent); ++ if (menu->parent_menu_item) gtk_widget_queue_draw(GTK_WIDGET(menu->parent_menu_item)); ++ } + } + + void +@@ -531,7 +566,7 @@ + "arrow_spacing", &arrow_spacing, + NULL); + +- requisition->width += child_requisition.height; ++ requisition->width += child_requisition.height + HILDON_ARROW_SPACE; + requisition->width += arrow_spacing; + + requisition->width = MAX (requisition->width, get_minimum_width (widget)); +@@ -543,6 +578,12 @@ + requisition->height += 4; + } + ++ /* We get correct focus size if we make the widget a bit bigger. ++ * (If the increment would be big, we should probably adjust the text ++ * position aswell.) ++ */ ++ requisition->height += HILDON_HEIGHT_INCREMENT; ++ + accel_width = 0; + gtk_container_foreach (GTK_CONTAINER (menu_item), + gtk_menu_item_accel_width_foreach, +@@ -596,7 +637,8 @@ + { + if (direction == GTK_TEXT_DIR_RTL) + child_allocation.x += child_requisition.height; +- child_allocation.width -= child_requisition.height; ++ /* HILDON Modification. */ ++ child_allocation.width -= child_requisition.height + HILDON_ARROW_SPACE; + } + + if (child_allocation.width < 1) +@@ -688,6 +730,7 @@ + GtkShadowType shadow_type, selected_shadow_type; + gint width, height; + gint x, y; ++ + gint border_width = GTK_CONTAINER (widget)->border_width; + + if (GTK_WIDGET_DRAWABLE (widget)) +@@ -704,10 +747,56 @@ + if ((state_type == GTK_STATE_PRELIGHT) && + (GTK_BIN (menu_item)->child)) + { ++ gint focus_x = x; ++ gint focus_width = width; + gtk_widget_style_get (widget, + "selected_shadow_type", &selected_shadow_type, + NULL); +- gtk_paint_box (widget->style, ++ ++ if (menu_item->submenu && menu_item->show_submenu_indicator) ++ { ++ GtkRequisition child_requisition; ++ gint arrow_size; ++ /* gint arrow_extent; */ ++ gtk_widget_get_child_requisition (GTK_BIN (menu_item)->child, ++ &child_requisition); ++ ++ arrow_size = child_requisition.height - 2 * widget->style->ythickness; ++ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) { ++ focus_width = x + width - arrow_size - 2 - HILDON_ARROW_SPACE; ++ } ++ else { ++ focus_x = x + arrow_size + 2 + HILDON_ARROW_SPACE; ++ } ++ } ++ ++ /* ++ * Hildon modification: ++ * This draws different focus depending on if it's the toplevel ++ * focused menu item. All items that have submenus that in turn ++ * have an item selected will be drawn with SELECTED - state focus. ++ * If this isn't the case, PRELIGHT - state focus is used. */ ++ if (menu_item->submenu) ++ { ++ GtkMenuItem *msi; ++ msi = GTK_MENU_ITEM(GTK_MENU_SHELL(&((GTK_MENU(menu_item->submenu))->menu_shell))->active_menu_item); ++ if ((msi == NULL) || (GTK_WIDGET (msi)->state == 0)) ++ gtk_paint_box (widget->style, ++ widget->window, ++ GTK_STATE_PRELIGHT, ++ selected_shadow_type, ++ area, widget, "menuitem", ++ focus_x, y, focus_width, height); ++ else ++ gtk_paint_box (widget->style, ++ widget->window, ++ GTK_STATE_SELECTED, ++ selected_shadow_type, ++ area, widget, "menuitem", ++ focus_x, y, focus_width, height); ++ } ++ else ++ gtk_paint_box (widget->style, + widget->window, + GTK_STATE_PRELIGHT, + selected_shadow_type, +@@ -747,8 +836,12 @@ + arrow_extent = arrow_size * 0.8; + + shadow_type = GTK_SHADOW_OUT; +- if (state_type == GTK_STATE_PRELIGHT) +- shadow_type = GTK_SHADOW_IN; ++ /*Hildon: only show the pressed arrow if the submenu is visible*/ ++ if (state_type == GTK_STATE_PRELIGHT ++ && GTK_WIDGET_VISIBLE( menu_item->submenu)) ++ { ++ shadow_type = GTK_SHADOW_IN; ++ } + + if (direction == GTK_TEXT_DIR_LTR) + { +@@ -763,6 +856,9 @@ + + arrow_y = y + (height - arrow_extent) / 2; + ++/* HILDON modification to correct focus drawing with submenu arrow */ ++ arrow_x = arrow_x - 4; ++ + gtk_paint_arrow (widget->style, widget->window, + state_type, shadow_type, + area, widget, "menuitem", +@@ -772,18 +868,20 @@ + } + else if (!GTK_BIN (menu_item)->child) + { +- guint horizontal_padding; ++ guint horizontal_padding, separator_height; + + gtk_widget_style_get (widget, + "horizontal_padding", &horizontal_padding, ++ "separator_height", &separator_height, + NULL); + +- gtk_paint_hline (widget->style, widget->window, GTK_STATE_NORMAL, +- area, widget, "menuitem", +- widget->allocation.x + horizontal_padding + widget->style->xthickness, +- widget->allocation.x + widget->allocation.width - horizontal_padding - widget->style->xthickness - 1, +- widget->allocation.y + (widget->allocation.height - +- widget->style->ythickness) / 2); ++ /* themable menuitem for menu separators */ ++ gtk_paint_box (widget->style, widget->window, GTK_STATE_NORMAL, GTK_SHADOW_NONE, ++ area, widget, "separator", ++ widget->allocation.x + horizontal_padding + widget->style->xthickness, ++ widget->allocation.y + (widget->allocation.height - widget->style->ythickness) / 2, ++ widget->allocation.x + widget->allocation.width - horizontal_padding - widget->style->xthickness - 1, ++ separator_height); + } + } + } +@@ -839,6 +937,7 @@ + (!GTK_WIDGET_MAPPED (menu_item->submenu) || + GTK_MENU (menu_item->submenu)->tearoff_active)) + { ++ GdkEvent *event = gtk_get_current_event (); + gint popup_delay; + + if (menu_item->timer) +@@ -851,26 +950,40 @@ + popup_delay = get_popup_delay (menu_item); + + if (popup_delay > 0) +- { +- GdkEvent *event = gtk_get_current_event (); +- +- menu_item->timer = g_timeout_add (popup_delay, +- gtk_menu_item_select_timeout, +- menu_item); +- if (event && +- event->type != GDK_BUTTON_PRESS && +- event->type != GDK_ENTER_NOTIFY) +- menu_item->timer_from_keypress = TRUE; +- else +- menu_item->timer_from_keypress = FALSE; +- +- if (event) +- gdk_event_free (event); +- } ++ { ++ /* OK, Here comes the contender for the 2003 Ugly Award ++ * The popup delay is set small enough to be unnoticable, but high enough to not ++ * notice the flickering which occurs when we close all the deepest menu's Gtk+ helpfully ++ * expands but are not needed ++ * This does not fix the mouse navigation yet (bug 18) but should take care of 442 ++ * NOTE: test the delay factor on different CPU speeds ++ */ ++ popup_delay = 3; ++ /* Hildon: Disabling the automatic opening of submenus. */ ++ ++ if (event && ++ event->type != GDK_BUTTON_PRESS && ++ event->type != GDK_ENTER_NOTIFY && ++ event->type != GDK_MOTION_NOTIFY) /*hildon: for some reason, the event is sometimes this and not enter!*/ ++ menu_item->timer_from_keypress = TRUE; ++ else if (event) ++ { ++ /* mouse/pen events */ ++ /* here is a problem -- when a menu item with sub menus gets a mouse event, ++ another event is generated for the submenu (and further its submenu etc.) ++ This leads to a behaviour which does not comply to the hildon spec. */ ++ menu_item->timer_from_keypress = FALSE; ++ } ++ else /* does this really happen? */ ++ menu_item->timer_from_keypress = FALSE; ++ } + else +- _gtk_menu_item_popup_submenu (GTK_WIDGET (menu_item)); ++ _gtk_menu_item_popup_submenu (menu_item); ++ ++ if (event) ++ gdk_event_free (event); + } +- ++ + gtk_widget_set_state (GTK_WIDGET (menu_item), GTK_STATE_PRELIGHT); + gtk_widget_queue_draw (GTK_WIDGET (menu_item)); + } +@@ -878,25 +991,16 @@ + static void + gtk_real_menu_item_deselect (GtkItem *item) + { +- GtkMenuItem *menu_item; ++ GtkWidget *menu_item; + + g_return_if_fail (GTK_IS_MENU_ITEM (item)); + +- menu_item = GTK_MENU_ITEM (item); ++ menu_item = GTK_WIDGET (item); + +- if (menu_item->submenu) +- { +- if (menu_item->timer) +- { +- g_source_remove (menu_item->timer); +- menu_item->timer = 0; +- } +- else +- gtk_menu_popdown (GTK_MENU (menu_item->submenu)); +- } ++ _gtk_menu_item_popdown_submenu (menu_item); + +- gtk_widget_set_state (GTK_WIDGET (menu_item), GTK_STATE_NORMAL); +- gtk_widget_queue_draw (GTK_WIDGET (menu_item)); ++ gtk_widget_set_state (menu_item, GTK_STATE_NORMAL); ++ gtk_widget_queue_draw (menu_item); + } + + static gboolean +@@ -941,10 +1045,7 @@ + _gtk_menu_shell_activate (menu_shell); + + gtk_menu_shell_select_item (GTK_MENU_SHELL (widget->parent), widget); +- _gtk_menu_item_popup_submenu (widget); +- +- gtk_menu_shell_select_first (GTK_MENU_SHELL (menu_item->submenu), TRUE); +- submenu = GTK_MENU_SHELL (menu_item->submenu); ++ /* Hildon mod: automatic submenu opening has been removed */ + } + } + } +@@ -983,7 +1084,7 @@ + { + _gtk_menu_item_popup_submenu (GTK_WIDGET (menu_item)); + if (menu_item->timer_from_keypress && menu_item->submenu) +- GTK_MENU_SHELL (menu_item->submenu)->ignore_enter = TRUE; ++ GTK_MENU_SHELL (menu_item->submenu)->ignore_enter = TRUE; + } + + GDK_THREADS_LEAVE (); +@@ -1002,7 +1103,16 @@ + g_source_remove (menu_item->timer); + menu_item->timer = 0; + ++ /* HILDON MOD. This is required as changed submenu arrow isn't drawn automatically ++ * and drawing it must be requested. */ ++ gtk_widget_queue_draw (widget); ++ + if (GTK_WIDGET_IS_SENSITIVE (menu_item->submenu)) ++ { ++ gboolean take_focus; ++ take_focus = gtk_menu_shell_get_take_focus (GTK_MENU_SHELL (widget->parent)); ++ gtk_menu_shell_set_take_focus (GTK_MENU_SHELL (menu_item->submenu),take_focus); ++ + gtk_menu_popup (GTK_MENU (menu_item->submenu), + widget->parent, + widget, +@@ -1010,6 +1120,28 @@ + menu_item, + GTK_MENU_SHELL (widget->parent)->button, + 0); ++ } ++} ++ ++void ++_gtk_menu_item_popdown_submenu (GtkWidget *widget) ++{ ++ GtkMenuItem *menu_item; ++ ++ menu_item = GTK_MENU_ITEM (widget); ++ ++ if (menu_item->submenu) ++ { ++ if (menu_item->timer) ++ { ++ g_source_remove (menu_item->timer); ++ menu_item->timer = 0; ++ } ++ else ++ gtk_menu_popdown (GTK_MENU (menu_item->submenu)); ++ } ++ ++ gtk_widget_queue_draw (widget); + } + + static void +@@ -1092,14 +1224,17 @@ + tx += widget->allocation.width - twidth; + } + ++/* HILDON modifications ++ * Here we make the submenu of an menubar appear under the menubar. ++ * The only exception is when the resulting menu would be under 100 pixels ++ * high. In that case, the menu is made 100 pixels high. ++ */ + if ((ty + widget->allocation.height + theight) <= monitor.y + monitor.height) + ty += widget->allocation.height; +- else if ((ty - theight) >= monitor.y) +- ty -= theight; +- else if (monitor.y + monitor.height - (ty + widget->allocation.height) > ty) ++ else if ((ty + widget->allocation.height) < monitor.y + monitor.height - 120) + ty += widget->allocation.height; + else +- ty -= theight; ++ ty = monitor.y + monitor.height - 120; + break; + + case GTK_LEFT_RIGHT: +@@ -1404,3 +1539,30 @@ + + return TRUE; + } ++ ++/* Hildon modification : ++ * This function exists only for opening submenus on ++ * activation. */ ++static void ++_gtk_menu_item_activate_submenus (GtkMenuItem *item) ++{ ++ GdkEvent *event; ++ ++ g_return_if_fail (GTK_IS_MENU_ITEM (item)); ++ ++ if (!GTK_IS_MENU (item->submenu) || ++ GTK_WIDGET_VISIBLE (item->submenu)) ++ return; ++ ++ event = gtk_get_current_event (); ++ _gtk_menu_item_popup_submenu (item); ++ ++ /* We don't want to select first item if the submenu ++ * is opened with mouse release because the selection ++ * would move straigh back under the cursor. */ ++ if ((event == NULL) || (event->type != GDK_BUTTON_RELEASE)) ++ gtk_menu_shell_select_first (GTK_MENU_SHELL (item->submenu), TRUE); ++ ++ if (event) ++ gdk_event_free (event); ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenuitem.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenuitem.h.diff new file mode 100644 index 0000000000..cece91e70c --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenuitem.h.diff @@ -0,0 +1,10 @@ +--- gtk+-2.6.4/gtk/gtkmenuitem.h 2004-12-15 18:27:30.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmenuitem.h 2005-04-06 16:19:36.983915952 +0300 +@@ -122,6 +122,7 @@ + gboolean group_changed); + gboolean _gtk_menu_item_is_selectable (GtkWidget *menu_item); + void _gtk_menu_item_popup_submenu (GtkWidget *menu_item); ++void _gtk_menu_item_popdown_submenu (GtkWidget *menu_item); + + #ifndef GTK_DISABLE_DEPRECATED + #define gtk_menu_item_right_justify(menu_item) gtk_menu_item_set_right_justified ((menu_item), TRUE) diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenushell.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenushell.c.diff new file mode 100644 index 0000000000..3534b7716d --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenushell.c.diff @@ -0,0 +1,490 @@ +--- gtk+-2.6.4/gtk/gtkmenushell.c 2005-02-09 18:46:54.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmenushell.c 2005-04-06 16:19:36.999913520 +0300 +@@ -39,6 +39,8 @@ + #include "gtkmnemonichash.h" + #include "gtktearoffmenuitem.h" + #include "gtkwindow.h" ++#include "gtkprivate.h" ++#include "gtkintl.h" + + #define MENU_SHELL_TIMEOUT 500 + +@@ -52,6 +54,11 @@ + LAST_SIGNAL + }; + ++enum { ++ PROP_0, ++ PROP_TAKE_FOCUS ++}; ++ + typedef void (*GtkMenuShellSignal1) (GtkObject *object, + GtkMenuDirectionType arg1, + gpointer data); +@@ -122,10 +129,20 @@ + { + GtkMnemonicHash *mnemonic_hash; + GtkKeyHash *key_hash; ++ gboolean activated_submenu; ++ gboolean take_focus; + }; + + static void gtk_menu_shell_class_init (GtkMenuShellClass *klass); + static void gtk_menu_shell_init (GtkMenuShell *menu_shell); ++static void gtk_menu_shell_set_property (GObject *object, ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec); ++static void gtk_menu_shell_get_property (GObject *object, ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec); + static void gtk_menu_shell_realize (GtkWidget *widget); + static void gtk_menu_shell_finalize (GObject *object); + static gint gtk_menu_shell_button_press (GtkWidget *widget, +@@ -176,7 +193,6 @@ + static GtkContainerClass *parent_class = NULL; + static guint menu_shell_signals[LAST_SIGNAL] = { 0 }; + +- + GType + gtk_menu_shell_get_type (void) + { +@@ -220,6 +236,8 @@ + container_class = (GtkContainerClass*) klass; + + parent_class = g_type_class_peek_parent (klass); ++ object_class->set_property = gtk_menu_shell_set_property; ++ object_class->get_property = gtk_menu_shell_get_property; + + object_class->finalize = gtk_menu_shell_finalize; + +@@ -299,9 +317,15 @@ + + + binding_set = gtk_binding_set_by_class (klass); ++/* Hildon : The following binding is commented out ++ * because we want the Escape key to only exit the ++ * currently opened submenu. Therefore, the handling ++ * of esc-key will be moved to gtkmenuitem.c */ ++/* + gtk_binding_entry_add_signal (binding_set, + GDK_Escape, 0, + "cancel", 0); ++*/ + gtk_binding_entry_add_signal (binding_set, + GDK_Return, 0, + "activate_current", 1, +@@ -330,7 +354,23 @@ + GDK_F10, GDK_SHIFT_MASK, + "cycle_focus", 1, + GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD); +- ++ /** ++ * GtkMenuShell:take-focus: ++ * ++ * A boolean that determines whether the menu and its submenus grab the ++ * keyboard focus. See gtk_menu_shell_set_take_focus() and ++ * gtk_menu_shell_get_take_focus(). ++ * ++ * Since: 2.8 ++ **/ ++ g_object_class_install_property (object_class, ++ PROP_TAKE_FOCUS, ++ g_param_spec_boolean ("take-focus", ++ P_("Take Focus"), ++ P_("A boolean that determines whether the menu grabs the keyboard focus"), ++ TRUE, ++ G_PARAM_READWRITE)); ++ + g_type_class_add_private (object_class, sizeof (GtkMenuShellPrivate)); + } + +@@ -356,6 +396,46 @@ + + priv->mnemonic_hash = NULL; + priv->key_hash = NULL; ++ priv->take_focus = TRUE; ++ priv->activated_submenu = FALSE; ++} ++ ++static void ++gtk_menu_shell_set_property (GObject *object, ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec) ++{ ++ GtkMenuShell *menu_shell = GTK_MENU_SHELL (object); ++ ++ switch (prop_id) ++ { ++ case PROP_TAKE_FOCUS: ++ gtk_menu_shell_set_take_focus (menu_shell, g_value_get_boolean (value)); ++ break; ++ default: ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); ++ break; ++ } ++} ++ ++static void ++gtk_menu_shell_get_property (GObject *object, ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec) ++{ ++ GtkMenuShell *menu_shell = GTK_MENU_SHELL (object); ++ ++ switch (prop_id) ++ { ++ case PROP_TAKE_FOCUS: ++ g_value_set_boolean (value, gtk_menu_shell_get_take_focus (menu_shell)); ++ break; ++ default: ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); ++ break; ++ } + } + + static void +@@ -470,6 +550,7 @@ + gtk_menu_shell_button_press (GtkWidget *widget, + GdkEventButton *event) + { ++ GtkMenuShellPrivate *priv; + GtkMenuShell *menu_shell; + GtkWidget *menu_item; + +@@ -479,7 +560,22 @@ + if (event->type != GDK_BUTTON_PRESS) + return FALSE; + ++ priv = GTK_MENU_SHELL_GET_PRIVATE (widget); ++ + menu_shell = GTK_MENU_SHELL (widget); ++ menu_item = gtk_menu_shell_get_item (menu_shell, (GdkEvent*) event); ++ ++ if (menu_shell->active && menu_item && ++ (menu_shell->active_menu_item == menu_item) && ++ _gtk_menu_item_is_selectable (menu_item) && ++ GTK_MENU_ITEM (menu_item)->submenu != NULL && ++ !GTK_WIDGET_VISIBLE (GTK_MENU_ITEM (menu_item)->submenu)) ++ { ++ /* Hildon : We want to be able to activate submenu items. */ ++ gtk_menu_shell_activate_item (menu_shell, menu_item, FALSE); ++ ++ priv->activated_submenu = TRUE; ++ } + + if (menu_shell->parent_menu_shell) + { +@@ -491,30 +587,29 @@ + + menu_shell->button = event->button; + +- menu_item = gtk_menu_shell_get_item (menu_shell, (GdkEvent *)event); +- + if (menu_item && _gtk_menu_item_is_selectable (menu_item)) +- { +- if ((menu_item->parent == widget) && +- (menu_item != menu_shell->active_menu_item)) +- { +- if (GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement == GTK_TOP_BOTTOM) +- { +- menu_shell->activate_time = event->time; +- } ++ { ++ ++ if ((menu_item->parent == widget) && ++ (menu_item != menu_shell->active_menu_item)) ++ { ++ 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); +- } +- } ++ gtk_menu_shell_select_item (menu_shell, menu_item); ++ } ++ } + } + else + { + widget = gtk_get_event_widget ((GdkEvent*) event); + if (widget == GTK_WIDGET (menu_shell)) +- { +- gtk_menu_shell_deactivate (menu_shell); +- g_signal_emit (menu_shell, menu_shell_signals[SELECTION_DONE], 0); +- } ++ { ++ gtk_menu_shell_deactivate (menu_shell); ++ g_signal_emit (menu_shell, menu_shell_signals[SELECTION_DONE], 0); ++ } + } + + return TRUE; +@@ -524,13 +619,20 @@ + gtk_menu_shell_button_release (GtkWidget *widget, + GdkEventButton *event) + { ++ GtkMenuShellPrivate *priv; + GtkMenuShell *menu_shell; + GtkWidget *menu_item; + gint deactivate; ++ gboolean activated_submenu; + + g_return_val_if_fail (GTK_IS_MENU_SHELL (widget), FALSE); + g_return_val_if_fail (event != NULL, FALSE); + ++ priv = GTK_MENU_SHELL_GET_PRIVATE (widget); ++ ++ activated_submenu = priv->activated_submenu; ++ priv->activated_submenu = FALSE; ++ + menu_shell = GTK_MENU_SHELL (widget); + if (menu_shell->active) + { +@@ -556,11 +658,11 @@ + gtk_menu_shell_activate_item (menu_shell, menu_item, TRUE); + return TRUE; + } +- else if (GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement != GTK_TOP_BOTTOM) +- { +- gtk_menu_item_select (GTK_MENU_ITEM (menu_item)); +- return TRUE; +- } ++ else if (!activated_submenu) ++ { ++ /* popdown the submenu if we didn't pop it up in this click */ ++ _gtk_menu_item_popdown_submenu (menu_item); ++ } + } + else if (menu_item && + !_gtk_menu_item_is_selectable (menu_item) && +@@ -630,12 +732,14 @@ + gtk_menu_shell_enter_notify (GtkWidget *widget, + GdkEventCrossing *event) + { ++ GtkMenuShellPrivate *priv; + GtkMenuShell *menu_shell; + GtkWidget *menu_item; + + g_return_val_if_fail (GTK_IS_MENU_SHELL (widget), FALSE); + g_return_val_if_fail (event != NULL, FALSE); + ++ priv = GTK_MENU_SHELL_GET_PRIVATE (widget); + menu_shell = GTK_MENU_SHELL (widget); + + if (menu_shell->active) +@@ -658,6 +762,17 @@ + (GTK_WIDGET_STATE (menu_item) != GTK_STATE_PRELIGHT)) + { + gtk_menu_shell_select_item (menu_shell, menu_item); ++ ++ /* If the pen is down, and there is a submenu that is not ++ * yet visible, activate it */ ++ if ((event->state & GDK_BUTTON1_MASK) && ++ GTK_MENU_ITEM (menu_item)->submenu != NULL && ++ !GTK_WIDGET_VISIBLE (GTK_MENU_ITEM (menu_item)->submenu)) ++ { ++ gtk_menu_shell_activate_item (menu_shell, menu_item, FALSE); ++ ++ priv->activated_submenu = TRUE; ++ } + } + } + else if (menu_shell->parent_menu_shell) +@@ -887,8 +1002,14 @@ + /* This allows the bizarre radio buttons-with-submenus-display-history + * behavior + */ ++ /* Hildon modification. We probably won't have those ++ * bizarre radio buttons-with-submenus so we don't ++ * need this. Also, this functionality interferes with ++ * other functionality. */ ++/* + if (GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu) + gtk_widget_activate (menu_shell->active_menu_item); ++*/ + } + + void +@@ -919,7 +1040,9 @@ + + g_object_ref (menu_shell); + +- if (deactivate) ++ /* We don't want to deactivate if we're activating ++ * a submenu item. */ ++ if ((deactivate) && (GTK_MENU_ITEM (menu_item)->submenu == NULL)) + { + GtkMenuShell *parent_menu_shell = menu_shell; + +@@ -965,29 +1088,30 @@ + + if (distance > 0) + { ++ /*Hildon: selection no longer wraps around at the ++ *bottom of the menu*/ ++ + node = node->next; +- while (node != start_node && +- (!node || !_gtk_menu_item_is_selectable (node->data))) ++ while (node && node != start_node && ++ !_gtk_menu_item_is_selectable (node->data)) + { +- if (!node) +- node = menu_shell->children; +- else + node = node->next; + } + } + else + { ++ /*Hildon: selection no longer wraps around at the top ++ *of the menu*/ ++ + node = node->prev; +- while (node != start_node && +- (!node || !_gtk_menu_item_is_selectable (node->data))) ++ while (node && node != start_node && ++ !_gtk_menu_item_is_selectable (node->data)) + { +- if (!node) +- node = g_list_last (menu_shell->children); +- else + node = node->prev; + } + } + ++ /*note: gtk_menu_shell_select_item won't select non-selectable items*/ + if (node) + gtk_menu_shell_select_item (menu_shell, node->data); + } +@@ -1119,6 +1243,16 @@ + switch (direction) + { + case GTK_MENU_DIR_PARENT: ++ ++ if(!parent_menu_shell || GTK_IS_MENU_BAR(parent_menu_shell)) ++ break; ++ ++ /* hildon-modification - menu should be closed when returning from submenu. ++ * WARNING: This function is from GtkMenu, which normally ++ * shouldn't be called from GtkMenuShell, but currently ++ * there are no better alternatives. */ ++ gtk_menu_popdown (GTK_MENU (menu_shell)); ++ + if (parent_menu_shell) + { + if (GTK_MENU_SHELL_GET_CLASS (parent_menu_shell)->submenu_placement == +@@ -1151,10 +1285,14 @@ + _gtk_menu_item_is_selectable (menu_shell->active_menu_item) && + GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu) + { ++ /* Hildon-modification -- submenu is not opened automatically but needs to be explicitly opened*/ ++ g_signal_emit (G_OBJECT (menu_shell), menu_shell_signals[ACTIVATE_CURRENT], 0, (gint) FALSE); ++ + if (gtk_menu_shell_select_submenu_first (menu_shell)) + break; + } + ++#if 0 + /* Try to find a menu running the opposite direction */ + while (parent_menu_shell && + (GTK_MENU_SHELL_GET_CLASS (parent_menu_shell)->submenu_placement == +@@ -1173,6 +1311,7 @@ + gtk_menu_shell_move_selected (parent_menu_shell, 1); + gtk_menu_shell_select_submenu_first (parent_menu_shell); + } ++#endif + break; + + case GTK_MENU_DIR_PREV: +@@ -1197,8 +1336,8 @@ + gtk_real_menu_shell_activate_current (GtkMenuShell *menu_shell, + gboolean force_hide) + { +- if (menu_shell->active_menu_item && +- _gtk_menu_item_is_selectable (menu_shell->active_menu_item)) ++ if (menu_shell->active_menu_item)/* && ++ _gtk_menu_item_is_selectable (menu_shell->active_menu_item)) */ + { + + if (GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu == NULL) +@@ -1390,4 +1529,73 @@ + keyval, target); + gtk_menu_shell_reset_key_hash (menu_shell); + } ++/** ++ * gtk_menu_shell_get_take_focus: ++ * @menu: a #GtkMenuShell ++ * ++ * @returns: %TRUE if the menu_shell will take the keyboard focus on popup. ++ * ++ * Since: 2.8 ++ **/ ++gboolean ++gtk_menu_shell_get_take_focus (GtkMenuShell *menu_shell) ++{ ++ GtkMenuShellPrivate *priv; ++ ++ g_return_val_if_fail (GTK_IS_MENU_SHELL (menu_shell), FALSE); ++ ++ priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell); ++ ++ return priv->take_focus; ++} ++ ++/** ++ * gtk_menu_shell_set_take_focus: ++ * @menu: a #GtkMenuShell ++ * @take_focus: %TRUE if the menu_shell should take the keyboard focus on popup. ++ * ++ * If @take_focus is %TRUE (the default) the menu will take the keyboard focus ++ * so that it will receive all keyboard events which is needed to enable ++ * keyboard navigation in menus. ++ * ++ * Setting @take_focus to %FALSE is useful only for special applications ++ * like virtual keyboard implementations which should not take keyboard ++ * focus. ++ * ++ * The @take_focus state of a menu or menu bar is automatically propagated ++ * to submenus whenever a submenu is popped up, so you don't have to worry ++ * about recursively setting it for your entire menu hierarchy. Only when ++ * programmatically picking a submenu and popping it up manually, the ++ * @take_focus property of the submenu needs to be set explicitely. ++ * ++ * Note that setting it to %FALSE has side-effects: ++ * ++ * If the focus is in some other app, it keeps the focus and keynav in ++ * the menu doesn't work. Consequently, keynav on the menu will only ++ * work if the focus is on some toplevel owned by the onscreen keyboard. ++ * ++ * To avoid confusing the user, menus with @take_focus set to %FALSE ++ * should not display mnemonics or accelerators, since it cannot be ++ * guaranteed that they will work. ++ * ++ * See also gdk_keyboard_grab() ++ * ++ * Since: 2.8 ++ **/ ++void ++gtk_menu_shell_set_take_focus (GtkMenuShell *menu_shell, ++ gboolean take_focus) ++{ ++ GtkMenuShellPrivate *priv; ++ ++ g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell)); ++ ++ priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell); ++ ++ if (priv->take_focus != take_focus) ++ { ++ priv->take_focus = take_focus; ++ g_object_notify (G_OBJECT (menu_shell), "take-focus"); ++ } ++} + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenushell.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenushell.h.diff new file mode 100644 index 0000000000..4bd7fc547c --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkmenushell.h.diff @@ -0,0 +1,12 @@ +--- gtk+-2.6.4/gtk/gtkmenushell.h 2004-12-11 00:09:22.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkmenushell.h 2005-04-06 16:19:36.999913520 +0300 +@@ -124,6 +124,9 @@ + void _gtk_menu_shell_remove_mnemonic (GtkMenuShell *menu_shell, + guint keyval, + GtkWidget *target); ++gboolean gtk_menu_shell_get_take_focus (GtkMenuShell *menu_shell); ++void gtk_menu_shell_set_take_focus (GtkMenuShell *menu_shell, ++ gboolean take_focus); + + #ifdef __cplusplus + } diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtknotebook.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtknotebook.c.diff new file mode 100644 index 0000000000..4f75106938 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtknotebook.c.diff @@ -0,0 +1,831 @@ +--- gtk+-2.6.4/gtk/gtknotebook.c 2004-09-27 06:43:55.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtknotebook.c 2005-04-06 16:19:37.033908352 +0300 +@@ -40,10 +40,10 @@ + + #define TAB_OVERLAP 2 + #define TAB_CURVATURE 1 +-#define ARROW_SIZE 12 ++#define ARROW_WIDTH 20 ++#define ARROW_HEIGHT 27 + #define ARROW_SPACING 0 +-#define NOTEBOOK_INIT_SCROLL_DELAY (200) +-#define NOTEBOOK_SCROLL_DELAY (100) ++#define LABEL_PADDING 0 + + + enum { +@@ -57,7 +57,9 @@ + + enum { + STEP_PREV, +- STEP_NEXT ++ STEP_NEXT, ++ STEP_PREV_CYCLE, ++ STEP_NEXT_CYCLE + }; + + typedef enum +@@ -216,7 +218,7 @@ + GList *list, + gboolean destroying); + static void gtk_notebook_update_labels (GtkNotebook *notebook); +-static gint gtk_notebook_timer (GtkNotebook *notebook); ++static gint gtk_notebook_timer (GtkNotebook *notebook ); + static gint gtk_notebook_page_compare (gconstpointer a, + gconstpointer b); + static GList* gtk_notebook_find_child (GtkNotebook *notebook, +@@ -458,7 +460,7 @@ + g_param_spec_boolean ("scrollable", + P_("Scrollable"), + P_("If TRUE, scroll arrows are added if there are too many tabs to fit"), +- FALSE, ++ TRUE, + G_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, + PROP_ENABLE_POPUP, +@@ -584,6 +586,75 @@ + + G_PARAM_READABLE)); + ++ /* Hildon: for adding paddings to the inner borders of the visible page */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("inner_left_border", ++ _("Inner left border of the visible page"), ++ _("Width of inner left border of the visible page"), ++ 0, ++ G_MAXINT, ++ 0, ++ G_PARAM_READABLE)); ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("inner_right_border", ++ _("Inner right border of the visible page"), ++ _("Width of inner right border of the visible page"), ++ 0, ++ G_MAXINT, ++ 0, ++ G_PARAM_READABLE)); ++ ++ /* Hildon: previously hardcoded constants ARROW_WIDTH, ARROW_HEIGHT, ++ ARROW_SPACING, TAB_OVERLAP and TAB_CURVATURE are now style properties */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("arrow-width", ++ _("Arrow width"), ++ _("Scroll arrow width"), ++ 0, ++ G_MAXINT, ++ ARROW_WIDTH, ++ G_PARAM_READABLE)); ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("arrow-height", ++ _("Arrow height"), ++ _("Scroll arrow height"), ++ 0, ++ G_MAXINT, ++ ARROW_HEIGHT, ++ G_PARAM_READABLE)); ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("arrow-spacing", ++ _("Arrow spacing"), ++ _("Scroll arrow spacing"), ++ 0, ++ G_MAXINT, ++ ARROW_SPACING, ++ G_PARAM_READABLE)); ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("tab-overlap", ++ _("Tab overlap"), ++ _("Tab overlap"), ++ 0, ++ G_MAXINT, ++ TAB_OVERLAP, ++ G_PARAM_READABLE)); ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("tab-curvature", ++ _("Tab curvature"), ++ _("Tab curvature"), ++ 0, ++ G_MAXINT, ++ TAB_CURVATURE, ++ G_PARAM_READABLE)); ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("label-padding", ++ _("Label padding"), ++ _("Label padding"), ++ 0, ++ G_MAXINT, ++ LABEL_PADDING, ++ G_PARAM_READABLE)); ++ + notebook_signals[SWITCH_PAGE] = + g_signal_new ("switch_page", + G_TYPE_FROM_CLASS (gobject_class), +@@ -705,11 +776,10 @@ + notebook->show_tabs = TRUE; + notebook->show_border = TRUE; + notebook->tab_pos = GTK_POS_TOP; +- notebook->scrollable = FALSE; ++ notebook->scrollable = TRUE; + notebook->in_child = 0; + notebook->click_child = 0; + notebook->button = 0; +- notebook->need_timer = 0; + notebook->child_has_focus = FALSE; + notebook->have_visible_child = FALSE; + notebook->focus_out = FALSE; +@@ -1189,9 +1259,18 @@ + GtkRequisition child_requisition; + gboolean switch_page = FALSE; + gint vis_pages; +- gint focus_width; ++ gint focus_width, label_padding; ++ gint arrow_width, arrow_height, arrow_spacing, tab_overlap, tab_curvature; + +- gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL); ++ gtk_widget_style_get (widget, ++ "focus-line-width", &focus_width, ++ "arrow-width", &arrow_width, ++ "arrow-height", &arrow_height, ++ "arrow-spacing", &arrow_spacing, ++ "tab-overlap", &tab_overlap, ++ "tab-curvature", &tab_curvature, ++ "label-padding", &label_padding, ++ NULL); + + widget->requisition.width = 0; + widget->requisition.height = 0; +@@ -1229,6 +1308,22 @@ + { + widget->requisition.width += widget->style->xthickness * 2; + widget->requisition.height += widget->style->ythickness * 2; ++ ++ /* Hildon kludge: inner border paddings */ ++ if (notebook->children && notebook->show_border) ++ { ++ gint inner_left_border, inner_right_border; ++ ++ gtk_widget_style_get (widget, ++ "inner_left_border", ++ &inner_left_border, ++ "inner_right_border", ++ &inner_right_border, ++ NULL); ++ ++ widget->requisition.width += inner_left_border + inner_right_border; ++ } ++ + + if (notebook->show_tabs) + { +@@ -1249,6 +1344,7 @@ + + gtk_widget_size_request (page->tab_label, + &child_requisition); ++ child_requisition.width += 2 * label_padding; + + page->requisition.width = + child_requisition.width + +@@ -1292,10 +1388,10 @@ + + if (notebook->scrollable && vis_pages > 1 && + widget->requisition.width < tab_width) +- tab_height = MAX (tab_height, ARROW_SIZE); ++ tab_height = MAX (tab_height, arrow_height); + +- padding = 2 * (TAB_CURVATURE + focus_width + +- notebook->tab_hborder) - TAB_OVERLAP; ++ padding = 2 * (tab_curvature + focus_width + ++ notebook->tab_hborder) - tab_overlap; + tab_max += padding; + while (children) + { +@@ -1316,15 +1412,15 @@ + + if (notebook->scrollable && vis_pages > 1 && + widget->requisition.width < tab_width) +- tab_width = tab_max + 2 * (ARROW_SIZE + ARROW_SPACING); ++ tab_width = tab_max + 2 * (arrow_width + arrow_spacing); + + if (notebook->homogeneous && !notebook->scrollable) + widget->requisition.width = MAX (widget->requisition.width, + vis_pages * tab_max + +- TAB_OVERLAP); ++ tab_overlap); + else + widget->requisition.width = MAX (widget->requisition.width, +- tab_width + TAB_OVERLAP); ++ tab_width + tab_overlap); + + widget->requisition.height += tab_height; + break; +@@ -1335,10 +1431,10 @@ + + if (notebook->scrollable && vis_pages > 1 && + widget->requisition.height < tab_height) +- tab_width = MAX (tab_width, ARROW_SPACING + 2 * ARROW_SIZE); ++ tab_width = MAX (tab_width, arrow_spacing + 2 * arrow_width); + +- padding = 2 * (TAB_CURVATURE + focus_width + +- notebook->tab_vborder) - TAB_OVERLAP; ++ padding = 2 * (tab_curvature + focus_width + ++ notebook->tab_vborder) - tab_overlap; + tab_max += padding; + + while (children) +@@ -1361,24 +1457,24 @@ + + if (notebook->scrollable && vis_pages > 1 && + widget->requisition.height < tab_height) +- tab_height = tab_max + ARROW_SIZE + ARROW_SPACING; ++ tab_height = tab_max + arrow_height + arrow_spacing; + + widget->requisition.width += tab_width; + + if (notebook->homogeneous && !notebook->scrollable) + widget->requisition.height = + MAX (widget->requisition.height, +- vis_pages * tab_max + TAB_OVERLAP); ++ vis_pages * tab_max + tab_overlap); + else + widget->requisition.height = + MAX (widget->requisition.height, +- tab_height + TAB_OVERLAP); ++ tab_height + tab_overlap); + + if (!notebook->homogeneous || notebook->scrollable) + vis_pages = 1; + widget->requisition.height = MAX (widget->requisition.height, + vis_pages * tab_max + +- TAB_OVERLAP); ++ tab_overlap); + break; + } + } +@@ -1499,7 +1595,26 @@ + } + } + ++ /* Hildon kludge: inner border paddings */ ++ if (notebook->show_border) ++ { ++ gint inner_left_border, inner_right_border; ++ ++ gtk_widget_style_get (widget, ++ "inner_left_border", ++ &inner_left_border, ++ "inner_right_border", ++ &inner_right_border, ++ NULL); ++ ++ child_allocation.x += inner_left_border; ++ child_allocation.width -= inner_left_border + inner_right_border; ++ if (child_allocation.width < 0) ++ child_allocation.width = 0; ++ } ++ + children = notebook->children; ++ + while (children) + { + page = children->data; +@@ -1580,11 +1695,18 @@ + GdkRectangle event_window_pos; + gboolean before = ARROW_IS_BEFORE (arrow); + gboolean left = ARROW_IS_LEFT (arrow); ++ gint arrow_width, arrow_height, arrow_spacing; ++ ++ gtk_widget_style_get (GTK_WIDGET(notebook), ++ "arrow-width", &arrow_width, ++ "arrow-height", &arrow_height, ++ "arrow-spacing", &arrow_spacing, ++ NULL); + + if (gtk_notebook_get_event_window_position (notebook, &event_window_pos)) + { +- rectangle->width = ARROW_SIZE; +- rectangle->height = ARROW_SIZE; ++ rectangle->width = arrow_width; ++ rectangle->height = arrow_height; + + switch (notebook->tab_pos) + { +@@ -1602,6 +1724,8 @@ + rectangle->y += event_window_pos.height - rectangle->height; + break; + case GTK_POS_TOP: ++ arrow_spacing = - arrow_spacing; ++ /* Fall through */ + case GTK_POS_BOTTOM: + if (before) + { +@@ -1617,7 +1741,11 @@ + else + rectangle->x = event_window_pos.x + event_window_pos.width - 2 * rectangle->width; + } +- rectangle->y = event_window_pos.y + (event_window_pos.height - rectangle->height) / 2; ++ rectangle->y = event_window_pos.y; ++ if (arrow_spacing > 0) ++ rectangle->y += arrow_spacing; ++ else ++ rectangle->y += (event_window_pos.height - rectangle->height) / 2; + break; + } + } +@@ -1696,6 +1824,10 @@ + gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; + gboolean left = (ARROW_IS_LEFT (arrow) && !is_rtl) || + (!ARROW_IS_LEFT (arrow) && is_rtl); ++ GtkSettings *settings = gtk_settings_get_default (); ++ guint timeout; ++ ++ g_object_get (settings, "gtk-initial-timeout", &timeout, NULL); + + if (!GTK_WIDGET_HAS_FOCUS (widget)) + gtk_widget_grab_focus (widget); +@@ -1706,14 +1838,14 @@ + if (event->button == 1) + { + gtk_notebook_do_arrow (notebook, arrow); +- ++ + if (!notebook->timer) +- { +- notebook->timer = g_timeout_add (NOTEBOOK_INIT_SCROLL_DELAY, +- (GSourceFunc) gtk_notebook_timer, +- (gpointer) notebook); +- notebook->need_timer = TRUE; +- } ++ { ++ notebook->timer = g_timeout_add (timeout, ++ (GSourceFunc) gtk_notebook_timer, ++ (gpointer) notebook); ++ notebook->need_timer = TRUE; ++ } + } + else if (event->button == 2) + gtk_notebook_page_select (notebook, TRUE); +@@ -1862,7 +1994,7 @@ + static void + stop_scrolling (GtkNotebook *notebook) + { +- if (notebook->timer) ++ if (notebook->timer) + { + g_source_remove (notebook->timer); + notebook->timer = 0; +@@ -2343,9 +2475,9 @@ + */ + return focus_child_in (notebook, GTK_DIR_TAB_FORWARD); + case GTK_DIR_LEFT: +- return focus_tabs_move (notebook, direction, STEP_PREV); ++ return focus_tabs_move (notebook, direction, STEP_PREV_CYCLE); + case GTK_DIR_RIGHT: +- return focus_tabs_move (notebook, direction, STEP_NEXT); ++ return focus_tabs_move (notebook, direction, STEP_NEXT_CYCLE); + } + } + else /* Focus was not on widget */ +@@ -2481,7 +2613,6 @@ + * gtk_notebook_redraw_tabs + * gtk_notebook_real_remove + * gtk_notebook_update_labels +- * gtk_notebook_timer + * gtk_notebook_page_compare + * gtk_notebook_real_page_position + * gtk_notebook_search_page +@@ -2574,22 +2705,27 @@ + gtk_notebook_timer (GtkNotebook *notebook) + { + gboolean retval = FALSE; ++ guint timeout; ++ GtkSettings *settings; + + GDK_THREADS_ENTER (); + ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-update-timeout", &timeout, NULL); ++ + if (notebook->timer) + { + gtk_notebook_do_arrow (notebook, notebook->click_child); + +- if (notebook->need_timer) +- { +- notebook->need_timer = FALSE; +- notebook->timer = g_timeout_add (NOTEBOOK_SCROLL_DELAY, +- (GSourceFunc) gtk_notebook_timer, +- (gpointer) notebook); +- } ++ if (notebook->need_timer) ++ { ++ notebook->need_timer = FALSE; ++ notebook->timer = g_timeout_add (timeout, ++ (GSourceFunc) gtk_notebook_timer, ++ (gpointer) notebook); ++ } + else +- retval = TRUE; ++ retval = TRUE; + } + + GDK_THREADS_LEAVE (); +@@ -2781,10 +2917,12 @@ + switch (direction) + { + case STEP_PREV: ++ case STEP_PREV_CYCLE: + flag = GTK_PACK_END; + break; + + case STEP_NEXT: ++ case STEP_NEXT_CYCLE: + flag = GTK_PACK_START; + break; + } +@@ -2827,6 +2965,37 @@ + old_list = list; + list = list->prev; + } ++ ++ /* Hildon hack: keyboard navigation should cycle around */ ++ if (direction == STEP_PREV_CYCLE) ++ { ++ /* find and return the last (visible) page */ ++ list = g_list_last (notebook->children); ++ if (!find_visible) ++ return list; ++ while (list) ++ { ++ page = list->data; ++ if (GTK_WIDGET_VISIBLE (page->child)) ++ return list; ++ list = list->prev; ++ } ++ } ++ if (direction == STEP_NEXT_CYCLE) ++ { ++ /* find and return the first (visible) page */ ++ list = g_list_first (notebook->children); ++ if (!find_visible) ++ return list; ++ while (list) ++ { ++ page = list->data; ++ if (GTK_WIDGET_VISIBLE (page->child)) ++ return list; ++ list = list->next; ++ } ++ } ++ + return NULL; + } + +@@ -2850,6 +3019,7 @@ + gint gap_x = 0, gap_width = 0, step = STEP_PREV; + gboolean is_rtl; + gint tab_pos; ++ gboolean paint_box_gap = FALSE; + + g_return_if_fail (GTK_IS_NOTEBOOK (widget)); + g_return_if_fail (area != NULL); +@@ -2933,15 +3103,37 @@ + step = STEP_PREV; + break; + } +- gtk_paint_box_gap (widget->style, widget->window, +- GTK_STATE_NORMAL, GTK_SHADOW_OUT, +- area, widget, "notebook", +- x, y, width, height, +- tab_pos, gap_x, gap_width); ++ ++ /* hildon hack to postpone painting until it ++ is known if scroll arrows will be drawn */ ++ paint_box_gap = TRUE; + } + ++ /* first, figure out if arrows should be drawn */ + showarrow = FALSE; + children = gtk_notebook_search_page (notebook, NULL, step, TRUE); ++ while (children && !showarrow) ++ { ++ page = children->data; ++ children = gtk_notebook_search_page (notebook, children, ++ step, TRUE); ++ if (!GTK_WIDGET_MAPPED (page->tab_label)) ++ showarrow = TRUE; ++ } ++ ++ /* then draw content area frame */ ++ if (paint_box_gap) ++ gtk_paint_box_gap (widget->style, widget->window, ++ GTK_STATE_NORMAL, GTK_SHADOW_OUT, ++ area, widget, ++ (showarrow && notebook->scrollable) ++ ? "notebook_show_arrow" ++ : "notebook", ++ x, y, width, height, ++ tab_pos, gap_x, gap_width); ++ ++ /* and finally draw tabs */ ++ children = gtk_notebook_search_page (notebook, NULL, step, TRUE); + while (children) + { + page = children->data; +@@ -3069,10 +3261,15 @@ + GdkRectangle arrow_rect; + GtkArrowType arrow; + gboolean is_rtl, left; ++ gint arrow_width, arrow_height; + + gtk_notebook_get_arrow_rect (notebook, &arrow_rect, nbarrow); + + widget = GTK_WIDGET (notebook); ++ gtk_widget_style_get (widget, ++ "arrow-width", &arrow_width, ++ "arrow-height", &arrow_height, ++ NULL); + + is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; + left = (ARROW_IS_LEFT (nbarrow) && !is_rtl) || +@@ -3112,7 +3309,7 @@ + gtk_paint_arrow (widget->style, widget->window, state_type, + shadow_type, NULL, widget, "notebook", + arrow, TRUE, arrow_rect.x, arrow_rect.y, +- ARROW_SIZE, ARROW_SIZE); ++ arrow_width, arrow_height); + } + } + +@@ -3143,13 +3340,25 @@ + gboolean is_rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL && + (tab_pos == GTK_POS_TOP || tab_pos == GTK_POS_BOTTOM)); + gint memo_x; ++ gboolean truncate = FALSE; ++ gint arrow_width, arrow_height, arrow_spacing, tab_overlap; ++ gint total_width, ideal_tab_width, n_expanding_tabs; + + if (!notebook->show_tabs || !notebook->children || !notebook->cur_page) + return; + ++ gtk_widget_style_get (widget, ++ "arrow-width", &arrow_width, ++ "arrow-height", &arrow_height, ++ "arrow-spacing", &arrow_spacing, ++ "tab-overlap", &tab_overlap, ++ NULL); ++ + child_allocation.x = widget->allocation.x + container->border_width; + child_allocation.y = widget->allocation.y + container->border_width; + ++ total_width = allocation->width - 2 * container->border_width - tab_overlap; ++ + switch (tab_pos) + { + case GTK_POS_BOTTOM: +@@ -3198,27 +3407,26 @@ + if (GTK_WIDGET_VISIBLE (page->child)) + tab_space += page->requisition.width; + } +- if (tab_space > +- allocation->width - 2 * container->border_width - TAB_OVERLAP) ++ if (tab_space > total_width) + { + showarrow = TRUE; + page = focus_tab->data; + +- tab_space = allocation->width - TAB_OVERLAP - ++ tab_space = allocation->width - tab_overlap - + page->requisition.width - 2 * container->border_width; + if (notebook->has_after_previous) +- tab_space -= ARROW_SPACING + ARROW_SIZE; ++ tab_space -= arrow_spacing + arrow_width; + if (notebook->has_after_next) +- tab_space -= ARROW_SPACING + ARROW_SIZE; ++ tab_space -= arrow_spacing + arrow_width; + if (notebook->has_before_previous) + { +- tab_space -= ARROW_SPACING + ARROW_SIZE; +- child_allocation.x += ARROW_SPACING + ARROW_SIZE; ++ tab_space -= arrow_spacing + arrow_width; ++ child_allocation.x += arrow_spacing + arrow_width; + } + if (notebook->has_before_next) + { +- tab_space -= ARROW_SPACING + ARROW_SIZE; +- child_allocation.x += ARROW_SPACING + ARROW_SIZE; ++ tab_space -= arrow_spacing + arrow_width; ++ child_allocation.x += arrow_spacing + arrow_width; + } + } + break; +@@ -3233,19 +3441,19 @@ + tab_space += page->requisition.height; + } + if (tab_space > +- (allocation->height - 2 * container->border_width - TAB_OVERLAP)) ++ (allocation->height - 2 * container->border_width - tab_overlap)) + { + showarrow = TRUE; + page = focus_tab->data; + tab_space = allocation->height +- - TAB_OVERLAP - 2 * container->border_width ++ - tab_overlap - 2 * container->border_width + - page->requisition.height; + if (notebook->has_after_previous || notebook->has_after_next) +- tab_space -= ARROW_SPACING + ARROW_SIZE; ++ tab_space -= arrow_spacing + arrow_height; + if (notebook->has_before_previous || notebook->has_before_next) + { +- tab_space -= ARROW_SPACING + ARROW_SIZE; +- child_allocation.y += ARROW_SPACING + ARROW_SIZE; ++ tab_space -= arrow_spacing + arrow_height; ++ child_allocation.y += arrow_spacing + arrow_height; + } + } + break; +@@ -3257,6 +3465,10 @@ + notebook->first_tab = focus_tab; + last_child = gtk_notebook_search_page (notebook, focus_tab, + STEP_NEXT, TRUE); ++ ++ /* Hildon: there is only one visible tab label ++ and it doesn't fit unless it is truncated */ ++ truncate = TRUE; + } + else + { +@@ -3413,7 +3625,7 @@ + } + tab_space -= allocation->height; + } +- tab_space += 2 * container->border_width + TAB_OVERLAP; ++ tab_space += 2 * container->border_width + tab_overlap; + tab_space *= -1; + notebook->first_tab = gtk_notebook_search_page (notebook, NULL, + STEP_NEXT, TRUE); +@@ -3432,12 +3644,29 @@ + if (showarrow) + { + if (notebook->has_after_previous) +- child_allocation.x -= ARROW_SPACING + ARROW_SIZE; ++ child_allocation.x -= arrow_spacing + arrow_width; + if (notebook->has_after_next) +- child_allocation.x -= ARROW_SPACING + ARROW_SIZE; ++ child_allocation.x -= arrow_spacing + arrow_width; + } + } + ++ ideal_tab_width = (total_width / n); ++ n_expanding_tabs = 0; ++ ++ while (children) ++ { ++ if (children == last_child) ++ break; ++ ++ page = children->data; ++ children = gtk_notebook_search_page (notebook, children, STEP_NEXT,TRUE); ++ ++ if (page->requisition.width <= ideal_tab_width) ++ n_expanding_tabs++; ++ } ++ ++ children = notebook->first_tab; ++ + while (children) + { + if (children == last_child) +@@ -3452,9 +3681,11 @@ + children = gtk_notebook_search_page (notebook, children, STEP_NEXT,TRUE); + + delta = 0; +- if (n && (showarrow || page->expand || notebook->homogeneous)) ++ ++ if (n && (showarrow || page->expand || notebook->homogeneous) && ++ (page->requisition.width <= ideal_tab_width)) + { +- new_fill = (tab_space * i++) / n; ++ new_fill = (tab_space * i++) / n_expanding_tabs; + delta = new_fill - old_fill; + old_fill = new_fill; + } +@@ -3463,15 +3694,18 @@ + { + case GTK_POS_TOP: + case GTK_POS_BOTTOM: ++ if (truncate) ++ delta *= -1; ++ + child_allocation.width = (page->requisition.width + +- TAB_OVERLAP + delta); ++ tab_overlap + delta); + if (is_rtl) + child_allocation.x -= child_allocation.width; + break; + case GTK_POS_LEFT: + case GTK_POS_RIGHT: + child_allocation.height = (page->requisition.height + +- TAB_OVERLAP + delta); ++ tab_overlap + delta); + break; + } + +@@ -3482,13 +3716,13 @@ + case GTK_POS_TOP: + case GTK_POS_BOTTOM: + if (!is_rtl) +- child_allocation.x += child_allocation.width - TAB_OVERLAP; ++ child_allocation.x += child_allocation.width - tab_overlap; + else +- child_allocation.x += TAB_OVERLAP; ++ child_allocation.x += tab_overlap; + break; + case GTK_POS_LEFT: + case GTK_POS_RIGHT: +- child_allocation.y += child_allocation.height - TAB_OVERLAP; ++ child_allocation.y += child_allocation.height - tab_overlap; + break; + } + +@@ -3538,14 +3772,14 @@ + case GTK_POS_TOP: + case GTK_POS_BOTTOM: + child_allocation.width = (page->requisition.width + +- TAB_OVERLAP + delta); ++ tab_overlap + delta); + if (!is_rtl) + child_allocation.x -= child_allocation.width; + break; + case GTK_POS_LEFT: + case GTK_POS_RIGHT: + child_allocation.height = (page->requisition.height + +- TAB_OVERLAP + delta); ++ tab_overlap + delta); + child_allocation.y -= child_allocation.height; + break; + } +@@ -3557,13 +3791,13 @@ + case GTK_POS_TOP: + case GTK_POS_BOTTOM: + if (!is_rtl) +- child_allocation.x += TAB_OVERLAP; ++ child_allocation.x += tab_overlap; + else +- child_allocation.x += child_allocation.width - TAB_OVERLAP; ++ child_allocation.x += child_allocation.width - tab_overlap; + break; + case GTK_POS_LEFT: + case GTK_POS_RIGHT: +- child_allocation.y += TAB_OVERLAP; ++ child_allocation.y += tab_overlap; + break; + } + +@@ -3589,8 +3823,12 @@ + gint padding; + gint focus_width; + gint tab_pos = get_effective_tab_pos (notebook); ++ gint tab_curvature; + +- gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL); ++ gtk_widget_style_get (widget, ++ "focus-line-width", &focus_width, ++ "tab-curvature", &tab_curvature, ++ NULL); + + xthickness = widget->style->xthickness; + ythickness = widget->style->ythickness; +@@ -3621,7 +3859,7 @@ + { + case GTK_POS_TOP: + case GTK_POS_BOTTOM: +- padding = TAB_CURVATURE + focus_width + notebook->tab_hborder; ++ padding = tab_curvature + focus_width + notebook->tab_hborder; + if (page->fill) + { + child_allocation.x = (xthickness + focus_width + +@@ -3646,7 +3884,7 @@ + break; + case GTK_POS_LEFT: + case GTK_POS_RIGHT: +- padding = TAB_CURVATURE + focus_width + notebook->tab_vborder; ++ padding = tab_curvature + focus_width + notebook->tab_vborder; + if (page->fill) + { + child_allocation.y = ythickness + padding; +@@ -4340,7 +4578,7 @@ + } + page->tab_label = tab_label; + page->menu_label = menu_label; +- page->expand = FALSE; ++ page->expand = TRUE; + page->fill = TRUE; + page->pack = GTK_PACK_START; + +@@ -5046,6 +5284,7 @@ + { + page->default_tab = FALSE; + page->tab_label = tab_label; ++ + gtk_widget_set_parent (page->tab_label, GTK_WIDGET (notebook)); + } + else diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkprogress.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkprogress.c.diff new file mode 100644 index 0000000000..07302bbab8 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkprogress.c.diff @@ -0,0 +1,20 @@ +--- gtk+-2.6.4/gtk/gtkprogress.c 2004-10-28 18:00:04.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkprogress.c 2005-04-06 16:19:37.066903336 +0300 +@@ -371,6 +371,17 @@ + widget->allocation.width, + widget->allocation.height, + -1); ++ ++ /* OSSO addition : clear the pixmap first or transparent images ++ * painted on top of it may look stupid when it's blended against ++ * random memory.*/ ++ gtk_paint_flat_box (widget->style, ++ progress->offscreen_pixmap, ++ GTK_STATE_NORMAL, ++ GTK_SHADOW_NONE, ++ NULL, widget, NULL, ++ 0, 0, widget->allocation.width, widget->allocation.height); ++ + GTK_PROGRESS_GET_CLASS (progress)->paint (progress); + } + } diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkprogressbar.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkprogressbar.c.diff new file mode 100644 index 0000000000..097e348c41 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkprogressbar.c.diff @@ -0,0 +1,141 @@ +--- gtk+-2.6.4/gtk/gtkprogressbar.c 2005-01-09 19:32:25.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkprogressbar.c 2005-04-06 16:19:37.112896344 +0300 +@@ -40,11 +40,18 @@ + + + #define MIN_HORIZONTAL_BAR_WIDTH 150 +-#define MIN_HORIZONTAL_BAR_HEIGHT 20 ++#define MIN_HORIZONTAL_BAR_HEIGHT 30 /* OSSO mod. was 20 */ + #define MIN_VERTICAL_BAR_WIDTH 22 + #define MIN_VERTICAL_BAR_HEIGHT 80 + #define MAX_TEXT_LENGTH 80 +-#define TEXT_SPACING 2 ++#define DEFAULT_TEXT_SPACING 2 /* OSSO mod. Changed from ++ * TEXT_SPACING. Now controlled ++ * by "text-spacing" style ++ * property */ ++#define DEFAULT_WIDTH_INCREMENT 3 ++#define DEFAULT_HEIGHT_INCREMENT 3 ++#define DEFAULT_TEXT_XNUDGE 1 ++#define DEFAULT_TEXT_YNUDGE 1 + + enum { + PROP_0, +@@ -245,6 +252,51 @@ + PANGO_ELLIPSIZE_NONE, + G_PARAM_READWRITE)); + ++ /* OSSO addition. */ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("text-spacing", ++ "Text Spacing", ++ "The amount of pixels between the trough and text.", ++ G_MININT, ++ G_MAXINT, ++ DEFAULT_TEXT_SPACING, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("width-increment", ++ "width Increment", ++ "The amount of pixels to add to the width size request.", ++ G_MININT, ++ G_MAXINT, ++ DEFAULT_WIDTH_INCREMENT, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("height-increment", ++ "Height Increment", ++ "The amount of pixels to add to the height size request.", ++ G_MININT, ++ G_MAXINT, ++ DEFAULT_WIDTH_INCREMENT, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("text-xnudge", ++ "Text XNudge", ++ "Amount of pixels to move the text x position.", ++ G_MININT, ++ G_MAXINT, ++ DEFAULT_TEXT_XNUDGE, ++ G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("text-ynudge", ++ "Text YNudge", ++ "Amount of pixels to move the text y position.", ++ G_MININT, ++ G_MAXINT, ++ DEFAULT_TEXT_YNUDGE, ++ G_PARAM_READWRITE)); + } + + static void +@@ -364,7 +416,9 @@ + { + GtkWidget *pbar; + +- pbar = gtk_widget_new (GTK_TYPE_PROGRESS_BAR, NULL); ++ pbar = gtk_widget_new (GTK_TYPE_PROGRESS_BAR, ++ "text-xalign", 0.0, /* OSSO addition. */ ++ NULL); + + return pbar; + } +@@ -494,15 +548,23 @@ + PangoRectangle logical_rect; + PangoLayout *layout; + gint width, height; ++ gint text_spacing; ++ gint width_increment, height_increment; + + g_return_if_fail (GTK_IS_PROGRESS_BAR (widget)); + g_return_if_fail (requisition != NULL); ++ ++ gtk_widget_style_get (widget, ++ "text-spacing", &text_spacing, ++ "width-increment", &width_increment, ++ "height-increment", &height_increment, ++ NULL); + + progress = GTK_PROGRESS (widget); + pbar = GTK_PROGRESS_BAR (widget); + +- width = 2 * widget->style->xthickness + 3 + 2 * TEXT_SPACING; +- height = 2 * widget->style->ythickness + 3 + 2 * TEXT_SPACING; ++ width = 2 * widget->style->xthickness + width_increment + 2 * text_spacing; ++ height = 2 * widget->style->ythickness + height_increment + 2 * text_spacing; + + if (progress->show_text && pbar->bar_style != GTK_PROGRESS_DISCRETE) + { +@@ -780,6 +842,13 @@ + PangoRectangle logical_rect; + GdkRectangle prelight_clip, normal_clip; + ++ gint text_xnudge, text_ynudge; ++ ++ gtk_widget_style_get (widget, ++ "text-xnudge", &text_xnudge, ++ "text-ynudge", &text_ynudge, ++ NULL); ++ + buf = gtk_progress_get_current_text (progress); + + layout = gtk_widget_create_pango_layout (widget, buf); +@@ -789,12 +858,12 @@ + + pango_layout_get_pixel_extents (layout, NULL, &logical_rect); + +- x = widget->style->xthickness + 1 + ++ x = widget->style->xthickness + text_xnudge + + (widget->allocation.width - 2 * widget->style->xthickness - + 2 - logical_rect.width) + * progress->x_align; + +- y = widget->style->ythickness + 1 + ++ y = widget->style->ythickness + text_ynudge + + (widget->allocation.height - 2 * widget->style->ythickness - + 2 - logical_rect.height) + * progress->y_align; diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkradiobutton.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkradiobutton.c.diff new file mode 100644 index 0000000000..f4669c6d9f --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkradiobutton.c.diff @@ -0,0 +1,244 @@ +--- gtk+-2.6.4/gtk/gtkradiobutton.c 2004-08-09 19:59:52.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkradiobutton.c 2005-04-06 16:19:37.126894216 +0300 +@@ -31,6 +31,7 @@ + #include "gtkradiobutton.h" + #include "gtkintl.h" + ++#define TOGGLE_ON_CLICK "toggle-on-click" + + enum { + PROP_0, +@@ -506,6 +507,9 @@ + { + tmp_list = tmp_list->next; + ++ if( !tmp_list ) ++ return FALSE; ++ + while (tmp_list) + { + GtkWidget *child = tmp_list->data; +@@ -543,7 +547,10 @@ + if (new_focus) + { + gtk_widget_grab_focus (new_focus); +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (new_focus), TRUE); ++ ++ /* arrow keys select the button ? CHECK THIS!! ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (new_focus), TRUE); ++ */ + } + + return TRUE; +@@ -579,7 +586,7 @@ + GtkToggleButton *toggle_button; + GtkRadioButton *radio_button; + GtkToggleButton *tmp_button; +- GtkStateType new_state; ++ GtkStateType new_state = GTK_WIDGET_STATE( button ); + GSList *tmp_list; + gint toggled; + gboolean depressed; +@@ -591,52 +598,54 @@ + g_object_ref (GTK_WIDGET (button)); + + if (toggle_button->active) +- { +- tmp_button = NULL; +- tmp_list = radio_button->group; +- +- while (tmp_list) +- { +- tmp_button = tmp_list->data; +- tmp_list = tmp_list->next; ++ { ++ tmp_button = NULL; ++ tmp_list = radio_button->group; + +- if (tmp_button->active && tmp_button != toggle_button) +- break; ++ while (tmp_list) ++ { ++ tmp_button = tmp_list->data; ++ tmp_list = tmp_list->next; ++ ++ if (tmp_button->active && tmp_button != toggle_button) ++ break; + +- tmp_button = NULL; +- } ++ tmp_button = NULL; ++ } + +- if (!tmp_button) +- { +- new_state = (button->in_button ? GTK_STATE_PRELIGHT : GTK_STATE_ACTIVE); ++ if (!tmp_button) ++ { ++ new_state = (button->in_button ? ++ GTK_STATE_PRELIGHT : GTK_STATE_ACTIVE); ++ } ++ else ++ { ++ toggled = TRUE; ++ toggle_button->active = !toggle_button->active; ++ new_state = (button->in_button ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL); ++ } + } + else + { + toggled = TRUE; + toggle_button->active = !toggle_button->active; +- new_state = (button->in_button ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL); +- } +- } +- else +- { +- toggled = TRUE; +- toggle_button->active = !toggle_button->active; + +- tmp_list = radio_button->group; +- while (tmp_list) +- { +- tmp_button = tmp_list->data; +- tmp_list = tmp_list->next; +- +- if (tmp_button->active && (tmp_button != toggle_button)) ++ tmp_list = radio_button->group; ++ while (tmp_list) + { +- gtk_button_clicked (GTK_BUTTON (tmp_button)); +- break; ++ tmp_button = tmp_list->data; ++ tmp_list = tmp_list->next; ++ ++ if (tmp_button->active && (tmp_button != toggle_button)) ++ { ++ gtk_button_clicked (GTK_BUTTON (tmp_button)); ++ break; ++ } + } ++ ++ new_state = (button->in_button ? GTK_STATE_PRELIGHT : GTK_STATE_ACTIVE); + } + +- new_state = (button->in_button ? GTK_STATE_PRELIGHT : GTK_STATE_ACTIVE); +- } + + if (toggle_button->inconsistent) + depressed = FALSE; +@@ -663,7 +672,6 @@ + GdkRectangle *area) + { + GtkWidget *widget; +- GtkWidget *child; + GtkButton *button; + GtkToggleButton *toggle_button; + GtkStateType state_type; +@@ -686,54 +694,80 @@ + "focus-padding", &focus_pad, + NULL); + +- _gtk_check_button_get_props (check_button, &indicator_size, &indicator_spacing); +- +- x = widget->allocation.x + indicator_spacing + GTK_CONTAINER (widget)->border_width; +- y = widget->allocation.y + (widget->allocation.height - indicator_size) / 2; +- +- child = GTK_BIN (check_button)->child; +- if (!interior_focus || !(child && GTK_WIDGET_VISIBLE (child))) +- x += focus_width + focus_pad; ++ _gtk_check_button_get_props (check_button, ++ &indicator_size, &indicator_spacing); + ++ x = widget->allocation.x + indicator_spacing + ++ GTK_CONTAINER (widget)->border_width; ++ y = widget->allocation.y + (widget->allocation.height - ++ indicator_size + focus_width + ++ focus_pad) / 2; ++ ++ /* Hildon - always add space for the padding ++ */ ++ x += focus_width + focus_pad; ++ + if (toggle_button->inconsistent) +- shadow_type = GTK_SHADOW_ETCHED_IN; ++ shadow_type = GTK_SHADOW_ETCHED_IN; ++ + else if (toggle_button->active) +- shadow_type = GTK_SHADOW_IN; ++ shadow_type = GTK_SHADOW_IN; ++ + else +- shadow_type = GTK_SHADOW_OUT; ++ shadow_type = GTK_SHADOW_OUT; ++ ++ if (button->activate_timeout || ++ (button->button_down && button->in_button) ) ++ state_type = GTK_STATE_ACTIVE; + +- if (button->activate_timeout || (button->button_down && button->in_button)) +- state_type = GTK_STATE_ACTIVE; + else if (button->in_button) +- state_type = GTK_STATE_PRELIGHT; ++ state_type = GTK_STATE_PRELIGHT; ++ + else if (!GTK_WIDGET_IS_SENSITIVE (widget)) + state_type = GTK_STATE_INSENSITIVE; ++ + else +- state_type = GTK_STATE_NORMAL; ++ state_type = GTK_STATE_NORMAL; + ++ /* Hildon change. We want to draw active image always when we have ++ * focus. */ ++ if (GTK_WIDGET_HAS_FOCUS (widget)) ++ state_type = GTK_STATE_ACTIVE; ++ + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) +- x = widget->allocation.x + widget->allocation.width - (indicator_size + x - widget->allocation.x); +- ++ { ++ x = widget->allocation.x + widget->allocation.width - ++ (indicator_size + x - widget->allocation.x); ++ } ++ /* Well, commenting this out fixes bug #280, ++ without apparent side effects. ++ * + if (GTK_WIDGET_STATE (toggle_button) == GTK_STATE_PRELIGHT) + { + GdkRectangle restrict_area; + GdkRectangle new_area; + +- restrict_area.x = widget->allocation.x + GTK_CONTAINER (widget)->border_width; +- restrict_area.y = widget->allocation.y + GTK_CONTAINER (widget)->border_width; +- restrict_area.width = widget->allocation.width - (2 * GTK_CONTAINER (widget)->border_width); +- restrict_area.height = widget->allocation.height - (2 * GTK_CONTAINER (widget)->border_width); ++ restrict_area.x = widget->allocation.x + ++ GTK_CONTAINER (widget)->border_width; ++ restrict_area.y = widget->allocation.y + ++ GTK_CONTAINER (widget)->border_width; ++ restrict_area.width = widget->allocation.width - ++ (2 * GTK_CONTAINER (widget)->border_width); ++ restrict_area.height = widget->allocation.height - ++ (2 * GTK_CONTAINER (widget)->border_width); + + if (gdk_rectangle_intersect (area, &restrict_area, &new_area)) + { +- gtk_paint_flat_box (widget->style, widget->window, GTK_STATE_PRELIGHT, +- GTK_SHADOW_ETCHED_OUT, +- area, widget, "checkbutton", +- new_area.x, new_area.y, +- new_area.width, new_area.height); ++ gtk_paint_flat_box (widget->style, widget->window, ++ GTK_STATE_PRELIGHT, ++ GTK_SHADOW_ETCHED_OUT, ++ area, widget, "checkbutton", ++ new_area.x, new_area.y, ++ new_area.width, new_area.height); + } + } + ++ */ + gtk_paint_option (widget->style, widget->window, + state_type, shadow_type, + area, widget, "radiobutton", diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrange.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrange.c.diff new file mode 100644 index 0000000000..867d2b1d46 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrange.c.diff @@ -0,0 +1,845 @@ +--- gtk+-2.6.4/gtk/gtkrange.c 2004-11-10 05:20:11.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkrange.c 2005-04-06 16:19:37.788793592 +0300 +@@ -25,6 +25,10 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++/* Modified for Nokia Oyj during 2002-2005. See CHANGES file for list ++ * of changes. ++ */ ++ + #include <config.h> + #include <stdio.h> + #include <math.h> +@@ -44,7 +48,10 @@ + PROP_0, + PROP_UPDATE_POLICY, + PROP_ADJUSTMENT, +- PROP_INVERTED ++ PROP_INVERTED, ++ PROP_STREAM_INDICATOR, ++ PROP_MINIMUM_VISIBLE_BARS, ++ PROP_STREAM_POSITION + }; + + enum { +@@ -88,8 +95,20 @@ + /* "grabbed" mouse location, OUTSIDE for no grab */ + MouseLocation grab_location; + gint grab_button; /* 0 if none */ ++ ++ /* OSSO hack: stream trough split position */ ++ gint stream_pixel_position; ++ gint minimum_visible_bars; + }; + ++#define OSSO_GTK_RANGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_RANGE, OssoGtkRangePrivate)) ++typedef struct _OssoGtkRangePrivate OssoGtkRangePrivate; ++ ++struct _OssoGtkRangePrivate ++{ ++ gboolean stream_indicator; ++ gdouble stream_position; ++}; + + static void gtk_range_class_init (GtkRangeClass *klass); + static void gtk_range_init (GtkRange *range); +@@ -135,6 +154,7 @@ + gint mouse_x, + gint mouse_y); + ++static gint osso_gtk_range_focus_out (GtkWidget *widget, GdkEventFocus *event); + + /* Range methods */ + +@@ -247,6 +267,9 @@ + widget_class->state_changed = gtk_range_state_changed; + widget_class->style_set = gtk_range_style_set; + ++ /* OSSO addition (see bug #1653) */ ++ widget_class->focus_out_event = osso_gtk_range_focus_out; ++ + class->move_slider = gtk_range_move_slider; + class->change_value = gtk_range_real_change_value; + +@@ -344,6 +367,34 @@ + FALSE, + G_PARAM_READWRITE)); + ++ g_object_class_install_property (gobject_class, ++ PROP_STREAM_INDICATOR, ++ g_param_spec_boolean ("stream_indicator", ++ P_("Stream Indicator"), ++ P_("Whether to display a stream indicator graphics on trough."), ++ FALSE, ++ G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); ++ ++ g_object_class_install_property (gobject_class, ++ PROP_MINIMUM_VISIBLE_BARS, ++ g_param_spec_int ("minimum_visible_bars", ++ P_("Minimum visible bars"), ++ P_("The minimum number of visible bars in a HildonControlBar"), ++ 0, ++ G_MAXINT, ++ 0, ++ G_PARAM_READWRITE)); ++ ++ g_object_class_install_property (gobject_class, ++ PROP_STREAM_POSITION, ++ g_param_spec_double ("stream_position", ++ P_("Stream Position"), ++ P_("The position of the streaming."), ++ -G_MAXDOUBLE, ++ G_MAXDOUBLE, ++ 0.0, ++ G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); ++ + gtk_widget_class_install_style_property (widget_class, + g_param_spec_int ("slider_width", + P_("Slider Width"), +@@ -392,6 +443,52 @@ + G_MAXINT, + 0, + G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("hildonlike", ++ _("hildonlike"), ++ _("Change focus out behaviour, 1/0"), ++ FALSE, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("two_part_trough", ++ _("Two-part trough"), ++ _("Allow different trough graphics on different sides of the slider, 1/0"), ++ FALSE, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("stream_indicator_padding", ++ P_("Stream Indicator Padding"), ++ P_("How many pixels smallerthan the trough the stream indicator is drawn from both ends ."), ++ 0, ++ G_MAXINT, ++ 1, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("autodimmed_steppers", ++ _("Autodimmed steppers"), ++ _("Automatically dim steppers when maximum or minimum value has been reached"), ++ FALSE, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("arrow_paint_box_layout", ++ _("Arrow paint box layout"), ++ _("Allows to use images instead of normal arrows."), ++ FALSE, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("draw_trough_under_steppers", ++ _("Draw trough under steppers"), ++ _("Whether to draw trought for full length of range or exclude the steppers and spacing"), ++ TRUE, ++ G_PARAM_READABLE)); ++ ++ g_type_class_add_private (gobject_class, sizeof (OssoGtkRangePrivate)); + } + + static void +@@ -415,6 +512,15 @@ + case PROP_INVERTED: + gtk_range_set_inverted (range, g_value_get_boolean (value)); + break; ++ case PROP_STREAM_INDICATOR: ++ osso_gtk_range_set_stream_indicator (range, g_value_get_boolean (value)); ++ break; ++ case PROP_STREAM_POSITION: ++ osso_gtk_range_set_stream_position (range, g_value_get_double (value)); ++ break; ++ case PROP_MINIMUM_VISIBLE_BARS: ++ range->layout->minimum_visible_bars = g_value_get_int(value); ++ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; +@@ -442,6 +548,15 @@ + case PROP_INVERTED: + g_value_set_boolean (value, range->inverted); + break; ++ case PROP_STREAM_INDICATOR: ++ g_value_set_boolean (value, osso_gtk_range_get_stream_indicator (range)); ++ break; ++ case PROP_STREAM_POSITION: ++ g_value_set_double (value, osso_gtk_range_get_stream_indicator (range)); ++ break; ++ case PROP_MINIMUM_VISIBLE_BARS: ++ g_value_set_int (value, range->layout->minimum_visible_bars); ++ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; +@@ -451,6 +566,7 @@ + static void + gtk_range_init (GtkRange *range) + { ++ OssoGtkRangePrivate *priv = OSSO_GTK_RANGE_GET_PRIVATE (range); + GTK_WIDGET_SET_FLAGS (range, GTK_NO_WINDOW); + + range->adjustment = NULL; +@@ -471,6 +587,9 @@ + range->layout->grab_location = MOUSE_OUTSIDE; + range->layout->grab_button = 0; + range->timer = NULL; ++ ++ priv->stream_indicator = FALSE; ++ priv->stream_position = 0.0; + } + + /** +@@ -584,7 +703,10 @@ + g_signal_connect (adjustment, "changed", + G_CALLBACK (gtk_range_adjustment_changed), + range); +- g_signal_connect (adjustment, "value_changed", ++ /* OSSO modification : Changed for controlbar. ++ * There we intercept this signal and put forth ++ * our own, with modified parameters. */ ++ g_signal_connect_after (adjustment, "value_changed", + G_CALLBACK (gtk_range_adjustment_value_changed), + range); + +@@ -677,16 +799,21 @@ + gdouble max) + { + gdouble value; ++ OssoGtkRangePrivate *priv; + + g_return_if_fail (GTK_IS_RANGE (range)); + g_return_if_fail (min < max); + ++ priv = OSSO_GTK_RANGE_GET_PRIVATE (range); ++ + range->adjustment->lower = min; + range->adjustment->upper = max; + + value = CLAMP (range->adjustment->value, + range->adjustment->lower, + (range->adjustment->upper - range->adjustment->page_size)); ++ if (priv->stream_indicator && value > priv->stream_position) ++ value = (gdouble)priv->stream_position; + + gtk_adjustment_set_value (range->adjustment, value); + gtk_adjustment_changed (range->adjustment); +@@ -707,10 +834,16 @@ + gtk_range_set_value (GtkRange *range, + gdouble value) + { ++ OssoGtkRangePrivate *priv; ++ + g_return_if_fail (GTK_IS_RANGE (range)); + ++ priv = OSSO_GTK_RANGE_GET_PRIVATE (range); ++ + value = CLAMP (value, range->adjustment->lower, + (range->adjustment->upper - range->adjustment->page_size)); ++ if (priv->stream_indicator && value > priv->stream_position) ++ value = (gdouble)priv->stream_position; + + gtk_adjustment_set_value (range->adjustment, value); + } +@@ -913,6 +1046,10 @@ + gint arrow_width; + gint arrow_height; + ++ /* OSSO modification: state of our style properties */ ++ gboolean autodimmed_steppers = FALSE; ++ gboolean arrow_paint_box_layout = FALSE; ++ + /* More to get the right clip region than for efficiency */ + if (!gdk_rectangle_intersect (area, rect, &intersection)) + return; +@@ -929,6 +1066,37 @@ + else + state_type = GTK_STATE_NORMAL; + ++ /* OSSO modification : read all of our style properties needed in this func */ ++ gtk_widget_style_get (widget, ++ "autodimmed_steppers", &autodimmed_steppers, ++ "arrow_paint_box_layout", &arrow_paint_box_layout, ++ NULL); ++ ++ /* OSSO modification : dim the stepper if maximum or minimum value has been reached */ ++ if (autodimmed_steppers) ++ { ++ OssoGtkRangePrivate *priv = OSSO_GTK_RANGE_GET_PRIVATE (range); ++ if (((!range->inverted && (arrow_type == GTK_ARROW_DOWN || ++ arrow_type == GTK_ARROW_RIGHT)) || ++ (range->inverted && (arrow_type == GTK_ARROW_UP || ++ arrow_type == GTK_ARROW_LEFT))) && ++ range->adjustment->value >= ++ (priv->stream_indicator ++ ? priv->stream_position ++ : range->adjustment->upper - range->adjustment->page_size)) ++ { ++ state_type = GTK_STATE_INSENSITIVE; ++ } ++ else if (((!range->inverted && (arrow_type == GTK_ARROW_UP || ++ arrow_type == GTK_ARROW_LEFT)) || ++ (range->inverted && (arrow_type == GTK_ARROW_DOWN || ++ arrow_type == GTK_ARROW_RIGHT))) && ++ range->adjustment->value <= range->adjustment->lower) ++ { ++ state_type = GTK_STATE_INSENSITIVE; ++ } ++ } ++ + if (clicked) + shadow_type = GTK_SHADOW_IN; + else +@@ -944,10 +1112,20 @@ + rect->width, + rect->height); + +- arrow_width = rect->width / 2; +- arrow_height = rect->height / 2; +- arrow_x = widget->allocation.x + rect->x + (rect->width - arrow_width) / 2; +- arrow_y = widget->allocation.y + rect->y + (rect->height - arrow_height) / 2; ++ if (arrow_paint_box_layout) ++ { ++ arrow_width = rect->width; ++ arrow_height = rect->height; ++ arrow_x = widget->allocation.x + rect->x; ++ arrow_y = widget->allocation.y + rect->y; ++ } ++ else ++ { ++ arrow_width = rect->width / 2; ++ arrow_height = rect->height / 2; ++ arrow_x = widget->allocation.x + rect->x + (rect->width - arrow_width) / 2; ++ arrow_y = widget->allocation.y + rect->y + (rect->height - arrow_height) / 2; ++ } + + if (clicked) + { +@@ -982,8 +1160,11 @@ + GdkRectangle area; + gint focus_line_width = 0; + gint focus_padding = 0; ++ OssoGtkRangePrivate *priv; + + range = GTK_RANGE (widget); ++ ++ priv = OSSO_GTK_RANGE_GET_PRIVATE (range); + + if (GTK_WIDGET_CAN_FOCUS (range)) + { +@@ -1011,18 +1192,118 @@ + if (gdk_rectangle_intersect (&expose_area, &range->range_rect, + &area)) + { ++ gint x = widget->allocation.x + range->range_rect.x + focus_line_width + focus_padding; ++ gint y = widget->allocation.y + range->range_rect.y + focus_line_width + focus_padding; ++ gint width = range->range_rect.width - 2 * (focus_line_width + focus_padding); ++ gint height = range->range_rect.height - 2 * (focus_line_width + focus_padding); ++ gint *virtual_position, *virtual_size; ++ gboolean two_part_trough = 0; ++ gint stepper_size = 0; ++ gint stepper_spacing = 0; ++ gboolean draw_trough_under_steppers = TRUE; ++ + area.x += widget->allocation.x; + area.y += widget->allocation.y; ++ ++ gtk_widget_style_get (GTK_WIDGET (range), ++ "two_part_trough", &two_part_trough, ++ "stepper_size", &stepper_size, ++ "stepper_spacing", &stepper_spacing, ++ "draw_trough_under_steppers", &draw_trough_under_steppers, ++ NULL); ++ ++ if (range->orientation == GTK_ORIENTATION_HORIZONTAL) ++ { ++ virtual_position = &x; ++ virtual_size = &width; ++ } ++ else ++ { ++ virtual_position = &y; ++ virtual_size = &height; ++ } ++ ++ if (draw_trough_under_steppers == FALSE) ++ { ++ *virtual_position += stepper_size + stepper_spacing; ++ *virtual_size -= 2 * (stepper_size + stepper_spacing); ++ } + +- gtk_paint_box (widget->style, +- widget->window, +- sensitive ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE, +- GTK_SHADOW_IN, +- &area, GTK_WIDGET(range), "trough", +- widget->allocation.x + range->range_rect.x + focus_line_width + focus_padding, +- widget->allocation.y + range->range_rect.y + focus_line_width + focus_padding, +- range->range_rect.width - 2 * (focus_line_width + focus_padding), +- range->range_rect.height - 2 * (focus_line_width + focus_padding)); ++ if (two_part_trough == FALSE) ++ { ++ gtk_paint_box (widget->style, ++ widget->window, ++ sensitive ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE, ++ GTK_SHADOW_IN, ++ &area, GTK_WIDGET(range), "trough", ++ x, y, ++ width, height); ++ } ++ else ++ { ++ gint trough_change_pos_x = width; ++ gint trough_change_pos_y = height; ++ ++ if (range->orientation == GTK_ORIENTATION_HORIZONTAL) ++ trough_change_pos_x = range->layout->slider.x + (range->layout->slider.width / 2) - stepper_size - stepper_spacing; ++ else ++ trough_change_pos_y = range->layout->slider.y + (range->layout->slider.height / 2) - stepper_size - stepper_spacing; ++ ++ gtk_paint_box (widget->style, ++ widget->window, ++ sensitive ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE, ++ GTK_SHADOW_IN, ++ &area, GTK_WIDGET(range), "trough_northwest", ++ x, y, ++ trough_change_pos_x, trough_change_pos_y); ++ ++ if (range->orientation == GTK_ORIENTATION_HORIZONTAL) ++ trough_change_pos_y = 0; ++ else ++ trough_change_pos_x = 0; ++ ++ gtk_paint_box (widget->style, ++ widget->window, ++ sensitive ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE, ++ GTK_SHADOW_IN, ++ &area, GTK_WIDGET(range), "trough_southeast", ++ x + trough_change_pos_x, y + trough_change_pos_y, ++ width - trough_change_pos_x, height - trough_change_pos_y); ++ } ++ ++ /* Stream indicator drawing does not support inverted state. */ ++ if (priv->stream_indicator) ++ { ++ gchar *used_detail; ++ gint stream_start_pos_x = 0; ++ gint stream_start_pos_y = 0; ++ gint stream_width = width; ++ gint stream_height = height; ++ ++ if (range->orientation == GTK_ORIENTATION_HORIZONTAL) ++ { ++ stream_start_pos_x = range->layout->slider.x; ++ stream_width = range->layout->stream_pixel_position - stream_start_pos_x; ++ } ++ else ++ { ++ stream_start_pos_y = range->layout->slider.y; ++ stream_height = range->layout->stream_pixel_position - stream_start_pos_y; ++ } ++ ++ if (priv->stream_position == range->adjustment->upper) ++ used_detail = "trough_stream_complete"; ++ else ++ used_detail = "trough_stream"; ++ ++ gtk_paint_box (widget->style, ++ widget->window, ++ sensitive ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE, ++ GTK_SHADOW_IN, ++ &area, GTK_WIDGET(range), used_detail, ++ widget->allocation.x + stream_start_pos_x, widget->allocation.y + stream_start_pos_y, ++ stream_width, stream_height); ++ } + + + if (sensitive && +@@ -1189,19 +1470,41 @@ + { + gdouble frac; + gdouble value; +- +- if (range->orientation == GTK_ORIENTATION_VERTICAL) ++ gint stepper_spacing = 0; ++ gint minimum_visible_blocks = 0; ++ gint magic_value = 0; ++ ++ g_object_get(range, "minimum_visible_bars", &minimum_visible_blocks, NULL); ++ ++ g_print("coord = %d\n", coord); ++ gtk_widget_style_get (GTK_WIDGET (range), ++ "stepper_spacing", &stepper_spacing, ++ NULL); ++ ++ if (range->orientation == GTK_ORIENTATION_VERTICAL) { ++ if (minimum_visible_blocks > 0) ++ magic_value = ((range->layout->trough.height -(2*stepper_spacing)) / (range->adjustment->upper - range->adjustment->lower + 1)) * minimum_visible_blocks; + if (range->layout->trough.height == range->layout->slider.height) + frac = 1.0; + else +- frac = ((coord - range->layout->trough.y) / +- (gdouble) (range->layout->trough.height - range->layout->slider.height)); +- else ++ frac = ((coord - range->layout->trough.y - magic_value - stepper_spacing) / ++ (gdouble) (range->layout->trough.height - magic_value - range->layout->slider.height - (2 * stepper_spacing))); ++ } ++ else { ++ if (minimum_visible_blocks > 0) ++ magic_value = ((range->layout->trough.width -(2*stepper_spacing)) / (range->adjustment->upper - range->adjustment->lower + 1)) * minimum_visible_blocks; + if (range->layout->trough.width == range->layout->slider.width) + frac = 1.0; + else +- frac = ((coord - range->layout->trough.x) / +- (gdouble) (range->layout->trough.width - range->layout->slider.width)); ++ frac = ((coord - range->layout->trough.x - magic_value - stepper_spacing) / ++ (gdouble) (range->layout->trough.width - magic_value - range->layout->slider.width - (2 * stepper_spacing))); ++ } ++ ++ if (frac < 0.0) ++ frac = 0.0; ++ else ++ if (frac > 1.0) ++ frac = 1.0; + + if (should_invert (range)) + frac = 1.0 - frac; +@@ -1242,6 +1545,8 @@ + range->orientation == GTK_ORIENTATION_VERTICAL ? + event->y : event->x); + ++ g_print("button_press: calling coord_to_value with %d, click value = %d\n", event->x, click_value); ++ + range->trough_click_forward = click_value > range->adjustment->value; + range_grab_add (range, MOUSE_TROUGH, event->button); + +@@ -1286,7 +1591,9 @@ + * On button 2 press, we warp the slider to mouse position, + * then begin the slider drag. + */ +- if (event->button == 2) ++ /* OSSO modification : We want this to be ++ * the default behaviour. */ ++ if (range->layout->mouse_location == MOUSE_TROUGH) + { + gdouble slider_low_value, slider_high_value, new_value; + +@@ -1299,7 +1606,10 @@ + range->orientation == GTK_ORIENTATION_VERTICAL ? + event->y - range->layout->slider.height : + event->x - range->layout->slider.width); +- ++ ++ g_print("calling coord_to_value with %d\n", event->x); ++ g_print("calling coord_to_value with %d\n", range->orientation == GTK_ORIENTATION_VERTICAL? event->y-range->layout->slider.height:event->x-range->layout->slider.width); ++ + /* compute new value for warped slider */ + new_value = slider_low_value + (slider_high_value - slider_low_value) / 2; + +@@ -1353,8 +1663,10 @@ + else + delta = mouse_x - range->slide_initial_coordinate; + ++ delta += -4; + c = range->slide_initial_slider_position + delta; + ++ g_print("delta = %d, calling coord_to_value with %d + delta = %d\n", delta, range->slide_initial_slider_position, c); + new_value = coord_to_value (range, c); + + g_signal_emit (range, signals[CHANGE_VALUE], 0, GTK_SCROLL_JUMP, new_value, +@@ -1395,9 +1707,12 @@ + + if (range->layout->grab_button == event->button) + { ++ /* OSSO modification : Commented out. ++ * Not sure about the reason unfortunately. */ ++/* + if (range->layout->grab_location == MOUSE_SLIDER) + update_slider_position (range, range->layout->mouse_x, range->layout->mouse_y); +- ++*/ + stop_scrolling (range); + + return TRUE; +@@ -2026,6 +2341,7 @@ + GdkRectangle range_rect; + GtkRangeLayout *layout; + GtkWidget *widget; ++ gint minimum_visible_bars = 0; + + if (!range->need_recalc) + return; +@@ -2047,6 +2363,8 @@ + &slider_width, &stepper_size, &trough_border, &stepper_spacing, + NULL, NULL); + ++ g_object_get(range, "minimum_visible_bars", &minimum_visible_bars, NULL); ++ + gtk_range_calc_request (range, + slider_width, stepper_size, trough_border, stepper_spacing, + &range_rect, &border, &n_steppers, &slider_length); +@@ -2167,10 +2485,13 @@ + /* Compute slider position/length */ + { + gint y, bottom, top, height; +- +- top = layout->trough.y + stepper_spacing; +- bottom = layout->trough.y + layout->trough.height - stepper_spacing; +- ++ gint magic_value; ++ ++ magic_value = (layout->trough.height / (range->adjustment->upper - range->adjustment->lower + 1)); ++ ++ top = layout->trough.y + stepper_spacing + (minimum_visible_bars * magic_value); ++ bottom = layout->trough.y + layout->trough.height - stepper_spacing; ++ + /* slider height is the fraction (page_size / + * total_adjustment_range) times the trough height in pixels + */ +@@ -2307,8 +2628,11 @@ + /* Compute slider position/length */ + { + gint x, left, right, width; ++ gint magic_value; ++ ++ magic_value = (layout->trough.width / (range->adjustment->upper - range->adjustment->lower + 1)); + +- left = layout->trough.x + stepper_spacing; ++ left = layout->trough.x + stepper_spacing + (minimum_visible_bars * magic_value); + right = layout->trough.x + layout->trough.width - stepper_spacing; + + /* slider width is the fraction (page_size / +@@ -2340,6 +2664,32 @@ + + layout->slider.x = x; + layout->slider.width = width; ++ ++ /* Hildon modification : Calculate the x point of streaming ++ * indicator. ++ */ ++ { ++ gint stream_indicator_padding = 0; ++ OssoGtkRangePrivate *priv = OSSO_GTK_RANGE_GET_PRIVATE (range); ++ gtk_widget_style_get (widget, ++ "stream_indicator_padding", &stream_indicator_padding, ++ NULL); ++ ++ if (priv->stream_indicator == TRUE) ++ { ++ if (range->adjustment->upper - range->adjustment->lower != 0) ++ layout->stream_pixel_position = ++ (right - left - (2 * stream_indicator_padding)) * ++ ((priv->stream_position - range->adjustment->lower) / ++ (range->adjustment->upper - range->adjustment->lower)) + ++ left + stream_indicator_padding; ++ else ++ layout->stream_pixel_position = left + stream_indicator_padding; ++ ++ if (layout->stream_pixel_position < left + stream_indicator_padding) ++ layout->stream_pixel_position = left + stream_indicator_padding; ++ } ++ } + + /* These are publically exported */ + range->slider_start = layout->slider.x; +@@ -2382,12 +2732,17 @@ + GtkScrollType scroll, + gdouble value) + { ++ OssoGtkRangePrivate *priv = OSSO_GTK_RANGE_GET_PRIVATE (range); ++ + /* potentially adjust the bounds _before we clamp */ + g_signal_emit (range, signals[ADJUST_BOUNDS], 0, value); + + value = CLAMP (value, range->adjustment->lower, + (range->adjustment->upper - range->adjustment->page_size)); + ++ if (priv->stream_indicator && value > priv->stream_position) ++ value = (gdouble)priv->stream_position; ++ + if (range->round_digits >= 0) + { + gdouble power; +@@ -2465,11 +2820,16 @@ + initial_timeout (gpointer data) + { + GtkRange *range; ++ GtkSettings *settings; ++ guint timeout = SCROLL_LATER_DELAY; ++ ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-update-timeout", &timeout, NULL); + + GDK_THREADS_ENTER (); + range = GTK_RANGE (data); + range->timer->timeout_id = +- g_timeout_add (SCROLL_LATER_DELAY, ++ g_timeout_add (/*SCROLL_LATER_DELAY*/timeout, + second_timeout, + range); + GDK_THREADS_LEAVE (); +@@ -2482,13 +2842,19 @@ + gtk_range_add_step_timer (GtkRange *range, + GtkScrollType step) + { ++ GtkSettings *settings; ++ guint timeout = SCROLL_INITIAL_DELAY; ++ + g_return_if_fail (range->timer == NULL); + g_return_if_fail (step != GTK_SCROLL_NONE); + ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-initial-timeout", &timeout, NULL); ++ + range->timer = g_new (GtkRangeStepTimer, 1); + + range->timer->timeout_id = +- g_timeout_add (SCROLL_INITIAL_DELAY, ++ g_timeout_add (/*SCROLL_INITIAL_DELAY*/timeout, + initial_timeout, + range); + range->timer->step = step; +@@ -2528,9 +2894,15 @@ + static void + gtk_range_reset_update_timer (GtkRange *range) + { ++ /*GtkSettings *settings; ++ guint timeout = UPDATE_DELAY; ++ ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-update-timeout", &timeout, NULL);*/ ++ + gtk_range_remove_update_timer (range); + +- range->update_timeout_id = g_timeout_add (UPDATE_DELAY, ++ range->update_timeout_id = g_timeout_add (/*timeout*/UPDATE_DELAY, + update_timeout, + range); + } +@@ -2544,3 +2916,116 @@ + range->update_timeout_id = 0; + } + } ++ ++/** ++ * osso_gtk_range_set_stream_indicator: ++ * @range: A GtkRange ++ * @stream_indicator: Whether stream indicator graphics is shown and restricts slider. ++ * ++ * Sets whether a graphical stream indicator ++ * is show on the trough and the slider is restricted ++ * to streamed area. ++ **/ ++void ++osso_gtk_range_set_stream_indicator (GtkRange *range, gboolean stream_indicator) ++{ ++ OssoGtkRangePrivate *priv; ++ ++ g_return_if_fail (GTK_IS_RANGE (range)); ++ ++ priv = OSSO_GTK_RANGE_GET_PRIVATE (range); ++ ++ if (stream_indicator == priv->stream_indicator) ++ return; ++ ++ priv->stream_indicator = stream_indicator; ++ g_signal_emit_by_name (G_OBJECT (range), "value_changed", NULL); ++} ++ ++/** ++ * osso_gtk_range_get_stream_indicator: ++ * @range: A GtkRange ++ * ++ * Return value: Whether GtkRange displays an ++ * stream indicator graphics and slider is restricted ++ * to streamed area ++ **/ ++gboolean ++osso_gtk_range_get_stream_indicator (GtkRange *range) ++{ ++ OssoGtkRangePrivate *priv; ++ ++ g_return_val_if_fail (GTK_IS_RANGE (range), FALSE); ++ ++ priv = OSSO_GTK_RANGE_GET_PRIVATE (range); ++ ++ return priv->stream_indicator; ++} ++ ++/** ++ * osso_gtk_range_set_stream_position: ++ * @range : A GtkRange ++ * @position : The new position of the stream indicator ++ * ++ * Sets the new position of the stream indicator. ++ * It is automatically clamped between lower and upper. ++ * Note that you need to enable stream_indicator ++ * before any stream-functionality is active. ++ **/ ++void ++osso_gtk_range_set_stream_position (GtkRange *range, ++ gdouble position) ++{ ++ OssoGtkRangePrivate *priv; ++ gdouble new_pos; ++ ++ g_return_if_fail (GTK_IS_RANGE (range)); ++ ++ new_pos = CLAMP (position, ++ range->adjustment->lower, ++ range->adjustment->upper); ++ priv = OSSO_GTK_RANGE_GET_PRIVATE (range); ++ ++ priv->stream_position = new_pos; ++ /* Reset the value to clamp it with the stream_position. */ ++ if (priv->stream_indicator == TRUE) ++ gtk_range_set_value (range, gtk_range_get_value (range)); ++ ++ g_object_notify (G_OBJECT (range), "stream_position"); ++} ++/** ++ * osso_gtk_range_get_stream_position: ++ * @range : A GtkRange ++ * ++ * Return value: The current position of the stream ++ * indicator. Note that this value is undefined ++ * when stream indicator is not enabled. ++ **/ ++gdouble ++osso_gtk_range_get_stream_position (GtkRange *range) ++{ ++ OssoGtkRangePrivate *priv; ++ ++ g_return_if_fail (GTK_IS_RANGE (range)); ++ ++ priv = OSSO_GTK_RANGE_GET_PRIVATE (range); ++ ++ return priv->stream_position; ++} ++ ++/* OSSO addition : A function to ensure that ++ * scrolling stops if widget loses focus (example: ++ * dialog pops up) */ ++static gint ++osso_gtk_range_focus_out (GtkWidget *widget, GdkEventFocus *event) ++{ ++ gboolean hildonlike; ++ ++ gtk_widget_style_get (widget, "hildonlike", &hildonlike, NULL); ++ ++ if (hildonlike) ++ { ++ stop_scrolling (GTK_RANGE (widget)); ++ } ++ return GTK_WIDGET_CLASS (parent_class)->focus_out_event (widget, event); ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrange.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrange.h.diff new file mode 100644 index 0000000000..a48acfaad5 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrange.h.diff @@ -0,0 +1,29 @@ +--- gtk+-2.6.4/gtk/gtkrange.h 2004-08-27 05:54:12.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkrange.h 2005-04-06 16:19:37.798792072 +0300 +@@ -24,6 +24,10 @@ + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + ++/* Modified for Nokia Oyj during 2002-2005. See CHANGES file for list ++ * of changes. ++ */ ++ + #ifndef __GTK_RANGE_H__ + #define __GTK_RANGE_H__ + +@@ -155,6 +159,15 @@ + gdouble _gtk_range_get_wheel_delta (GtkRange *range, + GdkScrollDirection direction); + ++/* OSSO additions for streaming indicator support. */ ++void osso_gtk_range_set_stream_indicator (GtkRange *range, ++ gboolean stream_indicator); ++gboolean osso_gtk_range_get_stream_indicator (GtkRange *range); ++ ++void osso_gtk_range_set_stream_position (GtkRange *range, ++ gdouble position); ++gdouble osso_gtk_range_get_stream_position (GtkRange *range); ++ + #ifdef __cplusplus + } + #endif /* __cplusplus */ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrbtree.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrbtree.c.diff new file mode 100644 index 0000000000..1e34b3f2e7 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrbtree.c.diff @@ -0,0 +1,48 @@ +--- gtk+-2.6.4/gtk/gtkrbtree.c 2004-10-28 18:00:04.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkrbtree.c 2005-04-06 16:19:37.812789944 +0300 +@@ -1378,18 +1378,18 @@ + g_return_val_if_fail (node != NULL, NULL); + + /* Case 1: the node's below us. */ +- if (node->right != tree->nil) ++ if (node && node->right != tree->nil) + { + node = node->right; +- while (node->left != tree->nil) ++ while (node && node->left != tree->nil) + node = node->left; + return node; + } + + /* Case 2: it's an ancestor */ +- while (node->parent != tree->nil) ++ while (node && node->parent != tree->nil) + { +- if (node->parent->right == node) ++ if (node->parent && node->parent->right == node) + node = node->parent; + else + return (node->parent); +@@ -1407,18 +1407,18 @@ + g_return_val_if_fail (node != NULL, NULL); + + /* Case 1: the node's below us. */ +- if (node->left != tree->nil) ++ if (node != NULL && node->left != tree->nil) + { + node = node->left; +- while (node->right != tree->nil) ++ while (node != NULL && node->right != tree->nil) + node = node->right; + return node; + } + + /* Case 2: it's an ancestor */ +- while (node->parent != tree->nil) ++ while (node != NULL && node->parent != tree->nil) + { +- if (node->parent->left == node) ++ if (node->parent && node->parent->left == node) + node = node->parent; + else + return (node->parent); diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrc.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrc.c.diff new file mode 100644 index 0000000000..a6b4f999ac --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrc.c.diff @@ -0,0 +1,581 @@ +--- gtk+-2.6.4/gtk/gtkrc.c 2005-02-01 20:07:40.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkrc.c 2005-04-06 16:19:37.848784472 +0300 +@@ -56,6 +56,7 @@ + #include "gtkprivate.h" + #include "gtksettings.h" + #include "gtkwindow.h" ++#include "gtkhashtable.h" + + #ifdef G_OS_WIN32 + #include <io.h> +@@ -105,6 +106,14 @@ + GtkStyle *default_style; + }; + ++#define GTK_RC_STYLE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_RC_STYLE, GtkRcStylePrivate)) ++ ++typedef struct _GtkRcStylePrivate GtkRcStylePrivate; ++ ++struct _GtkRcStylePrivate { ++ GSList *logical_color_hashes; ++}; ++ + static GtkRcContext *gtk_rc_context_get (GtkSettings *settings); + + static guint gtk_rc_style_hash (const gchar *name); +@@ -179,6 +188,13 @@ + GScanner *scanner, + GtkRcStyle *rc_style, + GtkIconFactory *factory); ++static guint gtk_rc_parse_logical_color (GScanner *scanner, ++ GtkRcStyle *rc_style, ++ GtkHashTable *hash); ++static guint gtk_rc_parse_color_full (GScanner *scanner, ++ GdkColor *color, ++ GtkRcStyle *style); ++ + static void gtk_rc_clear_hash_node (gpointer key, + gpointer data, + gpointer user_data); +@@ -277,7 +293,8 @@ + { "stock", GTK_RC_TOKEN_STOCK }, + { "im_module_file", GTK_RC_TOKEN_IM_MODULE_FILE }, + { "LTR", GTK_RC_TOKEN_LTR }, +- { "RTL", GTK_RC_TOKEN_RTL } ++ { "RTL", GTK_RC_TOKEN_RTL }, ++ { "logical_color", GTK_RC_TOKEN_LOGICAL_COLOR } + }; + + static GHashTable *realized_style_ht = NULL; +@@ -954,6 +971,7 @@ + static void + gtk_rc_style_init (GtkRcStyle *style) + { ++ GtkRcStylePrivate *priv = GTK_RC_STYLE_GET_PRIVATE (style); + guint i; + + style->name = NULL; +@@ -976,6 +994,7 @@ + + style->rc_style_lists = NULL; + style->icon_factories = NULL; ++ priv->logical_color_hashes = NULL; + } + + static void +@@ -991,6 +1010,21 @@ + klass->create_rc_style = gtk_rc_style_real_create_rc_style; + klass->merge = gtk_rc_style_real_merge; + klass->create_style = gtk_rc_style_real_create_style; ++ ++ g_type_class_add_private (object_class, sizeof (GtkRcStylePrivate)); ++} ++ ++static void ++free_object_list (GSList *list) ++{ ++ GSList *tmp_list = list; ++ while (tmp_list) ++ { ++ g_object_unref (tmp_list->data); ++ tmp_list = tmp_list->next; ++ } ++ g_slist_free (list); ++ + } + + static void +@@ -998,9 +1032,11 @@ + { + GSList *tmp_list1, *tmp_list2; + GtkRcStyle *rc_style; ++ GtkRcStylePrivate *rc_priv; + gint i; + + rc_style = GTK_RC_STYLE (object); ++ rc_priv = GTK_RC_STYLE_GET_PRIVATE (rc_style); + + if (rc_style->name) + g_free (rc_style->name); +@@ -1059,13 +1095,8 @@ + rc_style->rc_properties = NULL; + } + +- tmp_list1 = rc_style->icon_factories; +- while (tmp_list1) +- { +- g_object_unref (tmp_list1->data); +- tmp_list1 = tmp_list1->next; +- } +- g_slist_free (rc_style->icon_factories); ++ free_object_list (rc_style->icon_factories); ++ free_object_list (rc_priv->logical_color_hashes); + + G_OBJECT_CLASS (parent_class)->finalize (object); + } +@@ -1125,6 +1156,14 @@ + return g_object_new (G_OBJECT_TYPE (style), NULL); + } + ++GSList * ++_gtk_rc_style_get_logical_color_hashes (GtkRcStyle *rc_style) ++{ ++ GtkRcStylePrivate *priv = GTK_RC_STYLE_GET_PRIVATE (rc_style); ++ ++ return priv->logical_color_hashes; ++} ++ + static gint + gtk_rc_properties_cmp (gconstpointer bsearch_node1, + gconstpointer bsearch_node2) +@@ -1499,6 +1538,22 @@ + context->rc_files = NULL; + + gtk_rc_parse_default_files (context); ++/*Hildon- Swapped these sections of code, so the styles from the ++ XSettings theme are available when parsing with gtk_rc_context_parse_string*/ ++ g_free (context->theme_name); ++ g_free (context->key_theme_name); ++ ++ g_object_get (context->settings, ++ "gtk-theme-name", &context->theme_name, ++ "gtk-key-theme-name", &context->key_theme_name, ++ NULL); ++ ++ if (context->theme_name && context->theme_name[0]) ++ gtk_rc_parse_named (context, context->theme_name, NULL); ++ if (context->key_theme_name && context->key_theme_name[0]) ++ gtk_rc_parse_named (context, context->key_theme_name, "key"); ++ ++/*****/ + + tmp_list = global_rc_files; + while (tmp_list) +@@ -1512,19 +1567,6 @@ + + tmp_list = tmp_list->next; + } +- +- g_free (context->theme_name); +- g_free (context->key_theme_name); +- +- g_object_get (context->settings, +- "gtk-theme-name", &context->theme_name, +- "gtk-key-theme-name", &context->key_theme_name, +- NULL); +- +- if (context->theme_name && context->theme_name[0]) +- gtk_rc_parse_named (context, context->theme_name, NULL); +- if (context->key_theme_name && context->key_theme_name[0]) +- gtk_rc_parse_named (context, context->key_theme_name, "key"); + + g_object_thaw_notify (G_OBJECT (context->settings)); + +@@ -1905,10 +1947,19 @@ + { + GScanner *scanner; + guint i; ++ gchar *name_str; + gboolean done; + + scanner = gtk_rc_scanner_new (); + ++ if (input_name != NULL) ++ { ++ name_str = (gchar *) g_malloc(strlen(input_name) + 7); ++ sprintf(name_str, "%s.cache", input_name); ++ /*osso_g_scanner_cache_open (scanner, name_str);*/ ++ g_free(name_str); ++ } ++ + if (input_fd >= 0) + { + g_assert (input_string == NULL); +@@ -2062,6 +2113,29 @@ + return style; + } + ++static GSList * ++concat_object_lists (GSList *list_a, GSList *list_b) ++{ ++ GSList *copy; ++ ++ copy = g_slist_copy (list_b); ++ if (copy) ++ { ++ GSList *iter; ++ ++ iter = copy; ++ while (iter != NULL) ++ { ++ g_object_ref (iter->data); ++ iter = g_slist_next (iter); ++ } ++ ++ return g_slist_concat (list_a, copy); ++ } ++ else ++ return list_a; ++} ++ + /* Reuses or frees rc_styles */ + static GtkStyle * + gtk_rc_init_style (GtkRcContext *context, +@@ -2083,6 +2157,7 @@ + GtkRcStyle *base_style = NULL; + GtkRcStyle *proto_style; + GtkRcStyleClass *proto_style_class; ++ GtkRcStylePrivate *proto_priv; + GSList *tmp_styles; + GType rc_style_type = GTK_TYPE_RC_STYLE; + +@@ -2109,12 +2184,13 @@ + + proto_style_class = GTK_RC_STYLE_GET_CLASS (base_style); + proto_style = proto_style_class->create_rc_style (base_style); ++ proto_priv = GTK_RC_STYLE_GET_PRIVATE (proto_style); + + tmp_styles = rc_styles; + while (tmp_styles) + { + GtkRcStyle *rc_style = tmp_styles->data; +- GSList *factories; ++ GtkRcStylePrivate *rc_priv = GTK_RC_STYLE_GET_PRIVATE (rc_style); + + proto_style_class->merge (proto_style, rc_style); + +@@ -2122,22 +2198,12 @@ + if (!g_slist_find (rc_style->rc_style_lists, rc_styles)) + rc_style->rc_style_lists = g_slist_prepend (rc_style->rc_style_lists, rc_styles); + +- factories = g_slist_copy (rc_style->icon_factories); +- if (factories) +- { +- GSList *iter; +- +- iter = factories; +- while (iter != NULL) +- { +- g_object_ref (iter->data); +- iter = g_slist_next (iter); +- } +- +- proto_style->icon_factories = g_slist_concat (proto_style->icon_factories, +- factories); +- +- } ++ proto_style->icon_factories = ++ concat_object_lists (proto_style->icon_factories, ++ rc_style->icon_factories); ++ proto_priv->logical_color_hashes = ++ concat_object_lists (proto_priv->logical_color_hashes, ++ rc_priv->logical_color_hashes); + + tmp_styles = tmp_styles->next; + } +@@ -2515,9 +2581,11 @@ + GtkRcStyle *rc_style; + GtkRcStyle *orig_style; + GtkRcStyle *parent_style; ++ GtkRcStylePrivate *rc_priv = NULL; + guint token; + gint i; + GtkIconFactory *our_factory = NULL; ++ GtkHashTable *our_hash = NULL; + + token = g_scanner_get_next_token (scanner); + if (token != GTK_RC_TOKEN_STYLE) +@@ -2533,12 +2601,6 @@ + else + orig_style = NULL; + +- /* If there's a list, its first member is always the factory belonging +- * to this RcStyle +- */ +- if (rc_style && rc_style->icon_factories) +- our_factory = rc_style->icon_factories->data; +- + if (!rc_style) + { + rc_style = gtk_rc_style_new (); +@@ -2550,6 +2612,16 @@ + for (i = 0; i < 5; i++) + rc_style->color_flags[i] = 0; + } ++ ++ rc_priv = GTK_RC_STYLE_GET_PRIVATE (rc_style); ++ ++ /* If there's a list, its first member is always the factory belonging ++ * to this RcStyle ++ */ ++ if (rc_style->icon_factories) ++ our_factory = rc_style->icon_factories->data; ++ if (rc_priv->logical_color_hashes) ++ our_hash = rc_priv->logical_color_hashes->data; + + token = g_scanner_peek_next_token (scanner); + if (token == G_TOKEN_EQUAL_SIGN) +@@ -2566,8 +2638,8 @@ + parent_style = gtk_rc_style_find (context, scanner->value.v_string); + if (parent_style) + { +- GSList *factories; +- ++ GtkRcStylePrivate *parent_priv = GTK_RC_STYLE_GET_PRIVATE (parent_style); ++ + for (i = 0; i < 5; i++) + { + rc_style->color_flags[i] = parent_style->color_flags[i]; +@@ -2621,17 +2693,24 @@ + rc_style->icon_factories = g_slist_prepend (rc_style->icon_factories, + our_factory); + } +- +- rc_style->icon_factories = g_slist_concat (rc_style->icon_factories, +- g_slist_copy (parent_style->icon_factories)); +- +- factories = parent_style->icon_factories; +- while (factories != NULL) ++ rc_style->icon_factories = concat_object_lists (rc_style->icon_factories, ++ parent_style->icon_factories); ++ } ++ ++ /* Also append parent's color hashes, adding a ref to them */ ++ if (parent_priv->logical_color_hashes != NULL) ++ { ++ /* See comment above .. */ ++ if (our_hash == NULL) + { +- g_object_ref (factories->data); +- factories = factories->next; ++ our_hash = _gtk_hash_table_new (); ++ rc_priv->logical_color_hashes = g_slist_prepend (rc_priv->logical_color_hashes, ++ our_hash); + } +- } ++ ++ rc_priv->logical_color_hashes = concat_object_lists (rc_priv->logical_color_hashes, ++ parent_priv->logical_color_hashes); ++ } + } + } + +@@ -2689,12 +2768,22 @@ + } + token = gtk_rc_parse_stock (context, scanner, rc_style, our_factory); + break; ++ case GTK_RC_TOKEN_LOGICAL_COLOR: ++ if (our_hash == NULL) ++ { ++ our_hash = _gtk_hash_table_new (); ++ rc_priv->logical_color_hashes = g_slist_prepend (rc_priv->logical_color_hashes, ++ our_hash); ++ } ++ token = gtk_rc_parse_logical_color (scanner, rc_style, our_hash); ++ break; + case G_TOKEN_IDENTIFIER: + if (is_c_identifier (scanner->next_value.v_identifier) && + scanner->next_value.v_identifier[0] >= 'A' && + scanner->next_value.v_identifier[0] <= 'Z') /* match namespaced type names */ + { + GtkRcProperty prop = { 0, 0, NULL, { 0, }, }; ++ gchar *name; + + g_scanner_get_next_token (scanner); /* eat type name */ + prop.type_name = g_quark_from_string (scanner->value.v_identifier); +@@ -2712,8 +2801,10 @@ + } + + /* it's important that we do the same canonification as GParamSpecPool here */ +- g_strcanon (scanner->value.v_identifier, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-'); +- prop.property_name = g_quark_from_string (scanner->value.v_identifier); ++ name = g_strdup (scanner->value.v_identifier); ++ g_strcanon (name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-'); ++ prop.property_name = g_quark_from_string (name); ++ g_free (name); + + token = gtk_rc_parse_assignment (scanner, &prop); + if (token == G_TOKEN_NONE) +@@ -2825,7 +2916,7 @@ + return G_TOKEN_EQUAL_SIGN; + + style->color_flags[state] |= GTK_RC_BG; +- return gtk_rc_parse_color (scanner, &style->bg[state]); ++ return gtk_rc_parse_color_full (scanner, &style->bg[state], style); + } + + static guint +@@ -2848,7 +2939,7 @@ + return G_TOKEN_EQUAL_SIGN; + + style->color_flags[state] |= GTK_RC_FG; +- return gtk_rc_parse_color (scanner, &style->fg[state]); ++ return gtk_rc_parse_color_full (scanner, &style->fg[state], style); + } + + static guint +@@ -2871,7 +2962,7 @@ + return G_TOKEN_EQUAL_SIGN; + + style->color_flags[state] |= GTK_RC_TEXT; +- return gtk_rc_parse_color (scanner, &style->text[state]); ++ return gtk_rc_parse_color_full (scanner, &style->text[state], style); + } + + static guint +@@ -2894,7 +2985,7 @@ + return G_TOKEN_EQUAL_SIGN; + + style->color_flags[state] |= GTK_RC_BASE; +- return gtk_rc_parse_color (scanner, &style->base[state]); ++ return gtk_rc_parse_color_full (scanner, &style->base[state], style); + } + + static guint +@@ -3345,11 +3436,45 @@ + + return G_TOKEN_NONE; + } ++static gboolean ++lookup_logical_color (GtkRcStyle *style, ++ const char *color_name, ++ GdkColor *color) ++{ ++ GtkRcStylePrivate *priv = GTK_RC_STYLE_GET_PRIVATE (style); ++ GSList *iter; ++ ++ iter = priv->logical_color_hashes; ++ while (iter != NULL) ++ { ++ GdkColor *match = g_hash_table_lookup (GTK_HASH_TABLE (iter->data)->hash, ++ color_name); ++ if (match) ++ { ++ color->red = match->red; ++ color->green = match->green; ++ color->blue = match->blue; ++ return TRUE; ++ } ++ ++ iter = g_slist_next (iter); ++ } ++ ++ return FALSE; ++} + + guint + gtk_rc_parse_color (GScanner *scanner, + GdkColor *color) + { ++ return gtk_rc_parse_color_full (scanner, color, NULL); ++} ++ ++static guint ++gtk_rc_parse_color_full (GScanner *scanner, ++ GdkColor *color, ++ GtkRcStyle *style) ++{ + guint token; + + g_return_val_if_fail (scanner != NULL, G_TOKEN_ERROR); +@@ -3407,11 +3532,14 @@ + case G_TOKEN_STRING: + if (!gdk_color_parse (scanner->value.v_string, color)) + { +- g_scanner_warn (scanner, "Invalid color constant '%s'", +- scanner->value.v_string); +- return G_TOKEN_STRING; ++ if (!(style && lookup_logical_color (style, scanner->value.v_string, color))) ++ { ++ g_scanner_warn (scanner, "Invalid color constant '%s'", ++ scanner->value.v_string); ++ return G_TOKEN_STRING; ++ } + } +- else ++ + return G_TOKEN_NONE; + + default: +@@ -3625,8 +3753,8 @@ + } + + static guint +-gtk_rc_parse_stock_id (GScanner *scanner, +- gchar **stock_id) ++gtk_rc_parse_hash_key (GScanner *scanner, ++ gchar **hash_key) + { + guint token; + +@@ -3639,12 +3767,12 @@ + if (token != G_TOKEN_STRING) + return G_TOKEN_STRING; + +- *stock_id = g_strdup (scanner->value.v_string); ++ *hash_key = g_strdup (scanner->value.v_string); + + token = g_scanner_get_next_token (scanner); + if (token != G_TOKEN_RIGHT_BRACE) + { +- g_free (*stock_id); ++ g_free (*hash_key); + return G_TOKEN_RIGHT_BRACE; + } + +@@ -3854,7 +3982,7 @@ + if (token != GTK_RC_TOKEN_STOCK) + return GTK_RC_TOKEN_STOCK; + +- token = gtk_rc_parse_stock_id (scanner, &stock_id); ++ token = gtk_rc_parse_hash_key (scanner, &stock_id); + if (token != G_TOKEN_NONE) + return token; + +@@ -3965,3 +4093,46 @@ + } + + #endif ++ ++static guint ++gtk_rc_parse_logical_color (GScanner *scanner, ++ GtkRcStyle *rc_style, ++ GtkHashTable *hash) ++{ ++ gchar *color_id = NULL; ++ guint token; ++ GdkColor *color; ++ ++ token = g_scanner_get_next_token (scanner); ++ if (token != GTK_RC_TOKEN_LOGICAL_COLOR) ++ return GTK_RC_TOKEN_LOGICAL_COLOR; ++ ++ token = gtk_rc_parse_hash_key (scanner, &color_id); ++ if (token != G_TOKEN_NONE) ++ return token; ++ ++ token = g_scanner_get_next_token (scanner); ++ if (token != G_TOKEN_EQUAL_SIGN) ++ { ++ g_free (color_id); ++ return G_TOKEN_EQUAL_SIGN; ++ } ++ ++ color = g_new (GdkColor, 1); ++ token = gtk_rc_parse_color_full (scanner, color, rc_style); ++ if (token != G_TOKEN_NONE) ++ { ++ g_free (color_id); ++ g_free (color); ++ return token; ++ } ++ ++ /* Because the hash is created with destroy functions, ++ * g_hash_table_insert will free any old values for us, ++ * if a mapping with the specified key already exists. */ ++ g_hash_table_insert (hash->hash, color_id, color); ++ ++ return G_TOKEN_NONE; ++} ++ ++ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrc.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrc.h.diff new file mode 100644 index 0000000000..42710cd549 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkrc.h.diff @@ -0,0 +1,19 @@ +--- gtk+-2.6.4/gtk/gtkrc.h 2004-12-12 23:09:13.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkrc.h 2005-04-06 16:19:37.866781736 +0300 +@@ -211,6 +211,7 @@ + GTK_RC_TOKEN_STOCK, + GTK_RC_TOKEN_LTR, + GTK_RC_TOKEN_RTL, ++ GTK_RC_TOKEN_LOGICAL_COLOR, + GTK_RC_TOKEN_LAST + } GtkRcTokenType; + +@@ -241,6 +242,8 @@ + + const gchar* _gtk_rc_context_get_default_font_name (GtkSettings *settings); + ++GSList *_gtk_rc_style_get_logical_color_hashes (GtkRcStyle *rc_style); ++ + #ifdef __cplusplus + } + #endif /* __cplusplus */ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkscrolledwindow.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkscrolledwindow.c.diff new file mode 100644 index 0000000000..3c20de8ebd --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkscrolledwindow.c.diff @@ -0,0 +1,162 @@ +--- gtk+-2.6.4/gtk/gtkscrolledwindow.c 2004-08-09 19:59:52.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkscrolledwindow.c 2005-04-06 16:19:37.898776872 +0300 +@@ -289,6 +289,13 @@ + DEFAULT_SCROLLBAR_SPACING, + G_PARAM_READABLE)); + ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("scrollbar_dislocation", ++ P_("Scrollbar dislocation"), ++ P_("Flag for having scrollbar at the outer border or container padding instead of at the inner border"), ++ FALSE, ++ G_PARAM_READABLE)); ++ + signals[SCROLL_CHILD] = + g_signal_new ("scroll_child", + G_TYPE_FROM_CLASS (object_class), +@@ -1062,6 +1069,73 @@ + } + } + ++static gdouble ++gtk_scrolled_window_get_focus_movement (GtkScrolledWindow *scrolled_window) ++{ ++ GtkWidget *focus_child; ++ GtkRange *range; ++ GtkAdjustment *adj; ++ gdouble value, new_value; ++ gint x, y; ++ ++ focus_child = GTK_CONTAINER(scrolled_window)->focus_child; ++ if (focus_child == NULL) ++ return 0; ++ ++ while (GTK_IS_CONTAINER (focus_child) && ++ GTK_CONTAINER (focus_child)->focus_child) ++ { ++ focus_child = GTK_CONTAINER (focus_child)->focus_child; ++ } ++ ++ range = GTK_RANGE (scrolled_window->vscrollbar); ++ adj = range->adjustment; ++ value = gtk_adjustment_get_value (adj); ++ ++ gtk_widget_translate_coordinates (focus_child->parent, ++ GTK_WIDGET(scrolled_window), ++ focus_child->allocation.x, ++ focus_child->allocation.y, &x, &y); ++ ++ if (y < 0) ++ { ++ /* scroll up */ ++ new_value = value + y; ++ if (new_value < adj->lower) ++ new_value = adj->lower; ++ } ++ else if (y + focus_child->allocation.height > adj->page_size) ++ { ++ /* scroll down */ ++ new_value = value + y + focus_child->allocation.height - adj->page_size; ++ if (new_value > adj->upper - adj->page_size) ++ new_value = adj->upper - adj->page_size; ++ } ++ else ++ { ++ new_value = value; ++ } ++ ++ return new_value - value; ++} ++ ++static void ++gtk_scrolled_window_scroll_to_focus (GtkScrolledWindow *scrolled_window) ++{ ++ GtkAdjustment *adj; ++ gdouble diff; ++ ++ diff = gtk_scrolled_window_get_focus_movement (scrolled_window); ++ if (diff != 0) ++ { ++ adj = GTK_RANGE (scrolled_window->vscrollbar)->adjustment; ++ ++ gtk_adjustment_set_value (adj, gtk_adjustment_get_value (adj) + diff); ++ gtk_scrolled_window_set_vadjustment (scrolled_window, ++ GTK_ADJUSTMENT (adj)); ++ } ++} ++ + static void + gtk_scrolled_window_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) +@@ -1071,17 +1145,32 @@ + GtkAllocation relative_allocation; + GtkAllocation child_allocation; + gint scrollbar_spacing; +- ++ gboolean is_focus_visible, dislocate; ++ gint dislocation; ++ + g_return_if_fail (GTK_IS_SCROLLED_WINDOW (widget)); + g_return_if_fail (allocation != NULL); + + scrolled_window = GTK_SCROLLED_WINDOW (widget); + bin = GTK_BIN (scrolled_window); + ++ is_focus_visible = ++ gtk_scrolled_window_get_focus_movement (scrolled_window) == 0; ++ + scrollbar_spacing = _gtk_scrolled_window_get_scrollbar_spacing (scrolled_window); + + widget->allocation = *allocation; + ++ /* See how much scrollbar needs be "dislocated" (to get it to the other ++ * edge of the border). Does not apply to all occasions. */ ++ gtk_widget_style_get (GTK_WIDGET (scrolled_window), ++ "scrollbar_dislocation", &dislocate, ++ NULL); ++ if (dislocate) ++ dislocation = GTK_CONTAINER (scrolled_window)->border_width; ++ else ++ dislocation = 0; ++ + if (scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS) + scrolled_window->hscrollbar_visible = TRUE; + else if (scrolled_window->hscrollbar_policy == GTK_POLICY_NEVER) +@@ -1150,10 +1239,12 @@ + child_allocation.y = (relative_allocation.y + + relative_allocation.height + + scrollbar_spacing + ++ dislocation + + (scrolled_window->shadow_type == GTK_SHADOW_NONE ? + 0 : widget->style->ythickness)); + else +- child_allocation.y = GTK_CONTAINER (scrolled_window)->border_width; ++ child_allocation.y = GTK_CONTAINER (scrolled_window)->border_width - ++ dislocation; + + child_allocation.width = relative_allocation.width; + child_allocation.height = hscrollbar_requisition.height; +@@ -1189,10 +1280,12 @@ + child_allocation.x = (relative_allocation.x + + relative_allocation.width + + scrollbar_spacing + ++ dislocation + + (scrolled_window->shadow_type == GTK_SHADOW_NONE ? + 0 : widget->style->xthickness)); + else +- child_allocation.x = GTK_CONTAINER (scrolled_window)->border_width; ++ child_allocation.x = GTK_CONTAINER (scrolled_window)->border_width - ++ dislocation; + + child_allocation.y = relative_allocation.y; + child_allocation.width = vscrollbar_requisition.width; +@@ -1207,6 +1300,9 @@ + } + + gtk_widget_size_allocate (scrolled_window->vscrollbar, &child_allocation); ++ ++ if (is_focus_visible) ++ gtk_scrolled_window_scroll_to_focus (scrolled_window); + } + else if (GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar)) + gtk_widget_hide (scrolled_window->vscrollbar); diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkseparator.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkseparator.c.diff new file mode 100644 index 0000000000..63810e047b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkseparator.c.diff @@ -0,0 +1,21 @@ +--- gtk+-2.6.4/gtk/gtkseparator.c 2004-08-09 19:59:52.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkseparator.c 2005-04-06 16:19:37.928772312 +0300 +@@ -65,6 +65,18 @@ + static void + gtk_separator_class_init (GtkSeparatorClass *class) + { ++ GParamSpec* pspec; ++ ++ pspec = g_param_spec_boolean("hildonlike-drawing", ++ "hildonlike looks.", ++ "hildonlike looks. " ++ "Draws with paint_box " ++ "instead of paint_(vh)line, 1/0", ++ FALSE, ++ G_PARAM_READABLE); ++ ++ gtk_widget_class_install_style_property(GTK_WIDGET_CLASS(class), ++ pspec); + } + + static void diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkseparatortoolitem.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkseparatortoolitem.c.diff new file mode 100644 index 0000000000..63203f7db6 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkseparatortoolitem.c.diff @@ -0,0 +1,90 @@ +--- gtk+-2.6.4/gtk/gtkseparatortoolitem.c 2004-08-09 19:59:52.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkseparatortoolitem.c 2005-04-06 16:19:37.937770944 +0300 +@@ -29,6 +29,7 @@ + #include "gtktoolbar.h" + + #define MENU_ID "gtk-separator-tool-item-menu-id" ++#define HILDON_SEPARATOR_HEIGHT 40 + + enum { + PROP_0, +@@ -137,6 +138,18 @@ + P_("Whether the separator is drawn, or just blank"), + TRUE, + G_PARAM_READWRITE)); ++ /* Hildon addition : some new style properties we need. */ ++ gtk_widget_class_install_style_property(widget_class, ++ g_param_spec_int ("separator_size", ++ P_("Separator size"), P_("The thickness of the separator. -1 for default behaviour."), ++ -1, G_MAXINT, -1, G_PARAM_READWRITE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("is_image", ++ P_("Is separator an image or a line"), ++ P_("Whether the separator is drawn as an image, or just as a line"), ++ FALSE, ++ G_PARAM_READWRITE)); + + g_type_class_add_private (object_class, sizeof (GtkSeparatorToolItemPrivate)); + } +@@ -213,14 +226,26 @@ + GtkToolItem *item = GTK_TOOL_ITEM (widget); + GtkOrientation orientation = gtk_tool_item_get_orientation (item); + ++ /* Hildon modifications from here on: ++ * if the "separator_size" style property ++ * is the default value (it has not been set ++ * in resource files), use default gtk+ behaviour. ++ */ ++ gint separator_size = -1; ++ ++ gtk_widget_style_get( widget, "separator_size", &separator_size, NULL ); ++ ++ if (separator_size == -1) ++ separator_size = get_space_size (item); ++ + if (orientation == GTK_ORIENTATION_HORIZONTAL) + { +- requisition->width = get_space_size (item); ++ requisition->width = separator_size; + requisition->height = 1; + } + else + { +- requisition->height = get_space_size (item); ++ requisition->height = separator_size; + requisition->width = 1; + } + } +@@ -235,10 +260,30 @@ + + if (priv->draw) + { ++ gboolean is_image = FALSE; + if (widget->parent && GTK_IS_TOOLBAR (widget->parent)) + toolbar = GTK_TOOLBAR (widget->parent); + +- _gtk_toolbar_paint_space_line (widget, toolbar, ++ gtk_widget_style_get( widget, "is_image", &is_image, NULL ); ++ if (is_image) ++ { ++ gint separator_size = -1; ++ GtkOrientation orientation = gtk_tool_item_get_orientation (GTK_TOOL_ITEM (widget)); ++ ++ gtk_widget_style_get( widget, "separator_size", &separator_size, NULL ); ++ ++ /* if style property not set, use gtk+ ++ * default behaviour. */ ++ if (separator_size == -1) ++ separator_size = get_space_size (GTK_TOOL_ITEM (widget)); ++ ++ gtk_paint_box( widget->style, widget->window, GTK_WIDGET_STATE(widget), ++ GTK_SHADOW_NONE, &event->area, widget, ++ orientation == GTK_ORIENTATION_HORIZONTAL ? "vertical" : "horizontal", ++ widget->allocation.x, widget->allocation.y + (widget->allocation.height - HILDON_SEPARATOR_HEIGHT) / 2, ++ separator_size, HILDON_SEPARATOR_HEIGHT ); ++ } else ++ _gtk_toolbar_paint_space_line (widget, toolbar, + &(event->area), &widget->allocation); + } + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtksettings.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtksettings.c.diff new file mode 100644 index 0000000000..fac467797d --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtksettings.c.diff @@ -0,0 +1,66 @@ +--- gtk+-2.6.4/gtk/gtksettings.c 2004-11-20 01:18:38.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtksettings.c 2005-04-06 16:19:37.941770336 +0300 +@@ -1,4 +1,4 @@ +-/* GTK - The GIMP Toolkit ++/* + * Copyright (C) 2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or +@@ -24,6 +24,9 @@ + #include "gtkintl.h" + #include "gtkwidget.h" + ++#define DEFAULT_INITIAL_TIMEOUT 300 ++#define DEFAULT_UPDATE_TIMEOUT 125 ++ + typedef struct _GtkSettingsValuePrivate GtkSettingsValuePrivate; + + typedef enum +@@ -72,6 +75,9 @@ + PROP_XFT_RGBA, + PROP_XFT_DPI, + #endif ++ PROP_INITIAL_TIMEOUT, ++ PROP_UPDATE_TIMEOUT, ++ PROP_HILDON_KEYBOARD_NAVIGATION, + PROP_ALTERNATIVE_BUTTON_ORDER + }; + +@@ -426,6 +432,37 @@ + NULL); + + g_assert (result == PROP_XFT_DPI); ++ ++ result = settings_install_property_parser (class, ++ g_param_spec_int ("gtk-initial-timeout", ++ P_("Start timeout"), ++ P_("Starting value for timeouts, when button is pressed"), ++ 0, G_MAXINT, DEFAULT_INITIAL_TIMEOUT, ++ G_PARAM_READWRITE), ++ NULL); ++ ++ g_assert (result == PROP_INITIAL_TIMEOUT); ++ ++ result = settings_install_property_parser (class, ++ g_param_spec_int ("gtk-update-timeout", ++ P_("Repeat timeout"), ++ P_("Repeat value for timeouts, when button is pressed"), ++ 0, G_MAXINT, DEFAULT_UPDATE_TIMEOUT, ++ G_PARAM_READWRITE), ++ NULL); ++ ++ g_assert (result == PROP_UPDATE_TIMEOUT); ++ ++ result = settings_install_property_parser (class, ++ g_param_spec_boolean ("hildon-keyboard-navigation", ++ P_("Keyboard navigation"), ++ P_("This property can be used to enable keyboard navigation"), ++ FALSE, ++ G_PARAM_READWRITE), ++ NULL); ++ ++ g_assert (result == PROP_HILDON_KEYBOARD_NAVIGATION); ++ + #endif /* GDK_WINDOWING_X11 */ + result = settings_install_property_parser (class, + g_param_spec_boolean ("gtk-alternative-button-order", diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkspinbutton.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkspinbutton.c.diff new file mode 100644 index 0000000000..13f8c330f5 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkspinbutton.c.diff @@ -0,0 +1,50 @@ +--- gtk+-2.6.4/gtk/gtkspinbutton.c 2004-11-14 03:25:35.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkspinbutton.c 2005-04-06 16:19:37.945769728 +0300 +@@ -1041,15 +1041,21 @@ + GtkArrowType click_child, + gdouble step) + { ++ GtkSettings *settings; ++ guint timeout; ++ + g_return_if_fail (click_child == GTK_ARROW_UP || click_child == GTK_ARROW_DOWN); +- ++ ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-initial-timeout", &timeout, NULL); ++ + spin->click_child = click_child; + + if (!spin->timer) + { + spin->timer_step = step; + spin->need_timer = TRUE; +- spin->timer = g_timeout_add (SPIN_BUTTON_INITIAL_TIMER_DELAY, ++ spin->timer = g_timeout_add (/*SPIN_BUTTON_INITIAL_TIMER_DELAY*/timeout, + (GSourceFunc) gtk_spin_button_timer, + (gpointer) spin); + } +@@ -1188,9 +1194,14 @@ + gtk_spin_button_timer (GtkSpinButton *spin_button) + { + gboolean retval = FALSE; ++ GtkSettings *settings; ++ guint timeout; + + GDK_THREADS_ENTER (); + ++ settings = gtk_settings_get_default (); ++ g_object_get (settings, "gtk-update-timeout", &timeout, NULL); ++ + if (spin_button->timer) + { + if (spin_button->click_child == GTK_ARROW_UP) +@@ -1201,7 +1212,7 @@ + if (spin_button->need_timer) + { + spin_button->need_timer = FALSE; +- spin_button->timer = g_timeout_add (SPIN_BUTTON_TIMER_DELAY, ++ spin_button->timer = g_timeout_add (/*SPIN_BUTTON_TIMER_DELAY*/timeout, + (GSourceFunc) gtk_spin_button_timer, + (gpointer) spin_button); + } diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkstyle.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkstyle.c.diff new file mode 100644 index 0000000000..6a94d96509 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkstyle.c.diff @@ -0,0 +1,250 @@ +--- gtk+-2.6.4/gtk/gtkstyle.c 2005-01-18 18:43:45.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkstyle.c 2005-04-06 16:19:37.951768816 +0300 +@@ -38,6 +38,7 @@ + #include "gtkthemes.h" + #include "gtkiconfactory.h" + #include "gtksettings.h" /* _gtk_settings_parse_convert() */ ++#include "gtkhashtable.h" + + #define LIGHTNESS_MULT 1.3 + #define DARKNESS_MULT 0.7 +@@ -49,6 +50,14 @@ + GValue value; + } PropertyValue; + ++#define GTK_STYLE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_STYLE, GtkStylePrivate)) ++ ++typedef struct _GtkStylePrivate GtkStylePrivate; ++ ++struct _GtkStylePrivate { ++ GSList *logical_color_hashes; ++}; ++ + /* --- prototypes --- */ + static void gtk_style_init (GtkStyle *style); + static void gtk_style_class_init (GtkStyleClass *klass); +@@ -655,6 +664,7 @@ + klass->draw_layout = gtk_default_draw_layout; + klass->draw_resize_grip = gtk_default_draw_resize_grip; + ++ g_type_class_add_private (object_class, sizeof (GtkStylePrivate)); + + /** + * GtkStyle::realize: +@@ -714,9 +724,28 @@ + } + + static void ++free_object_list (GSList *list) ++{ ++ if (list) ++ { ++ GSList *tmp_list = list; ++ ++ while (tmp_list) ++ { ++ g_object_unref (tmp_list->data); ++ tmp_list = tmp_list->next; ++ } ++ ++ g_slist_free (list); ++ } ++ ++} ++ ++static void + gtk_style_finalize (GObject *object) + { + GtkStyle *style = GTK_STYLE (object); ++ GtkStylePrivate *priv = GTK_STYLE_GET_PRIVATE (style); + + g_return_if_fail (style->attach_count == 0); + +@@ -745,19 +774,9 @@ + g_slist_free_1 (style->styles); + } + } +- +- if (style->icon_factories) +- { +- GSList *tmp_list = style->icon_factories; +- +- while (tmp_list) +- { +- g_object_unref (tmp_list->data); +- tmp_list = tmp_list->next; +- } +- +- g_slist_free (style->icon_factories); +- } ++ ++ free_object_list (style->icon_factories); ++ free_object_list (priv->logical_color_hashes); + + pango_font_description_free (style->font_desc); + +@@ -1003,6 +1022,51 @@ + return gtk_icon_factory_lookup_default (stock_id); + } + ++ /** ++ * gtk_style_lookup_logical_color: ++ * @style: a #GtkStyle ++ * @color_name: the name of the logical color to look up ++ * @color: the #GdkColor to fill in ++ * ++ * Looks up @color_name in the style's logical color mappings, ++ * filling in @color and returning %TRUE if found, otherwise ++ * returning %FALSE. Do not cache the found mapping, because ++ * it depends on the #GtkStyle and might change when a theme ++ * switch occurs. ++ * ++ * Return value: %TRUE if the mapping was found. ++ */ ++gboolean ++gtk_style_lookup_logical_color (GtkStyle *style, ++ const char *color_name, ++ GdkColor *color) ++{ ++ GtkStylePrivate *priv = GTK_STYLE_GET_PRIVATE (style); ++ GSList *iter; ++ ++ g_return_val_if_fail (GTK_IS_STYLE (style), FALSE); ++ g_return_val_if_fail (color_name != NULL, FALSE); ++ g_return_val_if_fail (color != NULL, FALSE); ++ ++ iter = priv->logical_color_hashes; ++ while (iter != NULL) ++ { ++ GdkColor *mapping = g_hash_table_lookup (GTK_HASH_TABLE (iter->data)->hash, ++ color_name); ++ if (mapping) ++ { ++ color->red = mapping->red; ++ color->green = mapping->green; ++ color->blue = mapping->blue; ++ return TRUE; ++ } ++ ++ iter = g_slist_next (iter); ++ } ++ ++ return FALSE; ++} ++ + /** + * gtk_draw_hline: + * @style: a #GtkStyle +@@ -1717,10 +1781,32 @@ + clear_property_cache (style); + } + ++static GSList * ++copy_object_list (GSList *list) ++{ ++ if (list) ++ { ++ GSList *iter; ++ ++ iter = list; ++ while (iter != NULL) ++ { ++ g_object_ref (iter->data); ++ iter = g_slist_next (iter); ++ } ++ ++ return g_slist_copy (list); ++ } ++ else ++ return NULL; ++} ++ + static void + gtk_style_real_init_from_rc (GtkStyle *style, + GtkRcStyle *rc_style) + { ++ GtkStylePrivate *priv = GTK_STYLE_GET_PRIVATE (style); ++ GSList *logical_color_hashes; + gint i; + + /* cache _should_ be still empty */ +@@ -1746,19 +1832,10 @@ + if (rc_style->ythickness >= 0) + style->ythickness = rc_style->ythickness; + +- if (rc_style->icon_factories) +- { +- GSList *iter; ++ style->icon_factories = copy_object_list (rc_style->icon_factories); + +- style->icon_factories = g_slist_copy (rc_style->icon_factories); +- +- iter = style->icon_factories; +- while (iter != NULL) +- { +- g_object_ref (iter->data); +- iter = g_slist_next (iter); +- } +- } ++ logical_color_hashes = _gtk_rc_style_get_logical_color_hashes (rc_style); ++ priv->logical_color_hashes = copy_object_list (logical_color_hashes); + } + + static gint +@@ -2065,7 +2142,7 @@ + const gchar *detail) + { + GdkPixbuf *pixbuf; +- ++ + g_return_val_if_fail (GTK_IS_STYLE (style), NULL); + g_return_val_if_fail (GTK_STYLE_GET_CLASS (style)->render_icon != NULL, NULL); + +@@ -2156,7 +2233,7 @@ + { + return gdk_pixbuf_scale_simple (src, + width, height, +- GDK_INTERP_BILINEAR); ++ GDK_INTERP_NEAREST); + } + } + +@@ -2183,7 +2260,6 @@ + */ + + base_pixbuf = gtk_icon_source_get_pixbuf (source); +- + g_return_val_if_fail (base_pixbuf != NULL, NULL); + + if (widget && gtk_widget_has_screen (widget)) +@@ -2213,7 +2289,9 @@ + /* If the size was wildcarded, and we're allowed to scale, then scale; otherwise, + * leave it alone. + */ +- if (size != (GtkIconSize)-1 && gtk_icon_source_get_size_wildcarded (source)) ++ /* Hildon addition: Device icons are never scaled */ ++ if (size != (GtkIconSize)-1 && gtk_icon_source_get_size_wildcarded (source) ++ && size < HILDON_ICON_SIZE_26) + scaled = scale_or_ref (base_pixbuf, width, height); + else + scaled = g_object_ref (base_pixbuf); +@@ -2224,7 +2302,7 @@ + if (state == GTK_STATE_INSENSITIVE) + { + stated = gdk_pixbuf_copy (scaled); +- ++ + gdk_pixbuf_saturate_and_pixelate (scaled, stated, + 0.8, TRUE); + +@@ -2232,8 +2310,8 @@ + } + else if (state == GTK_STATE_PRELIGHT) + { +- stated = gdk_pixbuf_copy (scaled); +- ++ stated = gdk_pixbuf_copy (scaled); ++ + gdk_pixbuf_saturate_and_pixelate (scaled, stated, + 1.2, FALSE); + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkstyle.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkstyle.h.diff new file mode 100644 index 0000000000..79c36bb47f --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkstyle.h.diff @@ -0,0 +1,13 @@ +--- gtk+-2.6.4/gtk/gtkstyle.h 2004-11-28 09:02:27.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkstyle.h 2005-04-06 16:19:37.952768664 +0300 +@@ -454,6 +454,10 @@ + gint width, + gint height); + ++gboolean gtk_style_lookup_logical_color (GtkStyle *style, ++ const gchar *color_name, ++ GdkColor *color); ++ + GtkIconSet* gtk_style_lookup_icon_set (GtkStyle *style, + const gchar *stock_id); + GdkPixbuf* gtk_style_render_icon (GtkStyle *style, diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktable.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktable.c.diff new file mode 100644 index 0000000000..5f485da09b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktable.c.diff @@ -0,0 +1,95 @@ +--- gtk+-2.6.4/gtk/gtktable.c 2004-08-09 19:59:52.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtktable.c 2005-04-06 16:19:37.974765320 +0300 +@@ -28,6 +28,7 @@ + #include "gtkalias.h" + #include "gtktable.h" + #include "gtkintl.h" ++#include "gtkbutton.h" + + enum + { +@@ -507,6 +508,33 @@ + return GTK_WIDGET (table); + } + ++void osso_gtk_table_find_button_detail (GtkTable *table, ++ GtkTableChild *table_child) ++{ ++ OssoGtkButtonAttachFlags attachflags = 0; ++ gboolean automatic_detail; ++ ++ g_return_if_fail (GTK_IS_TABLE (table)); ++ g_return_if_fail (table_child != NULL); ++ g_return_if_fail (GTK_IS_BUTTON (table_child->widget)); ++ ++ if (table_child->top_attach == 0) ++ attachflags |= OSSO_GTK_BUTTON_ATTACH_NORTH; ++ ++ if (table_child->bottom_attach == table->nrows) ++ attachflags |= OSSO_GTK_BUTTON_ATTACH_SOUTH; ++ ++ if (table_child->left_attach == 0) ++ attachflags |= OSSO_GTK_BUTTON_ATTACH_WEST; ++ ++ if (table_child->right_attach == table->ncols) ++ attachflags |= OSSO_GTK_BUTTON_ATTACH_EAST; ++ ++ g_object_get (G_OBJECT (table_child->widget), "automatic_detail", &automatic_detail, NULL); ++ if (automatic_detail == TRUE) ++ g_object_set (G_OBJECT (table_child->widget), "detail", osso_gtk_button_attach_details[attachflags], NULL); ++} ++ + void + gtk_table_resize (GtkTable *table, + guint n_rows, +@@ -523,6 +551,18 @@ + n_cols != table->ncols) + { + GList *list; ++ guint recalc_column = -1; ++ guint recalc_row = -1; ++ ++ if (n_rows > table->nrows) ++ recalc_row = table->nrows; ++ else ++ recalc_row = n_rows; ++ ++ if (n_cols > table->ncols) ++ recalc_column = table->ncols; ++ else ++ recalc_column = n_cols; + + for (list = table->children; list; list = list->next) + { +@@ -577,6 +617,20 @@ + + g_object_notify (G_OBJECT (table), "n_columns"); + } ++ ++ if ((recalc_column != -1) || (recalc_row != -1)) ++ for (list = table->children; list; list = list->next) ++ { ++ GtkTableChild *child; ++ ++ child = list->data; ++ ++ if (GTK_IS_BUTTON (child->widget) && ++ ((child->bottom_attach == recalc_row) || ++ (child->right_attach == recalc_column))) ++ ++ osso_gtk_table_find_button_detail (table, child); ++ } + } + } + +@@ -623,6 +677,10 @@ + table_child->yshrink = (yoptions & GTK_SHRINK) != 0; + table_child->yfill = (yoptions & GTK_FILL) != 0; + table_child->ypadding = ypadding; ++ ++ ++ if (GTK_IS_BUTTON (table_child->widget)) ++ osso_gtk_table_find_button_detail (table, table_child); + + table->children = g_list_prepend (table->children, table_child); + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbuffer.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbuffer.c.diff new file mode 100644 index 0000000000..7a984dfb8c --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbuffer.c.diff @@ -0,0 +1,443 @@ +--- gtk+-2.6.4/gtk/gtktextbuffer.c 2004-11-01 21:57:13.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktextbuffer.c 2005-04-06 16:19:38.023757872 +0300 +@@ -1,5 +1,6 @@ + /* GTK - The GIMP Toolkit + * gtktextbuffer.c Copyright (C) 2000 Red Hat, Inc. ++ * Copyright (C) 2004 Nokia Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -39,6 +40,17 @@ + #include "gtktextbtree.h" + #include "gtktextiterprivate.h" + #include "gtkintl.h" ++#include "gtktextbufferserialize.h" ++ ++#define GTK_TEXT_BUFFER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TEXT_BUFFER, GtkTextBufferPrivate)) ++ ++typedef struct _GtkTextBufferPrivate GtkTextBufferPrivate; ++ ++struct _GtkTextBufferPrivate ++{ ++ gboolean can_paste_rich_text; ++ gchar *rich_text_format; ++}; + + typedef struct _ClipboardRequest ClipboardRequest; + +@@ -71,7 +83,10 @@ + PROP_0, + + /* Construct */ +- PROP_TAG_TABLE ++ PROP_TAG_TABLE, ++ ++ PROP_CAN_PASTE_RICH_TEXT, ++ PROP_RICH_TEXT_FORMAT + }; + + enum { +@@ -79,6 +94,8 @@ + TARGET_TEXT, + TARGET_COMPOUND_TEXT, + TARGET_UTF8_STRING, ++ TARGET_TEXT_VIEW_MARKUP, ++ TARGET_TEXT_VIEW_RICH_TEXT_FORMAT, + TARGET_TEXT_BUFFER_CONTENTS + }; + +@@ -185,7 +202,20 @@ + P_("Text Tag Table"), + GTK_TYPE_TEXT_TAG_TABLE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); ++ g_object_class_install_property (object_class, ++ PROP_CAN_PASTE_RICH_TEXT, ++ g_param_spec_boolean ("can_paste_rich_text", ++ P_("Can paste rich text"), ++ P_("Whether it should be possible to paste rich text to the buffer"), ++ FALSE, G_PARAM_READWRITE)); ++ g_object_class_install_property (object_class, ++ PROP_RICH_TEXT_FORMAT, ++ g_param_spec_string ("rich_text_format", ++ P_("Rich Text Format"), ++ P_("Name of a collection of tags that the text view supports"), ++ NULL, G_PARAM_READWRITE)); + ++ + signals[INSERT_TEXT] = + g_signal_new ("insert_text", + G_OBJECT_CLASS_TYPE (object_class), +@@ -335,7 +365,9 @@ + NULL, NULL, + _gtk_marshal_VOID__VOID, + G_TYPE_NONE, +- 0); ++ 0); ++ ++ g_type_class_add_private (object_class, sizeof (GtkTextBufferPrivate)); + } + + static void +@@ -385,7 +417,12 @@ + case PROP_TAG_TABLE: + set_table (text_buffer, g_value_get_object (value)); + break; +- ++ case PROP_CAN_PASTE_RICH_TEXT: ++ gtk_text_buffer_set_can_paste_rich_text (text_buffer, g_value_get_boolean (value)); ++ break; ++ case PROP_RICH_TEXT_FORMAT: ++ gtk_text_buffer_set_rich_text_format (text_buffer, g_value_get_string (value)); ++ break; + default: + break; + } +@@ -406,7 +443,14 @@ + case PROP_TAG_TABLE: + g_value_set_object (value, get_table (text_buffer)); + break; +- ++ case PROP_CAN_PASTE_RICH_TEXT: ++ g_value_set_boolean (value, ++ gtk_text_buffer_get_can_paste_rich_text (text_buffer)); ++ break; ++ case PROP_RICH_TEXT_FORMAT: ++ g_value_set_string (value, ++ gtk_text_buffer_get_rich_text_format (text_buffer)); ++ break; + default: + break; + } +@@ -434,11 +478,14 @@ + gtk_text_buffer_finalize (GObject *object) + { + GtkTextBuffer *buffer; ++ GtkTextBufferPrivate *priv; + + buffer = GTK_TEXT_BUFFER (object); + + remove_all_selection_clipboards (buffer); + ++ priv = GTK_TEXT_BUFFER_GET_PRIVATE (buffer); ++ + if (buffer->tag_table) + { + _gtk_text_tag_table_remove_buffer (buffer->tag_table, buffer); +@@ -456,7 +503,9 @@ + free_log_attr_cache (buffer->log_attr_cache); + + buffer->log_attr_cache = NULL; +- ++ ++ g_free (priv->rich_text_format); ++ + G_OBJECT_CLASS (parent_class)->finalize (object); + } + +@@ -2738,8 +2787,7 @@ + + if (gtk_text_buffer_get_selection_bounds (buffer, &start, &end)) + { +- if (selection_data->target == +- gdk_atom_intern ("GTK_TEXT_BUFFER_CONTENTS", FALSE)) ++ if (info == TARGET_TEXT_BUFFER_CONTENTS) + { + /* Provide the address of the buffer; this will only be + * used within-process +@@ -2750,6 +2798,32 @@ + (void*)&buffer, + sizeof (buffer)); + } ++ else if (info == TARGET_TEXT_VIEW_MARKUP) ++ { ++ gchar *str; ++ gint len; ++ ++ str = gtk_text_buffer_serialize_rich_text (buffer, &start, &end, &len); ++ ++ gtk_selection_data_set (selection_data, ++ gdk_atom_intern ("application/x-gtk-text-view-markup", FALSE), ++ 8, /* bytes */ ++ str, len); ++ g_free (str); ++ } ++ else if (info == TARGET_TEXT_VIEW_RICH_TEXT_FORMAT) ++ { ++ gint len; ++ gchar *format; ++ ++ format = g_object_get_data (G_OBJECT (buffer), "gtk-text-buffer-clipboard-format"); ++ len = format ? strlen (format) : -1; ++ ++ gtk_selection_data_set (selection_data, ++ gdk_atom_intern ("application/x-gtk-text-view-rich-text-format", FALSE), ++ 8, /* bytes */ ++ format, len); ++ } + else + { + gchar *str; +@@ -2765,10 +2839,16 @@ + create_clipboard_contents_buffer (GtkTextBuffer *buffer) + { + GtkTextBuffer *contents; ++ gchar *format; + + contents = gtk_text_buffer_new (gtk_text_buffer_get_tag_table (buffer)); + ++ format = GTK_TEXT_BUFFER_GET_PRIVATE (buffer)->rich_text_format; ++ + g_object_set_data (G_OBJECT (contents), "gtk-text-buffer-clipboard", GINT_TO_POINTER (1)); ++ ++ g_object_set_data_full (G_OBJECT (contents), "gtk-text-buffer-clipboard-format", ++ format ? g_strdup (format) : NULL, g_free); + + return contents; + } +@@ -2786,8 +2866,7 @@ + + g_assert (contents); /* This should never be called unless we own the clipboard */ + +- if (selection_data->target == +- gdk_atom_intern ("GTK_TEXT_BUFFER_CONTENTS", FALSE)) ++ if (info == TARGET_TEXT_BUFFER_CONTENTS) + { + /* Provide the address of the clipboard buffer; this will only + * be used within-process. OK to supply a NULL value for contents. +@@ -2798,6 +2877,35 @@ + (void*)&contents, + sizeof (contents)); + } ++ else if (info == TARGET_TEXT_VIEW_MARKUP) ++ { ++ gchar *str; ++ gint *len; ++ GtkTextIter start, end; ++ ++ gtk_text_buffer_get_bounds (contents, &start, &end); ++ ++ str = gtk_text_buffer_serialize_rich_text (contents, &start, &end, &len); ++ ++ gtk_selection_data_set (selection_data, ++ gdk_atom_intern ("application/x-gtk-text-view-markup", FALSE), ++ 8, /* bytes */ ++ str, len); ++ g_free (str); ++ } ++ else if (info == TARGET_TEXT_VIEW_RICH_TEXT_FORMAT) ++ { ++ gint len; ++ gchar *format; ++ ++ format = g_object_get_data (G_OBJECT (contents), "gtk-text-buffer-clipboard-format"); ++ len = format ? strlen (format) : -1; ++ ++ gtk_selection_data_set (selection_data, ++ gdk_atom_intern ("application/x-gtk-text-view-rich-text-format", FALSE), ++ 8, /* bytes */ ++ format, len); ++ } + else + { + gchar *str; +@@ -2992,6 +3100,54 @@ + #endif + + static void ++clipboard_text_view_markup_received (GtkClipboard *clipboard, ++ GtkSelectionData *selection_data, ++ gpointer data) ++{ ++ ClipboardRequest *request_data = data; ++ GtkTextIter insert_point; ++ gboolean retval = TRUE; ++ GError *error = NULL; ++ GtkTextBufferPrivate *priv; ++ ++ priv = GTK_TEXT_BUFFER_GET_PRIVATE (request_data->buffer); ++ ++ if (selection_data->target == ++ gdk_atom_intern ("application/x-gtk-text-view-markup", FALSE)) ++ { ++ pre_paste_prep (request_data, &insert_point); ++ ++ if (request_data->interactive) ++ gtk_text_buffer_begin_user_action (request_data->buffer); ++ ++ if (!request_data->interactive || ++ gtk_text_iter_can_insert (&insert_point, request_data->default_editable)) ++ retval = gtk_text_buffer_deserialize_rich_text (request_data->buffer, ++ &insert_point, ++ selection_data->data, selection_data->length, ++ priv->rich_text_format == NULL, &error); ++ ++ if (!retval) ++ { ++ g_warning ("error pasting: %s\n", error->message); ++ } ++ ++ if (request_data->interactive) ++ gtk_text_buffer_end_user_action (request_data->buffer); ++ ++ if (retval) { ++ post_paste_cleanup (request_data); ++ return; ++ } ++ } ++ ++ /* Request the text selection instead */ ++ gtk_clipboard_request_text (clipboard, ++ clipboard_text_received, ++ data); ++} ++ ++static void + paste_from_buffer (ClipboardRequest *request_data, + GtkTextBuffer *src_buffer, + const GtkTextIter *start, +@@ -3029,6 +3185,35 @@ + g_free (request_data); + } + ++static gboolean ++formats_match (GtkClipboard *clipboard, const gchar *format) ++{ ++ GtkSelectionData *data; ++ gchar *tmp; ++ gboolean retval; ++ ++ if (!format) ++ return TRUE; ++ ++ data = gtk_clipboard_wait_for_contents (clipboard, ++ gdk_atom_intern ("application/x-gtk-text-view-rich-text-format", FALSE)); ++ ++ if (data->length <= 0) ++ retval = FALSE; ++ else ++ { ++ tmp = g_strndup (data->data, data->length); ++ ++ retval = (strcmp (tmp, format) == 0); ++ ++ g_free (tmp); ++ } ++ ++ gtk_selection_data_free (data); ++ ++ return retval; ++} ++ + static void + clipboard_clipboard_buffer_received (GtkClipboard *clipboard, + GtkSelectionData *selection_data, +@@ -3036,6 +3221,7 @@ + { + ClipboardRequest *request_data = data; + GtkTextBuffer *src_buffer; ++ GtkTextBufferPrivate *priv; + + src_buffer = selection_data_get_buffer (selection_data, request_data); + +@@ -3059,10 +3245,19 @@ + } + else + { +- /* Request the text selection instead */ +- gtk_clipboard_request_text (clipboard, +- clipboard_text_received, +- data); ++ priv = GTK_TEXT_BUFFER_GET_PRIVATE (request_data->buffer); ++ ++ if (priv->can_paste_rich_text && ++ formats_match (clipboard, priv->rich_text_format)) ++ /* Request markup */ ++ gtk_clipboard_request_contents (clipboard, ++ gdk_atom_intern ("application/x-gtk-text-view-markup", FALSE), ++ clipboard_text_view_markup_received, data); ++ else ++ /* Request the text selection instead */ ++ gtk_clipboard_request_text (clipboard, ++ clipboard_text_received, ++ data); + } + } + +@@ -3071,6 +3266,8 @@ + { "TEXT", 0, TARGET_TEXT }, + { "COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT }, + { "UTF8_STRING", 0, TARGET_UTF8_STRING }, ++ { "application/x-gtk-text-view-markup", 0, TARGET_TEXT_VIEW_MARKUP }, ++ { "application/x-gtk-text-view-rich-text-format", 0, TARGET_TEXT_VIEW_RICH_TEXT_FORMAT }, + { "GTK_TEXT_BUFFER_CONTENTS", 0, TARGET_TEXT_BUFFER_CONTENTS } + }; + +@@ -3591,6 +3788,68 @@ + } + } + ++void ++gtk_text_buffer_set_can_paste_rich_text (GtkTextBuffer *buffer, ++ gboolean can_paste_rich_text) ++{ ++ GtkTextBufferPrivate *priv; ++ ++ g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); ++ ++ priv = GTK_TEXT_BUFFER_GET_PRIVATE (buffer); ++ ++ can_paste_rich_text = (can_paste_rich_text != FALSE); ++ ++ if (priv->can_paste_rich_text != can_paste_rich_text) ++ { ++ priv->can_paste_rich_text = can_paste_rich_text; ++ ++ g_object_notify (G_OBJECT (buffer), "can_paste_rich_text"); ++ } ++} ++ ++gboolean ++gtk_text_buffer_get_can_paste_rich_text (GtkTextBuffer *buffer) ++{ ++ GtkTextBufferPrivate *priv; ++ ++ g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), FALSE); ++ ++ priv = GTK_TEXT_BUFFER_GET_PRIVATE (buffer); ++ ++ return priv->can_paste_rich_text; ++} ++ ++void ++gtk_text_buffer_set_rich_text_format (GtkTextBuffer *buffer, ++ const gchar *format) ++{ ++ gchar *new_format; ++ GtkTextBufferPrivate *priv; ++ ++ g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); ++ ++ priv = GTK_TEXT_BUFFER_GET_PRIVATE (buffer); ++ ++ new_format = g_strdup (format); ++ g_free (priv->rich_text_format); ++ ++ priv->rich_text_format = new_format; ++ g_object_notify (G_OBJECT (buffer), "rich_text_format"); ++} ++ ++G_CONST_RETURN gchar * ++gtk_text_buffer_get_rich_text_format (GtkTextBuffer *buffer) ++{ ++ GtkTextBufferPrivate *priv; ++ ++ g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), NULL); ++ ++ priv = GTK_TEXT_BUFFER_GET_PRIVATE (buffer); ++ ++ return priv->rich_text_format; ++} ++ + /* + * Logical attribute cache + */ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbuffer.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbuffer.h.diff new file mode 100644 index 0000000000..61555eac8b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbuffer.h.diff @@ -0,0 +1,17 @@ +--- gtk+-2.6.4/gtk/gtktextbuffer.h 2004-10-21 22:13:17.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtktextbuffer.h 2005-04-06 16:19:38.024757720 +0300 +@@ -365,6 +365,14 @@ + void gtk_text_buffer_begin_user_action (GtkTextBuffer *buffer); + void gtk_text_buffer_end_user_action (GtkTextBuffer *buffer); + ++void gtk_text_buffer_set_can_paste_rich_text (GtkTextBuffer *buffer, ++ gboolean can_paste_rich_text); ++gboolean gtk_text_buffer_get_can_paste_rich_text (GtkTextBuffer *buffer); ++ ++void gtk_text_buffer_set_rich_text_format (GtkTextBuffer *buffer, ++ const gchar *format); ++G_CONST_RETURN gchar *gtk_text_buffer_get_rich_text_format (GtkTextBuffer *buffer); ++ + /* INTERNAL private stuff */ + void _gtk_text_buffer_spew (GtkTextBuffer *buffer); + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbufferserialize.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbufferserialize.c.diff new file mode 100644 index 0000000000..39c8f748de --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbufferserialize.c.diff @@ -0,0 +1,1688 @@ +--- gtk+-2.6.4/gtk/gtktextbufferserialize.c 1970-01-01 02:00:00.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktextbufferserialize.c 2005-04-06 16:19:38.024757720 +0300 +@@ -0,0 +1,1685 @@ ++/* gtktextbufferserialize.c ++ * ++ * Copyright (C) 2001 Havoc Pennington ++ * Copyright (C) 2004 Nokia ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++/* FIXME: We should use other error codes for the ++ * parts that deal with the format errors ++ */ ++ ++#include <config.h> ++ ++#include <stdio.h> ++#include "gdk-pixbuf/gdk-pixdata.h" ++#include "gtktextbufferserialize.h" ++#include "gtkintl.h" ++ ++#include <string.h> ++#include <stdlib.h> ++ ++typedef struct ++{ ++ GString *tag_table_str; ++ GString *text_str; ++ GHashTable *tags; ++ GtkTextIter start, end; ++ ++ gint n_pixbufs; ++ GList *pixbufs; ++} SerializationContext; ++ ++static gchar * ++serialize_value (GValue *value) ++{ ++ if (g_value_type_transformable (value->g_type, G_TYPE_STRING)) ++ { ++ GValue text_value = { 0 }; ++ gchar *tmp; ++ ++ g_value_init (&text_value, G_TYPE_STRING); ++ g_value_transform (value, &text_value); ++ ++ tmp = g_markup_escape_text (g_value_get_string (&text_value), -1); ++ g_value_unset (&text_value); ++ ++ return tmp; ++ } ++ else if (value->g_type == GDK_TYPE_COLOR) ++ { ++ GdkColor *color = g_value_get_boxed (value); ++ ++ return g_strdup_printf ("%x:%x:%x", color->red, color->green, color->blue); ++ } ++ else ++ { ++ g_warning ("Type %s is not serializable\n", g_type_name (value->g_type)); ++ } ++ ++ return NULL; ++} ++ ++static gboolean ++deserialize_value (const gchar *str, GValue *value) ++{ ++ if (g_value_type_transformable (G_TYPE_STRING, value->g_type)) ++ { ++ GValue text_value = { 0 }; ++ gboolean retval; ++ ++ g_value_init (&text_value, G_TYPE_STRING); ++ g_value_set_static_string (&text_value, str); ++ ++ retval = g_value_transform (&text_value, value); ++ g_value_unset (&text_value); ++ ++ return retval; ++ } ++ else if (value->g_type == G_TYPE_BOOLEAN) ++ { ++ gboolean v; ++ ++ v = strcmp (str, "TRUE") == 0; ++ ++ g_value_set_boolean (value, v); ++ ++ return TRUE; ++ } ++ else if (value->g_type == G_TYPE_INT) ++ { ++ gchar *tmp; ++ int v; ++ ++ v = strtol (str, &tmp, 10); ++ ++ if (tmp == NULL || tmp == str) ++ return FALSE; ++ ++ g_value_set_int (value, v); ++ ++ return TRUE; ++ } ++ else if (value->g_type == G_TYPE_DOUBLE) ++ { ++ gchar *tmp; ++ gdouble v; ++ ++ v = g_ascii_strtod (str, &tmp); ++ ++ if (tmp == NULL || tmp == str) ++ return FALSE; ++ ++ g_value_set_double (value, v); ++ ++ return TRUE; ++ } ++ else if (value->g_type == GDK_TYPE_COLOR) ++ { ++ GdkColor color; ++ const gchar *old; ++ gchar *tmp; ++ ++ old = str; ++ color.red = strtol (old, &tmp, 16); ++ ++ if (tmp == NULL || tmp == old) ++ return FALSE; ++ ++ old = tmp; ++ if (*old++ != ':') ++ return FALSE; ++ ++ color.green = strtol (old, &tmp, 16); ++ if (tmp == NULL || tmp == old) ++ return FALSE; ++ ++ old = tmp; ++ if (*old++ != ':') ++ return FALSE; ++ ++ color.blue = strtol (old, &tmp, 16); ++ ++ if (tmp == NULL || tmp == old || *tmp != '\0') ++ return FALSE; ++ ++ g_value_set_boxed (value, &color); ++ ++ return TRUE; ++ } ++ else if (G_VALUE_HOLDS_ENUM (value)) ++ { ++ GEnumClass *class = G_ENUM_CLASS (g_type_class_peek (value->g_type)); ++ GEnumValue *enum_value; ++ ++ enum_value = g_enum_get_value_by_name (class, str); ++ ++ if (enum_value) ++ { ++ g_value_set_enum (value, enum_value->value); ++ return TRUE; ++ } ++ ++ return FALSE; ++ } ++ else ++ { ++ g_warning ("Type %s can not be deserialized\n", g_type_name (value->g_type)); ++ } ++ ++ return FALSE; ++} ++ ++/* Checks if a param is set, or if it's the default value */ ++static gboolean ++is_param_set (GObject *object, GParamSpec *pspec, GValue *value) ++{ ++ /* We need to special case some attributes here */ ++ if (strcmp (pspec->name, "background-gdk") == 0) ++ { ++ gboolean is_set; ++ ++ g_object_get (object, "background-set", &is_set, NULL); ++ ++ if (is_set) ++ { ++ g_value_init (value, G_PARAM_SPEC_VALUE_TYPE (pspec)); ++ ++ g_object_get_property (object, pspec->name, value); ++ ++ return TRUE; ++ } ++ ++ return FALSE; ++ } ++ else if (strcmp (pspec->name, "foreground-gdk") == 0) ++ { ++ gboolean is_set; ++ ++ g_object_get (object, "foreground-set", &is_set, NULL); ++ ++ if (is_set) ++ { ++ g_value_init (value, G_PARAM_SPEC_VALUE_TYPE (pspec)); ++ ++ g_object_get_property (object, pspec->name, value); ++ ++ return TRUE; ++ } ++ ++ return FALSE; ++ } ++ else ++ { ++ gboolean is_set; ++ gchar *is_set_name; ++ ++ is_set_name = g_strdup_printf ("%s-set", pspec->name); ++ ++ if (g_object_class_find_property (G_OBJECT_GET_CLASS (object), is_set_name) == NULL) ++ { ++ g_free (is_set_name); ++ return FALSE; ++ } ++ else ++ { ++ g_object_get (object, is_set_name, &is_set, NULL); ++ ++ if (!is_set) ++ { ++ g_free (is_set_name); ++ return FALSE; ++ } ++ ++ g_free (is_set_name); ++ ++ g_value_init (value, G_PARAM_SPEC_VALUE_TYPE (pspec)); ++ ++ g_object_get_property (object, pspec->name, value); ++ ++ if (g_param_value_defaults (pspec, value)) ++ { ++ g_value_unset (value); ++ ++ return FALSE; ++ } ++ } ++ return TRUE; ++ } ++} ++ ++static void ++serialize_tag (gpointer key, gpointer data, gpointer user_data) ++{ ++ SerializationContext *context = user_data; ++ GtkTextTag *tag = data; ++ gchar *tag_name; ++ GParamSpec **pspecs; ++ guint n_pspecs; ++ int i; ++ ++ tag_name = g_markup_escape_text (tag->name, -1); ++ g_string_append_printf (context->tag_table_str, " <tag name=\"%s\" priority=\"%d\">\n", tag_name, tag->priority); ++ ++ /* Serialize properties */ ++ pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (tag), &n_pspecs); ++ ++ for (i = 0; i < n_pspecs; i++) ++ { ++ GValue value = { 0 }; ++ gchar *tmp, *tmp2; ++ ++ if (!(pspecs[i]->flags & G_PARAM_READABLE) || ++ !(pspecs[i]->flags & G_PARAM_WRITABLE)) ++ continue; ++ ++ if (!is_param_set (G_OBJECT (tag), pspecs[i], &value)) ++ continue; ++ ++ /* Now serialize the attr */ ++ tmp = g_markup_escape_text (pspecs[i]->name, -1); ++ g_string_append_printf (context->tag_table_str, " <attr name=\"%s\" ", tmp); ++ g_free (tmp); ++ ++ tmp = g_markup_escape_text (g_type_name (pspecs[i]->value_type), -1); ++ tmp2 = serialize_value (&value); ++ g_string_append_printf (context->tag_table_str, "type=\"%s\" value=\"%s\" />\n", tmp, tmp2); ++ ++ g_free (tmp); ++ g_free (tmp2); ++ ++ g_value_unset (&value); ++ } ++ ++ g_free (pspecs); ++ ++ g_string_append (context->tag_table_str, " </tag>\n"); ++ g_free (tag_name); ++} ++ ++static void ++serialize_tags (SerializationContext *context) ++{ ++ g_string_append (context->tag_table_str, " <text_view_markup>\n"); ++ g_string_append (context->tag_table_str, " <tags>\n"); ++ g_hash_table_foreach (context->tags, serialize_tag, context); ++ g_string_append (context->tag_table_str, " </tags>\n"); ++} ++ ++#if 0 ++static void ++dump_tag_list (const gchar *str, GList *list) ++{ ++ g_print ("%s: ", str); ++ ++ if (!list) ++ g_print ("(empty)"); ++ else ++ { ++ while (list) ++ { ++ g_print ("%s ", ((GtkTextTag *)list->data)->name); ++ list = list->next; ++ } ++ } ++ ++ g_print ("\n"); ++} ++#endif ++ ++static void ++find_list_delta (GSList *old_list, GSList *new_list, ++ GList **added, GList **removed) ++{ ++ GSList *tmp; ++ GList *tmp_added, *tmp_removed; ++ ++ tmp_added = NULL; ++ tmp_removed = NULL; ++ ++ /* Find added tags */ ++ tmp = new_list; ++ while (tmp) ++ { ++ if (!g_slist_find (old_list, tmp->data)) ++ tmp_added = g_list_prepend (tmp_added, tmp->data); ++ ++ tmp = tmp->next; ++ } ++ ++ *added = tmp_added; ++ ++ /* Find removed tags */ ++ tmp = old_list; ++ while (tmp) ++ { ++ if (!g_slist_find (new_list, tmp->data)) ++ tmp_removed = g_list_prepend (tmp_removed, tmp->data); ++ ++ tmp = tmp->next; ++ } ++ ++ /* We reverse the list here to match the xml semantics */ ++ *removed = g_list_reverse (tmp_removed); ++} ++ ++static void ++serialize_section_header (GString *str, ++ const gchar *name, ++ gint length) ++{ ++ g_return_if_fail (strlen (name) == 8); ++ ++ g_string_append (str, name); ++ ++ g_string_append_c (str, length >> 24); ++ ++ g_string_append_c (str, (length >> 16) & 0xff); ++ g_string_append_c (str, (length >> 8) & 0xff); ++ g_string_append_c (str, length & 0xff); ++} ++ ++static void ++serialize_text (GtkTextBuffer *buffer, SerializationContext *context) ++{ ++ GtkTextIter iter, old_iter; ++ GSList *tag_list, *new_tag_list; ++ GQueue *active_tags; ++ int i; ++ ++ g_string_append (context->text_str, "<text>"); ++ ++ iter = context->start; ++ tag_list = NULL; ++ active_tags = g_queue_new (); ++ ++ do ++ { ++ GList *added, *removed; ++ GList *tmp; ++ gchar *tmp_text, *escaped_text; ++ ++ new_tag_list = gtk_text_iter_get_tags (&iter); ++ find_list_delta (tag_list, new_tag_list, &added, &removed); ++ ++ /* Handle removed tags */ ++ tmp = removed; ++ while (tmp) ++ { ++ GtkTextTag *tag = tmp->data; ++ ++ g_string_append (context->text_str, "</apply_tag>"); ++ ++ /* We might need to drop some of the tags and re-add them afterwards */ ++ while (g_queue_peek_head (active_tags) != tag && ++ !g_queue_is_empty (active_tags)) ++ { ++ added = g_list_prepend (added, g_queue_pop_head (active_tags)); ++ g_string_append_printf (context->text_str, "</apply_tag>"); ++ } ++ ++ g_queue_pop_head (active_tags); ++ ++ tmp = tmp->next; ++ } ++ ++ /* Handle added tags */ ++ tmp = added; ++ while (tmp) ++ { ++ GtkTextTag *tag = tmp->data; ++ gchar *tag_name; ++ ++ /* Add it to the tag hash table */ ++ g_hash_table_insert (context->tags, tag, tag); ++ ++ tag_name = g_markup_escape_text (tag->name, -1); ++ ++ g_string_append_printf (context->text_str, "<apply_tag name=\"%s\">", tag_name); ++ g_free (tag_name); ++ ++ g_queue_push_head (active_tags, tag); ++ ++ tmp = tmp->next; ++ } ++ ++ g_slist_free (tag_list); ++ tag_list = new_tag_list; ++ ++ old_iter = iter; ++ ++ /* Now try to go to either the next tag toggle, or if a pixbuf appears */ ++ while (TRUE) ++ { ++ gunichar ch = gtk_text_iter_get_char (&iter); ++ ++ if (ch == 0xFFFC) ++ { ++ GdkPixbuf *pixbuf = gtk_text_iter_get_pixbuf (&iter); ++ ++ if (pixbuf) { ++ g_string_append_printf (context->text_str, "<pixbuf index=\"%d\" />", context->n_pixbufs); ++ ++ context->n_pixbufs++; ++ context->pixbufs = g_list_prepend (context->pixbufs, pixbuf); ++ } ++ } ++ ++ gtk_text_iter_forward_char (&iter); ++ ++ if (gtk_text_iter_toggles_tag (&iter, NULL)) ++ break; ++ } ++ ++ /* We might have moved too far */ ++ if (gtk_text_iter_compare (&iter, &context->end) > 0) ++ iter = context->end; ++ ++ /* Append the text */ ++ tmp_text = gtk_text_iter_get_slice (&old_iter, &iter); ++ escaped_text = g_markup_escape_text (tmp_text, -1); ++ g_free (tmp_text); ++ ++ g_string_append (context->text_str, escaped_text); ++ g_free (escaped_text); ++ } ++ while (!gtk_text_iter_equal (&iter, &context->end)); ++ ++ /* Close any open tags */ ++ for (i = 0; i < g_queue_get_length (active_tags); i++) { ++ g_string_append (context->text_str, "</apply_tag>"); ++ } ++ g_queue_free (active_tags); ++ g_string_append (context->text_str, "</text>\n</text_view_markup>\n"); ++} ++ ++static void ++serialize_pixbufs (SerializationContext *context, ++ GString *text) ++{ ++ GList *list; ++ ++ for (list = context->pixbufs; list != NULL; list = list->next) ++ { ++ GdkPixbuf *pixbuf = list->data; ++ GdkPixdata pixdata; ++ guint8 *tmp; ++ guint len; ++ ++ gdk_pixdata_from_pixbuf (&pixdata, pixbuf, FALSE); ++ tmp = gdk_pixdata_serialize (&pixdata, &len); ++ ++ serialize_section_header (text, "PDPIXBUF", len); ++ g_string_append_len (text, tmp, len); ++ g_free (tmp); ++ } ++} ++ ++gchar * ++gtk_text_buffer_serialize_rich_text (GtkTextBuffer *buffer, ++ const GtkTextIter *start, ++ const GtkTextIter *end, ++ gint *len) ++{ ++ SerializationContext context; ++ GString *text; ++ ++ context.tags = g_hash_table_new (NULL, NULL); ++ context.text_str = g_string_new (NULL); ++ context.tag_table_str = g_string_new (NULL); ++ context.start = *start; ++ context.end = *end; ++ context.n_pixbufs = 0; ++ context.pixbufs = NULL; ++ ++ /* We need to serialize the text before the tag table so we know ++ what tags are used */ ++ serialize_text (buffer, &context); ++ serialize_tags (&context); ++ ++ text = g_string_new (NULL); ++ serialize_section_header (text, "RICHTEXT", context.tag_table_str->len + context.text_str->len); ++ ++ g_print ("when serializing length is: %d\n", context.tag_table_str->len + context.text_str->len); ++ ++ g_string_append_len (text, context.tag_table_str->str, context.tag_table_str->len); ++ g_string_append_len (text, context.text_str->str, context.text_str->len); ++ ++ context.pixbufs = g_list_reverse (context.pixbufs); ++ serialize_pixbufs (&context, text); ++ ++ g_hash_table_destroy (context.tags); ++ g_list_free (context.pixbufs); ++ g_string_free (context.text_str, TRUE); ++ g_string_free (context.tag_table_str, TRUE); ++ ++ *len = text->len; ++ ++ return g_string_free (text, FALSE); ++} ++ ++typedef enum ++{ ++ STATE_START, ++ STATE_TEXT_VIEW_MARKUP, ++ STATE_TAGS, ++ STATE_TAG, ++ STATE_ATTR, ++ STATE_TEXT, ++ STATE_APPLY_TAG, ++ STATE_PIXBUF ++} ParseState; ++ ++typedef struct ++{ ++ gchar *text; ++ GdkPixbuf *pixbuf; ++ GSList *tags; ++} TextSpan; ++ ++typedef struct ++{ ++ GtkTextTag *tag; ++ gint prio; ++} TextTagPrio; ++ ++typedef struct ++{ ++ GSList *states; ++ ++ GList *headers; ++ ++ GtkTextBuffer *buffer; ++ ++ /* Tags that are defined in <tag> elements */ ++ GHashTable *defined_tags; ++ ++ /* Tag name substitutions */ ++ GHashTable *substitutions; ++ ++ /* Current tag */ ++ GtkTextTag *current_tag; ++ ++ /* Priority of current tag */ ++ gint current_tag_prio; ++ ++ /* Tags and their priorities */ ++ GList *tag_priorities; ++ ++ GSList *tag_stack; ++ ++ GList *spans; ++ ++ gboolean create_tags; ++ ++ gboolean parsed_text; ++ gboolean parsed_tags; ++} ParseInfo; ++ ++static void ++set_error (GError **err, ++ GMarkupParseContext *context, ++ int error_domain, ++ int error_code, ++ const char *format, ++ ...) ++{ ++ int line, ch; ++ va_list args; ++ char *str; ++ ++ g_markup_parse_context_get_position (context, &line, &ch); ++ ++ va_start (args, format); ++ str = g_strdup_vprintf (format, args); ++ va_end (args); ++ ++ g_set_error (err, error_domain, error_code, ++ ("Line %d character %d: %s"), ++ line, ch, str); ++ ++ g_free (str); ++} ++ ++static void ++push_state (ParseInfo *info, ++ ParseState state) ++{ ++ info->states = g_slist_prepend (info->states, GINT_TO_POINTER (state)); ++} ++ ++static void ++pop_state (ParseInfo *info) ++{ ++ g_return_if_fail (info->states != NULL); ++ ++ info->states = g_slist_remove (info->states, info->states->data); ++} ++ ++static ParseState ++peek_state (ParseInfo *info) ++{ ++ g_return_val_if_fail (info->states != NULL, STATE_START); ++ ++ return GPOINTER_TO_INT (info->states->data); ++} ++ ++#define ELEMENT_IS(name) (strcmp (element_name, (name)) == 0) ++ ++typedef struct ++{ ++ const char *name; ++ const char **retloc; ++} LocateAttr; ++ ++static gboolean ++locate_attributes (GMarkupParseContext *context, ++ const char *element_name, ++ const char **attribute_names, ++ const char **attribute_values, ++ GError **error, ++ const char *first_attribute_name, ++ const char **first_attribute_retloc, ++ ...) ++{ ++ va_list args; ++ const char *name; ++ const char **retloc; ++ int n_attrs; ++#define MAX_ATTRS 24 ++ LocateAttr attrs[MAX_ATTRS]; ++ gboolean retval; ++ int i; ++ ++ g_return_val_if_fail (first_attribute_name != NULL, FALSE); ++ g_return_val_if_fail (first_attribute_retloc != NULL, FALSE); ++ ++ retval = TRUE; ++ ++ n_attrs = 1; ++ attrs[0].name = first_attribute_name; ++ attrs[0].retloc = first_attribute_retloc; ++ *first_attribute_retloc = NULL; ++ ++ va_start (args, first_attribute_retloc); ++ ++ name = va_arg (args, const char*); ++ retloc = va_arg (args, const char**); ++ ++ while (name != NULL) ++ { ++ g_return_val_if_fail (retloc != NULL, FALSE); ++ ++ g_assert (n_attrs < MAX_ATTRS); ++ ++ attrs[n_attrs].name = name; ++ attrs[n_attrs].retloc = retloc; ++ n_attrs += 1; ++ *retloc = NULL; ++ ++ name = va_arg (args, const char*); ++ retloc = va_arg (args, const char**); ++ } ++ ++ va_end (args); ++ ++ if (!retval) ++ return retval; ++ ++ i = 0; ++ while (attribute_names[i]) ++ { ++ int j; ++ gboolean found; ++ ++ found = FALSE; ++ j = 0; ++ while (j < n_attrs) ++ { ++ if (strcmp (attrs[j].name, attribute_names[i]) == 0) ++ { ++ retloc = attrs[j].retloc; ++ ++ if (*retloc != NULL) ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, ++ G_MARKUP_ERROR_PARSE, ++ _("Attribute \"%s\" repeated twice on the same <%s> element"), ++ attrs[j].name, element_name); ++ retval = FALSE; ++ goto out; ++ } ++ ++ *retloc = attribute_values[i]; ++ found = TRUE; ++ } ++ ++ ++j; ++ } ++ ++ if (!found) ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, ++ G_MARKUP_ERROR_PARSE, ++ _("Attribute \"%s\" is invalid on <%s> element in this context"), ++ attribute_names[i], element_name); ++ retval = FALSE; ++ goto out; ++ } ++ ++ ++i; ++ } ++ ++ out: ++ return retval; ++} ++ ++static gboolean ++check_no_attributes (GMarkupParseContext *context, ++ const char *element_name, ++ const char **attribute_names, ++ const char **attribute_values, ++ GError **error) ++{ ++ if (attribute_names[0] != NULL) ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, ++ G_MARKUP_ERROR_PARSE, ++ _("Attribute \"%s\" is invalid on <%s> element in this context"), ++ attribute_names[0], element_name); ++ return FALSE; ++ } ++ ++ return TRUE; ++} ++ ++static const gchar * ++tag_exists (GMarkupParseContext *context, ++ const gchar *name, ++ ParseInfo *info, ++ GError **error) ++{ ++ const gchar *real_name; ++ ++ if (info->create_tags) ++ { ++ /* First, try the substitutions */ ++ real_name = g_hash_table_lookup (info->substitutions, name); ++ ++ if (real_name) ++ return real_name; ++ ++ /* Next, try the list of defined tags */ ++ if (g_hash_table_lookup (info->defined_tags, name) != NULL) ++ return name; ++ ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("Tag \"%s\" has not been defined."), name); ++ ++ return NULL; ++ } ++ else ++ { ++ if (gtk_text_tag_table_lookup (info->buffer->tag_table, name) != NULL) ++ return name; ++ ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("Tag \"%s\" does not exist in buffer and tags can not be created."), name); ++ ++ return NULL; ++ } ++} ++ ++typedef struct ++{ ++ const gchar *id; ++ gint length; ++ const gchar *start; ++} Header; ++ ++static GdkPixbuf * ++get_pixbuf_from_headers (GList *headers, int id, GError **error) ++{ ++ Header *header; ++ GdkPixdata pixdata; ++ GdkPixbuf *pixbuf; ++ ++ header = g_list_nth_data (headers, id); ++ ++ if (!header) ++ return NULL; ++ ++ if (!gdk_pixdata_deserialize (&pixdata, header->length, header->start, error)) ++ return NULL; ++ ++ pixbuf = gdk_pixbuf_from_pixdata (&pixdata, TRUE, error); ++ ++ g_print ("pixbuf is: %p\n", pixbuf); ++ ++ return pixbuf; ++} ++ ++static void ++parse_apply_tag_element (GMarkupParseContext *context, ++ const gchar *element_name, ++ const gchar **attribute_names, ++ const gchar **attribute_values, ++ ParseInfo *info, ++ GError **error) ++{ ++ const gchar *name, *tag_name, *id; ++ ++ g_assert (peek_state (info) == STATE_TEXT || ++ peek_state (info) == STATE_APPLY_TAG); ++ ++ if (ELEMENT_IS ("apply_tag")) ++ { ++ if (!locate_attributes (context, element_name, attribute_names, attribute_values, error, ++ "name", &name, NULL)) ++ return; ++ ++ tag_name = tag_exists (context, name, info, error); ++ ++ if (!tag_name) ++ return; ++ ++ info->tag_stack = g_slist_prepend (info->tag_stack, g_strdup (tag_name)); ++ ++ push_state (info, STATE_APPLY_TAG); ++ } ++ else if (ELEMENT_IS ("pixbuf")) ++ { ++ int int_id; ++ GdkPixbuf *pixbuf; ++ TextSpan *span; ++ ++ if (!locate_attributes (context, element_name, attribute_names, attribute_values, error, ++ "index", &id, NULL)) ++ return; ++ ++ int_id = atoi (id); ++ pixbuf = get_pixbuf_from_headers (info->headers, int_id, error); ++ ++ span = g_new0 (TextSpan, 1); ++ span->pixbuf = pixbuf; ++ span->tags = NULL; ++ ++ info->spans = g_list_prepend (info->spans, span); ++ ++ if (!pixbuf) ++ return; ++ ++ push_state (info, STATE_PIXBUF); ++ } ++ else ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("Element <%s> is not allowed below <%s>"), ++ element_name, peek_state(info) == STATE_TEXT ? "text" : "apply_tag"); ++} ++ ++static void ++parse_attr_element (GMarkupParseContext *context, ++ const gchar *element_name, ++ const gchar **attribute_names, ++ const gchar **attribute_values, ++ ParseInfo *info, ++ GError **error) ++{ ++ const gchar *name, *type, *value; ++ GType gtype; ++ GValue gvalue = { 0 }; ++ GParamSpec *pspec; ++ ++ g_assert (peek_state (info) == STATE_TAG); ++ ++ if (ELEMENT_IS ("attr")) ++ { ++ if (!locate_attributes (context, element_name, attribute_names, attribute_values, error, ++ "name", &name, "type", &type, "value", &value, NULL)) ++ return; ++ ++ gtype = g_type_from_name (type); ++ ++ if (gtype == G_TYPE_INVALID) ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("\"%s\" is not a valid attribute type"), type); ++ return; ++ } ++ ++ if (!(pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (info->current_tag), name))) ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("\"%s\" is not a valid attribute name"), name); ++ return; ++ } ++ ++ g_value_init (&gvalue, gtype); ++ ++ if (!deserialize_value (value, &gvalue)) ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("\"%s\" could not be converted to a value of type \"%s\" for attribute \"%s\""), ++ value, type, name); ++ return; ++ } ++ ++ if (g_param_value_validate (pspec, &gvalue)) ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("\"%s\" is not a valid value of for attribute \"%s\""), ++ value, name); ++ g_value_unset (&gvalue); ++ return; ++ } ++ ++ g_object_set_property (G_OBJECT (info->current_tag), ++ name, &gvalue); ++ ++ g_value_unset (&gvalue); ++ ++ push_state (info, STATE_ATTR); ++ } ++ else ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("Element <%s> is not allowed below <%s>"), ++ element_name, "tag"); ++ } ++} ++ ++ ++static gchar * ++get_tag_name (ParseInfo *info, ++ const gchar *tag_name) ++{ ++ gchar *name; ++ gint i; ++ ++ name = g_strdup (tag_name); ++ ++ if (!info->create_tags) ++ return name; ++ ++ i = 0; ++ ++ while (gtk_text_tag_table_lookup (info->buffer->tag_table, name) != NULL) ++ { ++ g_free (name); ++ name = g_strdup_printf ("%s-%d", tag_name, ++i); ++ } ++ ++ if (i != 0) ++ { ++ g_hash_table_insert (info->substitutions, g_strdup (tag_name), g_strdup (name)); ++ } ++ ++ return name; ++} ++ ++static void ++parse_tag_element (GMarkupParseContext *context, ++ const gchar *element_name, ++ const gchar **attribute_names, ++ const gchar **attribute_values, ++ ParseInfo *info, ++ GError **error) ++{ ++ const gchar *name, *priority; ++ gchar *tag_name; ++ gint prio; ++ gchar *tmp; ++ ++ g_assert (peek_state (info) == STATE_TAGS); ++ ++ if (ELEMENT_IS ("tag")) ++ { ++ if (!locate_attributes (context, element_name, attribute_names, attribute_values, error, ++ "name", &name, "priority", &priority, NULL)) ++ return; ++ ++ if (g_hash_table_lookup (info->defined_tags, name) != NULL) ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("Tag \"%s\" already defined"), name); ++ return; ++ } ++ ++ prio = strtol (priority, &tmp, 10); ++ ++ if (tmp == NULL || tmp == priority) ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("Tag \"%s\" has invalid priority \"%s\""), name, priority); ++ return; ++ } ++ ++ tag_name = get_tag_name (info, name); ++ info->current_tag = gtk_text_tag_new (tag_name); ++ info->current_tag_prio = prio; ++ ++ g_free (tag_name); ++ ++ push_state (info, STATE_TAG); ++ } ++ else ++ { ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("Element <%s> is not allowed below <%s>"), ++ element_name, "tags"); ++ } ++} ++ ++static void ++start_element_handler (GMarkupParseContext *context, ++ const gchar *element_name, ++ const gchar **attribute_names, ++ const gchar **attribute_values, ++ gpointer user_data, ++ GError **error) ++{ ++ ParseInfo *info = user_data; ++ ++ switch (peek_state (info)) ++ { ++ case STATE_START: ++ if (ELEMENT_IS ("text_view_markup")) ++ { ++ if (!check_no_attributes (context, element_name, ++ attribute_names, attribute_values, error)) ++ return; ++ ++ push_state (info, STATE_TEXT_VIEW_MARKUP); ++ break; ++ } ++ else ++ set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("Outermost element in text must be <text_view_markup> not <%s>"), ++ element_name); ++ break; ++ case STATE_TEXT_VIEW_MARKUP: ++ if (ELEMENT_IS ("tags")) ++ { ++ if (info->parsed_tags) ++ { ++ set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("A <tags> element has already been specified")); ++ return; ++ } ++ ++ if (!check_no_attributes (context, element_name, ++ attribute_names, attribute_values, error)) ++ return; ++ ++ push_state (info, STATE_TAGS); ++ break; ++ } ++ else if (ELEMENT_IS ("text")) ++ { ++ if (info->parsed_text) ++ { ++ set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("A <text> element has already been specified")); ++ return; ++ } ++ else if (!info->parsed_tags) ++ { ++ set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("A <text> element can't occur before a <tags> element")); ++ return; ++ } ++ ++ if (!check_no_attributes (context, element_name, ++ attribute_names, attribute_values, error)) ++ return; ++ ++ push_state (info, STATE_TEXT); ++ break; ++ } ++ else ++ set_error (error, context, ++ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, ++ _("Element <%s> is not allowed below <%s>"), ++ element_name, "text_view_markup"); ++ break; ++ case STATE_TAGS: ++ parse_tag_element (context, element_name, ++ attribute_names, attribute_values, ++ info, error); ++ break; ++ case STATE_TAG: ++ parse_attr_element (context, element_name, ++ attribute_names, attribute_values, ++ info, error); ++ break; ++ case STATE_TEXT: ++ case STATE_APPLY_TAG: ++ parse_apply_tag_element (context, element_name, ++ attribute_names, attribute_values, ++ info, error); ++ break; ++ default: ++ g_assert_not_reached (); ++ break; ++ } ++} ++ ++static gint ++sort_tag_prio (TextTagPrio *a, ++ TextTagPrio *b) ++{ ++ if (a->prio < b->prio) ++ return -1; ++ else if (a->prio > b->prio) ++ return 1; ++ else ++ return 0; ++} ++ ++static void ++end_element_handler (GMarkupParseContext *context, ++ const gchar *element_name, ++ gpointer user_data, ++ GError **error) ++{ ++ ParseInfo *info = user_data; ++ gchar *tmp; ++ GList *list; ++ ++ switch (peek_state (info)) ++ { ++ case STATE_TAGS: ++ pop_state (info); ++ g_assert (peek_state (info) == STATE_TEXT_VIEW_MARKUP); ++ ++ info->parsed_tags = TRUE; ++ ++ /* Sort list and add the tags */ ++ info->tag_priorities = g_list_sort (info->tag_priorities, ++ (GCompareFunc)sort_tag_prio); ++ list = info->tag_priorities; ++ while (list) ++ { ++ TextTagPrio *prio = list->data; ++ ++ if (info->create_tags) ++ gtk_text_tag_table_add (info->buffer->tag_table, prio->tag); ++ ++ g_object_unref (prio->tag); ++ prio->tag = NULL; ++ ++ list = list->next; ++ } ++ ++ break; ++ case STATE_TAG: ++ pop_state (info); ++ g_assert (peek_state (info) == STATE_TAGS); ++ ++ /* Add tag to defined tags hash */ ++ tmp = g_strdup (info->current_tag->name); ++ g_hash_table_insert (info->defined_tags, ++ tmp, tmp); ++ ++ if (info->create_tags) ++ { ++ TextTagPrio *prio; ++ ++ /* add the tag to the list */ ++ prio = g_new0 (TextTagPrio, 1); ++ prio->prio = info->current_tag_prio; ++ prio->tag = info->current_tag; ++ ++ info->tag_priorities = g_list_prepend (info->tag_priorities, prio); ++ } ++ ++ info->current_tag = NULL; ++ break; ++ case STATE_ATTR: ++ pop_state (info); ++ g_assert (peek_state (info) == STATE_TAG); ++ break; ++ case STATE_APPLY_TAG: ++ pop_state (info); ++ g_assert (peek_state (info) == STATE_APPLY_TAG || ++ peek_state (info) == STATE_TEXT); ++ ++ /* Pop tag */ ++ g_free (info->tag_stack->data); ++ info->tag_stack = g_slist_delete_link (info->tag_stack, ++ info->tag_stack); ++ ++ break; ++ case STATE_TEXT: ++ pop_state (info); ++ g_assert (peek_state (info) == STATE_TEXT_VIEW_MARKUP); ++ ++ info->spans = g_list_reverse (info->spans); ++ info->parsed_text = TRUE; ++ break; ++ case STATE_TEXT_VIEW_MARKUP: ++ pop_state (info); ++ g_assert (peek_state (info) == STATE_START); ++ break; ++ case STATE_PIXBUF: ++ pop_state (info); ++ g_assert (peek_state (info) == STATE_APPLY_TAG || ++ peek_state (info) == STATE_TEXT); ++ break; ++ default: ++ g_assert_not_reached (); ++ break; ++ } ++} ++ ++static gboolean ++all_whitespace (const char *text, ++ int text_len) ++{ ++ const char *p; ++ const char *end; ++ ++ p = text; ++ end = text + text_len; ++ ++ while (p != end) ++ { ++ if (!g_ascii_isspace (*p)) ++ return FALSE; ++ ++ p = g_utf8_next_char (p); ++ } ++ ++ return TRUE; ++} ++ ++static GSList * ++copy_tag_list (GSList *tag_list) ++{ ++ GSList *tmp = NULL; ++ ++ while (tag_list) ++ { ++ tmp = g_slist_prepend (tmp, g_strdup (tag_list->data)); ++ ++ tag_list = tag_list->next; ++ } ++ ++ return tmp; ++} ++ ++static void ++text_handler (GMarkupParseContext *context, ++ const gchar *text, ++ gsize text_len, ++ gpointer user_data, ++ GError **error) ++{ ++ ParseInfo *info = user_data; ++ TextSpan *span; ++ ++ if (all_whitespace (text, text_len) && ++ peek_state (info) != STATE_TEXT && ++ peek_state (info) != STATE_APPLY_TAG) ++ return; ++ ++ switch (peek_state (info)) ++ { ++ case STATE_START: ++ g_assert_not_reached (); /* gmarkup shouldn't do this */ ++ break; ++ case STATE_TEXT: ++ case STATE_APPLY_TAG: ++ if (text_len == 0) ++ return; ++ ++ span = g_new0 (TextSpan, 1); ++ span->text = g_strndup (text, text_len); ++ span->tags = copy_tag_list (info->tag_stack); ++ ++ info->spans = g_list_prepend (info->spans, span); ++ break; ++ default: ++ g_assert_not_reached (); ++ break; ++ } ++} ++ ++static void ++parse_info_init (ParseInfo *info, ++ GtkTextBuffer *buffer, ++ gboolean create_tags, ++ GList *headers) ++{ ++ info->states = g_slist_prepend (NULL, GINT_TO_POINTER (STATE_START)); ++ ++ info->create_tags = create_tags; ++ info->headers = headers; ++ info->defined_tags = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); ++ info->substitutions = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); ++ info->tag_stack = NULL; ++ info->spans = NULL; ++ info->parsed_text = FALSE; ++ info->parsed_tags = FALSE; ++ info->current_tag = NULL; ++ info->current_tag_prio = -1; ++ info->tag_priorities = NULL; ++ ++ info->buffer = buffer; ++} ++ ++static void ++text_span_free (TextSpan *span) ++{ ++ GSList *tmp; ++ ++ g_free (span->text); ++ ++ tmp = span->tags; ++ while (tmp) ++ { ++ g_free (tmp->data); ++ ++ tmp = tmp->next; ++ } ++ g_slist_free (span->tags); ++ g_free (span); ++} ++ ++static void ++parse_info_free (ParseInfo *info) ++{ ++ GSList *slist; ++ GList *list; ++ ++ slist = info->tag_stack; ++ while (slist) ++ { ++ g_free (slist->data); ++ ++ slist = slist->next; ++ } ++ ++ g_slist_free (info->tag_stack); ++ g_slist_free (info->states); ++ ++ g_hash_table_destroy (info->substitutions); ++ g_hash_table_destroy (info->defined_tags); ++ ++ if (info->current_tag) ++ g_object_unref (info->current_tag); ++ ++ list = info->spans; ++ while (list) ++ { ++ text_span_free (list->data); ++ ++ list = list->next; ++ } ++ g_list_free (info->spans); ++ ++ list = info->tag_priorities; ++ while (list) ++ { ++ TextTagPrio *prio = list->data; ++ ++ if (prio->tag) ++ g_object_unref (prio->tag); ++ g_free (prio); ++ ++ list = list->next; ++ } ++ g_list_free (info->tag_priorities); ++ ++} ++ ++static const gchar * ++get_tag_substitution (ParseInfo *info, ++ const gchar *name) ++{ ++ gchar *subst; ++ ++ if ((subst = g_hash_table_lookup (info->substitutions, name))) ++ return subst; ++ else ++ return name; ++} ++ ++static void ++insert_text (ParseInfo *info, ++ GtkTextIter *iter) ++{ ++ GtkTextIter start_iter; ++ GtkTextMark *mark; ++ GList *tmp; ++ GSList *tags; ++ ++ start_iter = *iter; ++ ++ mark = gtk_text_buffer_create_mark (info->buffer, "deserialize_insert_point", ++ &start_iter, TRUE); ++ ++ tmp = info->spans; ++ while (tmp) ++ { ++ TextSpan *span = tmp->data; ++ ++ if (span->text) ++ gtk_text_buffer_insert (info->buffer, iter, span->text, -1); ++ else ++ { ++ gtk_text_buffer_insert_pixbuf (info->buffer, iter, span->pixbuf); ++ g_object_unref (span->pixbuf); ++ } ++ gtk_text_buffer_get_iter_at_mark (info->buffer, &start_iter, mark); ++ ++ /* Apply tags */ ++ tags = span->tags; ++ while (tags) ++ { ++ const gchar *tag_name = get_tag_substitution (info, tags->data); ++ ++ gtk_text_buffer_apply_tag_by_name (info->buffer, tag_name, ++ &start_iter, iter); ++ ++ tags = tags->next; ++ } ++ ++ gtk_text_buffer_move_mark (info->buffer, mark, iter); ++ ++ tmp = tmp->next; ++ } ++ ++ gtk_text_buffer_delete_mark (info->buffer, mark); ++} ++ ++ ++ ++static int ++read_int (const guchar *start) ++{ ++ int result; ++ ++ result = ++ start[0] << 24 | ++ start[1] << 16 | ++ start[2] << 8 | ++ start[3]; ++ ++ return result; ++} ++ ++static gboolean ++header_is (Header *header, const gchar *id) ++{ ++ return (strncmp (header->id, id, 8) == 0); ++} ++ ++static GList * ++read_headers (const gchar *start, ++ gint len, ++ GError **error) ++{ ++ int i = 0; ++ int section_len; ++ Header *header; ++ GList *headers = NULL; ++ ++ while (i < len) ++ { ++ if (i + 12 >= len) ++ goto error; ++ ++ if (strncmp (start + i, "RICHTEXT", 8) == 0 || ++ strncmp (start + i, "PIXBDATA", 8) == 0) ++ { ++ ++ section_len = read_int (start + i + 8); ++ ++ if (i + 12 + section_len > len) ++ goto error; ++ ++ header = g_new0 (Header, 1); ++ header->id = start + i; ++ header->length = section_len; ++ header->start = start + i + 12; ++ ++ i += 12 + section_len; ++ ++ headers = g_list_prepend (headers, header); ++ } ++ else ++ break; ++ ++ } ++ ++ return g_list_reverse (headers); ++ ++ error: ++ g_list_foreach (headers, (GFunc) g_free, NULL); ++ g_list_free (headers); ++ ++ g_set_error (error, ++ G_MARKUP_ERROR, ++ G_MARKUP_ERROR_PARSE, ++ _("Serialized data is malformed")); ++ ++ return NULL; ++} ++ ++static gboolean ++deserialize_text (GtkTextBuffer *buffer, ++ GtkTextIter *iter, ++ const gchar *text, ++ gint len, ++ gboolean create_tags, ++ GError **error, ++ GList *headers) ++{ ++ GMarkupParseContext *context; ++ ParseInfo info; ++ gboolean retval = FALSE; ++ ++ ++ static GMarkupParser rich_text_parser = { ++ start_element_handler, ++ end_element_handler, ++ text_handler, ++ NULL, ++ NULL ++ }; ++ ++ parse_info_init (&info, buffer, create_tags, headers); ++ ++ context = g_markup_parse_context_new (&rich_text_parser, ++ 0, &info, NULL); ++ ++ if (!g_markup_parse_context_parse (context, ++ text, ++ len, ++ error)) ++ goto out; ++ ++ if (!g_markup_parse_context_end_parse (context, error)) ++ goto out; ++ ++ retval = TRUE; ++ ++ /* Now insert the text */ ++ insert_text (&info, iter); ++ ++ out: ++ parse_info_free (&info); ++ ++ g_markup_parse_context_free (context); ++ ++ return retval; ++} ++ ++gboolean ++gtk_text_buffer_deserialize_rich_text (GtkTextBuffer *buffer, ++ GtkTextIter *iter, ++ const gchar *text, ++ gint len, ++ gboolean create_tags, ++ GError **error) ++{ ++ GList *headers; ++ Header *header; ++ gboolean retval; ++ ++ headers = read_headers (text, len, error); ++ ++ if (!headers) ++ return FALSE; ++ ++ header = headers->data; ++ if (!header_is (header, "RICHTEXT")) ++ { ++ g_set_error (error, ++ G_MARKUP_ERROR, ++ G_MARKUP_ERROR_PARSE, ++ _("Serialized data is malformed. First section isn't RICHTEXT")); ++ ++ retval = FALSE; ++ goto out; ++ } ++ ++ retval = deserialize_text (buffer, iter, ++ header->start, header->length, ++ create_tags, error, headers->next); ++ ++ out: ++ g_list_foreach (headers, (GFunc)g_free, NULL); ++ g_list_free (headers); ++ ++ return retval; ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbufferserialize.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbufferserialize.h.diff new file mode 100644 index 0000000000..653c227cbe --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextbufferserialize.h.diff @@ -0,0 +1,40 @@ +--- gtk+-2.6.4/gtk/gtktextbufferserialize.h 1970-01-01 02:00:00.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktextbufferserialize.h 2005-04-06 16:19:38.025757568 +0300 +@@ -0,0 +1,37 @@ ++/* gtktextbufferserialize.h ++ * ++ * Copyright (C) 2004 Nokia ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++#ifndef GTK_TEXT_BUFFER_SERIALIZE_H ++ ++#include <gtk/gtktextbuffer.h> ++ ++gchar *gtk_text_buffer_serialize_rich_text (GtkTextBuffer *buffer, ++ const GtkTextIter *start, ++ const GtkTextIter *end, ++ gint *len); ++ ++gboolean gtk_text_buffer_deserialize_rich_text (GtkTextBuffer *buffer, ++ GtkTextIter *iter, ++ const gchar *text, ++ gint len, ++ gboolean create_tags, ++ GError **error); ++ ++ ++#endif /* GTK_TEXT_BUFFER_SERIALIZE_H */ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextview.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextview.c.diff new file mode 100644 index 0000000000..7323574a64 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktextview.c.diff @@ -0,0 +1,417 @@ +--- gtk+-2.6.4/gtk/gtktextview.c 2005-03-01 08:28:56.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktextview.c 2005-04-06 16:19:38.152738264 +0300 +@@ -99,6 +99,11 @@ + + #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 _GtkTextPendingScroll + { + GtkTextMark *mark; +@@ -145,6 +150,8 @@ + PROP_BUFFER, + PROP_OVERWRITE, + PROP_ACCEPTS_TAB, ++ PROP_AUTOCAP, ++ PROP_INPUT_MODE, + LAST_PROP + }; + +@@ -343,6 +350,13 @@ + + static void gtk_text_view_update_im_spot_location (GtkTextView *text_view); + ++static void gtk_text_view_set_autocap (GtkTextView *text_view, ++ gboolean autocap); ++static gboolean gtk_text_view_get_autocap (GtkTextView *text_view); ++static void gtk_text_view_set_input_mode (GtkTextView *text_view, ++ gint mode); ++static gint gtk_text_view_get_input_mode (GtkTextView *text_view); ++ + /* Container methods */ + static void gtk_text_view_add (GtkContainer *container, + GtkWidget *child); +@@ -412,6 +426,10 @@ + static gint text_window_get_width (GtkTextWindow *win); + static gint text_window_get_height (GtkTextWindow *win); + ++struct _GtkTextViewPrivate ++{ ++ guint release_selection : 1; ++}; + + static const GtkTargetEntry target_table[] = { + { "GTK_TEXT_BUFFER_CONTENTS", GTK_TARGET_SAME_APP, 0 }, +@@ -481,6 +499,7 @@ + + parent_class = g_type_class_peek_parent (klass); + ++ g_type_class_add_private( klass, sizeof(GtkTextViewPrivate) ); + /* Default handlers and virtual methods + */ + gobject_class->set_property = gtk_text_view_set_property; +@@ -667,6 +686,24 @@ + TRUE, + G_PARAM_READWRITE)); + ++ g_object_class_install_property (gobject_class, ++ PROP_AUTOCAP, ++ g_param_spec_boolean ("autocap", ++ P_("auto capitalization"), ++ P_("Enable autocap support"), ++ TRUE, ++ G_PARAM_READABLE | G_PARAM_WRITABLE)); ++ ++ g_object_class_install_property (gobject_class, ++ PROP_INPUT_MODE, ++ g_param_spec_int ("input_mode", ++ P_("input mode"), ++ P_("Define widget's input mode"), ++ 0, ++ 9, /* keep me updated */ ++ 0, ++ G_PARAM_READABLE | G_PARAM_WRITABLE)); ++ + /* + * Style properties + */ +@@ -676,6 +713,14 @@ + P_("Color with which to draw error-indication underlines"), + GDK_TYPE_COLOR, + G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("autocap", ++ _("auto capitalization"), ++ _("Enable autocap support"), ++ TRUE, ++ G_PARAM_READABLE)); ++ + + /* + * Signals +@@ -1040,8 +1085,9 @@ + gtk_text_view_init (GtkTextView *text_view) + { + GtkWidget *widget; +- ++ GtkTextViewPrivate *priv = NULL; + widget = GTK_WIDGET (text_view); ++ priv = GTK_TEXT_VIEW_GET_PRIVATE(text_view); + + GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS); + +@@ -1057,6 +1103,8 @@ + text_view->tabs = NULL; + text_view->editable = TRUE; + ++ priv->release_selection = TRUE; ++ + gtk_drag_dest_set (widget, + 0, + target_table, G_N_ELEMENTS (target_table), +@@ -1070,6 +1118,10 @@ + * to it; so we create it here and destroy it in finalize (). + */ + text_view->im_context = gtk_im_multicontext_new (); ++ /* Set default stuff. */ ++ gtk_text_view_set_autocap (text_view, TRUE); ++ gtk_text_view_set_input_mode (text_view, 0); /* alpha-numeric-special */ ++ g_object_set (G_OBJECT (text_view->im_context), "use-show-hide", TRUE, NULL); + + g_signal_connect (text_view->im_context, "commit", + G_CALLBACK (gtk_text_view_commit_handler), text_view); +@@ -2664,6 +2716,14 @@ + gtk_text_view_set_accepts_tab (text_view, g_value_get_boolean (value)); + break; + ++ case PROP_AUTOCAP: ++ gtk_text_view_set_autocap (text_view, g_value_get_boolean (value)); ++ break; ++ ++ case PROP_INPUT_MODE: ++ gtk_text_view_set_input_mode (text_view, g_value_get_int (value)); ++ break; ++ + default: + g_assert_not_reached (); + break; +@@ -2738,6 +2798,14 @@ + g_value_set_boolean (value, text_view->accepts_tab); + break; + ++ case PROP_AUTOCAP: ++ g_value_set_boolean (value, gtk_text_view_get_autocap (text_view)); ++ break; ++ ++ case PROP_INPUT_MODE: ++ g_value_set_int (value, gtk_text_view_get_input_mode (text_view)); ++ break; ++ + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; +@@ -3916,7 +3984,7 @@ + GtkTextView *text_view = GTK_TEXT_VIEW (widget); + GtkTextMark *insert; + GtkTextIter iter; +- ++ + if (text_view->layout == NULL || get_buffer (text_view) == NULL) + return FALSE; + +@@ -4039,6 +4107,9 @@ + if (event->window != text_view->text_window->bin_window) + return FALSE; + ++ if (text_view->editable) ++ gtk_im_context_show (text_view->im_context); ++ + if (event->button == 1) + { + if (text_view->drag_start_x >= 0) +@@ -4083,7 +4154,15 @@ + static gint + gtk_text_view_focus_in_event (GtkWidget *widget, GdkEventFocus *event) + { ++ /*gboolean have_selection; ++ GtkTextIter sel_start, sel_end;*/ ++ + GtkTextView *text_view = GTK_TEXT_VIEW (widget); ++ ++ /*have_selection = gtk_text_buffer_get_selection_bounds(text_view->buffer, &sel_start, &sel_end); ++ ++ if(!have_selection) ++ gtk_text_view_move_cursor(text_view, GTK_MOVEMENT_BUFFER_ENDS, 1, FALSE);*//*FIXME some other way to place the cursor in the end*/ + + gtk_widget_queue_draw (widget); + +@@ -4100,8 +4179,10 @@ + G_CALLBACK (keymap_direction_changed), text_view); + gtk_text_view_check_keymap_direction (text_view); + ++ /* Keyboard hack */ + text_view->need_im_reset = TRUE; + gtk_im_context_focus_in (GTK_TEXT_VIEW (widget)->im_context); ++ gtk_text_view_reset_im_context (text_view); + + return FALSE; + } +@@ -4110,6 +4191,14 @@ + gtk_text_view_focus_out_event (GtkWidget *widget, GdkEventFocus *event) + { + GtkTextView *text_view = GTK_TEXT_VIEW (widget); ++ GtkTextViewPrivate *priv = GTK_TEXT_VIEW_GET_PRIVATE(text_view); ++ /*{ ++ GtkTextIter start; ++ GtkTextIter end; ++ ++ gtk_text_buffer_get_bounds(text_view->buffer, &start, &end); ++ gtk_text_buffer_select_range(text_view->buffer, &start, &start); ++ }*//*FIXME need a hack here to take away the focus*/ + + gtk_widget_queue_draw (widget); + +@@ -4125,8 +4214,11 @@ + keymap_direction_changed, + text_view); + +- text_view->need_im_reset = TRUE; +- gtk_im_context_focus_out (GTK_TEXT_VIEW (widget)->im_context); ++ /* This is commented out to disable unselect feature. ++ When the decition of this has been made, we can either remove this patch ++ or to leave it. ++ if( priv->release_selection ) ++ gtk_text_view_unselect( text_view );*/ + + return FALSE; + } +@@ -5082,7 +5174,8 @@ + GtkTextIter end; + gboolean leave_one = FALSE; + +- gtk_text_view_reset_im_context (text_view); ++ /*gtk_text_view_reset_im_context (text_view);*/ /*backspace should not clear ++ the word completion*/ + + if (type == GTK_DELETE_CHARS) + { +@@ -5200,7 +5293,8 @@ + { + GtkTextIter insert; + +- gtk_text_view_reset_im_context (text_view); ++ /*gtk_text_view_reset_im_context (text_view);*/ /*backspace should not clear ++ the word completion*/ + + /* Backspace deletes the selection, if one exists */ + if (gtk_text_buffer_delete_selection (get_buffer (text_view), TRUE, +@@ -5928,11 +6022,11 @@ + static void + gtk_text_view_reset_im_context (GtkTextView *text_view) + { +- if (text_view->need_im_reset) ++/* if (text_view->need_im_reset) + { +- text_view->need_im_reset = FALSE; ++ text_view->need_im_reset = FALSE;*/ + gtk_im_context_reset (text_view->im_context); +- } ++/* }*/ + } + + /* +@@ -6665,18 +6759,23 @@ + { + GtkTextIter start; + GtkTextIter end; +- gint pos; ++ gint pos, endpos; + gchar *text; + +- gtk_text_buffer_get_iter_at_mark (text_view->buffer, &start, ++ gtk_text_buffer_get_iter_at_line (text_view->buffer, &start, 0); ++ gtk_text_buffer_get_iter_at_mark (text_view->buffer, &end, + gtk_text_buffer_get_insert (text_view->buffer)); +- end = start; + +- pos = gtk_text_iter_get_line_index (&start); +- gtk_text_iter_set_line_offset (&start, 0); ++ pos = gtk_text_iter_get_line_index (&end); ++ + gtk_text_iter_forward_to_line_end (&end); ++ endpos = gtk_text_iter_get_line_index (&end); + + text = gtk_text_iter_get_slice (&start, &end); ++ if (text) ++ pos = strlen (text) - (endpos - pos); /* want bytes, not characters */ ++ else ++ pos = 0; + gtk_im_context_set_surrounding (context, text, -1, pos); + g_free (text); + +@@ -6726,8 +6825,8 @@ + need_reset = TRUE; + } + +- if (need_reset) +- gtk_text_view_reset_im_context (text_view); ++ /*if (need_reset) ++ gtk_text_view_reset_im_context (text_view);*//*FIXME need a hack here*/ + } + + static void +@@ -6957,6 +7056,13 @@ + } + + static void ++block_selection_change( GtkMenuShell *menushell, gpointer user_data ) ++{ ++ GtkTextViewPrivate *priv = GTK_TEXT_VIEW_GET_PRIVATE(user_data); ++ priv->release_selection = TRUE; ++} ++ ++static void + unichar_chosen_func (const char *text, + gpointer data) + { +@@ -7064,7 +7170,12 @@ + signals[POPULATE_POPUP], + 0, + text_view->popup_menu); +- ++ { ++ GtkTextViewPrivate *priv = GTK_TEXT_VIEW_GET_PRIVATE(text_view); ++ g_signal_connect( GTK_WIDGET(text_view->popup_menu), "selection-done", ++ G_CALLBACK(block_selection_change), text_view ); ++ priv->release_selection = FALSE; ++ } + if (info->button) + gtk_menu_popup (GTK_MENU (text_view->popup_menu), NULL, NULL, + NULL, NULL, +@@ -8301,3 +8412,81 @@ + + return gtk_text_layout_move_iter_visually (text_view->layout, iter, count); + } ++ ++/* ++ * gtk_text_view_set_autocap: ++ * @entry: a #GtkTextView ++ * @autocap: autocap ++ * ++ * Sets autocapitalization of the widget. ++ */ ++static void ++gtk_text_view_set_autocap (GtkTextView *text_view, ++ gboolean autocap) ++{ ++ g_return_if_fail (GTK_IS_TEXT_VIEW (text_view)); ++ ++ if (gtk_text_view_get_autocap (text_view) != autocap) ++ { ++ g_object_set (G_OBJECT (text_view->im_context), "autocap", autocap, NULL); ++ g_object_notify (G_OBJECT (text_view), "autocap"); ++ } ++} ++ ++/* ++ * gtk_text_view_get_autocap: ++ * @entry: a #GtkTextView ++ * ++ * Gets autocapitalization state of the widget. ++ * ++ * Return value: a state ++ */ ++static gboolean ++gtk_text_view_get_autocap (GtkTextView *text_view) ++{ ++ gboolean autocap; ++ g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), FALSE); ++ ++ g_object_get (G_OBJECT (text_view->im_context), "autocap", &autocap, NULL); ++ ++ return autocap; ++} ++ ++/* ++ * gtk_text_view_set_input_mode: ++ * @text_view: a #GtkTextView ++ * @mode: input mode ++ * ++ * Sets autocapitalization of the widget. ++ */ ++static void ++gtk_text_view_set_input_mode (GtkTextView *text_view, ++ gint mode) ++{ ++ g_return_if_fail (GTK_IS_TEXT_VIEW (text_view)); ++ ++ if (gtk_text_view_get_input_mode (text_view) != mode) ++ { ++ g_object_set (G_OBJECT (text_view->im_context), "input_mode", mode, NULL); ++ g_object_notify (G_OBJECT (text_view), "input_mode"); ++ } ++} ++ ++/* ++ * gtk_text_view_get_input_mode: ++ * @text_view: a #GtkTextView ++ * ++ * Gets input mode of the widget. ++ * ++ * Return value: input mode ++ */ ++static gint ++gtk_text_view_get_input_mode (GtkTextView *text_view) ++{ ++ gint mode; ++ g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), FALSE); ++ ++ g_object_get (G_OBJECT (text_view->im_context), "input_mode", &mode, NULL); ++ ++ return mode; ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbar.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbar.c.diff new file mode 100644 index 0000000000..b99d346f4b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbar.c.diff @@ -0,0 +1,252 @@ +--- gtk+-2.6.4/gtk/gtktoolbar.c 2004-11-23 06:11:15.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktoolbar.c 2005-04-06 16:19:38.166736136 +0300 +@@ -67,7 +67,9 @@ + + #define DEFAULT_ICON_SIZE GTK_ICON_SIZE_LARGE_TOOLBAR + #define DEFAULT_TOOLBAR_STYLE GTK_TOOLBAR_BOTH ++#define DEFAULT_ANIMATION_STATE FALSE + ++#define DEFAULT_MAX_CHILD_SPACING G_MAXINT + #define MAX_HOMOGENEOUS_N_CHARS 13 /* Items that are wider than this do not participate + * in the homogeneous game. In units of + * pango_font_get_estimated_char_width(). +@@ -140,10 +142,14 @@ + + GTimer * timer; + ++ guint animation_connection; ++ + guint show_arrow : 1; + guint need_sync : 1; + guint is_sliding : 1; + guint need_rebuild : 1; /* whether the overflow menu should be regenerated */ ++ guint animation_set : 1; ++ guint animation : 1; + }; + + static void gtk_toolbar_init (GtkToolbar *toolbar); +@@ -225,9 +231,11 @@ + static void gtk_toolbar_reconfigured (GtkToolbar *toolbar); + static gboolean gtk_toolbar_check_new_api (GtkToolbar *toolbar); + static gboolean gtk_toolbar_check_old_api (GtkToolbar *toolbar); ++static void gtk_toolbar_update_animation_state (GtkToolbar *toolbar); + + static GtkReliefStyle get_button_relief (GtkToolbar *toolbar); + static gint get_internal_padding (GtkToolbar *toolbar); ++static gint get_max_child_expand (GtkToolbar *toolbar); + static GtkShadowType get_shadow_type (GtkToolbar *toolbar); + static gint get_space_size (GtkToolbar *toolbar); + static GtkToolbarSpaceStyle get_space_style (GtkToolbar *toolbar); +@@ -563,6 +571,15 @@ + G_PARAM_READABLE)); + + gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("max_child_expand", ++ P_("Maximum toolbar item spacing"), ++ P_("Maximum space between the toolbar items."), ++ 0, ++ G_MAXINT, ++ DEFAULT_MAX_CHILD_SPACING, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, + g_param_spec_enum ("space_style", + P_("Space style"), + P_("Whether spacers are vertical lines or just blank"), +@@ -598,6 +615,12 @@ + GTK_TYPE_ICON_SIZE, + DEFAULT_ICON_SIZE, + G_PARAM_READWRITE)); ++ ++ gtk_settings_install_property (g_param_spec_boolean ("gtk-toolbar-animation", ++ P_("Toolbar animation"), ++ P_("Are we using toolbar animation"), ++ DEFAULT_ANIMATION_STATE, ++ G_PARAM_READWRITE)); + + binding_set = gtk_binding_set_by_class (klass); + +@@ -638,6 +661,7 @@ + toolbar->orientation = GTK_ORIENTATION_HORIZONTAL; + toolbar->style = DEFAULT_TOOLBAR_STYLE; + toolbar->icon_size = DEFAULT_ICON_SIZE; ++ priv->animation = DEFAULT_ANIMATION_STATE; + toolbar->tooltips = gtk_tooltips_new (); + g_object_ref (toolbar->tooltips); + gtk_object_sink (GTK_OBJECT (toolbar->tooltips)); +@@ -960,7 +984,7 @@ + } + + static gint +-position (gint from, gint to, gdouble elapsed) ++position (GtkToolbar *toolbar, gint from, gint to, gdouble elapsed) + { + gint n_pixels; + +@@ -978,11 +1002,20 @@ + n_pixels = (SLIDE_SPEED / ACCEL_THRESHOLD) * elapsed * elapsed - + SLIDE_SPEED * elapsed + SLIDE_SPEED * ACCEL_THRESHOLD; + } +- +- if (to > from) +- return MIN (from + n_pixels, to); +- else +- return MAX (from - n_pixels, to); ++ if (GTK_TOOLBAR_GET_PRIVATE (toolbar)->animation) { ++ if (to > from) ++ return MIN (from + n_pixels, to); ++ else ++ return MAX (from - n_pixels, to); ++ } ++ return to; ++} ++ ++static GtkSettings * ++toolbar_get_settings (GtkToolbar *toolbar) ++{ ++ GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar); ++ return priv->settings; + } + + static void +@@ -994,12 +1027,12 @@ + GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar); + gdouble elapsed = g_timer_elapsed (priv->timer, NULL); + +- intermediate->x = position (start->x, goal->x, elapsed); +- intermediate->y = position (start->y, goal->y, elapsed); ++ intermediate->x = position (toolbar, start->x, goal->x, elapsed); ++ intermediate->y = position (toolbar, start->y, goal->y, elapsed); + intermediate->width = +- position (start->x + start->width, goal->x + goal->width, elapsed) - intermediate->x; ++ position (toolbar, start->x + start->width, goal->x + goal->width, elapsed) - intermediate->x; + intermediate->height = +- position (start->y + start->height, goal->y + goal->height, elapsed) - intermediate->y; ++ position (toolbar, start->y + start->height, goal->y + goal->height, elapsed) - intermediate->y; + } + + static void +@@ -1047,6 +1080,32 @@ + } + } + ++static void ++gtk_toolbar_update_animation_state (GtkToolbar *toolbar) ++{ ++ gboolean animation_state; ++ GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar); ++ ++ g_return_if_fail (GTK_IS_TOOLBAR (toolbar)); ++ ++ if (priv->animation_set) ++ { ++ GtkSettings *settings = toolbar_get_settings (toolbar); ++ ++ if (settings) ++ { ++ g_object_get (settings, ++ "gtk-toolbar-animation", &animation_state, ++ NULL); ++ } ++ else ++ animation_state = DEFAULT_ANIMATION_STATE; ++ ++ priv->animation = animation_state; ++ priv->animation_set = FALSE; ++ } ++} ++ + static gboolean + slide_idle_handler (gpointer data) + { +@@ -1537,10 +1596,14 @@ + + if (toolbar_content_get_expand (content) && new_states[i] == NORMAL) + { ++ gint mexpand = get_max_child_expand(toolbar); + gint extra = size / n_expand_items; + if (size % n_expand_items != 0) + extra++; +- ++ if (extra > mexpand) { ++ extra = mexpand; ++ } ++ + allocations[i].width += extra; + size -= extra; + n_expand_items--; +@@ -1932,11 +1995,16 @@ + } + } + +-static GtkSettings * +-toolbar_get_settings (GtkToolbar *toolbar) ++static void ++animation_change_notify (GtkToolbar *toolbar) + { + GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar); +- return priv->settings; ++ if (!priv->animation_set) ++ { ++ /* pretend it was set, then unset, thus reverting to new default */ ++ priv->animation_set = TRUE; ++ gtk_toolbar_update_animation_state (toolbar); ++ } + } + + static void +@@ -1960,6 +2028,7 @@ + { + g_signal_handler_disconnect (old_settings, toolbar->style_set_connection); + g_signal_handler_disconnect (old_settings, toolbar->icon_size_connection); ++ g_signal_handler_disconnect (old_settings, priv->animation_connection); + + g_object_unref (old_settings); + } +@@ -1976,6 +2045,11 @@ + "notify::gtk-toolbar-icon-size", + G_CALLBACK (icon_size_change_notify), + toolbar); ++ priv->animation_connection = ++ g_signal_connect_swapped (settings, ++ "notify::gtk-toolbar-animation", ++ G_CALLBACK (animation_change_notify), ++ toolbar); + + g_object_ref (settings); + priv->settings = settings; +@@ -1985,6 +2059,7 @@ + + style_change_notify (toolbar); + icon_size_change_notify (toolbar); ++ animation_change_notify (toolbar); + } + + static int +@@ -2913,7 +2988,7 @@ + * gtk_toolbar_get_icon_size: + * @toolbar: a #GtkToolbar + * +- * Retrieves the icon size fo the toolbar. See gtk_toolbar_set_icon_size(). ++ * Retrieves the icon size for the toolbar. See gtk_toolbar_set_icon_size(). + * + * Return value: the current icon size for the icons on the toolbar. + **/ +@@ -4642,6 +4717,17 @@ + return ipadding; + } + ++static gint ++get_max_child_expand (GtkToolbar *toolbar) ++{ ++ gint mexpand = DEFAULT_MAX_CHILD_SPACING; ++ ++ gtk_widget_style_get (GTK_WIDGET (toolbar), ++ "max_child_expand", &mexpand, ++ NULL); ++ return mexpand; ++} ++ + static GtkShadowType + get_shadow_type (GtkToolbar *toolbar) + { diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbutton.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbutton.c.diff new file mode 100644 index 0000000000..15e15fe796 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbutton.c.diff @@ -0,0 +1,65 @@ +--- gtk+-2.6.4/gtk/gtktoolbutton.c 2004-11-20 01:18:38.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktoolbutton.c 2005-04-06 16:19:38.167735984 +0300 +@@ -41,6 +41,7 @@ + + enum { + CLICKED, ++ INSENSITIVE_PRESS, + LAST_SIGNAL + }; + +@@ -74,7 +75,10 @@ + GtkToolButton *button); + + static void gtk_tool_button_construct_contents (GtkToolItem *tool_item); +- ++ ++ static void insensitive_press (GtkWidget *widget, ++ GtkToolButton *button); ++ + static GObjectClass *parent_class = NULL; + static guint toolbutton_signals[LAST_SIGNAL] = { 0 }; + +@@ -226,7 +230,7 @@ + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); +- ++ + g_type_class_add_private (object_class, sizeof (GtkToolButtonPrivate)); + } + +@@ -246,6 +250,10 @@ + g_signal_connect_object (button->priv->button, "clicked", + G_CALLBACK (button_clicked), button, 0); + ++ /* Hildon: connect "insensitive_press" signal for private button */ ++ g_signal_connect_object (button->priv->button, "insensitive_press", ++ G_CALLBACK (insensitive_press), button, 0); ++ + gtk_container_add (GTK_CONTAINER (button), button->priv->button); + gtk_widget_show (button->priv->button); + } +@@ -519,7 +527,7 @@ + + src_pixbuf = gtk_image_get_pixbuf (image); + dest_pixbuf = gdk_pixbuf_scale_simple (src_pixbuf, width, height, +- GDK_INTERP_BILINEAR); ++ GDK_INTERP_NEAREST); + + return gtk_image_new_from_pixbuf (dest_pixbuf); + } +@@ -594,6 +602,13 @@ + } + + static void ++insensitive_press (GtkWidget *widget, ++ GtkToolButton *button) ++{ ++ g_signal_emit_by_name (button, "insensitive_press"); ++} ++ ++static void + gtk_tool_button_toolbar_reconfigured (GtkToolItem *tool_item) + { + gtk_tool_button_construct_contents (tool_item); diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbutton.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbutton.h.diff new file mode 100644 index 0000000000..f11a73b63d --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbutton.h.diff @@ -0,0 +1,10 @@ +--- gtk+-2.6.4/gtk/gtktoolbutton.h 2004-11-23 22:02:15.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktoolbutton.h 2005-04-06 16:19:38.168735832 +0300 +@@ -54,6 +54,7 @@ + + /* signal */ + void (* clicked) (GtkToolButton *tool_item); ++ void (* insensitive_press) (GtkToolButton *tool_item); + + /* Padding for future expansion */ + void (* _gtk_reserved1) (void); diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff new file mode 100644 index 0000000000..af2d495a86 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelfilter.c.diff @@ -0,0 +1,52 @@ +--- gtk+-2.6.4/gtk/gtktreemodelfilter.c 2005-02-24 16:43:53.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktreemodelfilter.c 2005-04-06 16:19:38.177734464 +0300 +@@ -1210,14 +1210,22 @@ + if (gtk_tree_path_get_depth (filter->priv->virtual_root) >= + gtk_tree_path_get_depth (c_path)) + { +- gint level; ++ gint level, i; + gint *v_indices, *c_indices; ++ gboolean common_prefix = TRUE; + + level = gtk_tree_path_get_depth (c_path) - 1; + v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root); + c_indices = gtk_tree_path_get_indices (c_path); + +- if (v_indices[level] >= c_indices[level]) ++ for (i = 0; i < level; i++) ++ if (v_indices[i] != c_indices[i]) ++ { ++ common_prefix = FALSE; ++ break; ++ } ++ ++ if (common_prefix && v_indices[level] >= c_indices[level]) + (v_indices[level])++; + } + } +@@ -1455,14 +1463,22 @@ + if (gtk_tree_path_get_depth (filter->priv->virtual_root) >= + gtk_tree_path_get_depth (c_path)) + { +- gint level; ++ gint level, i; + gint *v_indices, *c_indices; ++ gboolean common_prefix = TRUE; + + level = gtk_tree_path_get_depth (c_path) - 1; + v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root); + c_indices = gtk_tree_path_get_indices (c_path); + +- if (v_indices[level] > c_indices[level]) ++ for (i = 0; i < level; i++) ++ if (v_indices[i] != c_indices[i]) ++ { ++ common_prefix = FALSE; ++ break; ++ } ++ ++ if (common_prefix && v_indices[level] > c_indices[level]) + (v_indices[level])--; + } + } diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelsort.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelsort.c.diff new file mode 100644 index 0000000000..94139d162a --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreemodelsort.c.diff @@ -0,0 +1,21 @@ +--- gtk+-2.6.4/gtk/gtktreemodelsort.c 2004-11-30 23:45:26.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktreemodelsort.c 2005-04-06 16:19:38.178734312 +0300 +@@ -703,6 +703,18 @@ + tmppath = gtk_tree_model_get_path (GTK_TREE_MODEL (data), &tmpiter); + if (tmppath) + { ++ GtkTreePath *path; ++ GtkTreeIter iter; ++ gboolean result; ++ ++ path = gtk_tree_path_copy (tmppath); ++ gtk_tree_path_down (path); ++ ++ result = gtk_tree_model_get_iter (GTK_TREE_MODEL (data), &iter, path); ++ g_assert (result); ++ gtk_tree_model_row_inserted (GTK_TREE_MODEL (data), path, &iter); ++ gtk_tree_path_free (path); ++ + gtk_tree_model_row_has_child_toggled (GTK_TREE_MODEL (data), + tmppath, + &tmpiter); diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeprivate.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeprivate.h.diff new file mode 100644 index 0000000000..384c63bc7d --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeprivate.h.diff @@ -0,0 +1,58 @@ +--- gtk+-2.6.4/gtk/gtktreeprivate.h 2004-08-02 22:11:32.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtktreeprivate.h 2005-04-06 16:19:38.185733248 +0300 +@@ -232,6 +232,37 @@ + GtkTreeViewRowSeparatorFunc row_separator_func; + gpointer row_separator_data; + GtkDestroyNotify row_separator_destroy; ++ ++ /* Hildon additions */ ++ guint new_state : 1; /* helper flag for pen drag in checkbox mode */ ++ guint checkbox_mode : 1; /* is checkbox mode on right now? */ ++ guint allow_checkbox_mode : 1; /* is checkbox mode ever allowed to be on? */ ++ guint pen_down : 1; ++ guint pen_drag_active : 1; ++ guint pen_drag_motion_counter; ++ guint pen_drag_reverse : 1; ++ gboolean pen_scroll_timer; ++ gdouble old_y; ++ gboolean pen_focus; ++ gboolean dotted_lines; ++ gboolean force_list_kludge; ++ ++ /* the "pen down" row of the current pen drag */ ++ GtkTreeRowReference *first_drag_row; ++ ++ /* most recently toggled row during pen drag */ ++ GtkTreeRowReference *last_drag_row; ++ ++ /* for postponing tree node expand/collapse at ++ button_press event until button_release event */ ++ GtkTreeRowReference *queued_expand_row; ++ ++ /* for postponing selection clearing at button_press event ++ until button_release event in painted multiple selection mode */ ++ GtkTreeRowReference *queued_select_row; ++ ++ /* Hildon treeview can_focus hack */ ++ guint check_if_can_focus_idle_id; + }; + + #ifdef __GNUC__ +@@ -357,6 +388,7 @@ + GtkTreeViewColumn *column); + + gboolean _gtk_tree_view_column_has_editable_cell (GtkTreeViewColumn *column); ++gboolean _gtk_tree_view_column_has_activatable_cell (GtkTreeViewColumn *column); + GtkCellRenderer *_gtk_tree_view_column_get_edited_cell (GtkTreeViewColumn *column); + gint _gtk_tree_view_column_count_special_cells (GtkTreeViewColumn *column); + GtkCellRenderer *_gtk_tree_view_column_get_cell_at_pos (GtkTreeViewColumn *column, +@@ -366,6 +398,9 @@ + GtkTreeSelection* _gtk_tree_selection_new_with_tree_view (GtkTreeView *tree_view); + void _gtk_tree_selection_set_tree_view (GtkTreeSelection *selection, + GtkTreeView *tree_view); ++gboolean _gtk_tree_selection_is_row_selectable (GtkTreeSelection *selection, ++ GtkRBNode *node, ++ GtkTreePath *path); + + void _gtk_tree_view_column_cell_render (GtkTreeViewColumn *tree_column, + GdkWindow *window, diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeselection.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeselection.c.diff new file mode 100644 index 0000000000..5361f9b5d1 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeselection.c.diff @@ -0,0 +1,91 @@ +--- gtk+-2.6.4/gtk/gtktreeselection.c 2004-11-20 01:18:38.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktreeselection.c 2005-04-06 16:19:38.186733096 +0300 +@@ -190,11 +190,28 @@ + GtkSelectionMode type) + { + GtkTreeSelectionFunc tmp_func; ++ + g_return_if_fail (GTK_IS_TREE_SELECTION (selection)); + + if (selection->type == type) + return; + ++ /* Hildon addition */ ++ if ((type == GTK_SELECTION_SINGLE) && ++ (selection->type == GTK_SELECTION_MULTIPLE || ++ selection->type == GTK_SELECTION_BROWSE)) ++ { ++ GtkTreePath *cursor_path; ++ ++ /* to successfully switch from multiple selection mode to single ++ selection, we must ensure that anchor exists and is selected ++ since otherwise gtk_tree_selection_select_path won't work anymore */ ++ if (gtk_tree_row_reference_valid (selection->tree_view->priv->cursor)) ++ { ++ cursor_path = gtk_tree_row_reference_get_path (selection->tree_view->priv->cursor); gtk_tree_selection_select_path (selection, cursor_path); ++ gtk_tree_path_free (cursor_path); ++ } ++ } + + if (type == GTK_SELECTION_NONE) + { +@@ -251,6 +268,20 @@ + } + + selection->type = type; ++ ++ /* Hildon addition */ ++ if (type == GTK_SELECTION_SINGLE) ++ { ++ GtkTreePath *path; ++ GtkTreeIter iter; ++ ++ /* reset cursor to the selected row */ ++ gtk_tree_selection_get_selected (selection, NULL, &iter); ++ path = gtk_tree_model_get_path (selection->tree_view->priv->model, ++ &iter); ++ gtk_tree_view_set_cursor (selection->tree_view, path, NULL, FALSE); ++ gtk_tree_path_free (path); ++ } + } + + /** +@@ -1319,10 +1350,10 @@ + return sensitive; + } + +-static gboolean +-row_is_selectable (GtkTreeSelection *selection, +- GtkRBNode *node, +- GtkTreePath *path) ++gboolean ++_gtk_tree_selection_is_row_selectable (GtkTreeSelection *selection, ++ GtkRBNode *node, ++ GtkTreePath *path) + { + GList *list; + GtkTreeIter iter; +@@ -1411,7 +1442,7 @@ + { + /* We only want to select the new node if we can unselect the old one, + * and we can select the new one. */ +- dirty = row_is_selectable (selection, node, path); ++ dirty = _gtk_tree_selection_is_row_selectable (selection, node, path); + + /* if dirty is FALSE, we weren't able to select the new one, otherwise, we try to + * unselect the new one +@@ -1528,8 +1559,13 @@ + if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED) != select) + { + path = _gtk_tree_view_find_path (selection->tree_view, tree, node); +- selected = row_is_selectable (selection, node, path); ++ selected = _gtk_tree_selection_is_row_selectable (selection, node, path); + gtk_tree_path_free (path); ++ ++ /* if row is unselectable, allow unselection only */ ++ if (!selected && !select && ++ GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED)) ++ selected = TRUE; + } + + if (selected == TRUE) diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeview.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeview.c.diff new file mode 100644 index 0000000000..87ccffa868 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeview.c.diff @@ -0,0 +1,2253 @@ +--- gtk+-2.6.4/gtk/gtktreeview.c 2005-02-24 00:38:20.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktreeview.c 2005-04-06 16:19:38.274719720 +0300 +@@ -42,6 +42,7 @@ + #include "gtkentry.h" + #include "gtkframe.h" + #include "gtktreemodelsort.h" ++#include "gtkscrolledwindow.h" + + #define GTK_TREE_VIEW_PRIORITY_VALIDATE (GDK_PRIORITY_REDRAW + 5) + #define GTK_TREE_VIEW_PRIORITY_SCROLL_SYNC (GTK_TREE_VIEW_PRIORITY_VALIDATE + 2) +@@ -114,6 +115,7 @@ + EXPAND_COLLAPSE_CURSOR_ROW, + SELECT_CURSOR_PARENT, + START_INTERACTIVE_SEARCH, ++ ROW_INSENSITIVE, + LAST_SIGNAL + }; + +@@ -132,7 +134,10 @@ + PROP_SEARCH_COLUMN, + PROP_FIXED_HEIGHT_MODE, + PROP_HOVER_SELECTION, +- PROP_HOVER_EXPAND ++ PROP_HOVER_EXPAND, ++ PROP_DOTTED_LINES, ++ PROP_FORCE_LIST_KLUDGE, ++ PROP_ALLOW_CHECKBOX_MODE + }; + + static void gtk_tree_view_class_init (GtkTreeViewClass *klass); +@@ -338,8 +343,6 @@ + static void gtk_tree_view_clamp_node_visible (GtkTreeView *tree_view, + GtkRBTree *tree, + GtkRBNode *node); +-static void gtk_tree_view_clamp_column_visible (GtkTreeView *tree_view, +- GtkTreeViewColumn *column); + static gboolean gtk_tree_view_maybe_begin_dragging_row (GtkTreeView *tree_view, + GdkEventMotion *event); + static void gtk_tree_view_focus_to_cursor (GtkTreeView *tree_view); +@@ -372,6 +375,18 @@ + gpointer data); + static gboolean expand_collapse_timeout (gpointer data); + static gboolean do_expand_collapse (GtkTreeView *tree_view); ++static void update_checkbox_mode (GObject *object, ++ GParamSpec *pspec, ++ gpointer data); ++static void set_dotted_lines (GtkTreeView *tree_view, ++ gboolean enable); ++static void selection_changed (GtkTreeSelection *selection, ++ gpointer data); ++static void check_if_can_focus (GtkTreeView *tree_view); ++static gint scroll_row_timeout (gpointer data); ++ ++static void add_scroll_timeout (GtkTreeView *tree_view); ++static void remove_scroll_timeout (GtkTreeView *tree_view); + + /* interactive search */ + static void gtk_tree_view_ensure_interactive_directory (GtkTreeView *tree_view); +@@ -694,8 +709,54 @@ + FALSE, + G_PARAM_READWRITE)); + ++ /** ++ * GtkTreeView:dotted-lines: ++ * ++ * Enables or disables the dotted lines for hierarchical trees. ++ * Hildon patch. ++ */ ++ g_object_class_install_property (o_class, ++ PROP_DOTTED_LINES, ++ g_param_spec_boolean ("dotted_lines", ++ P_("Dotted Lines"), ++ P_("Whether to show or hide dotted lines for hierarchical trees"), ++ FALSE, ++ G_PARAM_READWRITE)); ++ ++ /** ++ * GtkTreeView:force-list-kludge: ++ * ++ * Hildon kludge for fixing file tree behaviour until a cleaner ++ * implementation is scheduled: if this property is set, then rows ++ * can be activated by tapping even if the underlying tree model is ++ * not technically a list. ++ */ ++ g_object_class_install_property (o_class, ++ PROP_FORCE_LIST_KLUDGE, ++ g_param_spec_boolean ("force_list_kludge", ++ P_("Force List Behaviour"), ++ P_("Whether to activate tapped focused items even if model was not a list"), ++ FALSE, ++ G_PARAM_READWRITE)); ++ ++ /** ++ * GtkTreeView:enable-checkbox-mode: ++ * ++ * Another Hildon kludge for allowing the existence of GtkTreeViews ++ * that have activatable columns but that still is not a Text Listbox ++ * in multiple selection with checkboxes mode. ++ */ ++ g_object_class_install_property (o_class, ++ PROP_ALLOW_CHECKBOX_MODE, ++ g_param_spec_boolean ("allow_checkbox_mode", ++ P_("Enable Checkbox Mode"), ++ P_("Whether to behave like a Listbox in a multiple selection with checkboxes mode, if checkboxes exist"), ++ TRUE, ++ G_PARAM_READWRITE)); ++ + /* Style properties */ + #define _TREE_VIEW_EXPANDER_SIZE 12 ++#define _TREE_VIEW_EXPANDER_INDENT 10 + #define _TREE_VIEW_VERTICAL_SEPARATOR 2 + #define _TREE_VIEW_HORIZONTAL_SEPARATOR 2 + +@@ -709,6 +770,15 @@ + G_PARAM_READABLE)); + + gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("expander_indent", ++ P_("Expander intent"), ++ P_("Defines the expanders indent"), ++ 0, ++ G_MAXINT, ++ _TREE_VIEW_EXPANDER_INDENT, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, + g_param_spec_int ("vertical_separator", + P_("Vertical Separator Width"), + P_("Vertical space between cells. Must be an even number"), +@@ -754,6 +824,13 @@ + GDK_TYPE_COLOR, + G_PARAM_READABLE)); + ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("passive_focus", ++ P_("Enables passive focus"), ++ P_("Used for tree view passive focus"), ++ TRUE, ++ G_PARAM_READABLE)); ++ + /* Signals */ + widget_class->set_scroll_adjustments_signal = + g_signal_new ("set_scroll_adjustments", +@@ -917,6 +994,16 @@ + _gtk_marshal_BOOLEAN__NONE, + G_TYPE_BOOLEAN, 0); + ++ tree_view_signals[ROW_INSENSITIVE] = ++ g_signal_new ("row_insensitive", ++ G_TYPE_FROM_CLASS (o_class), ++ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, ++ G_STRUCT_OFFSET (GtkTreeViewClass, row_insensitive), ++ NULL, NULL, ++ _gtk_marshal_VOID__OBJECT, ++ G_TYPE_NONE, 1, ++ GTK_TYPE_TREE_PATH); ++ + /* Key bindings */ + gtk_tree_view_add_move_binding (binding_set, GDK_Up, 0, + GTK_MOVEMENT_DISPLAY_LINES, -1); +@@ -1004,12 +1091,13 @@ + + gtk_binding_entry_add_signal (binding_set, GDK_space, 0, "select_cursor_row", 1, + G_TYPE_BOOLEAN, TRUE); ++ /* Hildon change: Enter shouldn't select + gtk_binding_entry_add_signal (binding_set, GDK_Return, 0, "select_cursor_row", 1, + G_TYPE_BOOLEAN, TRUE); + gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0, "select_cursor_row", 1, + G_TYPE_BOOLEAN, TRUE); + gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0, "select_cursor_row", 1, +- G_TYPE_BOOLEAN, TRUE); ++ G_TYPE_BOOLEAN, TRUE);*/ + + /* expand and collapse rows */ + gtk_binding_entry_add_signal (binding_set, GDK_plus, 0, "expand_collapse_cursor_row", 3, +@@ -1123,19 +1211,31 @@ + gtk_binding_entry_add_signal (binding_set, GDK_f, GDK_CONTROL_MASK, "start_interactive_search", 0); + + gtk_binding_entry_add_signal (binding_set, GDK_F, GDK_CONTROL_MASK, "start_interactive_search", 0); ++ ++ /* Hildon addition: Add key bindings to Right and Left arrows */ ++ gtk_binding_entry_add_signal (binding_set, GDK_Right, 0, "expand_collapse_cursor_row", 3, ++ G_TYPE_BOOLEAN, FALSE, G_TYPE_BOOLEAN, TRUE, G_TYPE_BOOLEAN, FALSE); ++ gtk_binding_entry_add_signal (binding_set, GDK_plus, GDK_SHIFT_MASK, "expand_collapse_cursor_row", 3, ++ G_TYPE_BOOLEAN, FALSE, G_TYPE_BOOLEAN, TRUE, G_TYPE_BOOLEAN, TRUE); ++ gtk_binding_entry_add_signal (binding_set, GDK_Left, 0, "expand_collapse_cursor_row", 3, ++ G_TYPE_BOOLEAN, FALSE, G_TYPE_BOOLEAN, FALSE, G_TYPE_BOOLEAN, FALSE); ++ gtk_binding_entry_add_signal (binding_set, GDK_Left, GDK_SHIFT_MASK, "expand_collapse_cursor_row", 3, ++ G_TYPE_BOOLEAN, FALSE, G_TYPE_BOOLEAN, FALSE, G_TYPE_BOOLEAN, TRUE); + } + + static void + gtk_tree_view_init (GtkTreeView *tree_view) + { + tree_view->priv = g_new0 (GtkTreeViewPrivate, 1); +- GTK_WIDGET_SET_FLAGS (tree_view, GTK_CAN_FOCUS); ++ ++ /* Hildon: focus cannot be gained until at least one row is added */ ++ GTK_WIDGET_UNSET_FLAGS (tree_view, GTK_CAN_FOCUS); + + gtk_widget_set_redraw_on_allocate (GTK_WIDGET (tree_view), FALSE); + ++ /* Hildon: Headers invisible by default */ + tree_view->priv->flags = GTK_TREE_VIEW_SHOW_EXPANDERS +- | GTK_TREE_VIEW_DRAW_KEYFOCUS +- | GTK_TREE_VIEW_HEADERS_VISIBLE; ++ | GTK_TREE_VIEW_DRAW_KEYFOCUS; + + /* We need some padding */ + tree_view->priv->dy = 0; +@@ -1165,6 +1265,26 @@ + + tree_view->priv->hover_selection = FALSE; + tree_view->priv->hover_expand = FALSE; ++ ++ tree_view->priv->ctrl_pressed = FALSE; ++ tree_view->priv->shift_pressed = FALSE; ++ ++ tree_view->priv->checkbox_mode = FALSE; ++ tree_view->priv->allow_checkbox_mode = TRUE; ++ tree_view->priv->pen_down = FALSE; ++ tree_view->priv->pen_drag_active = FALSE; ++ tree_view->priv->pen_drag_reverse = FALSE; ++ tree_view->priv->first_drag_row = NULL; ++ tree_view->priv->last_drag_row = NULL; ++ tree_view->priv->queued_expand_row = NULL; ++ tree_view->priv->queued_select_row = NULL; ++ tree_view->priv->pen_focus = TRUE; ++ ++ /* Hildon: cursor should follow when selection changes */ ++ g_signal_connect (tree_view->priv->selection, "changed", ++ G_CALLBACK (selection_changed), tree_view); ++ ++ gtk_widget_set_name (GTK_WIDGET (tree_view), "treeview"); + } + + +@@ -1223,6 +1343,27 @@ + case PROP_HOVER_EXPAND: + tree_view->priv->hover_expand = g_value_get_boolean (value); + break; ++ case PROP_DOTTED_LINES: ++ set_dotted_lines (tree_view, g_value_get_boolean (value)); ++ break; ++ case PROP_FORCE_LIST_KLUDGE: ++ tree_view->priv->force_list_kludge = g_value_get_boolean (value); ++ break; ++ case PROP_ALLOW_CHECKBOX_MODE: ++ if ((tree_view->priv->allow_checkbox_mode = g_value_get_boolean (value))) ++ { ++ gtk_widget_set_name (GTK_WIDGET(tree_view), "treeview"); ++ update_checkbox_mode (NULL, NULL, tree_view); ++ } ++ else ++ { ++ /* ugly hack - to ensure that checkboxes are independent of the ++ selection if !allow_checkbox_mode, we must be able to use ++ different theming in that case */ ++ gtk_widget_set_name (GTK_WIDGET(tree_view), "no_checkbox_mode"); ++ tree_view->priv->checkbox_mode = FALSE; ++ } ++ break; + default: + break; + } +@@ -1276,6 +1417,15 @@ + case PROP_HOVER_EXPAND: + g_value_set_boolean (value, tree_view->priv->hover_expand); + break; ++ case PROP_DOTTED_LINES: ++ g_value_set_boolean (value, tree_view->priv->dotted_lines); ++ break; ++ case PROP_FORCE_LIST_KLUDGE: ++ g_value_set_boolean (value, tree_view->priv->force_list_kludge); ++ break; ++ case PROP_ALLOW_CHECKBOX_MODE: ++ g_value_set_boolean (value, tree_view->priv->allow_checkbox_mode); ++ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; +@@ -1376,6 +1526,27 @@ + tree_view->priv->destroy_count_data = NULL; + } + ++ if (tree_view->priv->first_drag_row) ++ { ++ gtk_tree_row_reference_free (tree_view->priv->first_drag_row); ++ tree_view->priv->first_drag_row = NULL; ++ } ++ if (tree_view->priv->last_drag_row) ++ { ++ gtk_tree_row_reference_free (tree_view->priv->last_drag_row); ++ tree_view->priv->last_drag_row = NULL; ++ } ++ if (tree_view->priv->queued_expand_row) ++ { ++ gtk_tree_row_reference_free (tree_view->priv->queued_expand_row); ++ tree_view->priv->queued_expand_row = NULL; ++ } ++ if (tree_view->priv->queued_select_row) ++ { ++ gtk_tree_row_reference_free (tree_view->priv->queued_select_row); ++ tree_view->priv->queued_select_row = NULL; ++ } ++ + gtk_tree_row_reference_free (tree_view->priv->cursor); + tree_view->priv->cursor = NULL; + +@@ -1494,6 +1665,8 @@ + gtk_tree_view_map_buttons (tree_view); + + gdk_window_show (widget->window); ++ ++ check_if_can_focus (tree_view); + } + + static void +@@ -1895,6 +2068,8 @@ + gint full_requested_width = 0; + gint number_of_expand_columns = 0; + gboolean rtl; ++ GtkWidget *scroll; ++ GtkPolicyType ptype; + + tree_view = GTK_TREE_VIEW (widget); + +@@ -1969,6 +2144,19 @@ + allocation.x = width; + column->width = real_requested_width; + ++ /* a dirty Hildon hack to force truncation if not enough space. This hack is applied ++ * only if we are NOT in a scrolled window with hscroll*/ ++ scroll = gtk_widget_get_ancestor(widget, GTK_TYPE_SCROLLED_WINDOW); ++ if ((!scroll || ++ (gtk_scrolled_window_get_policy (GTK_SCROLLED_WINDOW (scroll), &ptype, NULL), ptype == GTK_POLICY_NEVER)) ++ && (width + real_requested_width > widget->allocation.width)) ++ { ++ column->width = widget->allocation.width - width; ++ if (column->width < 1) ++ column->width = 1; ++ gtk_widget_queue_draw (widget); ++ } ++ + if (column->expand) + { + if (number_of_expand_columns == 1) +@@ -2153,6 +2341,23 @@ + GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS); + } + ++/* helper function for gtk_tree_view_button_press */ ++static void ++activate_callback (GtkTreeModel *model, ++ GtkTreePath *path, ++ GtkTreeIter *iter, ++ gpointer data) ++{ ++ GtkTreeView *tree_view = GTK_TREE_VIEW (data); ++ ++ /* Hildon: if the tree view has no active focus we don't activate ++ * the selected row */ ++ if ( !GTK_WIDGET_HAS_FOCUS (GTK_WIDGET(data)) ) ++ return; ++ ++ gtk_tree_view_row_activated (tree_view, path, tree_view->priv->focus_column); ++} ++ + static gboolean + gtk_tree_view_button_press (GtkWidget *widget, + GdkEventButton *event) +@@ -2166,6 +2371,7 @@ + gint vertical_separator; + gint horizontal_separator; + gboolean rtl; ++ gint expander_indent; + + g_return_val_if_fail (GTK_IS_TREE_VIEW (widget), FALSE); + g_return_val_if_fail (event != NULL, FALSE); +@@ -2176,6 +2382,7 @@ + gtk_widget_style_get (widget, + "vertical_separator", &vertical_separator, + "horizontal_separator", &horizontal_separator, ++ "expander_indent", &expander_indent, + NULL); + + +@@ -2199,6 +2406,14 @@ + gint column_handled_click = FALSE; + gboolean row_double_click = FALSE; + gboolean rtl; ++ gboolean force_list_kludge; ++ GtkRBNode *cursor = NULL; ++ gboolean focus_grab = FALSE; ++ ++ if (!GTK_WIDGET_HAS_FOCUS (widget)) ++ focus_grab = TRUE; ++ ++ GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS); + + /* Empty tree? */ + if (tree_view->priv->tree == NULL) +@@ -2207,7 +2422,9 @@ + return TRUE; + } + +- /* are we in an arrow? */ ++ /* In Hildon we don't want to use the arrows */ ++#if 0 ++ /* are we in an arrow? */ + if (tree_view->priv->prelight_node && + GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_ARROW_PRELIT)) + { +@@ -2226,6 +2443,7 @@ + grab_focus_and_unset_draw_keyfocus (tree_view); + return TRUE; + } ++#endif + + /* find the node that was clicked */ + new_y = TREE_WINDOW_Y_TO_RBTREE_Y(tree_view, event->y); +@@ -2247,6 +2465,65 @@ + background_area.height = ROW_HEIGHT (tree_view, GTK_RBNODE_GET_HEIGHT (node)); + background_area.x = 0; + ++ if (tree_view->priv->first_drag_row) ++ { ++ gtk_tree_row_reference_free (tree_view->priv->first_drag_row); ++ tree_view->priv->first_drag_row = NULL; ++ } ++ if (tree_view->priv->last_drag_row) ++ { ++ gtk_tree_row_reference_free (tree_view->priv->last_drag_row); ++ tree_view->priv->last_drag_row = NULL; ++ } ++ tree_view->priv->first_drag_row = ++ gtk_tree_row_reference_new (tree_view->priv->model, path); ++ tree_view->priv->last_drag_row = gtk_tree_row_reference_copy (tree_view->priv->first_drag_row); ++ ++ /* force_list_kludge allows pen dragging even if ++ GTK_TREE_MODEL_LIST_ONLY is not set (to fix file tree) */ ++ g_object_get (widget, "force_list_kludge", &force_list_kludge, NULL); ++ ++ /* Hildon: activate pen dragging, if listbox is not hierarchical and ++ the pen was not put down in a position that initiates drag'n'drop */ ++ if (!tree_view->priv->pen_down && ++ (force_list_kludge || ++ (gtk_tree_model_get_flags(tree_view->priv->model) ++ & GTK_TREE_MODEL_LIST_ONLY)) && ++ (tree_view->priv->checkbox_mode || ++ !gtk_tree_selection_path_is_selected(tree_view->priv->selection, path))) ++ { ++ gpointer drag_data; ++ ++ tree_view->priv->pen_down = TRUE; ++ tree_view->priv->pen_focus = TRUE; ++ ++ /* also block attached dnd signal handler */ ++ drag_data = g_object_get_data (G_OBJECT (widget), "gtk-site-data"); ++ if (drag_data) ++ g_signal_handlers_block_matched (widget, ++ G_SIGNAL_MATCH_DATA, ++ 0, 0, NULL, NULL, ++ drag_data); ++ } ++ ++ /* For the Hildon buttonpress find out the previously selected row */ ++ GtkRBTree *cursor_tree = NULL; ++ GtkTreePath *cursor_path = NULL; ++ ++ if (tree_view->priv->cursor) ++ { ++ cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor); ++ if (cursor_path) ++ { ++ _gtk_tree_view_find_node (tree_view, cursor_path, ++ &cursor_tree, &cursor); ++ gtk_tree_path_free (cursor_path); ++ } ++ } ++ ++ /* Hildon: in checkbox mode, dragging sets all checkboxes ++ to the same state as the first toggled checkbox */ ++ tree_view->priv->new_state = !gtk_tree_selection_path_is_selected(tree_view->priv->selection, path); + + /* Let the column have a chance at selecting it. */ + rtl = (gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL); +@@ -2275,8 +2552,11 @@ + if (gtk_tree_view_is_expander_column (tree_view, column) && + TREE_VIEW_DRAW_EXPANDERS(tree_view)) + { +- cell_area.x += depth * tree_view->priv->expander_size; +- cell_area.width -= depth * tree_view->priv->expander_size; ++ gint adjust; ++ ++ adjust = depth * tree_view->priv->expander_size + (depth - 1) * expander_indent; ++ cell_area.x += adjust; ++ cell_area.width -= adjust; + } + break; + } +@@ -2364,15 +2644,19 @@ + */ + if (event->type == GDK_BUTTON_PRESS) + { ++ /* Hildon: ignore Ctrl and Shift */ ++#if 0 + if ((event->state & GDK_CONTROL_MASK) == GDK_CONTROL_MASK) + tree_view->priv->ctrl_pressed = TRUE; + if ((event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK) + tree_view->priv->shift_pressed = TRUE; ++#endif + + focus_cell = _gtk_tree_view_column_get_cell_at_pos (column, event->x - background_area.x); + if (focus_cell) + gtk_tree_view_column_focus_cell (column, focus_cell); + ++#if 0 + if (event->state & GDK_CONTROL_MASK) + { + gtk_tree_view_real_set_cursor (tree_view, path, FALSE, TRUE); +@@ -2387,6 +2671,86 @@ + { + gtk_tree_view_real_set_cursor (tree_view, path, TRUE, TRUE); + } ++#endif ++ if (tree_view->priv->checkbox_mode) ++ { ++ GtkRBTree *tree = NULL; ++ GtkRBNode *node = NULL; ++ ++ _gtk_tree_view_find_node (tree_view, path, &tree, &node); ++ ++ /* cursor cannot move to an insensitive row, so we ++ need to check here to avoid toggling the current ++ row by clicking on an insensitive row */ ++ if (_gtk_tree_selection_is_row_selectable (tree_view->priv->selection, ++ node, path)) ++ { ++ gtk_tree_view_real_set_cursor (tree_view, path, ++ FALSE, TRUE); ++ gtk_tree_view_real_toggle_cursor_row (tree_view); ++ } ++ else ++ /* Usually this would be emitted by real_set_cursor. ++ However in this case we never call it. */ ++ g_signal_emit (tree_view, tree_view_signals[ROW_INSENSITIVE], 0, path); ++ } ++ else ++ { ++ gboolean queue_row = TRUE; ++ gboolean force_list_kludge; ++ ++ /* force_list_kludge allows rows to be activated even if ++ GTK_TREE_MODEL_LIST_ONLY is not set (to fix file tree) */ ++ g_object_get (widget, "force_list_kludge", ++ &force_list_kludge, NULL); ++ if ((force_list_kludge || ++ (gtk_tree_model_get_flags (tree_view->priv->model) & ++ GTK_TREE_MODEL_LIST_ONLY)) && ++ gtk_tree_row_reference_valid (tree_view->priv->cursor)) ++ { ++ /* special case: text listbox without checkboxes ++ should activate selected rows when user taps ++ on cursor row, but not affect selection*/ ++ GtkTreePath *cursor_path = ++ gtk_tree_row_reference_get_path (tree_view->priv->cursor); ++ if (gtk_tree_path_compare (cursor_path, path) == 0) ++ { ++ gtk_tree_selection_selected_foreach (tree_view->priv->selection, ++ activate_callback, ++ tree_view); ++ queue_row = FALSE; ++ } ++ } ++ ++ if (queue_row && ++ (gtk_tree_selection_get_mode (tree_view->priv->selection) == GTK_SELECTION_MULTIPLE) && ++ gtk_tree_selection_path_is_selected (tree_view->priv->selection, path)) ++ { ++ GtkTreePath *old_cursor_path = NULL; ++ ++ /* we don't know if the user is selecting an item or performing ++ multiple item drag and drop until we know where button is released */ ++ if (tree_view->priv->queued_select_row) ++ gtk_tree_row_reference_free (tree_view->priv->queued_select_row); ++ tree_view->priv->queued_select_row = ++ gtk_tree_row_reference_new (tree_view->priv->model, path); ++ ++ /* however, move focus */ ++ if (tree_view->priv->cursor) ++ { ++ old_cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor); ++ gtk_tree_row_reference_free (tree_view->priv->cursor); ++ } ++ tree_view->priv->cursor = gtk_tree_row_reference_new (tree_view->priv->model, ++ path); ++ gtk_tree_view_queue_draw_path (tree_view, path, NULL); ++ if (old_cursor_path) ++ gtk_tree_view_queue_draw_path (tree_view, old_cursor_path, NULL); ++ } ++ else ++ gtk_tree_view_real_set_cursor (tree_view, path, ++ queue_row, TRUE); ++ } + + tree_view->priv->ctrl_pressed = FALSE; + tree_view->priv->shift_pressed = FALSE; +@@ -2412,6 +2776,15 @@ + tree_view->priv->press_start_y = event->y; + } + ++ /* Hildon: if selected row is tapped -> the row gets activated and expands */ ++ if (!focus_grab) ++ { ++ /* ...although not until button is released */ ++ gtk_tree_row_reference_free (tree_view->priv->queued_expand_row); ++ tree_view->priv->queued_expand_row = ++ gtk_tree_row_reference_new (tree_view->priv->model, path); ++ } ++ + /* Test if a double click happened on the same row. */ + if (event->button == 1) + { +@@ -2433,6 +2806,8 @@ + } + } + ++ /* Hildon doesn't support double clicks */ ++#if 0 + if (row_double_click) + { + if (tree_view->priv->last_button_press) +@@ -2443,6 +2818,7 @@ + tree_view->priv->last_button_press_2 = NULL; + } + else ++#endif + { + if (tree_view->priv->last_button_press) + gtk_tree_row_reference_free (tree_view->priv->last_button_press); +@@ -2626,6 +3002,28 @@ + + tree_view = GTK_TREE_VIEW (widget); + ++ /* unblock attached dnd signal handler */ ++ if (tree_view->priv->pen_down) ++ { ++ gpointer drag_data = g_object_get_data (G_OBJECT (widget), "gtk-site-data"); ++ if (drag_data) ++ g_signal_handlers_unblock_matched (widget, ++ G_SIGNAL_MATCH_DATA, ++ 0, 0, NULL, NULL, ++ drag_data); ++ } ++ ++ /* stop pen dragging */ ++ if (tree_view->priv->first_drag_row) ++ gtk_tree_row_reference_free (tree_view->priv->first_drag_row); ++ if (tree_view->priv->last_drag_row) ++ gtk_tree_row_reference_free (tree_view->priv->last_drag_row); ++ tree_view->priv->first_drag_row = NULL; ++ tree_view->priv->last_drag_row = NULL; ++ tree_view->priv->pen_down = FALSE; ++ tree_view->priv->pen_drag_active = FALSE; ++ remove_scroll_timeout (tree_view); ++ + if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_IN_COLUMN_DRAG)) + return gtk_tree_view_button_release_drag_column (widget, event); + +@@ -2635,6 +3033,65 @@ + if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_IN_COLUMN_RESIZE)) + return gtk_tree_view_button_release_column_resize (widget, event); + ++ if (gtk_tree_row_reference_valid (tree_view->priv->queued_select_row)) ++ { ++ /* unselect other nodes - but only if not drag'n'dropping */ ++ if (event->window == tree_view->priv->bin_window) ++ gtk_tree_selection_unselect_all (tree_view->priv->selection); ++ ++ gtk_tree_view_real_set_cursor (tree_view, ++ gtk_tree_row_reference_get_path (tree_view->priv->queued_select_row), ++ FALSE, TRUE); ++ gtk_tree_row_reference_free (tree_view->priv->queued_select_row); ++ tree_view->priv->queued_select_row = NULL; ++ } ++ ++ /* for handling expand/collapse postponed from button_press (since we ++ don't want expand/collapse before tap on node has been completed) */ ++ if (gtk_tree_row_reference_valid (tree_view->priv->queued_expand_row) && ++ tree_view->priv->tree != NULL) ++ { ++ GtkTreePath *queued_expand_path; ++ GtkRBTree *tree; ++ GtkRBNode *node; ++ GtkRBNode *old_node; ++ gint y; ++ ++ queued_expand_path = ++ gtk_tree_row_reference_get_path (tree_view->priv->queued_expand_row); ++ ++ if (queued_expand_path) ++ { ++ /* must check that cursor hasn't moved elsewhere since button_press */ ++ y = TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, event->y); ++ _gtk_rbtree_find_offset (tree_view->priv->tree, y, &tree, &node); ++ ++ _gtk_tree_view_find_node (tree_view, queued_expand_path, ++ &tree, &old_node); ++ ++ if (node && old_node == node) ++ { ++ if (node->children == NULL) ++ gtk_tree_view_real_expand_row (tree_view, ++ queued_expand_path, ++ tree, ++ node, ++ FALSE, TRUE); ++ else ++ gtk_tree_view_real_collapse_row (tree_view, ++ queued_expand_path, ++ tree, ++ node, ++ TRUE); ++ } ++ ++ gtk_tree_path_free (queued_expand_path); ++ } ++ ++ gtk_tree_row_reference_free( tree_view->priv->queued_expand_row); ++ tree_view->priv->queued_expand_row = NULL; ++ } ++ + if (tree_view->priv->button_pressed_node == NULL) + return FALSE; + +@@ -3311,6 +3768,7 @@ + GtkTreeView *tree_view; + GtkRBTree *tree; + GtkRBNode *node; ++ GtkTreePath *path, *last_drag_path, *current_path; + gint new_y; + + tree_view = (GtkTreeView *) widget; +@@ -3319,7 +3777,8 @@ + return FALSE; + + /* only check for an initiated drag when a button is pressed */ +- if (tree_view->priv->pressed_button >= 0) ++ /* Hildon: active pen drag overrides drag and drop */ ++ if (tree_view->priv->pressed_button >= 0 && !tree_view->priv->pen_down) + gtk_tree_view_maybe_begin_dragging_row (tree_view, event); + + new_y = TREE_WINDOW_Y_TO_RBTREE_Y(tree_view, event->y); +@@ -3328,6 +3787,99 @@ + + _gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node); + ++ /* Hildon: pen dragging */ ++ if (tree_view->priv->pen_down && node != NULL && ++ tree_view->priv->queued_select_row == NULL && ++ gtk_tree_row_reference_valid (tree_view->priv->last_drag_row)) ++ { ++ gint direction; ++ ++ last_drag_path = gtk_tree_row_reference_get_path (tree_view->priv->last_drag_row); ++ path = _gtk_tree_view_find_path (tree_view, tree, node); ++ direction = gtk_tree_path_compare (path, last_drag_path); ++ ++ if (direction != 0) ++ { ++ current_path = gtk_tree_path_copy (last_drag_path); ++ ++ /* we must ensure that no row is skipped because stylus ++ is moving faster than motion events are generated */ ++ do { ++ if (direction > 0) ++ { ++ /* gtk_tree_path_next does not let us know when it failed */ ++ GtkTreeIter iter; ++ gtk_tree_model_get_iter (tree_view->priv->model, &iter, current_path); ++ if (!gtk_tree_model_iter_next (tree_view->priv->model, &iter)) ++ break; ++ ++ gtk_tree_path_next (current_path); ++ } ++ else if (!gtk_tree_path_prev (current_path)) ++ break; ++ ++ /* set cursor, and start scrolling */ ++ gtk_tree_view_real_set_cursor (tree_view, current_path, FALSE, FALSE); ++ add_scroll_timeout (tree_view); ++ ++ if (tree_view->priv->checkbox_mode) ++ { ++ /* always set to same state as the first tapped node */ ++ if (tree_view->priv->new_state) ++ gtk_tree_selection_select_path (tree_view->priv->selection, ++ current_path); ++ else ++ gtk_tree_selection_unselect_path (tree_view->priv->selection, ++ current_path); ++ } ++ else ++ { ++ if (gtk_tree_selection_path_is_selected (tree_view->priv->selection, ++ current_path)) ++ { ++ /* apparently we have reversed the pen drag direction */ ++ GtkTreePath *reverse_path; ++ gint reverse_direction; ++ ++ reverse_direction = gtk_tree_path_compare (current_path, ++ last_drag_path); ++ reverse_path = gtk_tree_path_copy (last_drag_path); ++ do { ++ gtk_tree_selection_unselect_path (tree_view->priv->selection, ++ reverse_path); ++ tree_view->priv->pen_drag_reverse = TRUE; ++ if (reverse_direction > 0) ++ { ++ GtkTreeIter iter; ++ gtk_tree_model_get_iter (tree_view->priv->model, &iter, reverse_path); ++ if (!gtk_tree_model_iter_next (tree_view->priv->model, &iter)) ++ break; ++ ++ gtk_tree_path_next (reverse_path); ++ } ++ else if (!gtk_tree_path_prev (reverse_path)) ++ break; ++ } while (gtk_tree_path_compare (reverse_path, current_path) != 0); ++ gtk_tree_path_free (reverse_path); ++ } ++ else ++ { ++ gtk_tree_selection_select_path (tree_view->priv->selection, ++ current_path); ++ tree_view->priv->pen_drag_reverse = FALSE; ++ } ++ } ++ } while (gtk_tree_path_compare(current_path, path) != 0); ++ gtk_tree_path_free (current_path); ++ ++ /* update last_drag_row */ ++ gtk_tree_row_reference_free (tree_view->priv->last_drag_row); ++ tree_view->priv->last_drag_row = ++ gtk_tree_row_reference_new (tree_view->priv->model, path); ++ gtk_tree_path_free (path); ++ } ++ } ++ + /* If we are currently pressing down a button, we don't want to prelight anything else. */ + if ((tree_view->priv->button_pressed_node != NULL) && + (tree_view->priv->button_pressed_node != node)) +@@ -3404,6 +3956,22 @@ + 1, 1, w, h); + } + ++/* Hildon: helper function for dotted slash drawing; ++ returns TRUE or FALSE, depending it there are ++ more nodes at current level */ ++static gboolean ++iter_has_next (GtkTreeModel *model, GtkTreeIter *iter) ++{ ++ GtkTreeIter *check_iter; ++ gboolean result; ++ ++ check_iter = gtk_tree_iter_copy(iter); ++ result = gtk_tree_model_iter_next (model, check_iter); ++ ++ gtk_tree_iter_free (check_iter); ++ return result; ++} ++ + /* Warning: Very scary function. + * Modify at your own risk + * +@@ -3433,16 +4001,25 @@ + guint flags; + gint highlight_x; + gint bin_window_width; +- GtkTreePath *cursor_path; +- GtkTreePath *drag_dest_path; ++ GtkTreePath *cursor_path = NULL; ++ GtkTreePath *drag_dest_path = NULL; + GList *last_column; + gint vertical_separator; + gint horizontal_separator; ++ gint expander_indent; + gint focus_line_width; + gboolean allow_rules; + gboolean has_special_cell; + gboolean rtl; + gint n_visible_columns; ++ gboolean dottedlines, passivefocus, res; ++ ++ /* Hildon: these variables are added for dotted slash drawing ++ (Hierarchical listbox) */ ++ gint i; ++ gint node_elements = 64; ++ gboolean *iter_value = NULL; ++ GtkTreeIter node_iter, parent_iter; + + g_return_val_if_fail (GTK_IS_TREE_VIEW (widget), FALSE); + +@@ -3455,8 +4032,12 @@ + "vertical_separator", &vertical_separator, + "allow_rules", &allow_rules, + "focus-line-width", &focus_line_width, ++ "expander_indent", &expander_indent, ++ "passive_focus", &passivefocus, + NULL); + ++ g_object_get (widget, "dotted_lines", &dottedlines, NULL); ++ + if (tree_view->priv->tree == NULL) + { + draw_empty_focus (tree_view, &event->area); +@@ -3478,6 +4059,8 @@ + if (node == NULL) + return TRUE; + ++ iter_value = g_new (gboolean, node_elements); ++ + /* find the path for the node */ + path = _gtk_tree_view_find_path ((GtkTreeView *)widget, + tree, +@@ -3486,11 +4069,25 @@ + &iter, + path); + depth = gtk_tree_path_get_depth (path); ++ ++ node_iter = iter; ++ for (i = depth - 1; i >= 1; i--) ++ { ++ res = gtk_tree_model_iter_parent (tree_view->priv->model, &parent_iter, &node_iter); ++ /* Check, if we should grow array */ ++ if (i >= node_elements - 1) ++ { ++ node_elements *= 2; ++ iter_value = g_renew (gboolean, iter_value, node_elements); ++ if (!iter_value) ++ goto done; ++ } ++ iter_value[i] = iter_has_next (tree_view->priv->model, &parent_iter); ++ node_iter = parent_iter; ++ } ++ gtk_tree_model_get_iter (tree_view->priv->model, &iter, path); + gtk_tree_path_free (path); + +- cursor_path = NULL; +- drag_dest_path = NULL; +- + if (tree_view->priv->cursor) + cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor); + +@@ -3533,6 +4130,7 @@ + do + { + gboolean parity; ++ gboolean is_first = TRUE; + gboolean is_separator = FALSE; + + if (tree_view->priv->row_separator_func) +@@ -3570,6 +4168,7 @@ + GtkTreeViewColumn *column = list->data; + const gchar *detail = NULL; + GtkStateType state; ++ gboolean is_last = (rtl ? !list->prev : !list->next); + + if (!column->visible) + continue; +@@ -3660,31 +4259,152 @@ + else + state = GTK_STATE_NORMAL; + +- /* Draw background */ +- gtk_paint_flat_box (widget->style, +- event->window, +- state, +- GTK_SHADOW_NONE, +- &event->area, +- widget, +- detail, +- background_area.x, +- background_area.y, +- background_area.width, +- background_area.height); ++ if (tree_view->priv->pen_focus) ++ { ++ if (node != cursor || ++ (!GTK_WIDGET_HAS_FOCUS (widget) && !passivefocus)) ++ { ++ if ((flags & GTK_CELL_RENDERER_SELECTED) ++ && !tree_view->priv->checkbox_mode) ++ state = GTK_STATE_SELECTED; ++ else ++ state = GTK_STATE_NORMAL; ++ ++ /* Draw background */ ++ gtk_paint_flat_box (widget->style, ++ event->window, ++ state, ++ GTK_SHADOW_NONE, ++ &event->area, ++ widget, ++ detail, ++ background_area.x, ++ background_area.y, ++ background_area.width, ++ background_area.height); ++ } ++ else if ((flags & GTK_CELL_RENDERER_SELECTED) && ++ !tree_view->priv->checkbox_mode && ++ node != cursor) ++ { ++ gtk_paint_flat_box (widget->style, ++ event->window, ++ GTK_STATE_SELECTED, ++ GTK_SHADOW_NONE, ++ &event->area, ++ widget, ++ detail, ++ background_area.x, ++ background_area.y, ++ background_area.width, ++ background_area.height); ++ } ++ } ++ else ++ { ++ /* Draw background */ ++ gtk_paint_flat_box (widget->style, ++ event->window, ++ state, ++ GTK_SHADOW_NONE, ++ &event->area, ++ widget, ++ detail, ++ background_area.x, ++ background_area.y, ++ background_area.width, ++ background_area.height); ++ } ++ ++ /* Hildon change: drawing focus is moved here because it didn't work ++ properly before. Some changes where also made.*/ ++ /* draw the big row-spanning focus rectangle, if needed */ ++ if (node == cursor && ++ (!passivefocus || GTK_WIDGET_HAS_FOCUS (widget))) ++ { ++ gtk_paint_focus (widget->style, ++ event->window, ++ GTK_STATE_ACTIVE, ++ &event->area, ++ widget, ++ (is_first ++ ? (is_last ? "full" : "left") ++ : (is_last ? "right" : "middle")), ++ background_area.x - (is_first ? 0 : horizontal_separator / 2), ++ background_area.y - vertical_separator / 2, ++ background_area.width + (is_first ? 0 : (is_last ? horizontal_separator / 2 : horizontal_separator)), ++ background_area.height + vertical_separator); ++ ++ is_first = FALSE; ++ } ++ else if (node == cursor && passivefocus && ++ !GTK_WIDGET_HAS_FOCUS (widget)) ++ { ++ GtkStyle *style = gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), ++ "hildon-focus", ++ NULL, ++ G_TYPE_NONE); ++ gtk_style_attach (style, event->window); ++ ++ gtk_paint_focus (style, event->window, GTK_STATE_SELECTED, ++ &event->area, widget, ++ (is_first ++ ? (is_last ? "full" : "left") ++ : (is_last ? "right" : "middle")), ++ background_area.x - (is_first ? 0 : horizontal_separator / 2), ++ background_area.y - vertical_separator / 2, ++ background_area.width + (is_first ? 0 : (is_last ? horizontal_separator / 2 : horizontal_separator)), ++ background_area.height + vertical_separator); ++ ++ is_first = FALSE; ++ } ++ ++ if (node == cursor) ++ { ++ gint width, x_offset; ++ GtkStateType focus_rect_state; ++ focus_rect_state = ++ flags & GTK_CELL_RENDERER_FOCUSED ? GTK_STATE_ACTIVE : ++ (flags & GTK_CELL_RENDERER_PRELIT ? GTK_STATE_PRELIGHT : ++ (flags & GTK_CELL_RENDERER_INSENSITIVE ? GTK_STATE_INSENSITIVE : ++ (flags & GTK_CELL_RENDERER_SELECTED ? GTK_STATE_SELECTED : ++ GTK_STATE_NORMAL))); ++ ++ gtk_tree_view_get_arrow_xrange (tree_view, tree, &x_offset, NULL); ++ gdk_drawable_get_size (tree_view->priv->bin_window, &width, NULL); ++ } + + if (gtk_tree_view_is_expander_column (tree_view, column) && + TREE_VIEW_DRAW_EXPANDERS(tree_view)) + { ++ gint px, px2, py, i; ++ ++ if (depth <= 1) ++ px = 0; ++ else ++ px = (depth - 1) * tree_view->priv->expander_size + ++ (depth - 2) * expander_indent; ++ ++ /* Hildonlike hack for making the indent look better. ++ * indent is added to all rows except the first one */ ++ + if (!rtl) +- cell_area.x += depth * tree_view->priv->expander_size; +- cell_area.width -= depth * tree_view->priv->expander_size; ++ cell_area.x += depth * tree_view->priv->expander_size + (depth-1) * expander_indent; ++ cell_area.width -= depth * tree_view->priv->expander_size + (depth-1) * expander_indent; + + /* If we have an expander column, the highlight underline + * starts with that column, so that it indicates which + * level of the tree we're dropping at. + */ + highlight_x = cell_area.x; ++ ++ if (!GTK_WIDGET_IS_SENSITIVE (widget)) ++ { ++ flags &= ~ (GTK_CELL_RENDERER_PRELIT + GTK_CELL_RENDERER_INSENSITIVE + ++ GTK_CELL_RENDERER_FOCUSED); ++ flags &= GTK_CELL_RENDERER_INSENSITIVE; ++ } ++ + if (is_separator) + gtk_paint_hline (widget->style, + event->window, +@@ -3702,6 +4422,48 @@ + &cell_area, + &event->area, + flags); ++ ++ /* Hildon dotted slash line drawing for Hierarchical Listbox ++ widget */ ++ if (dottedlines) ++ { ++ py = cell_area.y + cell_area.height / 2; ++ px2 = depth * tree_view->priv->expander_size + ++ (depth - 1) * expander_indent; ++ ++ gdk_gc_set_line_attributes (widget->style->fg_gc[GTK_WIDGET_STATE (widget)], ++ 1, GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_BEVEL); ++ ++ gdk_draw_line (tree_view->priv->bin_window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], ++ px, py, px2, py); ++ ++ if (depth > 1) ++ { ++ gdk_draw_line (tree_view->priv->bin_window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], ++ px, cell_area.y, px, py); ++ if (iter_has_next (tree_view->priv->model, &iter)) ++ { ++ gdk_draw_line (tree_view->priv->bin_window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], ++ px, py, px, cell_area.y + cell_area.height); ++ } ++ } ++ ++ if (node->children) ++ { ++ gdk_draw_line (tree_view->priv->bin_window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], ++ px2, py, px2, cell_area.y + cell_area.height); ++ } ++ for (i = depth - 1; i >= 2; i--) ++ { ++ if (iter_value[i]) ++ { ++ px = (i - 1)* tree_view->priv->expander_size + (i - 2) * expander_indent; ++ gdk_draw_line (tree_view->priv->bin_window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], ++ px, cell_area.y, px, cell_area.y + cell_area.height); ++ } ++ } ++ } ++ + if ((node->flags & GTK_RBNODE_IS_PARENT) == GTK_RBNODE_IS_PARENT) + { + gint x, y; +@@ -3803,6 +4565,8 @@ + } + } + ++ /* Hildon: disabled this */ ++#if 0 + /* draw the big row-spanning focus rectangle, if needed */ + if (!has_special_cell && node == cursor && + GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS) && +@@ -3830,6 +4594,7 @@ + width, + ROW_HEIGHT (tree_view, BACKGROUND_HEIGHT (node))); + } ++#endif + + y_offset += max_height; + if (node->children) +@@ -3847,6 +4612,17 @@ + has_child = gtk_tree_model_iter_children (tree_view->priv->model, + &iter, + &parent); ++ ++ /* Check if we need to grow array */ ++ if (depth >= node_elements - 1) ++ { ++ node_elements *= 2; ++ iter_value = g_renew (gboolean, iter_value, node_elements); ++ if (!iter_value) ++ goto done; ++ } ++ iter_value[depth] = iter_has_next (tree_view->priv->model, &parent); ++ + depth++; + + /* Sanity Check! */ +@@ -3897,6 +4673,9 @@ + if (drag_dest_path) + gtk_tree_path_free (drag_dest_path); + ++ if (iter_value) ++ g_free (iter_value); ++ + return FALSE; + } + +@@ -4179,6 +4958,63 @@ + + rtl = (gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL); + ++ /* Special Hildon keyboard interactions */ ++ if (event->keyval == GDK_Escape) ++ gtk_tree_selection_unselect_all (tree_view->priv->selection); ++ ++ if (event->keyval == GDK_Return && ++ gtk_tree_row_reference_valid (tree_view->priv->cursor)) ++ { ++ gboolean force_list_kludge; ++ ++ g_object_get (widget, "force_list_kludge", &force_list_kludge, NULL); ++ if (force_list_kludge || ++ (gtk_tree_model_get_flags (tree_view->priv->model) & ++ GTK_TREE_MODEL_LIST_ONLY)) ++ { ++ /* text listbox */ ++ if (tree_view->priv->checkbox_mode) ++ { ++ /* multisel with checkboxes: select key toggles focused */ ++ gtk_tree_view_real_toggle_cursor_row (tree_view); ++ } ++ else ++ { ++ /* no checkboxes: select key activates focused */ ++ GtkTreePath *cursor_path = ++ gtk_tree_row_reference_get_path (tree_view->priv->cursor); ++ ++ gtk_tree_view_row_activated (tree_view, cursor_path, ++ tree_view->priv->focus_column); ++ ++ gtk_tree_path_free (cursor_path); ++ } ++ } ++ else ++ { ++ /* hierarchical listbox */ ++ GtkTreePath *cursor_path; ++ GtkRBTree *tree; ++ GtkRBNode *node; ++ ++ cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor); ++ _gtk_tree_view_find_node (tree_view, cursor_path, &tree, &node); ++ ++ if (node->children == NULL) ++ gtk_tree_view_real_expand_row (tree_view, ++ cursor_path, ++ tree, ++ node, ++ FALSE, TRUE); ++ else ++ gtk_tree_view_real_collapse_row (tree_view, ++ cursor_path, ++ tree, ++ node, ++ TRUE); ++ } ++ } ++ + if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_IN_COLUMN_DRAG)) + { + if (event->keyval == GDK_Escape) +@@ -4420,6 +5256,7 @@ + + /* FIXME Is this function necessary? Can I get an enter_notify event + * w/o either an expose event or a mouse motion event? ++ * Hildon => it is necessary to make pen dragging work correctly + */ + static gboolean + gtk_tree_view_enter_notify (GtkWidget *widget, +@@ -4434,6 +5271,10 @@ + + tree_view = GTK_TREE_VIEW (widget); + ++ /* stop "automatic" pen dragging */ ++ tree_view->priv->pen_drag_active = FALSE; ++ remove_scroll_timeout (tree_view); ++ + /* Sanity check it */ + if (event->window != tree_view->priv->bin_window) + return FALSE; +@@ -4463,6 +5304,9 @@ + tree_view = GTK_TREE_VIEW (widget); + tree_view->priv->pressed_button = -1; + ++ if (tree_view->priv->pen_down && tree_view->priv->queued_select_row == NULL) ++ tree_view->priv->pen_drag_active = TRUE; ++ + if (event->mode == GDK_CROSSING_GRAB) + return TRUE; + +@@ -4535,6 +5379,7 @@ + gboolean retval = FALSE; + gboolean is_separator = FALSE; + gint focus_pad; ++ gint expander_indent; + + /* double check the row needs validating */ + if (! GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) && +@@ -4551,6 +5396,7 @@ + gtk_widget_style_get (GTK_WIDGET (tree_view), + "focus-padding", &focus_pad, + "horizontal_separator", &horizontal_separator, ++ "expander_indent", &expander_indent, + NULL); + + for (list = tree_view->priv->columns; list; list = list->next) +@@ -4577,13 +5423,16 @@ + { + height = MAX (height, tmp_height); + height = MAX (height, tree_view->priv->expander_size); ++ ++ /* Hildon addition */ ++ height -= 1; + } + else + height = 2 + 2 * focus_pad; + + if (gtk_tree_view_is_expander_column (tree_view, column) && TREE_VIEW_DRAW_EXPANDERS (tree_view)) + { +- tmp_width = tmp_width + horizontal_separator + depth * (tree_view->priv->expander_size); ++ tmp_width = tmp_width + horizontal_separator + depth * (tree_view->priv->expander_size) + (depth - 1) * expander_indent; + } + else + tmp_width = tmp_width + horizontal_separator; +@@ -5585,6 +6434,16 @@ + #endif /* 0 */ + + static void ++add_scroll_timeout (GtkTreeView *tree_view) ++{ ++ if (tree_view->priv->scroll_timeout == 0) ++ { ++ tree_view->priv->scroll_timeout = ++ g_timeout_add (150, scroll_row_timeout, tree_view); ++ } ++} ++ ++static void + remove_scroll_timeout (GtkTreeView *tree_view) + { + if (tree_view->priv->scroll_timeout != 0) +@@ -6130,10 +6989,9 @@ + tree_view->priv->open_dest_timeout = + g_timeout_add (AUTO_EXPAND_TIMEOUT, open_row_timeout, tree_view); + } +- else if (tree_view->priv->scroll_timeout == 0) ++ else + { +- tree_view->priv->scroll_timeout = +- g_timeout_add (150, scroll_row_timeout, tree_view); ++ add_scroll_timeout (tree_view); + } + + if (target == gdk_atom_intern ("GTK_TREE_MODEL_ROW", FALSE)) +@@ -6901,8 +7759,6 @@ + GtkMovementStep step, + gint count) + { +- GdkModifierType state; +- + g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), FALSE); + g_return_val_if_fail (step == GTK_MOVEMENT_LOGICAL_POSITIONS || + step == GTK_MOVEMENT_VISUAL_POSITIONS || +@@ -6919,6 +7775,8 @@ + GTK_TREE_VIEW_SET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS); + gtk_widget_grab_focus (GTK_WIDGET (tree_view)); + ++ /* Hildon: Ignore ctrl and shift */ ++#if 0 + if (gtk_get_current_event_state (&state)) + { + if ((state & GDK_CONTROL_MASK) == GDK_CONTROL_MASK) +@@ -6926,6 +7784,7 @@ + if ((state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK) + tree_view->priv->shift_pressed = TRUE; + } ++#endif + /* else we assume not pressed */ + + switch (step) +@@ -7092,6 +7951,27 @@ + done: + if (!tree_view->priv->fixed_height_mode) + install_presize_handler (tree_view); ++ ++ /* Hildon: has row now been dimmed? If so, unselect it */ ++ _gtk_tree_view_find_node (tree_view, path, &tree, &node); ++ if (!_gtk_tree_selection_is_row_selectable (tree_view->priv->selection, ++ node, ++ path)) ++ { ++ if (gtk_tree_path_compare (path, ++ gtk_tree_row_reference_get_path(tree_view->priv->cursor)) ++ == 0) ++ { ++ gtk_tree_row_reference_free (tree_view->priv->cursor); ++ tree_view->priv->cursor = NULL; ++ } ++ ++ gtk_tree_selection_unselect_path (tree_view->priv->selection, path); ++ gtk_tree_view_collapse_row (tree_view, path); ++ } ++ ++ check_if_can_focus (tree_view); ++ + if (free_path) + gtk_tree_path_free (path); + } +@@ -7196,6 +8076,11 @@ + install_presize_handler (tree_view); + if (free_path) + gtk_tree_path_free (path); ++ ++ /* Hildon: after a focusable row has been added, the ++ entire widget becomes focusable if it wasn't before */ ++ if ((GTK_WIDGET_FLAGS (tree_view) & GTK_CAN_FOCUS) == 0) ++ check_if_can_focus (tree_view); + } + + static void +@@ -7295,6 +8180,16 @@ + _gtk_rbtree_traverse (node->children, node->children->root, G_POST_ORDER, check_selection_helper, data); + } + ++static gboolean ++check_if_can_focus_idle (GtkTreeView *tree_view) ++{ ++ check_if_can_focus (tree_view); ++ ++ tree_view->priv->check_if_can_focus_idle_id = 0; ++ ++ return FALSE; ++} ++ + static void + gtk_tree_view_row_deleted (GtkTreeModel *model, + GtkTreePath *path, +@@ -7357,6 +8252,11 @@ + tree_view->priv->tree = NULL; + + _gtk_rbtree_remove (tree); ++ ++ /* Hildon: no nodes -> not focusable */ ++ /* FIXME this looks superfluos to me. check_if_can_focus is called ++ * at the end of this function .. -- Jorn */ ++ GTK_WIDGET_UNSET_FLAGS (tree_view, GTK_CAN_FOCUS); + } + else + { +@@ -7375,6 +8275,13 @@ + + if (selection_changed) + g_signal_emit_by_name (tree_view->priv->selection, "changed"); ++ ++ /* FIXME whacky hack to work around the treeview not being in a clean state ++ * when in a tree a row has been removed, but has_child_toggled not been ++ * called yet */ ++ if (tree_view->priv->check_if_can_focus_idle_id == 0) ++ tree_view->priv->check_if_can_focus_idle_id = ++ g_idle_add ((GSourceFunc) check_if_can_focus_idle, tree_view); + } + + static void +@@ -7508,6 +8415,7 @@ + GList *list; + GtkTreeViewColumn *tmp_column = NULL; + gint total_width; ++ gint expander_indent, depth; + gboolean indent_expanders; + gboolean rtl; + +@@ -7535,14 +8443,19 @@ + + gtk_widget_style_get (GTK_WIDGET (tree_view), + "indent_expanders", &indent_expanders, ++ "expander_indent", &expander_indent, + NULL); + ++ /* Hildonlike hack for making the indent look better. ++ * indent is added to all rows except the first one */ ++ depth = _gtk_rbtree_get_depth (tree); ++ + if (indent_expanders) + { + if (rtl) +- x_offset -= tree_view->priv->expander_size * _gtk_rbtree_get_depth (tree); ++ x_offset -= tree_view->priv->expander_size * depth + (depth) * expander_indent; + else +- x_offset += tree_view->priv->expander_size * _gtk_rbtree_get_depth (tree); ++ x_offset += tree_view->priv->expander_size * depth + (depth) * expander_indent; + } + if (x1) + { +@@ -7617,9 +8530,11 @@ + gboolean retval = FALSE; + gint tmpheight; + gint horizontal_separator; ++ gint expander_indent; + + gtk_widget_style_get (GTK_WIDGET (tree_view), + "horizontal_separator", &horizontal_separator, ++ "expander_indent", &expander_indent, + NULL); + + if (height) +@@ -7657,7 +8572,7 @@ + if (gtk_tree_view_is_expander_column (tree_view, column) && + TREE_VIEW_DRAW_EXPANDERS (tree_view)) + { +- if (depth * tree_view->priv->expander_size + horizontal_separator + width > column->requested_width) ++ if ((depth - 1) *expander_indent + depth * tree_view->priv->expander_size + horizontal_separator + width > column->requested_width) + { + _gtk_tree_view_column_cell_set_dirty (column, TRUE); + retval = TRUE; +@@ -7747,6 +8662,7 @@ + } + } + ++#if 0 + static void + gtk_tree_view_clamp_column_visible (GtkTreeView *tree_view, + GtkTreeViewColumn *column) +@@ -7762,6 +8678,7 @@ + gtk_adjustment_set_value (tree_view->priv->hadjustment, + column->button->allocation.x); + } ++#endif + + /* This function could be more efficient. I'll optimize it if profiling seems + * to imply that it is important */ +@@ -8290,7 +9207,7 @@ + + area.x = x_offset; + area.y = CELL_FIRST_PIXEL (tree_view, tree, node, vertical_separator); +- area.width = expander_size + 2; ++ area.width = expander_size; + area.height = MAX (CELL_HEIGHT (node, vertical_separator), (expander_size - vertical_separator)); + + if (node == tree_view->priv->button_pressed_node) +@@ -8397,7 +9314,10 @@ + GtkRBNode *cursor_node = NULL; + GtkRBTree *new_cursor_tree = NULL; + GtkRBNode *new_cursor_node = NULL; ++ GtkRBTree *old_cursor_tree; ++ GtkRBNode *old_cursor_node; + GtkTreePath *cursor_path = NULL; ++ GtkTreePath *new_cursor_path = NULL; + + if (! GTK_WIDGET_HAS_FOCUS (tree_view)) + return; +@@ -8415,12 +9335,30 @@ + if (cursor_tree == NULL) + /* FIXME: we lost the cursor; should we get the first? */ + return; +- if (count == -1) +- _gtk_rbtree_prev_full (cursor_tree, cursor_node, +- &new_cursor_tree, &new_cursor_node); +- else +- _gtk_rbtree_next_full (cursor_tree, cursor_node, +- &new_cursor_tree, &new_cursor_node); ++ ++ old_cursor_tree = cursor_tree; ++ old_cursor_node = cursor_node; ++ do { ++ if (count == -1) ++ _gtk_rbtree_prev_full (old_cursor_tree, old_cursor_node, ++ &new_cursor_tree, &new_cursor_node); ++ else ++ _gtk_rbtree_next_full (old_cursor_tree, old_cursor_node, ++ &new_cursor_tree, &new_cursor_node); ++ ++ if (new_cursor_node) ++ { ++ if (new_cursor_path) ++ gtk_tree_path_free (new_cursor_path); ++ ++ new_cursor_path = _gtk_tree_view_find_path (tree_view, new_cursor_tree, new_cursor_node); ++ old_cursor_tree = new_cursor_tree; ++ old_cursor_node = new_cursor_node; ++ } ++ } while (new_cursor_node && ++ !_gtk_tree_selection_is_row_selectable (tree_view->priv->selection, ++ new_cursor_node, ++ new_cursor_path)); + + /* + * If the list has only one item and multi-selection is set then select +@@ -8450,7 +9388,33 @@ + if (new_cursor_node) + { + cursor_path = _gtk_tree_view_find_path (tree_view, new_cursor_tree, new_cursor_node); +- gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, TRUE); ++ ++ if (tree_view->priv->checkbox_mode) ++ gtk_tree_view_real_set_cursor (tree_view, cursor_path, FALSE, TRUE); ++ else ++ gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, TRUE); ++ ++ if (tree_view->priv->pen_drag_active) ++ { ++ if (gtk_tree_path_compare (gtk_tree_row_reference_get_path (tree_view->priv->last_drag_row), ++ gtk_tree_row_reference_get_path (tree_view->priv->first_drag_row)) == 0) ++ tree_view->priv->pen_drag_reverse = FALSE; ++ ++ if (tree_view->priv->pen_drag_reverse) ++ { ++ gtk_tree_selection_select_path (tree_view->priv->selection, ++ cursor_path); ++ gtk_tree_selection_unselect_path (tree_view->priv->selection, ++ gtk_tree_row_reference_get_path (tree_view->priv->last_drag_row)); ++ } ++ ++ gtk_tree_row_reference_free (tree_view->priv->last_drag_row); ++ ++ tree_view->priv->last_drag_row = ++ gtk_tree_row_reference_new (tree_view->priv->model, ++ cursor_path); ++ } ++ + gtk_tree_path_free (cursor_path); + } + else +@@ -8467,6 +9431,8 @@ + { + GtkRBTree *cursor_tree = NULL; + GtkRBNode *cursor_node = NULL; ++ GtkRBTree *old_cursor_tree = NULL; ++ GtkRBNode *old_cursor_node = NULL; + GtkTreePath *cursor_path = NULL; + gint y; + gint vertical_separator; +@@ -8474,6 +9440,9 @@ + if (! GTK_WIDGET_HAS_FOCUS (tree_view)) + return; + ++ if (tree_view->priv->tree == NULL) ++ return; ++ + if (gtk_tree_row_reference_valid (tree_view->priv->cursor)) + cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor); + else +@@ -8504,7 +9473,65 @@ + + _gtk_rbtree_find_offset (tree_view->priv->tree, y, &cursor_tree, &cursor_node); + cursor_path = _gtk_tree_view_find_path (tree_view, cursor_tree, cursor_node); +- g_return_if_fail (cursor_path != NULL); ++ ++ while (cursor_node && ++ !_gtk_tree_selection_is_row_selectable (tree_view->priv->selection, ++ cursor_node, ++ cursor_path)) ++ { ++ old_cursor_tree = cursor_tree; ++ old_cursor_node = cursor_node; ++ ++ if (count < 0) ++ _gtk_rbtree_prev_full (old_cursor_tree, old_cursor_node, ++ &cursor_tree, &cursor_node); ++ else ++ _gtk_rbtree_next_full (old_cursor_tree, old_cursor_node, ++ &cursor_tree, &cursor_node); ++ ++ if (cursor_path) ++ { ++ gtk_tree_path_free(cursor_path); ++ cursor_path = NULL; ++ } ++ ++ if (cursor_node) ++ cursor_path = _gtk_tree_view_find_path (tree_view, cursor_tree, cursor_node); ++ } ++ ++ if (cursor_path == NULL) ++ { ++ /* looks like we reached the end without finding a sensitive row, ++ so search backwards and try to find the last sensitive row as ++ the next best thing */ ++ _gtk_rbtree_find_offset (tree_view->priv->tree, y, &cursor_tree, &cursor_node); ++ cursor_path = _gtk_tree_view_find_path (tree_view, cursor_tree, cursor_node); ++ while (cursor_node && ++ !_gtk_tree_selection_is_row_selectable (tree_view->priv->selection, ++ cursor_node, ++ cursor_path)) ++ { ++ old_cursor_tree = cursor_tree; ++ old_cursor_node = cursor_node; ++ ++ if (count < 0) ++ _gtk_rbtree_next_full (old_cursor_tree, old_cursor_node, ++ &cursor_tree, &cursor_node); ++ else ++ _gtk_rbtree_prev_full (old_cursor_tree, old_cursor_node, ++ &cursor_tree, &cursor_node); ++ ++ if (cursor_path) ++ { ++ gtk_tree_path_free(cursor_path); ++ cursor_path = NULL; ++ } ++ ++ if (cursor_node) ++ cursor_path = _gtk_tree_view_find_path (tree_view, cursor_tree, cursor_node); ++ } ++ } ++ + gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, TRUE); + gtk_tree_view_clamp_node_visible (tree_view, cursor_tree, cursor_node); + gtk_tree_path_free (cursor_path); +@@ -8514,6 +9541,8 @@ + gtk_tree_view_move_cursor_left_right (GtkTreeView *tree_view, + gint count) + { ++ /* Hildon: cursor is always displayed on an entire row anyway */ ++#if 0 + GtkRBTree *cursor_tree = NULL; + GtkRBNode *cursor_node = NULL; + GtkTreePath *cursor_path = NULL; +@@ -8589,12 +9618,15 @@ + g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0); + } + gtk_tree_view_clamp_column_visible (tree_view, tree_view->priv->focus_column); ++#endif + } + + static void + gtk_tree_view_move_cursor_start_end (GtkTreeView *tree_view, + gint count) + { ++ /* Hildon: cursor is always displayed on an entire row anyway */ ++#if 0 + GtkRBTree *cursor_tree; + GtkRBNode *cursor_node; + GtkTreePath *path; +@@ -8631,6 +9663,7 @@ + path = _gtk_tree_view_find_path (tree_view, cursor_tree, cursor_node); + gtk_tree_view_real_set_cursor (tree_view, path, TRUE, TRUE); + gtk_tree_path_free (path); ++#endif + } + + static gboolean +@@ -8670,7 +9703,7 @@ + GtkTreePath *cursor_path = NULL; + GtkTreeSelectMode mode = 0; + +- if (! GTK_WIDGET_HAS_FOCUS (tree_view)) ++ if (! GTK_WIDGET_HAS_FOCUS (tree_view) && !tree_view->priv->checkbox_mode) + return FALSE; + + if (tree_view->priv->cursor) +@@ -8731,7 +9764,7 @@ + GtkRBNode *cursor_node = NULL; + GtkTreePath *cursor_path = NULL; + +- if (! GTK_WIDGET_HAS_FOCUS (tree_view)) ++ if (! GTK_WIDGET_HAS_FOCUS (tree_view) && !tree_view->priv->checkbox_mode) + return FALSE; + + cursor_path = NULL; +@@ -8774,6 +9807,7 @@ + GtkTreePath *cursor_path = NULL; + GtkRBTree *tree; + GtkRBNode *node; ++ gboolean hildon_row; + + if (! GTK_WIDGET_HAS_FOCUS (tree_view)) + return FALSE; +@@ -8796,10 +9830,32 @@ + && gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL) + expand = !expand; + +- if (expand) +- gtk_tree_view_real_expand_row (tree_view, cursor_path, tree, node, open_all, TRUE); ++ /* Keyboard Navigation: if we can't expand/collapse row, we should either move active focus ++ to child item (right arrow) or move active focus to the parent item (left arrow) */ ++ if (expand) ++ { ++ hildon_row = gtk_tree_view_real_expand_row (tree_view, cursor_path, tree, ++ node, open_all, TRUE); ++ ++ if (!hildon_row || !node->children) ++ g_signal_emit_by_name (gtk_widget_get_ancestor (GTK_WIDGET (tree_view), ++ GTK_TYPE_WINDOW), ++ "move_focus", ++ GTK_DIR_TAB_FORWARD); ++ } + else +- gtk_tree_view_real_collapse_row (tree_view, cursor_path, tree, node, TRUE); ++ { ++ hildon_row = gtk_tree_view_real_collapse_row (tree_view, cursor_path, tree, node, TRUE); ++ ++ if (hildon_row == FALSE) ++ { ++ g_signal_emit_by_name (gtk_widget_get_ancestor (GTK_WIDGET(tree_view), ++ GTK_TYPE_WINDOW), ++ "move_focus", ++ GTK_DIR_TAB_BACKWARD); ++ gtk_tree_view_real_select_cursor_parent (tree_view); ++ } ++ } + + gtk_tree_path_free (cursor_path); + +@@ -9327,6 +10383,14 @@ + tree_view->priv->last_button_press_2 = NULL; + gtk_tree_row_reference_free (tree_view->priv->scroll_to_path); + tree_view->priv->scroll_to_path = NULL; ++ gtk_tree_row_reference_free (tree_view->priv->first_drag_row); ++ tree_view->priv->first_drag_row = NULL; ++ gtk_tree_row_reference_free (tree_view->priv->last_drag_row); ++ tree_view->priv->last_drag_row = NULL; ++ gtk_tree_row_reference_free (tree_view->priv->queued_expand_row); ++ tree_view->priv->queued_expand_row = NULL; ++ gtk_tree_row_reference_free (tree_view->priv->queued_select_row); ++ tree_view->priv->queued_select_row = NULL; + + tree_view->priv->scroll_to_column = NULL; + +@@ -9402,6 +10466,8 @@ + install_presize_handler (tree_view); + } + ++ check_if_can_focus (tree_view); ++ + g_object_notify (G_OBJECT (tree_view), "model"); + + if (GTK_WIDGET_REALIZED (tree_view)) +@@ -9744,6 +10810,10 @@ + G_CALLBACK (column_sizing_notify), + tree_view); + ++ g_signal_handlers_disconnect_by_func (column, ++ G_CALLBACK (update_checkbox_mode), ++ tree_view); ++ + _gtk_tree_view_column_unset_tree_view (column); + + tree_view->priv->columns = g_list_remove (tree_view->priv->columns, column); +@@ -9773,6 +10843,8 @@ + g_object_unref (column); + g_signal_emit (tree_view, tree_view_signals[COLUMNS_CHANGED], 0); + ++ update_checkbox_mode (NULL, NULL, tree_view); ++ + return tree_view->priv->n_columns; + } + +@@ -9815,6 +10887,9 @@ + g_signal_connect (column, "notify::sizing", + G_CALLBACK (column_sizing_notify), tree_view); + ++ g_signal_connect (column, "notify::visible", ++ G_CALLBACK (update_checkbox_mode), tree_view); ++ + tree_view->priv->columns = g_list_insert (tree_view->priv->columns, + column, position); + tree_view->priv->n_columns++; +@@ -9838,6 +10913,9 @@ + + g_signal_emit (tree_view, tree_view_signals[COLUMNS_CHANGED], 0); + ++ update_checkbox_mode (NULL, NULL, tree_view); ++ check_if_can_focus (tree_view); ++ + return tree_view->priv->n_columns; + } + +@@ -10295,7 +11373,6 @@ + GtkTreeViewColumn *column) + { + g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); +- + g_signal_emit (tree_view, tree_view_signals[ROW_ACTIVATED], 0, path, column); + } + +@@ -10560,6 +11637,16 @@ + GtkTreeIter iter; + GtkTreeIter temp; + gboolean expand; ++ gint vertical_separator; ++ GtkTreePath *collapse_path; ++ GtkRBTree *tree2; ++ GtkRBNode *node2; ++ GtkTreePath *child_path = NULL; ++ GtkTreeIter parent_iter; ++ GtkTreeIter child_iter; ++ GdkRectangle visible_rect; ++ gint children, n; ++ guint total_height; + + remove_auto_expand_timeout (tree_view); + +@@ -10573,8 +11660,12 @@ + if (! gtk_tree_model_iter_has_child (tree_view->priv->model, &iter)) + return FALSE; + ++ /* Hildon: insensitive rows cannot be expanded */ ++ if (!_gtk_tree_selection_is_row_selectable (tree_view->priv->selection, ++ node, path)) ++ return FALSE; + +- if (node->children && open_all) ++ if (node->children && open_all) + { + gboolean retval = FALSE; + GtkTreePath *tmp_path = gtk_tree_path_copy (path); +@@ -10603,6 +11694,37 @@ + return retval; + } + ++ /* Hildon: collapse other items in the same level */ ++ gtk_widget_style_get (GTK_WIDGET (tree_view), ++ "vertical_separator", &vertical_separator, NULL); ++ ++ /* find the first child */ ++ collapse_path = gtk_tree_path_copy (path); ++ while (gtk_tree_path_prev (collapse_path)) ++ ; ++ ++ do { ++ if (gtk_tree_path_compare (collapse_path, path) != 0) ++ { ++ _gtk_tree_view_find_node (tree_view, collapse_path, &tree2, &node2); ++ ++ if (tree2 == NULL) ++ /* end reached already */ ++ break; ++ ++ if (node2->children != NULL && ++ gtk_tree_view_real_collapse_row (tree_view, collapse_path, ++ tree2, node2, FALSE)) ++ /* no need to do anything else since only one row may ++ be expanded on any particular level at any time */ ++ break; ++ } ++ ++ gtk_tree_path_next (collapse_path); ++ } while (1); ++ ++ gtk_tree_path_free (collapse_path); ++ + g_signal_emit (tree_view, tree_view_signals[TEST_EXPAND_ROW], 0, &iter, path, &expand); + + if (expand) +@@ -10643,6 +11765,42 @@ + GTK_RBNODE_SET_FLAG (node, GTK_RBNODE_IS_SEMI_COLLAPSED); + } + ++ /* autoscroll if necessary */ ++ validate_visible_area (tree_view); ++ gtk_tree_model_get_iter (tree_view->priv->model, &parent_iter, path); ++ _gtk_tree_view_find_node (tree_view, path, &tree2, &node2); ++ validate_row (tree_view, tree2, node2, &parent_iter, path); ++ total_height = CELL_HEIGHT (node2, vertical_separator); ++ children = gtk_tree_model_iter_n_children (tree_view->priv->model, &parent_iter); ++ for (n = 0; n < children; n++) ++ { ++ gtk_tree_model_iter_nth_child (tree_view->priv->model, ++ &child_iter, &parent_iter, n); ++ ++ /* must free here so the path of last child is kept for later */ ++ if (child_path != NULL) ++ gtk_tree_path_free (child_path); ++ ++ child_path = gtk_tree_model_get_path (tree_view->priv->model, &child_iter); ++ _gtk_tree_view_find_node (tree_view, child_path, &tree2, &node2); ++ ++ if (CELL_HEIGHT (node2, 0) == 0) ++ validate_row (tree_view, tree2, node2, &child_iter, child_path); ++ ++ total_height += CELL_HEIGHT (node2, vertical_separator); ++ } ++ ++ gtk_tree_view_get_visible_rect (tree_view, &visible_rect); ++ ++ /* KNOWN BUG: If no autocollapse was performed earlier above, these calls ++ to gtk_tree_view_scroll_to_cell do nothing although they should. */ ++ if (total_height > visible_rect.height) ++ gtk_tree_view_scroll_to_cell (tree_view, path, NULL, TRUE, 0.0, 0.0); ++ else ++ gtk_tree_view_scroll_to_cell (tree_view, child_path, NULL, FALSE, 0.0, 0.0); ++ ++ gtk_tree_path_free (child_path); ++ + install_presize_handler (tree_view); + + g_signal_emit (tree_view, tree_view_signals[ROW_EXPANDED], 0, &iter, path); +@@ -11070,6 +12228,16 @@ + GtkRBTree *tree = NULL; + GtkRBNode *node = NULL; + ++ _gtk_tree_view_find_node (tree_view, path, &tree, &node); ++ ++ /* Hildon: cursor cannot move to an insensitive row */ ++ if (!_gtk_tree_selection_is_row_selectable (tree_view->priv->selection, ++ node, path)) ++ { ++ g_signal_emit (tree_view, tree_view_signals[ROW_INSENSITIVE], 0, path); ++ return; ++ } ++ + if (gtk_tree_row_reference_valid (tree_view->priv->cursor)) + { + GtkTreePath *cursor_path; +@@ -11083,7 +12251,6 @@ + tree_view->priv->cursor = gtk_tree_row_reference_new_proxy (G_OBJECT (tree_view), + tree_view->priv->model, + path); +- _gtk_tree_view_find_node (tree_view, path, &tree, &node); + if (tree != NULL) + { + GtkRBTree *new_tree = NULL; +@@ -11093,7 +12260,8 @@ + { + GtkTreeSelectMode mode = 0; + +- if (tree_view->priv->ctrl_pressed) ++ if (tree_view->priv->ctrl_pressed || ++ tree_view->priv->pen_drag_active) + mode |= GTK_TREE_SELECT_MODE_TOGGLE; + if (tree_view->priv->shift_pressed) + mode |= GTK_TREE_SELECT_MODE_EXTEND; +@@ -11213,6 +12381,9 @@ + { + g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); + g_return_if_fail (path != NULL); ++ ++ tree_view->priv->pen_focus = FALSE; ++ + if (focus_column) + g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (focus_column)); + if (focus_cell) +@@ -11414,6 +12585,7 @@ + GtkRBNode *node = NULL; + gint vertical_separator; + gint horizontal_separator; ++ gint expander_indent; + + g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); + g_return_if_fail (column == NULL || GTK_IS_TREE_VIEW_COLUMN (column)); +@@ -11424,6 +12596,7 @@ + gtk_widget_style_get (GTK_WIDGET (tree_view), + "vertical_separator", &vertical_separator, + "horizontal_separator", &horizontal_separator, ++ "expander_indent", &expander_indent, + NULL); + + rect->x = 0; +@@ -11453,9 +12626,11 @@ + TREE_VIEW_DRAW_EXPANDERS (tree_view)) + { + gint depth = gtk_tree_path_get_depth (path) - 1; ++ gint adjust; + +- rect->x += depth * tree_view->priv->expander_size; +- rect->width -= depth * tree_view->priv->expander_size; ++ adjust = depth * tree_view->priv->expander_size + (depth - 1) * expander_indent; ++ rect->x += adjust; ++ rect->width -= adjust; + rect->width = MAX (rect->width, 0); + } + } +@@ -12077,8 +13252,13 @@ + if (gtk_tree_view_is_expander_column (tree_view, column) && + TREE_VIEW_DRAW_EXPANDERS(tree_view)) + { +- cell_area.x += depth * tree_view->priv->expander_size; +- cell_area.width -= depth * tree_view->priv->expander_size; ++ gint adjust, expander_indent; ++ ++ gtk_widget_style_get (widget, "expander_indent", &expander_indent, NULL); ++ ++ adjust = depth * tree_view->priv->expander_size + (depth - 1) * expander_indent; ++ cell_area.x += adjust; ++ cell_area.width -= adjust; + } + + if (gtk_tree_view_column_cell_is_visible (column)) +@@ -13062,3 +14242,138 @@ + tree_view->priv->pressed_button = -1; + } + ++/* Hildon addition: iterates through columns and cells, looks for ++ a cell with "activatable" attribute and sets or unsets ++ priv->checkbox_mode accordingly (except when checkbox mode ++ is disabled by unsetting allow_checkbox_mode). ++ */ ++static void ++update_checkbox_mode (GObject *object, GParamSpec *pspec, gpointer data) ++{ ++ GtkTreeView *tree_view = GTK_TREE_VIEW (data); ++ GList *columns = gtk_tree_view_get_columns (tree_view); ++ GList *list; ++ gboolean allow_checkbox_mode; ++ ++ g_object_get (GTK_WIDGET (data), ++ "allow_checkbox_mode", &allow_checkbox_mode, NULL); ++ g_return_if_fail (allow_checkbox_mode); ++ ++ for (list = columns; list; list = list->next) ++ { ++ GtkTreeViewColumn *col = GTK_TREE_VIEW_COLUMN (list->data); ++ if (gtk_tree_view_column_get_visible (col) && ++ _gtk_tree_view_column_has_activatable_cell (col)) ++ { ++ /* checkbox column found */ ++ tree_view->priv->checkbox_mode = TRUE; ++ g_list_free (columns); ++ return; ++ } ++ } ++ ++ /* no checkbox column was found */ ++ tree_view->priv->checkbox_mode = FALSE; ++ g_list_free (columns); ++} ++ ++static void ++set_dotted_lines (GtkTreeView *tree_view, gboolean enable) ++{ ++ if (enable != tree_view->priv->dotted_lines) ++ { ++ tree_view->priv->dotted_lines = enable; ++ gtk_widget_queue_draw (GTK_WIDGET (tree_view)); ++ } ++} ++ ++/* This function is used to ensure two things: ++ * - in single selection mode, focus will always equal selection ++ * - in multiple selection mode, focus is removed if cursor row is ++ * explicitly unselected ++ */ ++static void ++selection_changed (GtkTreeSelection *selection, gpointer data) ++{ ++ GtkTreeView *tree_view = GTK_TREE_VIEW(data); ++ GtkTreePath *cursor_path = NULL; ++ GtkTreeIter iter; ++ ++ /* if there are checkboxes, cursor row doesn't have to be selected */ ++ if (tree_view->priv->checkbox_mode) ++ return; ++ ++ if (gtk_tree_row_reference_valid (tree_view->priv->cursor)) ++ cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor); ++ ++ if (cursor_path == NULL || ++ !gtk_tree_selection_path_is_selected (selection, cursor_path)) ++ { ++ GtkTreePath *selected_path; ++ GtkRBTree *tree = NULL; ++ GtkRBNode *node = NULL; ++ ++ if (gtk_tree_selection_get_mode (selection) != GTK_SELECTION_MULTIPLE && ++ gtk_tree_selection_get_selected (selection, NULL, &iter)) ++ { ++ selected_path = gtk_tree_model_get_path (tree_view->priv->model, ++ &iter); ++ gtk_tree_view_real_set_cursor (tree_view, selected_path, TRUE, TRUE); ++ _gtk_tree_view_find_node (tree_view, selected_path, &tree, &node); ++ gtk_tree_view_clamp_node_visible (tree_view, tree, node); ++ gtk_tree_path_free (selected_path); ++ gtk_widget_grab_focus (GTK_WIDGET (tree_view)); ++ } ++ else ++ { ++ gtk_tree_row_reference_free (tree_view->priv->cursor); ++ tree_view->priv->cursor = NULL; ++ } ++ } ++ ++ if (cursor_path) ++ gtk_tree_path_free (cursor_path); ++} ++ ++/* Helper function for ensuring that GtkTreeView is focusable ++ * if and only if it contains at least one sensitive top-level row. ++ * Should be called whenever the existence of a sensitive top-level row ++ * might have changed. ++ */ ++static void ++check_if_can_focus (GtkTreeView *tree_view) ++{ ++ GtkTreeModel *model = gtk_tree_view_get_model (tree_view); ++ GtkTreeIter iter; ++ ++ if (model == NULL || !GTK_WIDGET_MAPPED (tree_view)) ++ return; ++ ++ if (gtk_tree_model_get_iter_first (model, &iter) == FALSE) ++ { ++ GTK_WIDGET_UNSET_FLAGS (tree_view, GTK_CAN_FOCUS); ++ return; ++ } ++ ++ do { ++ GtkTreePath *path = gtk_tree_model_get_path (model, &iter); ++ GtkRBTree *tree; ++ GtkRBNode *node; ++ ++ _gtk_tree_view_find_node (tree_view, path, &tree, &node); ++ ++ if (_gtk_tree_selection_is_row_selectable (tree_view->priv->selection, ++ node, path)) ++ { ++ GTK_WIDGET_SET_FLAGS (tree_view, GTK_CAN_FOCUS); ++ if (!gtk_tree_row_reference_valid (tree_view->priv->cursor)) ++ gtk_tree_view_real_set_cursor (tree_view, path, ++ !tree_view->priv->checkbox_mode, ++ TRUE); ++ ++ return; ++ } ++ } while (gtk_tree_model_iter_next (model, &iter)); ++ ++ GTK_WIDGET_UNSET_FLAGS (tree_view, GTK_CAN_FOCUS); ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeview.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeview.h.diff new file mode 100644 index 0000000000..13f5c75600 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeview.h.diff @@ -0,0 +1,18 @@ +--- gtk+-2.6.4/gtk/gtktreeview.h 2004-11-23 22:02:15.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktreeview.h 2005-04-06 16:19:38.342709384 +0300 +@@ -102,12 +102,14 @@ + gboolean (* select_cursor_parent) (GtkTreeView *tree_view); + gboolean (* start_interactive_search) (GtkTreeView *tree_view); + ++ void (* row_insensitive) (GtkTreeView *tree_view, ++ GtkTreePath *path); ++ + /* Padding for future expansion */ + void (*_gtk_reserved0) (void); + void (*_gtk_reserved1) (void); + void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); +- void (*_gtk_reserved4) (void); + }; + + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeviewcolumn.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeviewcolumn.c.diff new file mode 100644 index 0000000000..aab0f0ed1f --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktreeviewcolumn.c.diff @@ -0,0 +1,51 @@ +--- gtk+-2.6.4/gtk/gtktreeviewcolumn.c 2005-01-05 00:10:56.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktreeviewcolumn.c 2005-04-06 16:19:38.346708776 +0300 +@@ -1367,6 +1367,19 @@ + return FALSE; + } + ++gboolean ++_gtk_tree_view_column_has_activatable_cell (GtkTreeViewColumn *column) ++{ ++ GList *list; ++ ++ for (list = column->cell_list; list; list = list->next) ++ if (((GtkTreeViewColumnCellInfo *)list->data)->cell->mode == ++ GTK_CELL_RENDERER_MODE_ACTIVATABLE) ++ return TRUE; ++ ++ return FALSE; ++} ++ + /* gets cell being edited */ + GtkCellRenderer * + _gtk_tree_view_column_get_edited_cell (GtkTreeViewColumn *column) +@@ -2582,6 +2595,7 @@ + GList *list; + gboolean first_cell = TRUE; + gint focus_line_width; ++ gint horizontal_separator; + + g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column)); + +@@ -2590,7 +2604,10 @@ + if (width) + * width = 0; + +- gtk_widget_style_get (tree_column->tree_view, "focus-line-width", &focus_line_width, NULL); ++ gtk_widget_style_get (tree_column->tree_view, ++ "focus-line-width", &focus_line_width, ++ "horizontal-separator", &horizontal_separator, ++ NULL); + + for (list = tree_column->cell_list; list; list = list->next) + { +@@ -2618,7 +2635,7 @@ + * height = MAX (*height, new_height + focus_line_width * 2); + info->requested_width = MAX (info->requested_width, new_width + focus_line_width * 2); + if (width) +- * width += info->requested_width; ++ * width += info->requested_width + horizontal_separator; + first_cell = FALSE; + } + } diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktypebuiltins.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktypebuiltins.c.diff new file mode 100644 index 0000000000..31b52e68a3 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktypebuiltins.c.diff @@ -0,0 +1,86 @@ +--- gtk+-2.6.4/gtk/gtktypebuiltins.c 2005-03-01 17:58:15.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktypebuiltins.c 2005-04-06 16:19:38.348708472 +0300 +@@ -25,6 +25,26 @@ + } + + ++/* enumerations from "gtkbutton.h" */ ++GType ++osso_gtk_button_attach_flags_get_type (void) ++{ ++ static GType etype = 0; ++ if (etype == 0) { ++ static const GFlagsValue values[] = { ++ { OSSO_GTK_BUTTON_ATTACH_NORTH, "OSSO_GTK_BUTTON_ATTACH_NORTH", "north" }, ++ { OSSO_GTK_BUTTON_ATTACH_EAST, "OSSO_GTK_BUTTON_ATTACH_EAST", "east" }, ++ { OSSO_GTK_BUTTON_ATTACH_SOUTH, "OSSO_GTK_BUTTON_ATTACH_SOUTH", "south" }, ++ { OSSO_GTK_BUTTON_ATTACH_WEST, "OSSO_GTK_BUTTON_ATTACH_WEST", "west" }, ++ { OSSO_GTK_BUTTON_ATTACH_ENUM_END, "OSSO_GTK_BUTTON_ATTACH_ENUM_END", "enum-end" }, ++ { 0, NULL, NULL } ++ }; ++ etype = g_flags_register_static ("OssoGtkButtonAttachFlags", values); ++ } ++ return etype; ++} ++ ++ + /* enumerations from "gtkcalendar.h" */ + GType + gtk_calendar_display_options_get_type (void) +@@ -468,13 +488,17 @@ + static GType etype = 0; + if (etype == 0) { + static const GEnumValue values[] = { +- { GTK_ICON_SIZE_INVALID, "GTK_ICON_SIZE_INVALID", "invalid" }, +- { GTK_ICON_SIZE_MENU, "GTK_ICON_SIZE_MENU", "menu" }, +- { GTK_ICON_SIZE_SMALL_TOOLBAR, "GTK_ICON_SIZE_SMALL_TOOLBAR", "small-toolbar" }, +- { GTK_ICON_SIZE_LARGE_TOOLBAR, "GTK_ICON_SIZE_LARGE_TOOLBAR", "large-toolbar" }, +- { GTK_ICON_SIZE_BUTTON, "GTK_ICON_SIZE_BUTTON", "button" }, +- { GTK_ICON_SIZE_DND, "GTK_ICON_SIZE_DND", "dnd" }, +- { GTK_ICON_SIZE_DIALOG, "GTK_ICON_SIZE_DIALOG", "dialog" }, ++ { GTK_ICON_SIZE_INVALID, "GTK_ICON_SIZE_INVALID", "gtk-icon-size-invalid" }, ++ { GTK_ICON_SIZE_MENU, "GTK_ICON_SIZE_MENU", "gtk-icon-size-menu" }, ++ { GTK_ICON_SIZE_SMALL_TOOLBAR, "GTK_ICON_SIZE_SMALL_TOOLBAR", "gtk-icon-size-small-toolbar" }, ++ { GTK_ICON_SIZE_LARGE_TOOLBAR, "GTK_ICON_SIZE_LARGE_TOOLBAR", "gtk-icon-size-large-toolbar" }, ++ { GTK_ICON_SIZE_BUTTON, "GTK_ICON_SIZE_BUTTON", "gtk-icon-size-button" }, ++ { GTK_ICON_SIZE_DND, "GTK_ICON_SIZE_DND", "gtk-icon-size-dnd" }, ++ { GTK_ICON_SIZE_DIALOG, "GTK_ICON_SIZE_DIALOG", "gtk-icon-size-dialog" }, ++ { HILDON_ICON_SIZE_26, "HILDON_ICON_SIZE_26", "hildon-icon-size-26" }, ++ { HILDON_ICON_SIZE_40, "HILDON_ICON_SIZE_40", "hildon-icon-size-40" }, ++ { HILDON_ICON_SIZE_50, "HILDON_ICON_SIZE_50", "hildon-icon-size-50" }, ++ { HILDON_ICON_SIZE_64, "HILDON_ICON_SIZE_64", "hildon-icon-size-64" }, + { 0, NULL, NULL } + }; + etype = g_enum_register_static ("GtkIconSize", values); +@@ -1390,6 +1414,7 @@ + { GTK_RC_TOKEN_STOCK, "GTK_RC_TOKEN_STOCK", "stock" }, + { GTK_RC_TOKEN_LTR, "GTK_RC_TOKEN_LTR", "ltr" }, + { GTK_RC_TOKEN_RTL, "GTK_RC_TOKEN_RTL", "rtl" }, ++ { GTK_RC_TOKEN_LOGICAL_COLOR, "GTK_RC_TOKEN_LOGICAL_COLOR", "logical-color" }, + { GTK_RC_TOKEN_LAST, "GTK_RC_TOKEN_LAST", "last" }, + { 0, NULL, NULL } + }; +@@ -1673,6 +1698,23 @@ + return etype; + } + ++GType ++gtk_widget_tap_and_hold_flags_get_type (void) ++{ ++ static GType etype = 0; ++ if (etype == 0) { ++ static const GFlagsValue values[] = { ++ { GTK_TAP_AND_HOLD_NONE, "GTK_TAP_AND_HOLD_NONE", "none" }, ++ { GTK_TAP_AND_HOLD_PASS_PRESS, "GTK_TAP_AND_HOLD_PASS_PRESS", "pass-press" }, ++ { GTK_TAP_AND_HOLD_NO_SIGNALS, "GTK_TAP_AND_HOLD_NO_SIGNALS", "no-signals" }, ++ { GTK_TAP_AND_HOLD_NO_INTERNALS, "GTK_TAP_AND_HOLD_NO_INTERNALS", "no-internals" }, ++ { 0, NULL, NULL } ++ }; ++ etype = g_flags_register_static ("GtkWidgetTapAndHoldFlags", values); ++ } ++ return etype; ++} ++ + + /* Generated data ends here */ + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktypebuiltins.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktypebuiltins.h.diff new file mode 100644 index 0000000000..ac266dbaf6 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktypebuiltins.h.diff @@ -0,0 +1,24 @@ +--- gtk+-2.6.4/gtk/gtktypebuiltins.h 2005-03-01 17:58:16.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtktypebuiltins.h 2005-04-06 16:19:38.348708472 +0300 +@@ -13,6 +13,11 @@ + GType gtk_accel_flags_get_type (void) G_GNUC_CONST; + #define GTK_TYPE_ACCEL_FLAGS (gtk_accel_flags_get_type()) + ++/* enumerations from "gtkbutton.h" */ ++ ++GType osso_gtk_button_attach_flags_get_type (void) G_GNUC_CONST; ++#define GTK_TYPE_GTK_BUTTON_ATTACH_FLAGS (osso_gtk_button_attach_flags_get_type()) ++ + /* enumerations from "gtkcalendar.h" */ + + GType gtk_calendar_display_options_get_type (void) G_GNUC_CONST; +@@ -335,6 +340,9 @@ + GType gtk_widget_help_type_get_type (void) G_GNUC_CONST; + #define GTK_TYPE_WIDGET_HELP_TYPE (gtk_widget_help_type_get_type()) + ++GType gtk_widget_tap_and_hold_flags_get_type (void) G_GNUC_CONST; ++#define GTK_TYPE_WIDGET_TAP_AND_HOLD_FLAGS (gtk_widget_tap_and_hold_flags_get_type()) ++ + G_END_DECLS + + #endif /* __GTK_TYPE_BUILTINS_H__ */ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkvseparator.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkvseparator.c.diff new file mode 100644 index 0000000000..f4b1c00900 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkvseparator.c.diff @@ -0,0 +1,45 @@ +--- gtk+-2.6.4/gtk/gtkvseparator.c 2004-08-09 19:59:53.000000000 +0300 ++++ gtk+-2.6.4/gtk/gtkvseparator.c 2005-04-06 16:19:38.356707256 +0300 +@@ -91,13 +91,34 @@ + gtk_vseparator_expose (GtkWidget *widget, + GdkEventExpose *event) + { +- if (GTK_WIDGET_DRAWABLE (widget)) +- gtk_paint_vline (widget->style, widget->window, GTK_WIDGET_STATE (widget), +- &event->area, widget, "vseparator", +- widget->allocation.y, +- widget->allocation.y + widget->allocation.height - 1, +- widget->allocation.x + (widget->allocation.width - +- widget->style->xthickness) / 2); ++ gboolean hildonlike_drawing = FALSE; + +- return FALSE; ++ ++ gtk_widget_style_get ( widget, "hildonlike-drawing", &hildonlike_drawing, NULL ); ++ ++ if (GTK_WIDGET_DRAWABLE (widget)) ++ { ++ if(hildonlike_drawing) ++ gtk_paint_box (widget->style, widget->window, GTK_STATE_NORMAL, ++ GTK_SHADOW_NONE, &event->area, widget, "vseparator", ++ widget->allocation.x + (widget->allocation.width - ++ widget->style->xthickness) / 2, ++ widget->allocation.y, ++ ++ widget->style->xthickness, ++ widget->allocation.height - 1); ++ else ++ gtk_paint_vline (widget->style, widget->window, GTK_STATE_NORMAL, ++ &event->area, widget, "vseparator", ++ widget->allocation.y, ++ widget->allocation.y + widget->allocation.height - 1, ++ widget->allocation.x + (widget->allocation.width - ++ widget->style->xthickness) / 2); ++ } ++ ++ ++ ++ ++ ++ return FALSE; + } diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwidget.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwidget.c.diff new file mode 100644 index 0000000000..ecef0041eb --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwidget.c.diff @@ -0,0 +1,1046 @@ +--- gtk+-2.6.4/gtk/gtkwidget.c 2005-02-24 18:44:02.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkwidget.c 2005-04-06 16:19:38.386702696 +0300 +@@ -28,6 +28,8 @@ + #include <stdarg.h> + #include <string.h> + #include <locale.h> ++#include <stdlib.h> ++#include <x11/gdkx.h> + #include "gtkalias.h" + #include "gtkcontainer.h" + #include "gtkaccelmap.h" +@@ -44,6 +46,11 @@ + #include "gtkwindow.h" + #include "gtkbindings.h" + #include "gtkprivate.h" ++#include "gtktreeview.h" ++#include "gtkentry.h" ++#include "gtktextview.h" ++#include "gtkimcontext.h" ++#include "gtkmenu.h" + #include "gdk/gdk.h" + #include "gdk/gdkprivate.h" /* Used in gtk_reset_shapes_recurse to avoid copy */ + #include <gobject/gvaluecollector.h> +@@ -53,11 +60,30 @@ + #include "gtkaccessible.h" + #include "gtktooltips.h" + #include "gtkinvisible.h" ++#include "gtkscrollbar.h" /* Following are needed for special focus changes */ ++#include "gtktoolbar.h" ++#include "gtkmenu.h" ++#include "gtkmenuitem.h" ++#include "gtktogglebutton.h" ++#include "gtkcomboboxentry.h" ++#include "gtktogglebutton.h" ++#include "gtkcomboboxentry.h" + + #define WIDGET_CLASS(w) GTK_WIDGET_GET_CLASS (w) + #define INIT_PATH_SIZE (512) + ++#define GTK_TAP_THRESHOLD 30 ++#define GTK_TAP_MENU_THRESHOLD 20 ++#define GTK_TAP_AND_HOLD_TIMER_COUNTER 11 ++#define GTK_TAP_AND_HOLD_TIMER_INTERVAL 100 + ++typedef struct _GtkWidgetPrivate GtkWidgetPrivate; ++ ++#define GTK_WIDGET_GET_PRIVATE(obj) ( G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ ++ GTK_TYPE_WIDGET, GtkWidgetPrivate) ) ++ ++#define TAP_AND_HOLD_ANIMATION 1 ++ + enum { + SHOW, + HIDE, +@@ -120,6 +146,9 @@ + ACCEL_CLOSURES_CHANGED, + SCREEN_CHANGED, + CAN_ACTIVATE_ACCEL, ++ INSENSITIVE_PRESS, ++ TAP_AND_HOLD, ++ TAP_AND_HOLD_SETUP, + LAST_SIGNAL + }; + +@@ -142,7 +171,8 @@ + PROP_STYLE, + PROP_EVENTS, + PROP_EXTENSION_EVENTS, +- PROP_NO_SHOW_ALL ++ PROP_NO_SHOW_ALL, ++ PROP_TAP_AND_HOLD + }; + + typedef struct _GtkStateData GtkStateData; +@@ -155,7 +185,50 @@ + guint use_forall : 1; + }; + ++struct _GtkWidgetPrivate ++{ ++ GtkWidget *menu; ++ guint timer_id; ++ ++ GtkStateType stype; ++ GtkStateType type_on_press; ++ GdkEvent *fake_event; ++ GtkMenuPositionFunc func; ++ gint x, y; ++ gint timer_counter; ++ gint run_press : 1; ++ gint button_pressed : 1; ++ gint signals_connected : 1; ++ GtkWidgetTapAndHoldFlags flags; ++ gboolean state_set; ++ guint interval; ++ ++#ifdef TAP_AND_HOLD_ANIMATION ++ GdkPixbufAnimation *anim; ++ GdkPixbufAnimationIter *iter; ++ guint width, height; ++#endif ++}; ++ + ++/* --- Tap And Hold --- */ ++static gboolean gtk_widget_tap_and_hold_button_press_with_events( GtkWidget *widget, ++ GdkEvent *event, GtkWidgetPrivate *priv ); ++static gboolean gtk_widget_tap_and_hold_button_release_with_events( GtkWidget *widget, ++ GdkEvent *event, GtkWidgetPrivate *priv ); ++static gboolean gtk_widget_tap_and_hold_leave_notify_with_events( GtkWidget *widget, ++ GdkEvent *event, GtkWidgetPrivate *priv ); ++static gboolean gtk_widget_tap_and_hold_timeout_with_events( GtkWidget *widget ); ++static gboolean gtk_widget_tap_and_hold_timeout( GtkWidget *widget ); ++static gboolean gtk_widget_tap_and_hold_button_press( GtkWidget *widget, ++ GdkEvent *event, GtkWidgetPrivate *priv ); ++static gboolean gtk_widget_tap_and_hold_button_release( GtkWidget *widget, ++ GdkEvent *event, GtkWidgetPrivate *priv ); ++static gboolean gtk_widget_tap_and_hold_leave_notify( GtkWidget *widget, ++ GdkEvent *event, GtkWidgetPrivate *priv ); ++static void gtk_widget_tap_and_hold_setup_real( GtkWidget *widget, ++ GtkWidget *menu, GtkCallback func, GtkWidgetTapAndHoldFlags flags ); ++static void gtk_widget_real_tap_and_hold(GtkWidget *widget); + /* --- prototypes --- */ + static void gtk_widget_class_init (GtkWidgetClass *klass); + static void gtk_widget_init (GtkWidget *widget); +@@ -228,6 +301,13 @@ + gint width, + gint height); + ++/*Hildon focus handling*/ ++static void gtk_widget_set_focus_handling( GtkWidget *widget, gboolean state ); ++ ++static gboolean gtk_widget_enter_notify_event( GtkWidget *widget, GdkEventCrossing *event ); ++static gboolean gtk_widget_leave_notify_event( GtkWidget *widget, GdkEventCrossing *event ); ++static gint gtk_widget_button_release_event( GtkWidget *widget, GdkEventButton *event ); ++static gint gtk_widget_button_press_event( GtkWidget *widget, GdkEventButton *event ); + + /* --- variables --- */ + static gpointer parent_class = NULL; +@@ -239,6 +319,9 @@ + static GtkTextDirection gtk_default_direction = GTK_TEXT_DIR_LTR; + static GParamSpecPool *style_property_spec_pool = NULL; + ++static gboolean on_same_widget = FALSE; /*Hildon focus handling*/ ++static gboolean mouse_pressed = FALSE; /*Hildon focus handling*/ ++ + static GQuark quark_property_parser = 0; + static GQuark quark_aux_info = 0; + static GQuark quark_accel_path = 0; +@@ -396,6 +479,9 @@ + klass->drag_data_received = NULL; + klass->screen_changed = NULL; + klass->can_activate_accel = gtk_widget_real_can_activate_accel; ++ klass->tap_and_hold_setup = gtk_widget_tap_and_hold_setup_real; ++ klass->insensitive_press = NULL; ++ klass->tap_and_hold = gtk_widget_real_tap_and_hold; + + klass->show_help = gtk_widget_real_show_help; + +@@ -404,6 +490,18 @@ + + klass->no_expose_event = NULL; + ++ g_type_class_add_private( klass, sizeof(GtkWidgetPrivate) ); ++ ++ g_object_class_install_property (gobject_class, ++ PROP_TAP_AND_HOLD, ++ g_param_spec_int ("tap_and_hold_state", ++ P_("Tap and hold State type"), ++ P_("Sets the state to be used to the tap and hold functionality. The default is GTK_STATE_NORMAL"), ++ 0, ++ 4, /*4 == Last state in GTK+-2.0*/ ++ GTK_STATE_NORMAL, ++ G_PARAM_READWRITE)); ++ + g_object_class_install_property (gobject_class, + PROP_NAME, + g_param_spec_string ("name", +@@ -1389,6 +1487,31 @@ + _gtk_marshal_BOOLEAN__UINT, + G_TYPE_BOOLEAN, 1, G_TYPE_UINT); + ++ widget_signals[INSENSITIVE_PRESS] = ++ g_signal_new ("insensitive_press", ++ G_TYPE_FROM_CLASS (gobject_class), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET (GtkWidgetClass, insensitive_press), ++ NULL, NULL, ++ _gtk_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ ++ widget_signals[TAP_AND_HOLD] = ++ g_signal_new("tap-and-hold", G_TYPE_FROM_CLASS(gobject_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkWidgetClass, tap_and_hold), ++ NULL, NULL, ++ _gtk_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ ++ widget_signals[TAP_AND_HOLD_SETUP] = ++ g_signal_new("tap-and-hold-setup", G_TYPE_FROM_CLASS(gobject_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkWidgetClass, tap_and_hold_setup), ++ NULL, NULL, /*FIXME -- OBJECT_POINTER_FLAGS*/ ++ _gtk_marshal_VOID__OBJECT_UINT_FLAGS, ++ G_TYPE_NONE, 3, G_TYPE_OBJECT, G_TYPE_POINTER, G_TYPE_UINT); ++ + binding_set = gtk_binding_set_by_class (klass); + gtk_binding_entry_add_signal (binding_set, GDK_F10, GDK_SHIFT_MASK, + "popup_menu", 0); +@@ -1418,7 +1541,12 @@ + P_("Whether to draw the focus indicator inside widgets"), + TRUE, + G_PARAM_READABLE)); +- ++ gtk_widget_class_install_style_property (klass, ++ g_param_spec_boolean ("hildon-focus-handling", ++ P_("Hildon focus handling"), ++ P_("Whether the widget is using the hildon like focus handling or not"), ++ FALSE, ++ G_PARAM_READABLE)); + gtk_widget_class_install_style_property (klass, + g_param_spec_int ("focus-line-width", + P_("Focus linewidth"), +@@ -1543,6 +1671,8 @@ + case PROP_NO_SHOW_ALL: + gtk_widget_set_no_show_all (widget, g_value_get_boolean (value)); + break; ++ case PROP_TAP_AND_HOLD: ++ GTK_WIDGET_GET_PRIVATE(widget)->type_on_press = g_value_get_int(value); + default: + break; + } +@@ -1637,16 +1767,45 @@ + case PROP_NO_SHOW_ALL: + g_value_set_boolean (value, gtk_widget_get_no_show_all (widget)); + break; ++ case PROP_TAP_AND_HOLD: ++ g_value_set_int (value, ++ (int)GTK_WIDGET_GET_PRIVATE(widget)->type_on_press); + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } + } + ++static void gtk_widget_set_focus_handling( GtkWidget *widget, gboolean state ) ++{ ++ GtkWidgetPrivate *priv; ++ priv = GTK_WIDGET_GET_PRIVATE (widget); ++ ++ if( state && GTK_WIDGET_CAN_FOCUS(widget) ) ++ { ++ if (!priv->state_set) ++ { ++ g_signal_connect( G_OBJECT(widget), "button-press-event", ++ G_CALLBACK(gtk_widget_button_press_event), NULL ); ++ g_signal_connect( G_OBJECT(widget), "button-release-event", ++ G_CALLBACK(gtk_widget_button_release_event), NULL ); ++ g_signal_connect( G_OBJECT(widget), "enter-notify-event", ++ G_CALLBACK(gtk_widget_enter_notify_event), NULL ); ++ g_signal_connect( G_OBJECT(widget), "leave-notify-event", ++ G_CALLBACK(gtk_widget_leave_notify_event), NULL ); ++ priv->state_set = TRUE; ++ } ++ } ++} ++ + static void + gtk_widget_init (GtkWidget *widget) + { ++ GtkWidgetPrivate *priv; + GTK_PRIVATE_FLAGS (widget) = PRIVATE_GTK_CHILD_VISIBLE; ++ ++ priv = GTK_WIDGET_GET_PRIVATE(widget); ++ + widget->state = GTK_STATE_NORMAL; + widget->saved_state = GTK_STATE_NORMAL; + widget->name = NULL; +@@ -1659,6 +1818,18 @@ + widget->window = NULL; + widget->parent = NULL; + ++ priv->fake_event = NULL; ++ priv->timer_id = 0; ++ priv->menu = NULL; ++ priv->run_press = TRUE; ++ priv->signals_connected = FALSE; ++ priv->x = priv->y = 0; ++ priv->func = NULL; ++ priv->timer_counter = 0; ++ priv->flags = 0x0; ++ priv->state_set = FALSE; ++ priv->interval = GTK_TAP_AND_HOLD_TIMER_INTERVAL; ++ + GTK_WIDGET_SET_FLAGS (widget, + GTK_SENSITIVE | + GTK_PARENT_SENSITIVE | +@@ -1670,6 +1841,7 @@ + GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED); + + widget->style = gtk_widget_get_default_style (); ++ + g_object_ref (widget->style); + } + +@@ -2153,6 +2325,7 @@ + + if ((GTK_WIDGET_FLAGS (widget) & GTK_NO_SHOW_ALL) != 0) + return; ++ + + class = GTK_WIDGET_GET_CLASS (widget); + +@@ -3400,6 +3573,127 @@ + return FALSE; + } + ++/** ++ * gtk_widget_button_press_event ++ * @widget: a #GtkWidget ++ * @event: a #GtkEventKey ++ * ++**/ ++static gboolean gtk_widget_button_press_event(GtkWidget *widget, GdkEventButton *event ) ++{ ++ if( !mouse_pressed /*&& !GTK_IS_TREE_VIEW(widget) && !GTK_IS_ENTRY(widget)*/ ) ++ { ++ GtkWidget *toplevel; ++ toplevel = gtk_widget_get_toplevel (widget); ++ if (GTK_IS_WINDOW (toplevel)) ++ { ++ mouse_pressed = TRUE; ++ ++ if( /*!gtk_window_get_prev_focus_widget(GTK_WINDOW(toplevel)) &&*/ ++ GTK_IS_WIDGET(GTK_WINDOW(toplevel)->focus_widget) ) ++ gtk_window_set_prev_focus_widget( GTK_WINDOW(toplevel), ++ GTK_WINDOW(toplevel)->focus_widget ); ++ } ++ } ++ return FALSE; ++} ++ ++/** ++ * gtk_widget_button_release_event ++ * @widget: a #GtkWidget ++ * @event: a #GtkEventKey ++ * ++**/ ++static gboolean gtk_widget_button_release_event(GtkWidget *widget, GdkEventButton *event ) ++{ ++ if( mouse_pressed /*&& !GTK_IS_ENTRY(widget)*/ ) ++ { ++ GtkWidget *toplevel; ++ GtkWidget *event_widget; ++ event_widget = gtk_get_event_widget( (GdkEvent*) event ); ++ toplevel = gtk_widget_get_toplevel (widget); ++ ++ mouse_pressed = FALSE; ++ on_same_widget = TRUE; ++ ++ if (GTK_IS_WINDOW (toplevel)) ++ { ++ if( !on_same_widget && GTK_IS_WIDGET(GTK_WINDOW(toplevel)->focus_widget) ) ++ gtk_window_set_prev_focus_widget( GTK_WINDOW(toplevel), GTK_WINDOW(toplevel)->focus_widget ); ++ else ++ gtk_window_set_prev_focus_widget( GTK_WINDOW(toplevel), event_widget ); ++ } ++ } ++ return FALSE; ++} ++ ++/** ++ * gtk_widget_enter_notify_event ++ * @widget: a #GtkWidget ++ * @event: a #GtkEventCrossing ++ * ++**/ ++static gboolean gtk_widget_enter_notify_event( GtkWidget *widget, GdkEventCrossing *event ) ++{ ++ GtkWidget *toplevel; ++ GtkWidget *event_widget; ++ /*if( GTK_IS_ENTRY(widget) ) ++ return FALSE;*/ ++ ++ toplevel = gtk_widget_get_toplevel (widget); ++ event_widget = gtk_get_event_widget ( (GdkEvent*) event ); ++ ++ if(mouse_pressed && !on_same_widget && gtk_window_get_prev_focus_widget( GTK_WINDOW(toplevel) ) == event_widget) ++ { ++/* GtkWidget *temp;*/ ++ on_same_widget = TRUE; ++ ++/* temp = gtk_window_get_prev_focus_widget( GTK_WINDOW(toplevel) );*/ ++ if( GTK_IS_WIDGET(GTK_WINDOW(toplevel)->focus_widget) ) ++ { ++ gtk_window_set_prev_focus_widget( GTK_WINDOW(toplevel), GTK_WINDOW(toplevel)->focus_widget ); ++ if( GTK_WIDGET_CAN_FOCUS(event_widget) ) ++ gtk_widget_grab_focus( event_widget ); ++ else ++ gtk_widget_activate( event_widget ); ++ } ++ } ++ return FALSE; ++} ++ ++ ++/** ++ * gtk_widget_leave_notify_event ++ * @widget: a #GtkWidget ++ * @event: a #GtkEventCrossing ++ * ++**/ ++static gboolean gtk_widget_leave_notify_event( GtkWidget *widget, GdkEventCrossing *event ) ++{ ++ if( mouse_pressed && on_same_widget /*&& !GTK_IS_ENTRY(widget)*/ ) ++ { ++ GtkWidget *event_widget; ++ GtkWidget *toplevel; ++ GtkWidget *temp; ++ toplevel = gtk_widget_get_toplevel( widget ); ++ event_widget = gtk_get_event_widget( (GdkEvent*) event ); ++ on_same_widget = FALSE; ++ ++ temp = gtk_window_get_prev_focus_widget( GTK_WINDOW(toplevel) ); ++ if( GTK_IS_WIDGET(temp) && ++ gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel)) ) ++ { ++ gtk_window_set_prev_focus_widget( GTK_WINDOW(toplevel), event_widget ); ++ if( GTK_WIDGET_CAN_FOCUS(temp) ) ++ gtk_widget_grab_focus( temp ); ++ else ++ gtk_widget_activate( temp ); ++ } ++ } ++ return FALSE; ++} ++ ++ + #define WIDGET_REALIZED_FOR_EVENT(widget, event) \ + (event->type == GDK_FOCUS_CHANGE || GTK_WIDGET_REALIZED(widget)) + +@@ -3947,11 +4241,14 @@ + static void + gtk_widget_real_grab_focus (GtkWidget *focus_widget) + { +- if (GTK_WIDGET_CAN_FOCUS (focus_widget)) ++ if (GTK_WIDGET_CAN_FOCUS (focus_widget) && ++ GTK_WIDGET_VISIBLE (focus_widget)) + { ++ static GtkIMContext *last_context = NULL; + GtkWidget *toplevel; + GtkWidget *widget; +- ++ GtkIMContext *context; ++ + /* clear the current focus setting, break if the current widget + * is the focus widget's parent, since containers above that will + * be set by the next loop. +@@ -3972,6 +4269,53 @@ + + return; + } ++ ++ /* Focus change stuff (previously in modified im context) */ ++ if (GTK_IS_ENTRY (widget)) ++ context = GTK_ENTRY (widget)->im_context; ++ else if (GTK_IS_TEXT_VIEW (widget)) ++ context = GTK_TEXT_VIEW (widget)->im_context; ++ else ++ context = NULL; ++ ++ if (context || last_context) ++ { ++ gboolean is_combo, is_inside_toolbar; ++ GtkWidget *parent; ++ ++ parent = gtk_widget_get_parent (focus_widget); ++ is_combo = GTK_IS_TOGGLE_BUTTON (focus_widget) && ++ (GTK_IS_COMBO_BOX_ENTRY (parent) || ++ GTK_IS_COMBO_BOX (parent)); ++ is_inside_toolbar = ++ gtk_widget_get_ancestor (focus_widget, ++ GTK_TYPE_TOOLBAR) != NULL; ++ ++ if (focus_widget == NULL || ++ !GTK_IS_ENTRY (focus_widget) && ++ !GTK_IS_TEXT_VIEW (focus_widget) && ++ !GTK_IS_SCROLLBAR (focus_widget) && ++ !GTK_IS_MENU_ITEM (focus_widget) && ++ !GTK_IS_MENU (focus_widget) && ++ !is_inside_toolbar && ++ !is_combo) ++ { ++ /* we can't hide IM without IM context. it's possible to move ++ * focus to widget which doesn't have IM context, but which ++ * doesn't want IM to be hidden either. So, we have this ++ * static last_context variable which is used... */ ++ gtk_im_context_hide (context != NULL ++ ? context : last_context); ++ } ++ ++ if (context) ++ { ++ if (last_context != NULL) ++ g_object_unref (last_context); ++ last_context = context; ++ g_object_ref (last_context); ++ } ++ } + + if (widget) + { +@@ -4462,9 +4806,13 @@ + { + g_return_if_fail (GTK_IS_WIDGET (widget)); + +- if (!GTK_WIDGET_USER_STYLE (widget) && +- !GTK_WIDGET_RC_STYLE (widget)) ++ if (!GTK_WIDGET_USER_STYLE (widget) && !GTK_WIDGET_RC_STYLE (widget)) ++ { ++ gboolean hfh = FALSE; + gtk_widget_reset_rc_style (widget); ++ gtk_widget_style_get( widget, "hildon-focus-handling", &hfh, NULL ); ++ gtk_widget_set_focus_handling( widget, hfh ); ++ } + } + + /* Look up the RC style for this widget, unsetting any user style that +@@ -6396,7 +6744,7 @@ + + if (!GTK_WIDGET_DIRECTION_SET (widget)) + gtk_widget_emit_direction_changed (widget, old_dir); +- ++ + if (GTK_IS_CONTAINER (widget)) + gtk_container_forall (GTK_CONTAINER (widget), + gtk_widget_set_default_direction_recurse, +@@ -6405,6 +6753,13 @@ + g_object_unref (widget); + } + ++/* Non static */ ++void gtk_widget_set_direction_recursive(GtkWidget * widget, GtkTextDirection dir ) ++{ ++ gtk_widget_set_default_direction_recurse( widget, GUINT_TO_POINTER(dir) ); ++} ++ ++ + /** + * gtk_widget_set_default_direction: + * @dir: the new default direction. This cannot be +@@ -6422,7 +6777,7 @@ + { + GList *toplevels, *tmp_list; + GtkTextDirection old_dir = gtk_default_direction; +- ++ + gtk_default_direction = dir; + + tmp_list = toplevels = gtk_window_list_toplevels (); +@@ -6497,6 +6852,7 @@ + gtk_widget_finalize (GObject *object) + { + GtkWidget *widget = GTK_WIDGET (object); ++ GtkWidgetPrivate *priv = GTK_WIDGET_GET_PRIVATE(object); + GtkWidgetAuxInfo *aux_info; + gint *events; + GdkExtensionMode *mode; +@@ -6507,6 +6863,12 @@ + g_object_unref (widget->style); + widget->style = NULL; + ++ if (priv->timer_id) ++ { ++ g_source_remove (priv->timer_id); ++ priv->timer_id = 0; ++ } ++ + if (widget->name) + g_free (widget->name); + +@@ -6526,6 +6888,12 @@ + if (accessible) + g_object_unref (accessible); + ++ if (GTK_IS_MENU(priv->menu)) ++ gtk_widget_destroy (priv->menu); ++ ++ if (priv->fake_event) ++ gdk_event_free (priv->fake_event); ++ + G_OBJECT_CLASS (parent_class)->finalize (object); + } + +@@ -7577,3 +7945,450 @@ + + g_object_notify (G_OBJECT (widget), "no_show_all"); + } ++ ++void gtk_widget_insensitive_press ( GtkWidget *widget ) ++{ ++ g_return_if_fail (GTK_IS_WIDGET (widget)); ++ ++ g_signal_emit(widget, widget_signals[INSENSITIVE_PRESS], 0); ++} ++ ++/*Tap And Hold*/ ++ ++#ifdef TAP_AND_HOLD_ANIMATION ++static void ++init_tap_and_hold_animation( GtkWidgetPrivate *priv ) ++{ ++ GTimeVal time; ++ if( priv->anim ) ++ { ++ g_get_current_time( &time ); ++ priv->iter = gdk_pixbuf_animation_get_iter( priv->anim, &time ); ++ priv->interval = gdk_pixbuf_animation_iter_get_delay_time( priv->iter ); ++ } ++} ++ ++static void ++timeout_tap_and_hold_animation( GtkWidgetPrivate *priv ) ++{ ++ GdkScreen *screen; ++ GdkPixbuf *pic; ++ GdkCursor *cursor; ++ GTimeVal time; ++ ++ if( priv->anim ) ++ { ++ screen = gdk_screen_get_default(); ++ g_get_current_time( &time ); ++ ++ pic = gdk_pixbuf_animation_iter_get_pixbuf( priv->iter ); ++ cursor = gdk_cursor_new_from_pixbuf( gdk_display_get_default(), pic, ++ priv->width, priv->height ); ++ ++ gdk_window_set_cursor( priv->fake_event->button.window, cursor ); ++ ++ gdk_pixbuf_animation_iter_advance( priv->iter, &time ); ++ } ++} ++ ++static void ++stop_tap_and_hold_animation( GtkWidgetPrivate *priv ) ++{ ++ if( priv->anim ) ++ { ++ gdk_window_set_cursor( priv->fake_event->button.window, NULL ); ++ } ++} ++ ++ ++#endif ++ ++void tap_and_hold_remove_timer( GtkWidgetPrivate *priv ) ++{ ++ if (priv->timer_id) ++ { ++ g_source_remove (priv->timer_id); ++ priv->timer_id = 0; ++ #ifdef TAP_AND_HOLD_ANIMATION ++ stop_tap_and_hold_animation( priv ); ++ #endif ++ } ++} ++ ++/** ++ * gtk_widget_tap_and_hold_setup: ++ * ++ * @widget : A @GtkWidget ++ * @menu : A @GtkWidget ++ * @func : A @GtkCallback ++ * @flags : A @GtkWidgetTapAndHoldFlags ++ * ++ * Setups the tap and hold functionality to the @widget. ++ * The @menu is shown when the functionality is activated. ++ * If the @menu is wanted to be positioned in a different way than the ++ * gtk+ default, the menuposition @func can be passed as a third parameter. ++ * Fourth parameter, @flags are explaned with detail in the documentation. ++ */ ++void gtk_widget_tap_and_hold_setup (GtkWidget *widget, GtkWidget *menu, ++ GtkCallback func, GtkWidgetTapAndHoldFlags flags) ++{ ++ /*GtkWidgetClass *klass = GTK_WIDGET_GET_CLASS(widget);*/ ++ g_return_if_fail( GTK_IS_WIDGET(widget)); ++ g_return_if_fail(menu == NULL || GTK_IS_MENU(menu)); ++ g_signal_emit( widget, widget_signals[TAP_AND_HOLD_SETUP], 0, menu, func, ++ flags ); ++} ++ ++static void gtk_widget_tap_and_hold_setup_real (GtkWidget *widget, ++ GtkWidget *menu, GtkCallback func, GtkWidgetTapAndHoldFlags flags) ++{ ++ #ifdef TAP_AND_HOLD_ANIMATION ++ GtkStyle *style = NULL; ++ GError *error = NULL; ++ #endif ++ GtkWidgetPrivate *priv; ++ g_return_if_fail (GTK_IS_WIDGET(widget)); ++ g_return_if_fail (menu == NULL || GTK_IS_MENU(menu)); ++ priv = GTK_WIDGET_GET_PRIVATE (widget); ++ ++ if (priv->signals_connected) ++ return; ++ ++ _gtk_menu_enable_context_menu_behavior (menu); ++ ++ priv->menu = menu; ++ priv->func = (GtkMenuPositionFunc)func; ++ priv->signals_connected = TRUE; ++ priv->timer_counter = 0; ++ priv->flags = flags; ++ ++ if (flags & GTK_TAP_AND_HOLD_PASS_PRESS) ++ { ++ g_signal_connect( widget, "button-press-event", ++ G_CALLBACK(gtk_widget_tap_and_hold_button_press_with_events), priv ); ++ g_signal_connect( widget, "button-release-event", ++ G_CALLBACK(gtk_widget_tap_and_hold_button_release_with_events), priv ); ++ g_signal_connect( widget, "leave-notify-event", ++ G_CALLBACK(gtk_widget_tap_and_hold_leave_notify_with_events), priv ); ++ } ++ else ++ { ++ g_signal_connect( widget, "button-press-event", ++ G_CALLBACK(gtk_widget_tap_and_hold_button_press), priv ); ++ g_signal_connect( widget, "button-release-event", ++ G_CALLBACK(gtk_widget_tap_and_hold_button_release), priv ); ++ g_signal_connect( widget, "leave-notify-event", ++ G_CALLBACK(gtk_widget_tap_and_hold_leave_notify), priv ); ++ } ++ ++#ifdef TAP_AND_HOLD_ANIMATION ++ priv->anim = NULL; ++ style = gtk_rc_get_style_by_paths(gtk_settings_get_default(), ++ "gtk-tap-and-hold-animation", ++ NULL, G_TYPE_NONE); ++ ++ if( style ) ++ { ++ ++ priv->anim = gdk_pixbuf_animation_new_from_file( ++ (gchar*)style->rc_style->bg_pixmap_name[0], &error ); ++ ++ priv->width = gdk_pixbuf_animation_get_width( priv->anim )/2; ++ priv->height = gdk_pixbuf_animation_get_height( priv->anim )/2; ++ } ++#endif ++} ++ ++static void gtk_widget_real_tap_and_hold(GtkWidget *widget) ++{ ++ GtkWidgetPrivate *priv = GTK_WIDGET_GET_PRIVATE (widget); ++ ++ if (GTK_IS_MENU(priv->menu)) ++ gtk_menu_popup( GTK_MENU(priv->menu), NULL, NULL, ++ (GtkMenuPositionFunc)priv->func, ++ widget, 1, gdk_x11_get_server_time(widget->window) ); ++} ++ ++static gboolean gtk_widget_tap_and_hold_timeout (GtkWidget *widget) ++{ ++ GtkWidgetPrivate *priv= GTK_WIDGET_GET_PRIVATE(widget); ++ gboolean return_value; ++ gint x = 0, y = 0; ++ ++ #ifdef TAP_AND_HOLD_ANIMATION ++ timeout_tap_and_hold_animation( priv ); ++ #endif ++ ++ if( priv->timer_counter ) ++ priv->timer_counter--; ++ else ++ priv->timer_id = 0; ++ ++ gdk_display_get_pointer( gdk_x11_lookup_xdisplay( ++ GDK_WINDOW_XDISPLAY(priv->fake_event->button.window) ), ++ NULL, &x, &y, NULL ); ++ ++ if ((abs(x - priv->x) > GTK_TAP_THRESHOLD) || ++ (abs(y - priv->y) > GTK_TAP_THRESHOLD)) ++ { ++ if (priv->stype != priv->type_on_press) ++ gtk_widget_set_state( widget, priv->stype ); ++ priv->timer_counter = 0; ++ priv->timer_id = 0; ++ priv->x = priv->y = 0; ++ priv->run_press = FALSE; ++ g_signal_emit_by_name (G_OBJECT(widget), "button-press-event", ++ priv->fake_event, &return_value); ++ return FALSE; ++ } ++ if (!priv->timer_id) ++ { ++ if (priv->stype != priv->type_on_press) ++ gtk_widget_set_state( widget, priv->stype ); ++ #ifdef TAP_AND_HOLD_ANIMATION ++ stop_tap_and_hold_animation( priv ); ++ #endif ++ g_signal_emit(widget, widget_signals[TAP_AND_HOLD], 0); ++ priv->x = x; ++ priv->y = y; ++ return FALSE; ++ } ++ return TRUE; ++} ++ ++static gboolean gtk_widget_tap_and_hold_button_press (GtkWidget *widget, ++ GdkEvent *event, GtkWidgetPrivate *priv) ++{ ++ if (!priv->run_press || event->button.button != 1) ++ { ++ priv->run_press = TRUE; ++ return FALSE; ++ } ++ ++ if (event->button.type == GDK_2BUTTON_PRESS) ++ return FALSE; ++ ++ if (priv->fake_event) ++ gdk_event_free (priv->fake_event); ++ priv->fake_event = gdk_event_copy(event); ++ ++ if (!priv->timer_id) ++ { ++ priv->stype = GTK_WIDGET_STATE(widget); ++ if (priv->stype != priv->type_on_press) ++ gtk_widget_set_state( widget, priv->type_on_press ); ++ gdk_display_get_pointer( ++ gdk_x11_lookup_xdisplay( GDK_WINDOW_XDISPLAY(event->button.window) ), ++ NULL, &priv->x, &priv->y, NULL ); ++ priv->timer_counter = GTK_TAP_AND_HOLD_TIMER_COUNTER; ++ ++ #ifdef TAP_AND_HOLD_ANIMATION ++ init_tap_and_hold_animation( priv ); ++ #endif ++ priv->timer_id = g_timeout_add( priv->interval, ++ (GSourceFunc)gtk_widget_tap_and_hold_timeout, widget ); ++ } ++return TRUE; ++} ++ ++static gboolean gtk_widget_tap_and_hold_button_release (GtkWidget *widget, ++ GdkEvent *event, GtkWidgetPrivate *priv) ++{ ++ gboolean return_value; ++ ++ if (!priv->run_press || event->button.button != 1 || !priv->timer_id || ++ event->button.type == GDK_2BUTTON_PRESS) ++ return FALSE; ++ ++ g_source_remove (priv->timer_id); ++ priv->timer_id = 0; ++ priv->x = priv->y = priv->timer_counter = 0; ++ if (priv->stype != priv->type_on_press) ++ gtk_widget_set_state (widget, priv->stype); ++ ++ #ifdef TAP_AND_HOLD_ANIMATION ++ stop_tap_and_hold_animation( priv ); ++ #endif ++ ++ if (priv->flags & GTK_TAP_AND_HOLD_NO_SIGNALS) ++ return FALSE; ++ ++ priv->run_press = FALSE; ++ ++ g_signal_emit_by_name (G_OBJECT(widget), "button-press-event", ++ priv->fake_event, &return_value); ++ ++return FALSE; ++} ++ ++static gboolean gtk_widget_tap_and_hold_leave_notify (GtkWidget *widget, ++ GdkEvent *event, GtkWidgetPrivate *priv) ++{ ++ gboolean return_value; ++ if (!priv->timer_id) ++ return FALSE; ++ ++ g_source_remove (priv->timer_id); ++ priv->timer_id = 0; ++ priv->x = priv->y = priv->timer_counter = 0; ++ if (priv->stype != priv->type_on_press) ++ gtk_widget_set_state (widget, priv->stype); ++ ++ #ifdef TAP_AND_HOLD_ANIMATION ++ stop_tap_and_hold_animation( priv ); ++ #endif ++ priv->run_press = FALSE; ++ g_signal_emit_by_name (G_OBJECT(widget), "button-press-event", ++ priv->fake_event, &return_value); ++ ++return FALSE; ++} ++ ++static gboolean ++gtk_widget_tap_and_hold_timeout_with_events (GtkWidget *widget) ++{ ++ gint x, y; ++ GtkWidgetPrivate *priv= GTK_WIDGET_GET_PRIVATE(widget); ++ ++ g_return_val_if_fail (priv->fake_event, FALSE); ++ ++ #ifdef TAP_AND_HOLD_ANIMATION ++ timeout_tap_and_hold_animation( priv ); ++ #endif ++ ++ gdk_display_get_pointer( gdk_x11_lookup_xdisplay( ++ GDK_WINDOW_XDISPLAY(priv->fake_event->button.window) ), ++ NULL, &x, &y, NULL ); ++ ++ if( priv->timer_counter ) ++ { ++ priv->timer_counter--; ++ if ((abs(x - priv->x) > GTK_TAP_THRESHOLD) || ++ (abs(y - priv->y) > GTK_TAP_THRESHOLD)) ++ { ++ #ifdef TAP_AND_HOLD_ANIMATION ++ stop_tap_and_hold_animation( priv ); ++ #endif ++ tap_and_hold_remove_timer( priv ); ++ } ++ return TRUE; ++ } ++ ++ if (!((abs(x - priv->x) > GTK_TAP_THRESHOLD) || ++ (abs(y - priv->y) > GTK_TAP_THRESHOLD))) ++ { ++ gboolean return_value; ++ priv->fake_event->button.type = GDK_BUTTON_RELEASE; ++ priv->fake_event->button.x = x; ++ priv->fake_event->button.y = y; ++ g_signal_emit_by_name (G_OBJECT(widget), "button-release-event", ++ priv->fake_event, &return_value); ++ #ifdef TAP_AND_HOLD_ANIMATION ++ stop_tap_and_hold_animation( priv ); ++ #endif ++ g_signal_emit(widget, widget_signals[TAP_AND_HOLD], 0); ++ priv->timer_id = 0; ++ priv->x = x; ++ priv->y = y; ++ gdk_event_free(priv->fake_event); ++ priv->fake_event = NULL; ++ } ++ ++ ++ if (priv->timer_id) ++ { ++ g_source_remove (priv->timer_id); ++ priv->timer_id = 0; ++ } ++ ++ return FALSE; ++} ++ ++static gboolean gtk_widget_tap_and_hold_button_press_with_events( ++ GtkWidget *widget, GdkEvent *event, GtkWidgetPrivate *priv) ++{ ++ if( priv->timer_id || event->button.type == GDK_2BUTTON_PRESS) ++ return FALSE; ++ ++ if (priv->fake_event) ++ gdk_event_free (priv->fake_event); ++ priv->fake_event = gdk_event_copy (event); ++ ++ gdk_display_get_pointer( ++ gdk_x11_lookup_xdisplay(GDK_WINDOW_XDISPLAY(event->button.window)), ++ NULL, &priv->x, &priv->y, NULL); ++ #ifdef TAP_AND_HOLD_ANIMATION ++ init_tap_and_hold_animation( priv ); ++ #endif ++ priv->timer_counter = GTK_TAP_AND_HOLD_TIMER_COUNTER; ++ priv->timer_id = g_timeout_add(priv->interval, ++ (GSourceFunc)gtk_widget_tap_and_hold_timeout_with_events, ++ widget); ++ return FALSE; ++} ++ ++static gboolean gtk_widget_tap_and_hold_button_release_with_events( ++ GtkWidget *widget, GdkEvent *event, GtkWidgetPrivate *priv) ++{ ++ tap_and_hold_remove_timer( priv ); ++ return FALSE; ++} ++ ++static gboolean gtk_widget_tap_and_hold_leave_notify_with_events( ++ GtkWidget *widget, GdkEvent *event, GtkWidgetPrivate *priv) ++{ ++ tap_and_hold_remove_timer( priv ); ++ return FALSE; ++} ++ ++/** ++ * gtk_widget_tap_and_hold_menu_position_top: ++ * @menu: a #GtkMenu ++ * @x: x cordinate to be returned ++ * @y: y cordinate to be returned ++ * @push_in: If going off screen, push it pack on the screen ++ * @widget: a #GtkWidget ++ * ++ * Pre-made menu positioning function. ++ * It positiones the @menu over the @widget. ++ * ++ **/ ++void gtk_widget_tap_and_hold_menu_position_top( GtkWidget *menu, ++ gint *x, gint *y, gboolean *push_in, GtkWidget *widget ) ++{ ++ /* ++ * This function positiones the menu above widgets. ++ * This is a modified version of the position function ++ * gtk_combo_box_position_over. ++ */ ++ GtkWidget *topw; ++ GtkRequisition requisition; ++ gint screen_width = 0; ++ gint menu_xpos = 0; ++ gint menu_ypos = 0; ++ gint w_xpos = 0, w_ypos = 0; ++ ++ gtk_widget_size_request( menu, &requisition ); ++ ++ topw = gtk_widget_get_toplevel(widget); ++ gdk_window_get_origin( topw->window, &w_xpos, &w_ypos ); ++ ++ menu_xpos += widget->allocation.x + w_xpos; ++ menu_ypos += widget->allocation.y + w_ypos - requisition.height; ++ ++ if( gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL ) ++ menu_xpos = menu_xpos + widget->allocation.width - requisition.width; ++ ++ screen_width = gdk_screen_get_width( gtk_widget_get_screen(widget) ); ++ ++ if( menu_xpos < w_xpos ) ++ menu_xpos = w_xpos; ++ else if( (menu_xpos + requisition.width) > screen_width ) ++ menu_xpos -= ( (menu_xpos + requisition.width) - screen_width ); ++ if( menu_ypos < w_ypos ) ++ menu_ypos = w_ypos; ++ ++ *x = menu_xpos; ++ *y = menu_ypos; ++ *push_in = TRUE; ++} diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwidget.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwidget.h.diff new file mode 100644 index 0000000000..7350082d3c --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwidget.h.diff @@ -0,0 +1,59 @@ +--- gtk+-2.6.4/gtk/gtkwidget.h 2004-11-28 09:02:27.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkwidget.h 2005-04-06 16:19:38.400700568 +0300 +@@ -22,6 +22,9 @@ + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. ++ ++ * Changes made to create Hildon focus handling and the tap and hold functionality ++ * + */ + + #ifndef __GTK_WIDGET_H__ +@@ -87,6 +90,15 @@ + GTK_WIDGET_HELP_WHATS_THIS + } GtkWidgetHelpType; + ++/*Tap And Hold type flags*/ ++typedef enum ++{ ++ GTK_TAP_AND_HOLD_NONE = 0, ++ GTK_TAP_AND_HOLD_PASS_PRESS = 1 << 0, ++ GTK_TAP_AND_HOLD_NO_SIGNALS = 1 << 1, ++ GTK_TAP_AND_HOLD_NO_INTERNALS = 1 << 2 ++} GtkWidgetTapAndHoldFlags; ++ + /* Macro for casting a pointer to a GtkWidget or GtkWidgetClass pointer. + * Macros for testing whether `widget' or `klass' are of type GTK_TYPE_WIDGET. + */ +@@ -410,9 +422,10 @@ + void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); + void (*_gtk_reserved4) (void); +- void (*_gtk_reserved5) (void); +- void (*_gtk_reserved6) (void); +- void (*_gtk_reserved7) (void); ++ void (*tap_and_hold) (GtkWidget *widget); /* Tap and hold action */ ++ void (*tap_and_hold_setup) (GtkWidget *widget, GtkWidget *menu, ++ GtkCallback func, GtkWidgetTapAndHoldFlags flags); ++ void (*insensitive_press) (GtkWidget *widget); + }; + + struct _GtkWidgetAuxInfo +@@ -787,6 +800,16 @@ + + GdkColormap* _gtk_widget_peek_colormap (void); + ++/*Hildon functions for focus handling*/ ++void gtk_widget_set_hildon_focus_handling( GtkWidget *widget, gboolean hildon_like ); ++gboolean gtk_widget_get_hildon_focus_handling( GtkWidget *widget ); ++ ++/*Tap And Hold functions*/ ++void gtk_widget_tap_and_hold_menu_position_top (GtkWidget *menu, ++ gint *x, gint *y, gboolean *push_in, GtkWidget *widget); ++void gtk_widget_tap_and_hold_setup (GtkWidget *widget, GtkWidget *menu, ++ GtkCallback func, GtkWidgetTapAndHoldFlags flags); ++ + #ifdef __cplusplus + } + #endif /* __cplusplus */ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff new file mode 100644 index 0000000000..a67feac810 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff @@ -0,0 +1,78 @@ +--- gtk+-2.6.4/gtk/gtkwindow.c 2005-02-21 06:21:49.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkwindow.c 2005-04-06 16:19:38.407699504 +0300 +@@ -166,6 +166,7 @@ + guint skips_taskbar : 1; + guint skips_pager : 1; + guint accept_focus : 1; ++ GtkWidget *prev_focus_widget; + guint focus_on_map : 1; + }; + +@@ -293,6 +294,9 @@ + GValue *value, + GParamSpec *pspec); + ++static void gtk_window_focus_weak_notify (GtkWindow *window, ++ GtkWidget *widget); ++static void gtk_window_weak_notify(GtkWidget *widget, GtkWindow *window); + + GType + gtk_window_get_type (void) +@@ -771,6 +775,7 @@ + window->decorated = TRUE; + window->mnemonic_modifier = GDK_MOD1_MASK; + window->screen = gdk_screen_get_default (); ++ priv->prev_focus_widget = NULL; + + priv->accept_focus = TRUE; + priv->focus_on_map = TRUE; +@@ -7505,3 +7510,49 @@ + } + + #endif ++ ++/*Hildon focus handling*/ ++GtkWidget *gtk_window_get_prev_focus_widget( GtkWindow *window ) ++{ ++ g_return_val_if_fail( GTK_IS_WINDOW(window), NULL ); ++ return GTK_WINDOW_GET_PRIVATE(window)->prev_focus_widget; ++} ++ ++static void gtk_window_weak_notify(GtkWidget *widget, GtkWindow *window) ++{ ++ GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE(window); ++ if (priv->prev_focus_widget == widget) ++ g_object_weak_unref(G_OBJECT(widget), ++ (GWeakNotify)gtk_window_focus_weak_notify, ++ (gpointer)window); ++} ++ ++void gtk_window_set_prev_focus_widget( GtkWindow *window, GtkWidget *widget ) ++{ ++ GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE(window); ++ g_return_if_fail(GTK_IS_WINDOW(window)); ++ g_return_if_fail(GTK_IS_WIDGET(widget)); ++ ++ if (priv->prev_focus_widget) ++ { ++ g_object_weak_unref(G_OBJECT(window), (GWeakNotify)gtk_window_weak_notify, ++ (gpointer)priv->prev_focus_widget); ++ g_object_weak_unref(G_OBJECT(priv->prev_focus_widget), ++ (GWeakNotify)gtk_window_focus_weak_notify, ++ (gpointer)window); ++ } ++ ++ priv->prev_focus_widget = widget; ++ ++ g_object_weak_ref(G_OBJECT(window), (GWeakNotify)gtk_window_weak_notify, ++ (gpointer)widget); ++ g_object_weak_ref(G_OBJECT(widget), (GWeakNotify)gtk_window_focus_weak_notify, ++ (gpointer)window); ++} ++ ++static void gtk_window_focus_weak_notify(GtkWindow *window, GtkWidget *widget) ++{ ++ GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE(window); ++ priv->prev_focus_widget = window->focus_widget; ++} ++ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.h.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.h.diff new file mode 100644 index 0000000000..99fb70b1e7 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.h.diff @@ -0,0 +1,13 @@ +--- gtk+-2.6.4/gtk/gtkwindow.h 2004-12-12 23:09:13.000000000 +0200 ++++ gtk+-2.6.4/gtk/gtkwindow.h 2005-04-06 16:19:38.408699352 +0300 +@@ -413,6 +413,10 @@ + guint accel_key, + GdkModifierType accel_mods); + ++GtkWidget *gtk_window_get_prev_focus_widget( GtkWindow *window ); ++void gtk_window_set_prev_focus_widget( GtkWindow *window, GtkWidget *widget ); ++ ++ + #ifdef __cplusplus + } + #endif /* __cplusplus */ diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/hardcoded_libtool.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/hardcoded_libtool.patch new file mode 100644 index 0000000000..b2afddcc61 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/hardcoded_libtool.patch @@ -0,0 +1,29 @@ +--- gtk+-2.6.0/configure.in.old 2005-01-01 16:23:45.000000000 +0000 ++++ gtk+-2.6.0/configure.in 2005-01-01 16:24:03.000000000 +0000 +@@ -360,7 +360,7 @@ + AC_MSG_CHECKING([Whether to write dependencies into .pc files]) + case $enable_explicit_deps in + auto) +- deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh` ++ deplib_check_method=`($host_alias-libtool --config; echo eval echo \\$deplib_check_method) | sh` + if test "X$deplib_check_method" = Xnone || test "x$enable_static" = xyes ; then + enable_explicit_deps=yes + else +@@ -688,7 +688,7 @@ + dnl Now we check to see if our libtool supports shared lib deps + dnl (in a rather ugly way even) + if $dynworks; then +- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config" ++ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config" + pixbuf_deplibs_check=`$pixbuf_libtool_config | \ + grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \ + sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'` +@@ -1512,7 +1512,7 @@ + # + # We are using gmodule-no-export now, but I'm leaving the stripping + # code in place for now, since pango and atk still require gmodule. +-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` + if test -n "$export_dynamic"; then + GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"` + GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"` diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff new file mode 100644 index 0000000000..d030ae30b8 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff @@ -0,0 +1,108 @@ +--- gtk+-2.6.4/gdk-pixbuf/io-gif-animation.c 2003-06-27 05:38:43.000000000 +0300 ++++ gtk+-2.6.4/gdk-pixbuf/io-gif-animation.c 2005-04-06 16:19:35.595127080 +0300 +@@ -391,6 +391,11 @@ + + while (tmp != NULL) { + GdkPixbufFrame *f = tmp->data; ++ ++ if (f->pixbuf == NULL) { ++ return; ++ } ++ + gint clipped_width = MIN (gif_anim->width - f->x_offset, gdk_pixbuf_get_width (f->pixbuf)); + gint clipped_height = MIN (gif_anim->height - f->y_offset, gdk_pixbuf_get_height (f->pixbuf)); + +@@ -414,6 +419,10 @@ + TRUE, + 8, gif_anim->width, gif_anim->height); + ++ if (f->composited == NULL) { ++ return; ++ } ++ + /* alpha gets dumped if f->composited has no alpha */ + + gdk_pixbuf_fill (f->composited, +@@ -453,9 +462,18 @@ + + if (prev_frame->action == GDK_PIXBUF_FRAME_RETAIN) { + f->composited = gdk_pixbuf_copy (prev_frame->composited); ++ ++ if (f->composited == NULL) { ++ return; ++ } + + } else if (prev_frame->action == GDK_PIXBUF_FRAME_DISPOSE) { + f->composited = gdk_pixbuf_copy (prev_frame->composited); ++ ++ if (f->composited == NULL) { ++ return; ++ } ++ + if (prev_clipped_width > 0 && prev_clipped_height > 0) { + /* Clear area of previous frame to background */ + GdkPixbuf *area; +@@ -465,6 +483,10 @@ + prev_frame->y_offset, + prev_clipped_width, + prev_clipped_height); ++ ++ if (area == NULL) { ++ return; ++ } + + gdk_pixbuf_fill (area, + (gif_anim->bg_red << 24) | +@@ -475,7 +497,13 @@ + } + } else if (prev_frame->action == GDK_PIXBUF_FRAME_REVERT) { + f->composited = gdk_pixbuf_copy (prev_frame->composited); +- if (prev_clipped_width > 0 && prev_clipped_height > 0) { ++ ++ if (f->composited == NULL) { ++ return; ++ } ++ ++ if (prev_frame->revert != NULL && ++ prev_clipped_width > 0 && prev_clipped_height > 0) { + /* Copy in the revert frame */ + gdk_pixbuf_copy_area (prev_frame->revert, + 0, 0, +@@ -500,14 +528,23 @@ + f->y_offset, + clipped_width, + clipped_height); +- ++ ++ if (area == NULL) { ++ return; ++ } ++ + f->revert = gdk_pixbuf_copy (area); +- ++ + g_object_unref (area); ++ ++ if (f->revert == NULL) { ++ return; ++ } + } + } + +- if (clipped_width > 0 && clipped_height > 0) { ++ if (clipped_width > 0 && clipped_height > 0 && ++ f->pixbuf != NULL && f->composited != NULL) { + /* Put current frame onto f->composited */ + gdk_pixbuf_composite (f->pixbuf, + f->composited, +@@ -531,10 +568,6 @@ + tmp = tmp->next; + } + } +- +- g_assert (frame->composited != NULL); +- g_assert (gdk_pixbuf_get_width (frame->composited) == gif_anim->width); +- g_assert (gdk_pixbuf_get_height (frame->composited) == gif_anim->height); + } + + GdkPixbuf* diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif.c.diff b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif.c.diff new file mode 100644 index 0000000000..a42d0e4ac2 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif.c.diff @@ -0,0 +1,37 @@ +--- gtk+-2.6.4/gdk-pixbuf/io-gif.c 2004-11-12 07:34:31.000000000 +0200 ++++ gtk+-2.6.4/gdk-pixbuf/io-gif.c 2005-04-06 16:19:35.597126776 +0300 +@@ -920,6 +920,34 @@ + + gdk_pixbuf_gif_anim_frame_composite (context->animation, prev_frame); + ++ /* Composite failed */ ++ if (prev_frame->composited == NULL) { ++ GdkPixbufFrame *frame = NULL; ++ link = g_list_first (context->animation->frames); ++ while (link != NULL) { ++ frame = (GdkPixbufFrame *)link->data; ++ if (frame != NULL) { ++ if (frame->pixbuf != NULL) ++ g_object_unref (frame->pixbuf); ++ if (frame->composited != NULL) ++ g_object_unref (frame->composited); ++ if (frame->revert != NULL) ++ g_object_unref (frame->revert); ++ g_free (frame); ++ } ++ link = link->next; ++ } ++ ++ g_list_free (context->animation->frames); ++ context->animation->frames = NULL; ++ ++ g_set_error (context->error, ++ GDK_PIXBUF_ERROR, ++ GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, ++ _("Not enough memory to composite a frame in GIF file")); ++ return -2; ++ } ++ + x = context->frame->x_offset; + y = context->frame->y_offset; + w = gdk_pixbuf_get_width (context->frame->pixbuf); diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/menu-deactivate.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/menu-deactivate.patch new file mode 100644 index 0000000000..29e665fbf3 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/menu-deactivate.patch @@ -0,0 +1,50 @@ +--- gtk+-2.4.4/gtk/gtkmenushell.c.old Thu Aug 26 23:45:28 2004 ++++ gtk+-2.4.4/gtk/gtkmenushell.c Fri Aug 27 00:13:33 2004 +@@ -37,7 +37,7 @@ + #include "gtktearoffmenuitem.h" + #include "gtkwindow.h" + +-#define MENU_SHELL_TIMEOUT 500 ++#define MENU_SHELL_TIMEOUT 2000 + + enum { + DEACTIVATE, +@@ -156,6 +156,7 @@ + static GtkContainerClass *parent_class = NULL; + static guint menu_shell_signals[LAST_SIGNAL] = { 0 }; + ++static int last_crossing_time; + + GType + gtk_menu_shell_get_type (void) +@@ -418,6 +419,7 @@ + gtk_grab_add (GTK_WIDGET (menu_shell)); + menu_shell->have_grab = TRUE; + menu_shell->active = TRUE; ++ last_crossing_time = 0; + } + } + +@@ -545,6 +547,13 @@ + menu_shell->activate_time = 0; + deactivate = FALSE; + } ++ ++ if (last_crossing_time != 0 ++ && ((event->time - last_crossing_time) < 500)) ++ { ++ last_crossing_time = 0; ++ deactivate = FALSE; ++ } + + if (deactivate) + { +@@ -597,6 +606,8 @@ + if (menu_shell->active) + { + menu_item = gtk_get_event_widget ((GdkEvent*) event); ++ ++ last_crossing_time = event->time; + + if (!menu_item || + (GTK_IS_MENU_ITEM (menu_item) && diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/no-demos.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/no-demos.patch new file mode 100644 index 0000000000..2f10a30dda --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/no-demos.patch @@ -0,0 +1,10 @@ +--- gtk+-2.4.1/Makefile.am~ 2004-01-17 22:15:56.000000000 +0000 ++++ gtk+-2.4.1/Makefile.am 2004-05-08 12:25:32.000000000 +0100 +@@ -1,6 +1,6 @@ + ## Makefile.am for GTK+ + +-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib ++SRC_SUBDIRS = gdk-pixbuf gdk gtk modules tests contrib + SUBDIRS = po po-properties $(SRC_SUBDIRS) docs build m4macros + + # require automake 1.4 diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/no-xwc.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/no-xwc.patch new file mode 100644 index 0000000000..affb4a303e --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/no-xwc.patch @@ -0,0 +1,151 @@ +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00 ++++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00 +@@ -576,12 +576,14 @@ + GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2); + } + } ++#ifdef HAVE_XWC + else if (font->type == GDK_FONT_FONTSET) + { + XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font); + XmbDrawString (xdisplay, impl->xid, + fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length); + } ++#endif + else + g_error("undefined font type\n"); + } +@@ -613,6 +615,7 @@ + GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length); + g_free (text_8bit); + } ++#ifdef HAVE_XWC + else if (font->type == GDK_FONT_FONTSET) + { + if (sizeof(GdkWChar) == sizeof(wchar_t)) +@@ -633,6 +636,7 @@ + g_free (text_wchar); + } + } ++#endif + else + g_error("undefined font type\n"); + } +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00 ++++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00 +@@ -525,10 +525,12 @@ + width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2); + } + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + width = XmbTextEscapement (fontset, text, text_length); + break; ++#endif + default: + width = 0; + } +@@ -578,6 +580,7 @@ + width = 0; + } + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + if (sizeof(GdkWChar) == sizeof(wchar_t)) + { +@@ -595,6 +598,7 @@ + g_free (text_wchar); + } + break; ++#endif + default: + width = 0; + } +@@ -667,6 +671,7 @@ + if (descent) + *descent = overall.descent; + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + XmbTextExtents (fontset, text, text_length, &ink, &logical); +@@ -681,6 +686,7 @@ + if (descent) + *descent = ink.y + ink.height; + break; ++#endif + } + + } +@@ -753,6 +759,7 @@ + *descent = overall.descent; + break; + } ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + +@@ -780,6 +787,7 @@ + if (descent) + *descent = ink.y + ink.height; + break; ++#endif + } + + } +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00 ++++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00 +@@ -48,6 +48,7 @@ + void + _gdk_x11_initialize_locale (void) + { ++#ifdef HAVE_XWC + wchar_t result; + gchar *current_locale; + static char *last_locale = NULL; +@@ -93,7 +94,8 @@ + GDK_NOTE (XIM, + g_message ("%s multi-byte string functions.", + gdk_use_mb ? "Using" : "Not using")); +- ++#endif ++ + return; + } + +@@ -136,6 +138,7 @@ + { + gchar *mbstr; + ++#ifdef HAVE_XWC + if (gdk_use_mb) + { + GdkDisplay *display = find_a_display (); +@@ -178,6 +181,7 @@ + XFree (tpr.value); + } + else ++#endif + { + gint length = 0; + gint i; +@@ -210,6 +214,7 @@ + gint + gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max) + { ++#ifdef HAVE_XWC + if (gdk_use_mb) + { + GdkDisplay *display = find_a_display (); +@@ -242,6 +247,7 @@ + return len_cpy; + } + else ++#endif + { + gint i; + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/scroll-timings.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/scroll-timings.patch new file mode 100644 index 0000000000..a38b21dcc2 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/scroll-timings.patch @@ -0,0 +1,15 @@ +--- gtk+-2.4.4/gtk/gtkrange.c~ 2004-08-23 01:50:22.000000000 +0100 ++++ gtk+-2.4.4/gtk/gtkrange.c 2004-08-27 15:48:49.000000000 +0100 +@@ -35,9 +35,9 @@ + #include "gtkintl.h" + #include "gtkscrollbar.h" + +-#define SCROLL_INITIAL_DELAY 250 /* must hold button this long before ... */ +-#define SCROLL_LATER_DELAY 100 /* ... it starts repeating at this rate */ +-#define UPDATE_DELAY 300 /* Delay for queued update */ ++#define SCROLL_INITIAL_DELAY 500 /* must hold button this long before ... */ ++#define SCROLL_LATER_DELAY 200 /* ... it starts repeating at this rate */ ++#define UPDATE_DELAY 1000 /* Delay for queued update */ + + enum { + PROP_0, diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/single-click.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/single-click.patch new file mode 100644 index 0000000000..3bb208d4d6 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/single-click.patch @@ -0,0 +1,54 @@ +diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c gtk+-2.6.3/gtk/gtkcalendar.c +--- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 16:57:04 +01:00 ++++ gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 20:05:18 +01:00 +@@ -1023,9 +1023,11 @@ + } + + gtk_calendar_select_and_focus_day (calendar, day); +- } ++ ++ // This change causes the calendar to disappear after choosing a day ++/* } + else if (event->type == GDK_2BUTTON_PRESS) +- { ++ {*/ + private_data->in_drag = 0; + if (day_month == MONTH_CURRENT) + g_signal_emit (calendar, +diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c gtk+-2.6.3/gtk/gtkfilesel.c +--- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-06 16:57:07 +01:00 ++++ gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-07 13:40:32 +01:00 +@@ -2468,6 +2468,33 @@ + if (fs->last_selected != NULL) + g_free (fs->last_selected); + ++ // Single-click directory entry ++ if (new_names->len == 1) ++ { ++ GtkTreeView *tree_view; ++ GtkTreeModel *model; ++ GtkTreePath *path; ++ GtkTreeIter iter; ++ gboolean is_file; ++ ++ tree_view = gtk_tree_selection_get_tree_view (selection); ++ ++ if (gtk_tree_selection_get_selected (selection, &model, &iter)) ++ { ++ path = gtk_tree_model_get_path (model, &iter); ++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); ++ ++ if (!is_file) ++ { ++ gtk_file_selection_dir_activate (tree_view, path, ++ gtk_tree_view_get_column (tree_view, DIR_COLUMN), ++ user_data); ++ } ++ ++ gtk_tree_path_free (path); ++ } ++ } ++ + fs->last_selected = g_strdup (g_ptr_array_index (new_names, index)); + filename = get_real_filename (fs->last_selected, FALSE); + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/small-gtkfilesel.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/small-gtkfilesel.patch new file mode 100644 index 0000000000..20bf4cf366 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/small-gtkfilesel.patch @@ -0,0 +1,267 @@ +diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c +--- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 ++++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100 +@@ -68,6 +68,7 @@ + #include "gtkprivate.h" + #include "gtkscrolledwindow.h" + #include "gtkstock.h" ++#include "gtksignal.h" + #include "gtktreeselection.h" + #include "gtktreeview.h" + #include "gtkvbox.h" +@@ -77,6 +78,7 @@ + #include "gtkmessagedialog.h" + #include "gtkdnd.h" + #include "gtkeventbox.h" ++#include "gtkimage.h" + + #undef GTK_DISABLE_DEPRECATED + #include "gtkoptionmenu.h" +@@ -245,7 +247,8 @@ + }; + + enum { +- DIR_COLUMN ++ DIR_COLUMN, ++ ISFILE_COLUMN + }; + + enum { +@@ -400,6 +403,12 @@ + GtkTreePath *path, + GtkTreeViewColumn *column, + gpointer user_data); ++ ++static void gtk_file_selection_activate (GtkTreeView *tree_view, ++ GtkTreePath *path, ++ GtkTreeViewColumn *column, ++ gpointer user_data); ++ + static void gtk_file_selection_file_changed (GtkTreeSelection *selection, + gpointer user_data); + static void gtk_file_selection_dir_activate (GtkTreeView *tree_view, +@@ -419,6 +428,7 @@ + static void gtk_file_selection_create_dir (GtkWidget *widget, gpointer data); + static void gtk_file_selection_delete_file (GtkWidget *widget, gpointer data); + static void gtk_file_selection_rename_file (GtkWidget *widget, gpointer data); ++static void gtk_file_selection_style_set (GtkWidget *widget, GtkStyle *prev_style); + + static void free_selected_names (GPtrArray *names); + +@@ -578,6 +588,23 @@ + G_PARAM_WRITABLE)); + object_class->destroy = gtk_file_selection_destroy; + widget_class->map = gtk_file_selection_map; ++ widget_class->style_set = gtk_file_selection_style_set; ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("show_fileops_default", ++ _("Show fileop buttons by default"), ++ _("Whether file operation buttons are shown by default"), ++ TRUE, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("border_width", ++ _("Border width"), ++ _("Width of border around the main dialog area"), ++ 0, ++ G_MAXINT, ++ 10, ++ G_PARAM_READABLE)); + } + + static void gtk_file_selection_set_property (GObject *object, +@@ -649,7 +676,29 @@ + gtk_widget_grab_default (widget); + return FALSE; + } +- ++ ++static void ++gtk_file_selection_style_set (GtkWidget *filesel, ++ GtkStyle *prev_style) ++{ ++ gboolean show_fileops; ++ gint border_width; ++ ++ gtk_widget_style_get (filesel, ++ "show_fileops_default", ++ &show_fileops, ++ "border_width", ++ &border_width, ++ NULL); ++ ++ gtk_container_set_border_width (GTK_CONTAINER (filesel), border_width); ++ ++ if (show_fileops) ++ gtk_file_selection_show_fileop_buttons (GTK_FILE_SELECTION (filesel)); ++ else ++ gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (filesel)); ++} ++ + static void + gtk_file_selection_init (GtkFileSelection *filesel) + { +@@ -674,17 +723,15 @@ + + /* The dialog-sized vertical box */ + filesel->main_vbox = dialog->vbox; +- gtk_container_set_border_width (GTK_CONTAINER (filesel), 10); + + /* The horizontal box containing create, rename etc. buttons */ + filesel->button_area = gtk_hbutton_box_new (); + gtk_button_box_set_layout (GTK_BUTTON_BOX (filesel->button_area), GTK_BUTTONBOX_START); +- gtk_box_set_spacing (GTK_BOX (filesel->button_area), 0); + gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->button_area, + FALSE, FALSE, 0); + gtk_widget_show (filesel->button_area); + +- gtk_file_selection_show_fileop_buttons (filesel); ++ gtk_file_selection_style_set (GTK_WIDGET (filesel), NULL); + + /* hbox for pulldown menu */ + pulldown_hbox = gtk_hbox_new (TRUE, 5); +@@ -723,25 +770,32 @@ + + /* The directories list */ + +- model = gtk_list_store_new (1, G_TYPE_STRING); ++ model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); /* MA */ + filesel->dir_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); + g_object_unref (model); + +- column = gtk_tree_view_column_new_with_attributes (_("Folders"), ++ column = gtk_tree_view_column_new_with_attributes (/*_("Folders")*/ NULL, + gtk_cell_renderer_text_new (), + "text", DIR_COLUMN, + NULL); + label = gtk_label_new_with_mnemonic (_("Fol_ders")); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->dir_list); + gtk_widget_show (label); +- gtk_tree_view_column_set_widget (column, label); ++ ++ /* gtk_tree_view_column_set_widget (column, label); */ ++ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (filesel->dir_list), FALSE); ++ + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->dir_list), column); + + gtk_widget_set_size_request (filesel->dir_list, + DIR_LIST_WIDTH, DIR_LIST_HEIGHT); + g_signal_connect (filesel->dir_list, "row_activated", +- G_CALLBACK (gtk_file_selection_dir_activate), filesel); ++ G_CALLBACK (gtk_file_selection_activate), filesel); ++ ++ g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->dir_list)), "changed", ++ G_CALLBACK (gtk_file_selection_file_changed), filesel); ++ + + /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->dir_list)); */ + +@@ -758,41 +812,6 @@ + gtk_widget_show (filesel->dir_list); + gtk_widget_show (scrolled_win); + +- /* The files list */ +- model = gtk_list_store_new (1, G_TYPE_STRING); +- filesel->file_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); +- g_object_unref (model); +- +- column = gtk_tree_view_column_new_with_attributes (_("Files"), +- gtk_cell_renderer_text_new (), +- "text", FILE_COLUMN, +- NULL); +- label = gtk_label_new_with_mnemonic (_("_Files")); +- gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->file_list); +- gtk_widget_show (label); +- gtk_tree_view_column_set_widget (column, label); +- gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); +- gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->file_list), column); +- +- gtk_widget_set_size_request (filesel->file_list, +- FILE_LIST_WIDTH, FILE_LIST_HEIGHT); +- g_signal_connect (filesel->file_list, "row_activated", +- G_CALLBACK (gtk_file_selection_file_activate), filesel); +- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)), "changed", +- G_CALLBACK (gtk_file_selection_file_changed), filesel); +- +- /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->file_list)); */ +- +- scrolled_win = gtk_scrolled_window_new (NULL, NULL); +- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN); +- gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->file_list); +- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), +- GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); +- gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0); +- gtk_container_add (GTK_CONTAINER (list_container), scrolled_win); +- gtk_widget_show (filesel->file_list); +- gtk_widget_show (scrolled_win); +- + /* action area for packing buttons into. */ + filesel->action_area = gtk_hbox_new (TRUE, 0); + gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->action_area, +@@ -2008,6 +2027,23 @@ + } + + static void ++gtk_file_selection_activate (GtkTreeView *tree_view, ++ GtkTreePath *path, ++ GtkTreeViewColumn *column, ++ gpointer user_data) ++{ ++ GtkTreeModel *model = gtk_tree_view_get_model (tree_view); ++ GtkTreeIter iter; ++ gboolean is_file; ++ ++ gtk_tree_model_get_iter (model, &iter, path); ++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); ++ ++ if (! is_file) ++ gtk_file_selection_dir_activate (tree_view, path, column, user_data); ++} ++ ++static void + gtk_file_selection_file_activate (GtkTreeView *tree_view, + GtkTreePath *path, + GtkTreeViewColumn *column, +@@ -2103,7 +2139,6 @@ + PossibleCompletion* poss; + GtkTreeIter iter; + GtkListStore *dir_model; +- GtkListStore *file_model; + gchar* filename; + gchar* rem_path = rel_path; + gchar* sel_text; +@@ -2125,10 +2160,8 @@ + g_assert (cmpl_state->reference_dir); + + dir_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->dir_list))); +- file_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->file_list))); + + gtk_list_store_clear (dir_model); +- gtk_list_store_clear (file_model); + + /* Set the dir list to include ./ and ../ */ + gtk_list_store_append (dir_model, &iter); +@@ -2150,13 +2183,17 @@ + strcmp (filename, ".." G_DIR_SEPARATOR_S) != 0) + { + gtk_list_store_append (dir_model, &iter); +- gtk_list_store_set (dir_model, &iter, DIR_COLUMN, filename, -1); ++ gtk_list_store_set (dir_model, &iter, ++ DIR_COLUMN, filename, ++ ISFILE_COLUMN, FALSE, -1); + } + } + else + { +- gtk_list_store_append (file_model, &iter); +- gtk_list_store_set (file_model, &iter, DIR_COLUMN, filename, -1); ++ gtk_list_store_append (dir_model, &iter); ++ gtk_list_store_set (dir_model, &iter, ++ DIR_COLUMN, filename, ++ ISFILE_COLUMN, TRUE, -1); + } + } + diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/spinbutton.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/spinbutton.patch new file mode 100644 index 0000000000..8ad7507af0 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/spinbutton.patch @@ -0,0 +1,128 @@ +--- gtk+-2.4.3/gtk/gtkspinbutton.c.old 2004-04-22 14:49:27.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtkspinbutton.c 2004-06-30 21:48:18.000000000 +0100 +@@ -733,7 +733,7 @@ + + spin = GTK_SPIN_BUTTON (widget); + arrow_size = spin_button_get_arrow_size (spin); +- panel_width = arrow_size + 2 * widget->style->xthickness; ++ panel_width = (2 * arrow_size) + 4 * widget->style->xthickness; + + widget->allocation = *allocation; + +@@ -866,19 +866,16 @@ + { + width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness; + ++ y = widget->style->ythickness; ++ height = widget->requisition.height - (2 * y); ++ + if (arrow_type == GTK_ARROW_UP) + { + x = 0; +- y = 0; +- +- height = widget->requisition.height / 2; + } + else + { +- x = 0; +- y = widget->requisition.height / 2; +- +- height = (widget->requisition.height + 1) / 2; ++ x = width; + } + + if (spin_button_at_limit (spin_button, arrow_type)) +@@ -908,32 +905,17 @@ + shadow_type = GTK_SHADOW_OUT; + } + } +- ++ + gtk_paint_box (widget->style, spin_button->panel, + state_type, shadow_type, + NULL, widget, +- (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down", ++ NULL, + x, y, width, height); + + height = widget->requisition.height; + +- if (arrow_type == GTK_ARROW_DOWN) +- { +- y = height / 2; +- height = height - y - 2; +- } +- else +- { +- y = 2; +- height = height / 2 - 2; +- } +- + width -= 3; +- +- if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) +- x = 2; +- else +- x = 1; ++ height -= 3; + + w = width / 2; + w -= w % 2 - 1; /* force odd */ +@@ -1108,7 +1090,7 @@ + if (GTK_ENTRY (widget)->editable) + gtk_spin_button_update (spin); + +- if (event->y <= widget->requisition.height / 2) ++ if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness)) + { + if (event->button == 1) + start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment); +@@ -1143,44 +1125,11 @@ + + arrow_size = spin_button_get_arrow_size (spin); + +- if (event->button == spin->button) +- { +- int click_child = spin->click_child; ++ gtk_spin_button_stop_spinning (spin); + +- gtk_spin_button_stop_spinning (spin); +- +- if (event->button == 3) +- { +- if (event->y >= 0 && event->x >= 0 && +- event->y <= widget->requisition.height && +- event->x <= arrow_size + 2 * widget->style->xthickness) +- { +- if (click_child == GTK_ARROW_UP && +- event->y <= widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->upper - spin->adjustment->value; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, diff); +- } +- else if (click_child == GTK_ARROW_DOWN && +- event->y > widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->value - spin->adjustment->lower; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, -diff); +- } +- } +- } +- spin_button_redraw (spin); ++ spin_button_redraw (spin); + +- return TRUE; +- } +- else +- return GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, event); ++ return TRUE; + } + + static gint diff --git a/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/xsettings.patch b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/xsettings.patch new file mode 100644 index 0000000000..b63e262d34 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/xsettings.patch @@ -0,0 +1,16 @@ +--- gtk+-2.4.4/gdk/x11/gdkevents-x11.c.old Sun Aug 22 17:14:00 2004 ++++ gtk+-2.4.4/gdk/x11/gdkevents-x11.c Sun Aug 22 17:14:00 2004 +@@ -2827,10 +2827,9 @@ + { + GdkScreenX11 *screen = data; + +- if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent)) +- return GDK_FILTER_REMOVE; +- else +- return GDK_FILTER_CONTINUE; ++ xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent); ++ ++ return GDK_FILTER_CONTINUE; + } + + static void diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/automake-lossage.patch b/openembedded/packages/gtk+/gtk+-2.6.7/automake-lossage.patch new file mode 100644 index 0000000000..0d423ddbb9 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/automake-lossage.patch @@ -0,0 +1,24 @@ +--- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100 ++++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100 +@@ -52,21 +52,5 @@ + + dist-hook: html + cp -Rp $(srcdir)/html $(distdir) +-else +-html: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "***" +- +-pdf: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "***" +- +-dist-hook: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "*** DISTRIBUTION IS INCOMPLETE" +- echo "***" + endif + diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/disable-tooltips.patch b/openembedded/packages/gtk+/gtk+-2.6.7/disable-tooltips.patch new file mode 100644 index 0000000000..d71d839c3c --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/disable-tooltips.patch @@ -0,0 +1,11 @@ +--- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100 +@@ -118,7 +118,7 @@ + tooltips->tips_data_list = NULL; + + tooltips->delay = DEFAULT_DELAY; +- tooltips->enabled = TRUE; ++ tooltips->enabled = FALSE; + tooltips->timer_tag = 0; + tooltips->use_sticky_delay = FALSE; + tooltips->last_popdown.tv_sec = -1; diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/gtk+-handhelds.patch b/openembedded/packages/gtk+/gtk+-2.6.7/gtk+-handhelds.patch new file mode 100644 index 0000000000..20481f059b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/gtk+-handhelds.patch @@ -0,0 +1,236 @@ +--- gtk+-2.4.1/gtk/gtkarrow.c 2004-03-13 09:51:13.000000000 +1100 ++++ gtk+-2.4.1/gtk/gtkarrow.c 2004-05-26 14:52:17.000000000 +1000 +@@ -29,7 +29,7 @@ + #include "gtkarrow.h" + #include "gtkintl.h" + +-#define MIN_ARROW_SIZE 15 ++#define MIN_ARROW_SIZE 7 + + enum { + PROP_0, +@@ -53,6 +53,8 @@ + guint prop_id, + GValue *value, + GParamSpec *pspec); ++static void gtk_arrow_size_request (GtkWidget *arrow, ++ GtkRequisition *requisition); + + GType + gtk_arrow_get_type (void) +@@ -111,6 +113,7 @@ + G_PARAM_READABLE | G_PARAM_WRITABLE)); + + widget_class->expose_event = gtk_arrow_expose; ++ widget_class->size_request = gtk_arrow_size_request; + } + + static void +@@ -166,13 +169,18 @@ + } + + static void ++gtk_arrow_size_request (GtkWidget *arrow, ++ GtkRequisition *requisition) ++{ ++ requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; ++ requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; ++} ++ ++static void + gtk_arrow_init (GtkArrow *arrow) + { + GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW); + +- GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; +- GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; +- + arrow->arrow_type = GTK_ARROW_RIGHT; + arrow->shadow_type = GTK_SHADOW_OUT; + } +--- gtk+-2.4.1/gtk/gtkcalendar.c 2004-03-06 14:37:26.000000000 +1100 ++++ gtk+-2.4.1/gtk/gtkcalendar.c 2004-05-26 14:58:57.000000000 +1000 +@@ -340,6 +340,9 @@ + static void gtk_calendar_select_and_focus_day (GtkCalendar *calendar, + guint day); + ++static void gtk_calendar_do_select_day (GtkCalendar *calendar, ++ guint day); ++ + static void gtk_calendar_paint_arrow (GtkWidget *widget, + guint arrow); + static void gtk_calendar_paint_day_num (GtkWidget *widget, +@@ -861,13 +864,13 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else + { + if (calendar->selected_day < 0) + calendar->selected_day = calendar->selected_day + 1 + month_length[leap (calendar->year)][calendar->month + 1]; +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + } + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); +@@ -908,10 +911,10 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); +@@ -939,10 +942,10 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); +@@ -974,10 +977,10 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); +@@ -2480,9 +2483,9 @@ + return TRUE; + } + +-void +-gtk_calendar_select_day (GtkCalendar *calendar, +- guint day) ++static void ++gtk_calendar_do_select_day (GtkCalendar *calendar, ++ guint day) + { + g_return_if_fail (GTK_IS_CALENDAR (calendar)); + g_return_if_fail (day <= 31); +@@ -2499,6 +2502,13 @@ + if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar))) + gtk_calendar_paint_day_num (GTK_WIDGET (calendar), selected_day); + } ++} ++ ++void ++gtk_calendar_select_day (GtkCalendar *calendar, ++ guint day) ++{ ++ gtk_calendar_do_select_day (calendar, day); + + calendar->selected_day = day; + +--- gtk+-2.4.1/gtk/gtkentry.c 2004-04-22 08:08:08.000000000 +1000 ++++ gtk+-2.4.1/gtk/gtkentry.c 2004-05-26 14:52:17.000000000 +1000 +@@ -557,6 +557,15 @@ + 0.0, + G_PARAM_READABLE | G_PARAM_WRITABLE)); + ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("min_width", ++ _("Minimum width"), ++ _("Minimum width of the entry field"), ++ 0, ++ G_MAXINT, ++ MIN_ENTRY_WIDTH, ++ G_PARAM_READABLE)); ++ + signals[POPULATE_POPUP] = + g_signal_new ("populate_popup", + G_OBJECT_CLASS_TYPE (gobject_class), +@@ -1124,7 +1133,7 @@ + { + GtkEntry *entry = GTK_ENTRY (widget); + PangoFontMetrics *metrics; +- gint xborder, yborder; ++ gint xborder, yborder, min_width; + PangoContext *context; + + gtk_widget_ensure_style (widget); +@@ -1140,9 +1149,11 @@ + + xborder += INNER_BORDER; + yborder += INNER_BORDER; +- ++ ++ gtk_widget_style_get (widget, "min_width", &min_width, NULL); ++ + if (entry->width_chars < 0) +- requisition->width = MIN_ENTRY_WIDTH + xborder * 2; ++ requisition->width = min_width + xborder * 2; + else + { + gint char_width = pango_font_metrics_get_approximate_char_width (metrics); +--- gtk+-2.4.1/gtk/gtkrange.c 2004-03-06 14:38:08.000000000 +1100 ++++ gtk+-2.4.1/gtk/gtkrange.c 2004-05-26 14:52:17.000000000 +1000 +@@ -180,6 +180,7 @@ + static GtkWidgetClass *parent_class = NULL; + static guint signals[LAST_SIGNAL]; + ++static GdkAtom recognize_protocols_atom, atom_atom; + + GType + gtk_range_get_type (void) +@@ -220,6 +221,9 @@ + object_class = (GtkObjectClass*) class; + widget_class = (GtkWidgetClass*) class; + ++ recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE); ++ atom_atom = gdk_atom_intern ("ATOM", FALSE); ++ + parent_class = g_type_class_peek_parent (class); + + gobject_class->set_property = gtk_range_set_property; +@@ -815,6 +819,12 @@ + &attributes, attributes_mask); + gdk_window_set_user_data (range->event_window, range); + ++ gdk_property_change (range->event_window, ++ recognize_protocols_atom, ++ atom_atom, ++ 32, GDK_PROP_MODE_REPLACE, ++ NULL, 0); ++ + widget->style = gtk_style_attach (widget->style, widget->window); + } + +@@ -1186,7 +1196,7 @@ + + /* ignore presses when we're already doing something else. */ + if (range->layout->grab_location != MOUSE_OUTSIDE) +- return FALSE; ++ return TRUE; + + range->layout->mouse_x = event->x; + range->layout->mouse_y = event->y; +@@ -1364,7 +1374,7 @@ + return TRUE; + } + +- return FALSE; ++ return TRUE; + } + + /** diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/gtklabel-resize-patch b/openembedded/packages/gtk+/gtk+-2.6.7/gtklabel-resize-patch new file mode 100644 index 0000000000..df29656343 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/gtklabel-resize-patch @@ -0,0 +1,10 @@ +--- gtk+-2.4.3/gtk/gtklabel.c~ 2004-06-11 13:50:34.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtklabel.c 2004-07-05 13:33:57.000000000 +0100 +@@ -1623,6 +1623,7 @@ + + /* We have to clear the layout, fonts etc. may have changed */ + gtk_label_clear_layout (label); ++ gtk_widget_queue_resize (GTK_WIDGET (label)); + } + + static void diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/hardcoded_libtool.patch b/openembedded/packages/gtk+/gtk+-2.6.7/hardcoded_libtool.patch new file mode 100644 index 0000000000..b2afddcc61 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/hardcoded_libtool.patch @@ -0,0 +1,29 @@ +--- gtk+-2.6.0/configure.in.old 2005-01-01 16:23:45.000000000 +0000 ++++ gtk+-2.6.0/configure.in 2005-01-01 16:24:03.000000000 +0000 +@@ -360,7 +360,7 @@ + AC_MSG_CHECKING([Whether to write dependencies into .pc files]) + case $enable_explicit_deps in + auto) +- deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh` ++ deplib_check_method=`($host_alias-libtool --config; echo eval echo \\$deplib_check_method) | sh` + if test "X$deplib_check_method" = Xnone || test "x$enable_static" = xyes ; then + enable_explicit_deps=yes + else +@@ -688,7 +688,7 @@ + dnl Now we check to see if our libtool supports shared lib deps + dnl (in a rather ugly way even) + if $dynworks; then +- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config" ++ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config" + pixbuf_deplibs_check=`$pixbuf_libtool_config | \ + grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \ + sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'` +@@ -1512,7 +1512,7 @@ + # + # We are using gmodule-no-export now, but I'm leaving the stripping + # code in place for now, since pango and atk still require gmodule. +-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` + if test -n "$export_dynamic"; then + GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"` + GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"` diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/menu-deactivate.patch b/openembedded/packages/gtk+/gtk+-2.6.7/menu-deactivate.patch new file mode 100644 index 0000000000..29e665fbf3 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/menu-deactivate.patch @@ -0,0 +1,50 @@ +--- gtk+-2.4.4/gtk/gtkmenushell.c.old Thu Aug 26 23:45:28 2004 ++++ gtk+-2.4.4/gtk/gtkmenushell.c Fri Aug 27 00:13:33 2004 +@@ -37,7 +37,7 @@ + #include "gtktearoffmenuitem.h" + #include "gtkwindow.h" + +-#define MENU_SHELL_TIMEOUT 500 ++#define MENU_SHELL_TIMEOUT 2000 + + enum { + DEACTIVATE, +@@ -156,6 +156,7 @@ + static GtkContainerClass *parent_class = NULL; + static guint menu_shell_signals[LAST_SIGNAL] = { 0 }; + ++static int last_crossing_time; + + GType + gtk_menu_shell_get_type (void) +@@ -418,6 +419,7 @@ + gtk_grab_add (GTK_WIDGET (menu_shell)); + menu_shell->have_grab = TRUE; + menu_shell->active = TRUE; ++ last_crossing_time = 0; + } + } + +@@ -545,6 +547,13 @@ + menu_shell->activate_time = 0; + deactivate = FALSE; + } ++ ++ if (last_crossing_time != 0 ++ && ((event->time - last_crossing_time) < 500)) ++ { ++ last_crossing_time = 0; ++ deactivate = FALSE; ++ } + + if (deactivate) + { +@@ -597,6 +606,8 @@ + if (menu_shell->active) + { + menu_item = gtk_get_event_widget ((GdkEvent*) event); ++ ++ last_crossing_time = event->time; + + if (!menu_item || + (GTK_IS_MENU_ITEM (menu_item) && diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/no-demos.patch b/openembedded/packages/gtk+/gtk+-2.6.7/no-demos.patch new file mode 100644 index 0000000000..2f10a30dda --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/no-demos.patch @@ -0,0 +1,10 @@ +--- gtk+-2.4.1/Makefile.am~ 2004-01-17 22:15:56.000000000 +0000 ++++ gtk+-2.4.1/Makefile.am 2004-05-08 12:25:32.000000000 +0100 +@@ -1,6 +1,6 @@ + ## Makefile.am for GTK+ + +-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib ++SRC_SUBDIRS = gdk-pixbuf gdk gtk modules tests contrib + SUBDIRS = po po-properties $(SRC_SUBDIRS) docs build m4macros + + # require automake 1.4 diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/no-xwc.patch b/openembedded/packages/gtk+/gtk+-2.6.7/no-xwc.patch new file mode 100644 index 0000000000..affb4a303e --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/no-xwc.patch @@ -0,0 +1,151 @@ +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00 ++++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00 +@@ -576,12 +576,14 @@ + GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2); + } + } ++#ifdef HAVE_XWC + else if (font->type == GDK_FONT_FONTSET) + { + XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font); + XmbDrawString (xdisplay, impl->xid, + fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length); + } ++#endif + else + g_error("undefined font type\n"); + } +@@ -613,6 +615,7 @@ + GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length); + g_free (text_8bit); + } ++#ifdef HAVE_XWC + else if (font->type == GDK_FONT_FONTSET) + { + if (sizeof(GdkWChar) == sizeof(wchar_t)) +@@ -633,6 +636,7 @@ + g_free (text_wchar); + } + } ++#endif + else + g_error("undefined font type\n"); + } +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00 ++++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00 +@@ -525,10 +525,12 @@ + width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2); + } + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + width = XmbTextEscapement (fontset, text, text_length); + break; ++#endif + default: + width = 0; + } +@@ -578,6 +580,7 @@ + width = 0; + } + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + if (sizeof(GdkWChar) == sizeof(wchar_t)) + { +@@ -595,6 +598,7 @@ + g_free (text_wchar); + } + break; ++#endif + default: + width = 0; + } +@@ -667,6 +671,7 @@ + if (descent) + *descent = overall.descent; + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + XmbTextExtents (fontset, text, text_length, &ink, &logical); +@@ -681,6 +686,7 @@ + if (descent) + *descent = ink.y + ink.height; + break; ++#endif + } + + } +@@ -753,6 +759,7 @@ + *descent = overall.descent; + break; + } ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + +@@ -780,6 +787,7 @@ + if (descent) + *descent = ink.y + ink.height; + break; ++#endif + } + + } +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00 ++++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00 +@@ -48,6 +48,7 @@ + void + _gdk_x11_initialize_locale (void) + { ++#ifdef HAVE_XWC + wchar_t result; + gchar *current_locale; + static char *last_locale = NULL; +@@ -93,7 +94,8 @@ + GDK_NOTE (XIM, + g_message ("%s multi-byte string functions.", + gdk_use_mb ? "Using" : "Not using")); +- ++#endif ++ + return; + } + +@@ -136,6 +138,7 @@ + { + gchar *mbstr; + ++#ifdef HAVE_XWC + if (gdk_use_mb) + { + GdkDisplay *display = find_a_display (); +@@ -178,6 +181,7 @@ + XFree (tpr.value); + } + else ++#endif + { + gint length = 0; + gint i; +@@ -210,6 +214,7 @@ + gint + gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max) + { ++#ifdef HAVE_XWC + if (gdk_use_mb) + { + GdkDisplay *display = find_a_display (); +@@ -242,6 +247,7 @@ + return len_cpy; + } + else ++#endif + { + gint i; + diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/scroll-timings.patch b/openembedded/packages/gtk+/gtk+-2.6.7/scroll-timings.patch new file mode 100644 index 0000000000..a38b21dcc2 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/scroll-timings.patch @@ -0,0 +1,15 @@ +--- gtk+-2.4.4/gtk/gtkrange.c~ 2004-08-23 01:50:22.000000000 +0100 ++++ gtk+-2.4.4/gtk/gtkrange.c 2004-08-27 15:48:49.000000000 +0100 +@@ -35,9 +35,9 @@ + #include "gtkintl.h" + #include "gtkscrollbar.h" + +-#define SCROLL_INITIAL_DELAY 250 /* must hold button this long before ... */ +-#define SCROLL_LATER_DELAY 100 /* ... it starts repeating at this rate */ +-#define UPDATE_DELAY 300 /* Delay for queued update */ ++#define SCROLL_INITIAL_DELAY 500 /* must hold button this long before ... */ ++#define SCROLL_LATER_DELAY 200 /* ... it starts repeating at this rate */ ++#define UPDATE_DELAY 1000 /* Delay for queued update */ + + enum { + PROP_0, diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/single-click.patch b/openembedded/packages/gtk+/gtk+-2.6.7/single-click.patch new file mode 100644 index 0000000000..3bb208d4d6 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/single-click.patch @@ -0,0 +1,54 @@ +diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c gtk+-2.6.3/gtk/gtkcalendar.c +--- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 16:57:04 +01:00 ++++ gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 20:05:18 +01:00 +@@ -1023,9 +1023,11 @@ + } + + gtk_calendar_select_and_focus_day (calendar, day); +- } ++ ++ // This change causes the calendar to disappear after choosing a day ++/* } + else if (event->type == GDK_2BUTTON_PRESS) +- { ++ {*/ + private_data->in_drag = 0; + if (day_month == MONTH_CURRENT) + g_signal_emit (calendar, +diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c gtk+-2.6.3/gtk/gtkfilesel.c +--- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-06 16:57:07 +01:00 ++++ gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-07 13:40:32 +01:00 +@@ -2468,6 +2468,33 @@ + if (fs->last_selected != NULL) + g_free (fs->last_selected); + ++ // Single-click directory entry ++ if (new_names->len == 1) ++ { ++ GtkTreeView *tree_view; ++ GtkTreeModel *model; ++ GtkTreePath *path; ++ GtkTreeIter iter; ++ gboolean is_file; ++ ++ tree_view = gtk_tree_selection_get_tree_view (selection); ++ ++ if (gtk_tree_selection_get_selected (selection, &model, &iter)) ++ { ++ path = gtk_tree_model_get_path (model, &iter); ++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); ++ ++ if (!is_file) ++ { ++ gtk_file_selection_dir_activate (tree_view, path, ++ gtk_tree_view_get_column (tree_view, DIR_COLUMN), ++ user_data); ++ } ++ ++ gtk_tree_path_free (path); ++ } ++ } ++ + fs->last_selected = g_strdup (g_ptr_array_index (new_names, index)); + filename = get_real_filename (fs->last_selected, FALSE); + diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/small-gtkfilesel.patch b/openembedded/packages/gtk+/gtk+-2.6.7/small-gtkfilesel.patch new file mode 100644 index 0000000000..20bf4cf366 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/small-gtkfilesel.patch @@ -0,0 +1,267 @@ +diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c +--- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 ++++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100 +@@ -68,6 +68,7 @@ + #include "gtkprivate.h" + #include "gtkscrolledwindow.h" + #include "gtkstock.h" ++#include "gtksignal.h" + #include "gtktreeselection.h" + #include "gtktreeview.h" + #include "gtkvbox.h" +@@ -77,6 +78,7 @@ + #include "gtkmessagedialog.h" + #include "gtkdnd.h" + #include "gtkeventbox.h" ++#include "gtkimage.h" + + #undef GTK_DISABLE_DEPRECATED + #include "gtkoptionmenu.h" +@@ -245,7 +247,8 @@ + }; + + enum { +- DIR_COLUMN ++ DIR_COLUMN, ++ ISFILE_COLUMN + }; + + enum { +@@ -400,6 +403,12 @@ + GtkTreePath *path, + GtkTreeViewColumn *column, + gpointer user_data); ++ ++static void gtk_file_selection_activate (GtkTreeView *tree_view, ++ GtkTreePath *path, ++ GtkTreeViewColumn *column, ++ gpointer user_data); ++ + static void gtk_file_selection_file_changed (GtkTreeSelection *selection, + gpointer user_data); + static void gtk_file_selection_dir_activate (GtkTreeView *tree_view, +@@ -419,6 +428,7 @@ + static void gtk_file_selection_create_dir (GtkWidget *widget, gpointer data); + static void gtk_file_selection_delete_file (GtkWidget *widget, gpointer data); + static void gtk_file_selection_rename_file (GtkWidget *widget, gpointer data); ++static void gtk_file_selection_style_set (GtkWidget *widget, GtkStyle *prev_style); + + static void free_selected_names (GPtrArray *names); + +@@ -578,6 +588,23 @@ + G_PARAM_WRITABLE)); + object_class->destroy = gtk_file_selection_destroy; + widget_class->map = gtk_file_selection_map; ++ widget_class->style_set = gtk_file_selection_style_set; ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("show_fileops_default", ++ _("Show fileop buttons by default"), ++ _("Whether file operation buttons are shown by default"), ++ TRUE, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("border_width", ++ _("Border width"), ++ _("Width of border around the main dialog area"), ++ 0, ++ G_MAXINT, ++ 10, ++ G_PARAM_READABLE)); + } + + static void gtk_file_selection_set_property (GObject *object, +@@ -649,7 +676,29 @@ + gtk_widget_grab_default (widget); + return FALSE; + } +- ++ ++static void ++gtk_file_selection_style_set (GtkWidget *filesel, ++ GtkStyle *prev_style) ++{ ++ gboolean show_fileops; ++ gint border_width; ++ ++ gtk_widget_style_get (filesel, ++ "show_fileops_default", ++ &show_fileops, ++ "border_width", ++ &border_width, ++ NULL); ++ ++ gtk_container_set_border_width (GTK_CONTAINER (filesel), border_width); ++ ++ if (show_fileops) ++ gtk_file_selection_show_fileop_buttons (GTK_FILE_SELECTION (filesel)); ++ else ++ gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (filesel)); ++} ++ + static void + gtk_file_selection_init (GtkFileSelection *filesel) + { +@@ -674,17 +723,15 @@ + + /* The dialog-sized vertical box */ + filesel->main_vbox = dialog->vbox; +- gtk_container_set_border_width (GTK_CONTAINER (filesel), 10); + + /* The horizontal box containing create, rename etc. buttons */ + filesel->button_area = gtk_hbutton_box_new (); + gtk_button_box_set_layout (GTK_BUTTON_BOX (filesel->button_area), GTK_BUTTONBOX_START); +- gtk_box_set_spacing (GTK_BOX (filesel->button_area), 0); + gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->button_area, + FALSE, FALSE, 0); + gtk_widget_show (filesel->button_area); + +- gtk_file_selection_show_fileop_buttons (filesel); ++ gtk_file_selection_style_set (GTK_WIDGET (filesel), NULL); + + /* hbox for pulldown menu */ + pulldown_hbox = gtk_hbox_new (TRUE, 5); +@@ -723,25 +770,32 @@ + + /* The directories list */ + +- model = gtk_list_store_new (1, G_TYPE_STRING); ++ model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); /* MA */ + filesel->dir_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); + g_object_unref (model); + +- column = gtk_tree_view_column_new_with_attributes (_("Folders"), ++ column = gtk_tree_view_column_new_with_attributes (/*_("Folders")*/ NULL, + gtk_cell_renderer_text_new (), + "text", DIR_COLUMN, + NULL); + label = gtk_label_new_with_mnemonic (_("Fol_ders")); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->dir_list); + gtk_widget_show (label); +- gtk_tree_view_column_set_widget (column, label); ++ ++ /* gtk_tree_view_column_set_widget (column, label); */ ++ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (filesel->dir_list), FALSE); ++ + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->dir_list), column); + + gtk_widget_set_size_request (filesel->dir_list, + DIR_LIST_WIDTH, DIR_LIST_HEIGHT); + g_signal_connect (filesel->dir_list, "row_activated", +- G_CALLBACK (gtk_file_selection_dir_activate), filesel); ++ G_CALLBACK (gtk_file_selection_activate), filesel); ++ ++ g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->dir_list)), "changed", ++ G_CALLBACK (gtk_file_selection_file_changed), filesel); ++ + + /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->dir_list)); */ + +@@ -758,41 +812,6 @@ + gtk_widget_show (filesel->dir_list); + gtk_widget_show (scrolled_win); + +- /* The files list */ +- model = gtk_list_store_new (1, G_TYPE_STRING); +- filesel->file_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); +- g_object_unref (model); +- +- column = gtk_tree_view_column_new_with_attributes (_("Files"), +- gtk_cell_renderer_text_new (), +- "text", FILE_COLUMN, +- NULL); +- label = gtk_label_new_with_mnemonic (_("_Files")); +- gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->file_list); +- gtk_widget_show (label); +- gtk_tree_view_column_set_widget (column, label); +- gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); +- gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->file_list), column); +- +- gtk_widget_set_size_request (filesel->file_list, +- FILE_LIST_WIDTH, FILE_LIST_HEIGHT); +- g_signal_connect (filesel->file_list, "row_activated", +- G_CALLBACK (gtk_file_selection_file_activate), filesel); +- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)), "changed", +- G_CALLBACK (gtk_file_selection_file_changed), filesel); +- +- /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->file_list)); */ +- +- scrolled_win = gtk_scrolled_window_new (NULL, NULL); +- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN); +- gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->file_list); +- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), +- GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); +- gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0); +- gtk_container_add (GTK_CONTAINER (list_container), scrolled_win); +- gtk_widget_show (filesel->file_list); +- gtk_widget_show (scrolled_win); +- + /* action area for packing buttons into. */ + filesel->action_area = gtk_hbox_new (TRUE, 0); + gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->action_area, +@@ -2008,6 +2027,23 @@ + } + + static void ++gtk_file_selection_activate (GtkTreeView *tree_view, ++ GtkTreePath *path, ++ GtkTreeViewColumn *column, ++ gpointer user_data) ++{ ++ GtkTreeModel *model = gtk_tree_view_get_model (tree_view); ++ GtkTreeIter iter; ++ gboolean is_file; ++ ++ gtk_tree_model_get_iter (model, &iter, path); ++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); ++ ++ if (! is_file) ++ gtk_file_selection_dir_activate (tree_view, path, column, user_data); ++} ++ ++static void + gtk_file_selection_file_activate (GtkTreeView *tree_view, + GtkTreePath *path, + GtkTreeViewColumn *column, +@@ -2103,7 +2139,6 @@ + PossibleCompletion* poss; + GtkTreeIter iter; + GtkListStore *dir_model; +- GtkListStore *file_model; + gchar* filename; + gchar* rem_path = rel_path; + gchar* sel_text; +@@ -2125,10 +2160,8 @@ + g_assert (cmpl_state->reference_dir); + + dir_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->dir_list))); +- file_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->file_list))); + + gtk_list_store_clear (dir_model); +- gtk_list_store_clear (file_model); + + /* Set the dir list to include ./ and ../ */ + gtk_list_store_append (dir_model, &iter); +@@ -2150,13 +2183,17 @@ + strcmp (filename, ".." G_DIR_SEPARATOR_S) != 0) + { + gtk_list_store_append (dir_model, &iter); +- gtk_list_store_set (dir_model, &iter, DIR_COLUMN, filename, -1); ++ gtk_list_store_set (dir_model, &iter, ++ DIR_COLUMN, filename, ++ ISFILE_COLUMN, FALSE, -1); + } + } + else + { +- gtk_list_store_append (file_model, &iter); +- gtk_list_store_set (file_model, &iter, DIR_COLUMN, filename, -1); ++ gtk_list_store_append (dir_model, &iter); ++ gtk_list_store_set (dir_model, &iter, ++ DIR_COLUMN, filename, ++ ISFILE_COLUMN, TRUE, -1); + } + } + diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/spinbutton.patch b/openembedded/packages/gtk+/gtk+-2.6.7/spinbutton.patch new file mode 100644 index 0000000000..8ad7507af0 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/spinbutton.patch @@ -0,0 +1,128 @@ +--- gtk+-2.4.3/gtk/gtkspinbutton.c.old 2004-04-22 14:49:27.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtkspinbutton.c 2004-06-30 21:48:18.000000000 +0100 +@@ -733,7 +733,7 @@ + + spin = GTK_SPIN_BUTTON (widget); + arrow_size = spin_button_get_arrow_size (spin); +- panel_width = arrow_size + 2 * widget->style->xthickness; ++ panel_width = (2 * arrow_size) + 4 * widget->style->xthickness; + + widget->allocation = *allocation; + +@@ -866,19 +866,16 @@ + { + width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness; + ++ y = widget->style->ythickness; ++ height = widget->requisition.height - (2 * y); ++ + if (arrow_type == GTK_ARROW_UP) + { + x = 0; +- y = 0; +- +- height = widget->requisition.height / 2; + } + else + { +- x = 0; +- y = widget->requisition.height / 2; +- +- height = (widget->requisition.height + 1) / 2; ++ x = width; + } + + if (spin_button_at_limit (spin_button, arrow_type)) +@@ -908,32 +905,17 @@ + shadow_type = GTK_SHADOW_OUT; + } + } +- ++ + gtk_paint_box (widget->style, spin_button->panel, + state_type, shadow_type, + NULL, widget, +- (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down", ++ NULL, + x, y, width, height); + + height = widget->requisition.height; + +- if (arrow_type == GTK_ARROW_DOWN) +- { +- y = height / 2; +- height = height - y - 2; +- } +- else +- { +- y = 2; +- height = height / 2 - 2; +- } +- + width -= 3; +- +- if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) +- x = 2; +- else +- x = 1; ++ height -= 3; + + w = width / 2; + w -= w % 2 - 1; /* force odd */ +@@ -1108,7 +1090,7 @@ + if (GTK_ENTRY (widget)->editable) + gtk_spin_button_update (spin); + +- if (event->y <= widget->requisition.height / 2) ++ if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness)) + { + if (event->button == 1) + start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment); +@@ -1143,44 +1125,11 @@ + + arrow_size = spin_button_get_arrow_size (spin); + +- if (event->button == spin->button) +- { +- int click_child = spin->click_child; ++ gtk_spin_button_stop_spinning (spin); + +- gtk_spin_button_stop_spinning (spin); +- +- if (event->button == 3) +- { +- if (event->y >= 0 && event->x >= 0 && +- event->y <= widget->requisition.height && +- event->x <= arrow_size + 2 * widget->style->xthickness) +- { +- if (click_child == GTK_ARROW_UP && +- event->y <= widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->upper - spin->adjustment->value; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, diff); +- } +- else if (click_child == GTK_ARROW_DOWN && +- event->y > widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->value - spin->adjustment->lower; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, -diff); +- } +- } +- } +- spin_button_redraw (spin); ++ spin_button_redraw (spin); + +- return TRUE; +- } +- else +- return GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, event); ++ return TRUE; + } + + static gint diff --git a/openembedded/packages/gtk+/gtk+-2.6.7/xsettings.patch b/openembedded/packages/gtk+/gtk+-2.6.7/xsettings.patch new file mode 100644 index 0000000000..b63e262d34 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.6.7/xsettings.patch @@ -0,0 +1,16 @@ +--- gtk+-2.4.4/gdk/x11/gdkevents-x11.c.old Sun Aug 22 17:14:00 2004 ++++ gtk+-2.4.4/gdk/x11/gdkevents-x11.c Sun Aug 22 17:14:00 2004 +@@ -2827,10 +2827,9 @@ + { + GdkScreenX11 *screen = data; + +- if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent)) +- return GDK_FILTER_REMOVE; +- else +- return GDK_FILTER_CONTINUE; ++ xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent); ++ ++ return GDK_FILTER_CONTINUE; + } + + static void diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/automake-lossage.patch b/openembedded/packages/gtk+/gtk+-2.8.3/automake-lossage.patch new file mode 100644 index 0000000000..0d423ddbb9 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/automake-lossage.patch @@ -0,0 +1,24 @@ +--- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100 ++++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100 +@@ -52,21 +52,5 @@ + + dist-hook: html + cp -Rp $(srcdir)/html $(distdir) +-else +-html: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "***" +- +-pdf: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "***" +- +-dist-hook: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "*** DISTRIBUTION IS INCOMPLETE" +- echo "***" + endif + diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/disable-tooltips.patch b/openembedded/packages/gtk+/gtk+-2.8.3/disable-tooltips.patch new file mode 100644 index 0000000000..d71d839c3c --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/disable-tooltips.patch @@ -0,0 +1,11 @@ +--- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100 +@@ -118,7 +118,7 @@ + tooltips->tips_data_list = NULL; + + tooltips->delay = DEFAULT_DELAY; +- tooltips->enabled = TRUE; ++ tooltips->enabled = FALSE; + tooltips->timer_tag = 0; + tooltips->use_sticky_delay = FALSE; + tooltips->last_popdown.tv_sec = -1; diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/gtk+-handhelds.patch b/openembedded/packages/gtk+/gtk+-2.8.3/gtk+-handhelds.patch new file mode 100644 index 0000000000..20481f059b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/gtk+-handhelds.patch @@ -0,0 +1,236 @@ +--- gtk+-2.4.1/gtk/gtkarrow.c 2004-03-13 09:51:13.000000000 +1100 ++++ gtk+-2.4.1/gtk/gtkarrow.c 2004-05-26 14:52:17.000000000 +1000 +@@ -29,7 +29,7 @@ + #include "gtkarrow.h" + #include "gtkintl.h" + +-#define MIN_ARROW_SIZE 15 ++#define MIN_ARROW_SIZE 7 + + enum { + PROP_0, +@@ -53,6 +53,8 @@ + guint prop_id, + GValue *value, + GParamSpec *pspec); ++static void gtk_arrow_size_request (GtkWidget *arrow, ++ GtkRequisition *requisition); + + GType + gtk_arrow_get_type (void) +@@ -111,6 +113,7 @@ + G_PARAM_READABLE | G_PARAM_WRITABLE)); + + widget_class->expose_event = gtk_arrow_expose; ++ widget_class->size_request = gtk_arrow_size_request; + } + + static void +@@ -166,13 +169,18 @@ + } + + static void ++gtk_arrow_size_request (GtkWidget *arrow, ++ GtkRequisition *requisition) ++{ ++ requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; ++ requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; ++} ++ ++static void + gtk_arrow_init (GtkArrow *arrow) + { + GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW); + +- GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; +- GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; +- + arrow->arrow_type = GTK_ARROW_RIGHT; + arrow->shadow_type = GTK_SHADOW_OUT; + } +--- gtk+-2.4.1/gtk/gtkcalendar.c 2004-03-06 14:37:26.000000000 +1100 ++++ gtk+-2.4.1/gtk/gtkcalendar.c 2004-05-26 14:58:57.000000000 +1000 +@@ -340,6 +340,9 @@ + static void gtk_calendar_select_and_focus_day (GtkCalendar *calendar, + guint day); + ++static void gtk_calendar_do_select_day (GtkCalendar *calendar, ++ guint day); ++ + static void gtk_calendar_paint_arrow (GtkWidget *widget, + guint arrow); + static void gtk_calendar_paint_day_num (GtkWidget *widget, +@@ -861,13 +864,13 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else + { + if (calendar->selected_day < 0) + calendar->selected_day = calendar->selected_day + 1 + month_length[leap (calendar->year)][calendar->month + 1]; +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + } + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); +@@ -908,10 +911,10 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); +@@ -939,10 +942,10 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); +@@ -974,10 +977,10 @@ + if (month_len < calendar->selected_day) + { + calendar->selected_day = 0; +- gtk_calendar_select_day (calendar, month_len); ++ gtk_calendar_do_select_day (calendar, month_len); + } + else +- gtk_calendar_select_day (calendar, calendar->selected_day); ++ gtk_calendar_do_select_day (calendar, calendar->selected_day); + + gtk_widget_queue_draw (GTK_WIDGET (calendar)); + gtk_calendar_thaw (calendar); +@@ -2480,9 +2483,9 @@ + return TRUE; + } + +-void +-gtk_calendar_select_day (GtkCalendar *calendar, +- guint day) ++static void ++gtk_calendar_do_select_day (GtkCalendar *calendar, ++ guint day) + { + g_return_if_fail (GTK_IS_CALENDAR (calendar)); + g_return_if_fail (day <= 31); +@@ -2499,6 +2502,13 @@ + if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar))) + gtk_calendar_paint_day_num (GTK_WIDGET (calendar), selected_day); + } ++} ++ ++void ++gtk_calendar_select_day (GtkCalendar *calendar, ++ guint day) ++{ ++ gtk_calendar_do_select_day (calendar, day); + + calendar->selected_day = day; + +--- gtk+-2.4.1/gtk/gtkentry.c 2004-04-22 08:08:08.000000000 +1000 ++++ gtk+-2.4.1/gtk/gtkentry.c 2004-05-26 14:52:17.000000000 +1000 +@@ -557,6 +557,15 @@ + 0.0, + G_PARAM_READABLE | G_PARAM_WRITABLE)); + ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("min_width", ++ _("Minimum width"), ++ _("Minimum width of the entry field"), ++ 0, ++ G_MAXINT, ++ MIN_ENTRY_WIDTH, ++ G_PARAM_READABLE)); ++ + signals[POPULATE_POPUP] = + g_signal_new ("populate_popup", + G_OBJECT_CLASS_TYPE (gobject_class), +@@ -1124,7 +1133,7 @@ + { + GtkEntry *entry = GTK_ENTRY (widget); + PangoFontMetrics *metrics; +- gint xborder, yborder; ++ gint xborder, yborder, min_width; + PangoContext *context; + + gtk_widget_ensure_style (widget); +@@ -1140,9 +1149,11 @@ + + xborder += INNER_BORDER; + yborder += INNER_BORDER; +- ++ ++ gtk_widget_style_get (widget, "min_width", &min_width, NULL); ++ + if (entry->width_chars < 0) +- requisition->width = MIN_ENTRY_WIDTH + xborder * 2; ++ requisition->width = min_width + xborder * 2; + else + { + gint char_width = pango_font_metrics_get_approximate_char_width (metrics); +--- gtk+-2.4.1/gtk/gtkrange.c 2004-03-06 14:38:08.000000000 +1100 ++++ gtk+-2.4.1/gtk/gtkrange.c 2004-05-26 14:52:17.000000000 +1000 +@@ -180,6 +180,7 @@ + static GtkWidgetClass *parent_class = NULL; + static guint signals[LAST_SIGNAL]; + ++static GdkAtom recognize_protocols_atom, atom_atom; + + GType + gtk_range_get_type (void) +@@ -220,6 +221,9 @@ + object_class = (GtkObjectClass*) class; + widget_class = (GtkWidgetClass*) class; + ++ recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE); ++ atom_atom = gdk_atom_intern ("ATOM", FALSE); ++ + parent_class = g_type_class_peek_parent (class); + + gobject_class->set_property = gtk_range_set_property; +@@ -815,6 +819,12 @@ + &attributes, attributes_mask); + gdk_window_set_user_data (range->event_window, range); + ++ gdk_property_change (range->event_window, ++ recognize_protocols_atom, ++ atom_atom, ++ 32, GDK_PROP_MODE_REPLACE, ++ NULL, 0); ++ + widget->style = gtk_style_attach (widget->style, widget->window); + } + +@@ -1186,7 +1196,7 @@ + + /* ignore presses when we're already doing something else. */ + if (range->layout->grab_location != MOUSE_OUTSIDE) +- return FALSE; ++ return TRUE; + + range->layout->mouse_x = event->x; + range->layout->mouse_y = event->y; +@@ -1364,7 +1374,7 @@ + return TRUE; + } + +- return FALSE; ++ return TRUE; + } + + /** diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/gtklabel-resize-patch b/openembedded/packages/gtk+/gtk+-2.8.3/gtklabel-resize-patch new file mode 100644 index 0000000000..df29656343 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/gtklabel-resize-patch @@ -0,0 +1,10 @@ +--- gtk+-2.4.3/gtk/gtklabel.c~ 2004-06-11 13:50:34.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtklabel.c 2004-07-05 13:33:57.000000000 +0100 +@@ -1623,6 +1623,7 @@ + + /* We have to clear the layout, fonts etc. may have changed */ + gtk_label_clear_layout (label); ++ gtk_widget_queue_resize (GTK_WIDGET (label)); + } + + static void diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/hardcoded_libtool.patch b/openembedded/packages/gtk+/gtk+-2.8.3/hardcoded_libtool.patch new file mode 100644 index 0000000000..b2afddcc61 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/hardcoded_libtool.patch @@ -0,0 +1,29 @@ +--- gtk+-2.6.0/configure.in.old 2005-01-01 16:23:45.000000000 +0000 ++++ gtk+-2.6.0/configure.in 2005-01-01 16:24:03.000000000 +0000 +@@ -360,7 +360,7 @@ + AC_MSG_CHECKING([Whether to write dependencies into .pc files]) + case $enable_explicit_deps in + auto) +- deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh` ++ deplib_check_method=`($host_alias-libtool --config; echo eval echo \\$deplib_check_method) | sh` + if test "X$deplib_check_method" = Xnone || test "x$enable_static" = xyes ; then + enable_explicit_deps=yes + else +@@ -688,7 +688,7 @@ + dnl Now we check to see if our libtool supports shared lib deps + dnl (in a rather ugly way even) + if $dynworks; then +- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config" ++ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config" + pixbuf_deplibs_check=`$pixbuf_libtool_config | \ + grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \ + sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'` +@@ -1512,7 +1512,7 @@ + # + # We are using gmodule-no-export now, but I'm leaving the stripping + # code in place for now, since pango and atk still require gmodule. +-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` + if test -n "$export_dynamic"; then + GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"` + GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"` diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/menu-deactivate.patch b/openembedded/packages/gtk+/gtk+-2.8.3/menu-deactivate.patch new file mode 100644 index 0000000000..29e665fbf3 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/menu-deactivate.patch @@ -0,0 +1,50 @@ +--- gtk+-2.4.4/gtk/gtkmenushell.c.old Thu Aug 26 23:45:28 2004 ++++ gtk+-2.4.4/gtk/gtkmenushell.c Fri Aug 27 00:13:33 2004 +@@ -37,7 +37,7 @@ + #include "gtktearoffmenuitem.h" + #include "gtkwindow.h" + +-#define MENU_SHELL_TIMEOUT 500 ++#define MENU_SHELL_TIMEOUT 2000 + + enum { + DEACTIVATE, +@@ -156,6 +156,7 @@ + static GtkContainerClass *parent_class = NULL; + static guint menu_shell_signals[LAST_SIGNAL] = { 0 }; + ++static int last_crossing_time; + + GType + gtk_menu_shell_get_type (void) +@@ -418,6 +419,7 @@ + gtk_grab_add (GTK_WIDGET (menu_shell)); + menu_shell->have_grab = TRUE; + menu_shell->active = TRUE; ++ last_crossing_time = 0; + } + } + +@@ -545,6 +547,13 @@ + menu_shell->activate_time = 0; + deactivate = FALSE; + } ++ ++ if (last_crossing_time != 0 ++ && ((event->time - last_crossing_time) < 500)) ++ { ++ last_crossing_time = 0; ++ deactivate = FALSE; ++ } + + if (deactivate) + { +@@ -597,6 +606,8 @@ + if (menu_shell->active) + { + menu_item = gtk_get_event_widget ((GdkEvent*) event); ++ ++ last_crossing_time = event->time; + + if (!menu_item || + (GTK_IS_MENU_ITEM (menu_item) && diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/no-demos.patch b/openembedded/packages/gtk+/gtk+-2.8.3/no-demos.patch new file mode 100644 index 0000000000..2f10a30dda --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/no-demos.patch @@ -0,0 +1,10 @@ +--- gtk+-2.4.1/Makefile.am~ 2004-01-17 22:15:56.000000000 +0000 ++++ gtk+-2.4.1/Makefile.am 2004-05-08 12:25:32.000000000 +0100 +@@ -1,6 +1,6 @@ + ## Makefile.am for GTK+ + +-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib ++SRC_SUBDIRS = gdk-pixbuf gdk gtk modules tests contrib + SUBDIRS = po po-properties $(SRC_SUBDIRS) docs build m4macros + + # require automake 1.4 diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/no-xwc.patch b/openembedded/packages/gtk+/gtk+-2.8.3/no-xwc.patch new file mode 100644 index 0000000000..affb4a303e --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/no-xwc.patch @@ -0,0 +1,151 @@ +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00 ++++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00 +@@ -576,12 +576,14 @@ + GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2); + } + } ++#ifdef HAVE_XWC + else if (font->type == GDK_FONT_FONTSET) + { + XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font); + XmbDrawString (xdisplay, impl->xid, + fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length); + } ++#endif + else + g_error("undefined font type\n"); + } +@@ -613,6 +615,7 @@ + GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length); + g_free (text_8bit); + } ++#ifdef HAVE_XWC + else if (font->type == GDK_FONT_FONTSET) + { + if (sizeof(GdkWChar) == sizeof(wchar_t)) +@@ -633,6 +636,7 @@ + g_free (text_wchar); + } + } ++#endif + else + g_error("undefined font type\n"); + } +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00 ++++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00 +@@ -525,10 +525,12 @@ + width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2); + } + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + width = XmbTextEscapement (fontset, text, text_length); + break; ++#endif + default: + width = 0; + } +@@ -578,6 +580,7 @@ + width = 0; + } + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + if (sizeof(GdkWChar) == sizeof(wchar_t)) + { +@@ -595,6 +598,7 @@ + g_free (text_wchar); + } + break; ++#endif + default: + width = 0; + } +@@ -667,6 +671,7 @@ + if (descent) + *descent = overall.descent; + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + XmbTextExtents (fontset, text, text_length, &ink, &logical); +@@ -681,6 +686,7 @@ + if (descent) + *descent = ink.y + ink.height; + break; ++#endif + } + + } +@@ -753,6 +759,7 @@ + *descent = overall.descent; + break; + } ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + +@@ -780,6 +787,7 @@ + if (descent) + *descent = ink.y + ink.height; + break; ++#endif + } + + } +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00 ++++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00 +@@ -48,6 +48,7 @@ + void + _gdk_x11_initialize_locale (void) + { ++#ifdef HAVE_XWC + wchar_t result; + gchar *current_locale; + static char *last_locale = NULL; +@@ -93,7 +94,8 @@ + GDK_NOTE (XIM, + g_message ("%s multi-byte string functions.", + gdk_use_mb ? "Using" : "Not using")); +- ++#endif ++ + return; + } + +@@ -136,6 +138,7 @@ + { + gchar *mbstr; + ++#ifdef HAVE_XWC + if (gdk_use_mb) + { + GdkDisplay *display = find_a_display (); +@@ -178,6 +181,7 @@ + XFree (tpr.value); + } + else ++#endif + { + gint length = 0; + gint i; +@@ -210,6 +214,7 @@ + gint + gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max) + { ++#ifdef HAVE_XWC + if (gdk_use_mb) + { + GdkDisplay *display = find_a_display (); +@@ -242,6 +247,7 @@ + return len_cpy; + } + else ++#endif + { + gint i; + diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/scroll-timings.patch b/openembedded/packages/gtk+/gtk+-2.8.3/scroll-timings.patch new file mode 100644 index 0000000000..a38b21dcc2 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/scroll-timings.patch @@ -0,0 +1,15 @@ +--- gtk+-2.4.4/gtk/gtkrange.c~ 2004-08-23 01:50:22.000000000 +0100 ++++ gtk+-2.4.4/gtk/gtkrange.c 2004-08-27 15:48:49.000000000 +0100 +@@ -35,9 +35,9 @@ + #include "gtkintl.h" + #include "gtkscrollbar.h" + +-#define SCROLL_INITIAL_DELAY 250 /* must hold button this long before ... */ +-#define SCROLL_LATER_DELAY 100 /* ... it starts repeating at this rate */ +-#define UPDATE_DELAY 300 /* Delay for queued update */ ++#define SCROLL_INITIAL_DELAY 500 /* must hold button this long before ... */ ++#define SCROLL_LATER_DELAY 200 /* ... it starts repeating at this rate */ ++#define UPDATE_DELAY 1000 /* Delay for queued update */ + + enum { + PROP_0, diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/single-click.patch b/openembedded/packages/gtk+/gtk+-2.8.3/single-click.patch new file mode 100644 index 0000000000..3bb208d4d6 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/single-click.patch @@ -0,0 +1,54 @@ +diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c gtk+-2.6.3/gtk/gtkcalendar.c +--- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 16:57:04 +01:00 ++++ gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 20:05:18 +01:00 +@@ -1023,9 +1023,11 @@ + } + + gtk_calendar_select_and_focus_day (calendar, day); +- } ++ ++ // This change causes the calendar to disappear after choosing a day ++/* } + else if (event->type == GDK_2BUTTON_PRESS) +- { ++ {*/ + private_data->in_drag = 0; + if (day_month == MONTH_CURRENT) + g_signal_emit (calendar, +diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c gtk+-2.6.3/gtk/gtkfilesel.c +--- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-06 16:57:07 +01:00 ++++ gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-07 13:40:32 +01:00 +@@ -2468,6 +2468,33 @@ + if (fs->last_selected != NULL) + g_free (fs->last_selected); + ++ // Single-click directory entry ++ if (new_names->len == 1) ++ { ++ GtkTreeView *tree_view; ++ GtkTreeModel *model; ++ GtkTreePath *path; ++ GtkTreeIter iter; ++ gboolean is_file; ++ ++ tree_view = gtk_tree_selection_get_tree_view (selection); ++ ++ if (gtk_tree_selection_get_selected (selection, &model, &iter)) ++ { ++ path = gtk_tree_model_get_path (model, &iter); ++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); ++ ++ if (!is_file) ++ { ++ gtk_file_selection_dir_activate (tree_view, path, ++ gtk_tree_view_get_column (tree_view, DIR_COLUMN), ++ user_data); ++ } ++ ++ gtk_tree_path_free (path); ++ } ++ } ++ + fs->last_selected = g_strdup (g_ptr_array_index (new_names, index)); + filename = get_real_filename (fs->last_selected, FALSE); + diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/small-gtkfilesel.patch b/openembedded/packages/gtk+/gtk+-2.8.3/small-gtkfilesel.patch new file mode 100644 index 0000000000..20bf4cf366 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/small-gtkfilesel.patch @@ -0,0 +1,267 @@ +diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c +--- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 ++++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100 +@@ -68,6 +68,7 @@ + #include "gtkprivate.h" + #include "gtkscrolledwindow.h" + #include "gtkstock.h" ++#include "gtksignal.h" + #include "gtktreeselection.h" + #include "gtktreeview.h" + #include "gtkvbox.h" +@@ -77,6 +78,7 @@ + #include "gtkmessagedialog.h" + #include "gtkdnd.h" + #include "gtkeventbox.h" ++#include "gtkimage.h" + + #undef GTK_DISABLE_DEPRECATED + #include "gtkoptionmenu.h" +@@ -245,7 +247,8 @@ + }; + + enum { +- DIR_COLUMN ++ DIR_COLUMN, ++ ISFILE_COLUMN + }; + + enum { +@@ -400,6 +403,12 @@ + GtkTreePath *path, + GtkTreeViewColumn *column, + gpointer user_data); ++ ++static void gtk_file_selection_activate (GtkTreeView *tree_view, ++ GtkTreePath *path, ++ GtkTreeViewColumn *column, ++ gpointer user_data); ++ + static void gtk_file_selection_file_changed (GtkTreeSelection *selection, + gpointer user_data); + static void gtk_file_selection_dir_activate (GtkTreeView *tree_view, +@@ -419,6 +428,7 @@ + static void gtk_file_selection_create_dir (GtkWidget *widget, gpointer data); + static void gtk_file_selection_delete_file (GtkWidget *widget, gpointer data); + static void gtk_file_selection_rename_file (GtkWidget *widget, gpointer data); ++static void gtk_file_selection_style_set (GtkWidget *widget, GtkStyle *prev_style); + + static void free_selected_names (GPtrArray *names); + +@@ -578,6 +588,23 @@ + G_PARAM_WRITABLE)); + object_class->destroy = gtk_file_selection_destroy; + widget_class->map = gtk_file_selection_map; ++ widget_class->style_set = gtk_file_selection_style_set; ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("show_fileops_default", ++ _("Show fileop buttons by default"), ++ _("Whether file operation buttons are shown by default"), ++ TRUE, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("border_width", ++ _("Border width"), ++ _("Width of border around the main dialog area"), ++ 0, ++ G_MAXINT, ++ 10, ++ G_PARAM_READABLE)); + } + + static void gtk_file_selection_set_property (GObject *object, +@@ -649,7 +676,29 @@ + gtk_widget_grab_default (widget); + return FALSE; + } +- ++ ++static void ++gtk_file_selection_style_set (GtkWidget *filesel, ++ GtkStyle *prev_style) ++{ ++ gboolean show_fileops; ++ gint border_width; ++ ++ gtk_widget_style_get (filesel, ++ "show_fileops_default", ++ &show_fileops, ++ "border_width", ++ &border_width, ++ NULL); ++ ++ gtk_container_set_border_width (GTK_CONTAINER (filesel), border_width); ++ ++ if (show_fileops) ++ gtk_file_selection_show_fileop_buttons (GTK_FILE_SELECTION (filesel)); ++ else ++ gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (filesel)); ++} ++ + static void + gtk_file_selection_init (GtkFileSelection *filesel) + { +@@ -674,17 +723,15 @@ + + /* The dialog-sized vertical box */ + filesel->main_vbox = dialog->vbox; +- gtk_container_set_border_width (GTK_CONTAINER (filesel), 10); + + /* The horizontal box containing create, rename etc. buttons */ + filesel->button_area = gtk_hbutton_box_new (); + gtk_button_box_set_layout (GTK_BUTTON_BOX (filesel->button_area), GTK_BUTTONBOX_START); +- gtk_box_set_spacing (GTK_BOX (filesel->button_area), 0); + gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->button_area, + FALSE, FALSE, 0); + gtk_widget_show (filesel->button_area); + +- gtk_file_selection_show_fileop_buttons (filesel); ++ gtk_file_selection_style_set (GTK_WIDGET (filesel), NULL); + + /* hbox for pulldown menu */ + pulldown_hbox = gtk_hbox_new (TRUE, 5); +@@ -723,25 +770,32 @@ + + /* The directories list */ + +- model = gtk_list_store_new (1, G_TYPE_STRING); ++ model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); /* MA */ + filesel->dir_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); + g_object_unref (model); + +- column = gtk_tree_view_column_new_with_attributes (_("Folders"), ++ column = gtk_tree_view_column_new_with_attributes (/*_("Folders")*/ NULL, + gtk_cell_renderer_text_new (), + "text", DIR_COLUMN, + NULL); + label = gtk_label_new_with_mnemonic (_("Fol_ders")); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->dir_list); + gtk_widget_show (label); +- gtk_tree_view_column_set_widget (column, label); ++ ++ /* gtk_tree_view_column_set_widget (column, label); */ ++ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (filesel->dir_list), FALSE); ++ + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->dir_list), column); + + gtk_widget_set_size_request (filesel->dir_list, + DIR_LIST_WIDTH, DIR_LIST_HEIGHT); + g_signal_connect (filesel->dir_list, "row_activated", +- G_CALLBACK (gtk_file_selection_dir_activate), filesel); ++ G_CALLBACK (gtk_file_selection_activate), filesel); ++ ++ g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->dir_list)), "changed", ++ G_CALLBACK (gtk_file_selection_file_changed), filesel); ++ + + /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->dir_list)); */ + +@@ -758,41 +812,6 @@ + gtk_widget_show (filesel->dir_list); + gtk_widget_show (scrolled_win); + +- /* The files list */ +- model = gtk_list_store_new (1, G_TYPE_STRING); +- filesel->file_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); +- g_object_unref (model); +- +- column = gtk_tree_view_column_new_with_attributes (_("Files"), +- gtk_cell_renderer_text_new (), +- "text", FILE_COLUMN, +- NULL); +- label = gtk_label_new_with_mnemonic (_("_Files")); +- gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->file_list); +- gtk_widget_show (label); +- gtk_tree_view_column_set_widget (column, label); +- gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); +- gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->file_list), column); +- +- gtk_widget_set_size_request (filesel->file_list, +- FILE_LIST_WIDTH, FILE_LIST_HEIGHT); +- g_signal_connect (filesel->file_list, "row_activated", +- G_CALLBACK (gtk_file_selection_file_activate), filesel); +- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)), "changed", +- G_CALLBACK (gtk_file_selection_file_changed), filesel); +- +- /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->file_list)); */ +- +- scrolled_win = gtk_scrolled_window_new (NULL, NULL); +- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN); +- gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->file_list); +- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), +- GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); +- gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0); +- gtk_container_add (GTK_CONTAINER (list_container), scrolled_win); +- gtk_widget_show (filesel->file_list); +- gtk_widget_show (scrolled_win); +- + /* action area for packing buttons into. */ + filesel->action_area = gtk_hbox_new (TRUE, 0); + gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->action_area, +@@ -2008,6 +2027,23 @@ + } + + static void ++gtk_file_selection_activate (GtkTreeView *tree_view, ++ GtkTreePath *path, ++ GtkTreeViewColumn *column, ++ gpointer user_data) ++{ ++ GtkTreeModel *model = gtk_tree_view_get_model (tree_view); ++ GtkTreeIter iter; ++ gboolean is_file; ++ ++ gtk_tree_model_get_iter (model, &iter, path); ++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); ++ ++ if (! is_file) ++ gtk_file_selection_dir_activate (tree_view, path, column, user_data); ++} ++ ++static void + gtk_file_selection_file_activate (GtkTreeView *tree_view, + GtkTreePath *path, + GtkTreeViewColumn *column, +@@ -2103,7 +2139,6 @@ + PossibleCompletion* poss; + GtkTreeIter iter; + GtkListStore *dir_model; +- GtkListStore *file_model; + gchar* filename; + gchar* rem_path = rel_path; + gchar* sel_text; +@@ -2125,10 +2160,8 @@ + g_assert (cmpl_state->reference_dir); + + dir_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->dir_list))); +- file_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->file_list))); + + gtk_list_store_clear (dir_model); +- gtk_list_store_clear (file_model); + + /* Set the dir list to include ./ and ../ */ + gtk_list_store_append (dir_model, &iter); +@@ -2150,13 +2183,17 @@ + strcmp (filename, ".." G_DIR_SEPARATOR_S) != 0) + { + gtk_list_store_append (dir_model, &iter); +- gtk_list_store_set (dir_model, &iter, DIR_COLUMN, filename, -1); ++ gtk_list_store_set (dir_model, &iter, ++ DIR_COLUMN, filename, ++ ISFILE_COLUMN, FALSE, -1); + } + } + else + { +- gtk_list_store_append (file_model, &iter); +- gtk_list_store_set (file_model, &iter, DIR_COLUMN, filename, -1); ++ gtk_list_store_append (dir_model, &iter); ++ gtk_list_store_set (dir_model, &iter, ++ DIR_COLUMN, filename, ++ ISFILE_COLUMN, TRUE, -1); + } + } + diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/spinbutton.patch b/openembedded/packages/gtk+/gtk+-2.8.3/spinbutton.patch new file mode 100644 index 0000000000..8ad7507af0 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/spinbutton.patch @@ -0,0 +1,128 @@ +--- gtk+-2.4.3/gtk/gtkspinbutton.c.old 2004-04-22 14:49:27.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtkspinbutton.c 2004-06-30 21:48:18.000000000 +0100 +@@ -733,7 +733,7 @@ + + spin = GTK_SPIN_BUTTON (widget); + arrow_size = spin_button_get_arrow_size (spin); +- panel_width = arrow_size + 2 * widget->style->xthickness; ++ panel_width = (2 * arrow_size) + 4 * widget->style->xthickness; + + widget->allocation = *allocation; + +@@ -866,19 +866,16 @@ + { + width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness; + ++ y = widget->style->ythickness; ++ height = widget->requisition.height - (2 * y); ++ + if (arrow_type == GTK_ARROW_UP) + { + x = 0; +- y = 0; +- +- height = widget->requisition.height / 2; + } + else + { +- x = 0; +- y = widget->requisition.height / 2; +- +- height = (widget->requisition.height + 1) / 2; ++ x = width; + } + + if (spin_button_at_limit (spin_button, arrow_type)) +@@ -908,32 +905,17 @@ + shadow_type = GTK_SHADOW_OUT; + } + } +- ++ + gtk_paint_box (widget->style, spin_button->panel, + state_type, shadow_type, + NULL, widget, +- (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down", ++ NULL, + x, y, width, height); + + height = widget->requisition.height; + +- if (arrow_type == GTK_ARROW_DOWN) +- { +- y = height / 2; +- height = height - y - 2; +- } +- else +- { +- y = 2; +- height = height / 2 - 2; +- } +- + width -= 3; +- +- if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) +- x = 2; +- else +- x = 1; ++ height -= 3; + + w = width / 2; + w -= w % 2 - 1; /* force odd */ +@@ -1108,7 +1090,7 @@ + if (GTK_ENTRY (widget)->editable) + gtk_spin_button_update (spin); + +- if (event->y <= widget->requisition.height / 2) ++ if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness)) + { + if (event->button == 1) + start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment); +@@ -1143,44 +1125,11 @@ + + arrow_size = spin_button_get_arrow_size (spin); + +- if (event->button == spin->button) +- { +- int click_child = spin->click_child; ++ gtk_spin_button_stop_spinning (spin); + +- gtk_spin_button_stop_spinning (spin); +- +- if (event->button == 3) +- { +- if (event->y >= 0 && event->x >= 0 && +- event->y <= widget->requisition.height && +- event->x <= arrow_size + 2 * widget->style->xthickness) +- { +- if (click_child == GTK_ARROW_UP && +- event->y <= widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->upper - spin->adjustment->value; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, diff); +- } +- else if (click_child == GTK_ARROW_DOWN && +- event->y > widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->value - spin->adjustment->lower; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, -diff); +- } +- } +- } +- spin_button_redraw (spin); ++ spin_button_redraw (spin); + +- return TRUE; +- } +- else +- return GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, event); ++ return TRUE; + } + + static gint diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/xsettings.patch b/openembedded/packages/gtk+/gtk+-2.8.3/xsettings.patch new file mode 100644 index 0000000000..b63e262d34 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/xsettings.patch @@ -0,0 +1,16 @@ +--- gtk+-2.4.4/gdk/x11/gdkevents-x11.c.old Sun Aug 22 17:14:00 2004 ++++ gtk+-2.4.4/gdk/x11/gdkevents-x11.c Sun Aug 22 17:14:00 2004 +@@ -2827,10 +2827,9 @@ + { + GdkScreenX11 *screen = data; + +- if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent)) +- return GDK_FILTER_REMOVE; +- else +- return GDK_FILTER_CONTINUE; ++ xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent); ++ ++ return GDK_FILTER_CONTINUE; + } + + static void diff --git a/openembedded/packages/gtk+/gtk+_2.6.4-1.osso7.bb b/openembedded/packages/gtk+/gtk+_2.6.4-1.osso7.bb new file mode 100644 index 0000000000..146da9f3e0 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+_2.6.4-1.osso7.bb @@ -0,0 +1,165 @@ +LICENSE = "LGPL" +DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \ +set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites." +HOMEPAGE = "http://www.gtk.org" +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Koen Kooi <koen@handhelds.org>" +DEPENDS = "glib-2.0 pango atk jpeg libpng xext libxcursor gtk-doc libgcrypt" +PR = "r1" + +S = "${WORKDIR}/gtk+2.0-2.6.4/upstream/tarballs/gtk+-2.6.4/" + +SRC_URI = "http://stage.maemo.org:80/pool/maemo/ossw/source/g/gtk+2.0/gtk+2.0_${PV}.tar.gz \ + file://no-demos.patch;patch=1 \ + file://no-xwc.patch;patch=1 \ + file://automake-lossage.patch;patch=1 \ + file://spinbutton.patch;patch=1 \ + file://hardcoded_libtool.patch;patch=1 \ + file://disable-tooltips.patch;patch=1 \ + file://gtklabel-resize-patch;patch=1 \ + file://xsettings.patch;patch=1 \ + file://scroll-timings.patch;patch=1 \ + file://small-gtkfilesel.patch;patch=1 \ + file://migration.patch;patch=1;pnum=0 \ + file://000_gtk+-2.0.6-exportsymbols.patch;patch=1 \ + file://000_gtk+-2.2.0-buildfix-immodule.patch;patch=1 \ + file://002_xpmico.patch;patch=1 \ + file://003_iconcache.patch;patch=1 \ + file://configure.diff;patch=1 \ + file://configure.in.diff;patch=1 \ + file://gdkwindow-x11.c.diff;patch=1 \ + file://gtk.h.diff;patch=1 \ + file://gtk_Makefile.am.diff;patch=1 \ + file://gtk_Makefile.in.diff;patch=1 \ + file://gtkalias.h.diff;patch=1 \ + file://gtkbutton.c.diff;patch=1 \ + file://gtkbutton.h.diff;patch=1 \ + file://gtkcalendar.c.diff;patch=1 \ + file://gtkcalendar.h.diff;patch=1 \ + file://gtkcellrenderertext.c.diff;patch=1 \ + file://gtkcellrenderertoggle.c.diff;patch=1 \ + file://gtkcellview.c.diff;patch=1 \ + file://gtkcellview.h.diff;patch=1 \ + file://gtkcheckbutton.c.diff;patch=1 \ + file://gtkcombobox.c.diff;patch=1 \ + file://gtkcomboboxentry.c.diff;patch=1 \ + file://gtkcontainer.c.diff;patch=1 \ + file://gtkdialog.c.diff;patch=1 \ + file://gtkdnd.c.diff;patch=1 \ + file://gtkentry.c.diff;patch=1 \ + file://gtkenums.h.diff;patch=1 \ + file://gtkfilesystem.c.diff;patch=1 \ + file://gtkfilesystem.h.diff;patch=1 \ + file://gtkframe.c.diff;patch=1 \ + file://gtkhashtable.c.diff;patch=1 \ + file://gtkhashtable.h.diff;patch=1 \ + file://gtkhbbox.c.diff;patch=1 \ + file://gtkhseparator.c.diff;patch=1 \ + file://gtkiconfactory.c.diff;patch=1 \ + file://gtkicontheme.c.diff;patch=1 \ + file://gtkimcontext.c.diff;patch=1 \ + file://gtkimcontext.h.diff;patch=1 \ + file://gtkimmulticontext.c.diff;patch=1 \ + file://gtklabel.c.diff;patch=1 \ + file://gtklabel.h.diff;patch=1 \ + file://gtkmain.c.diff;patch=1 \ + file://gtkmarshal.c.diff;patch=1 \ + file://gtkmarshal.h.diff;patch=1 \ + file://gtkmarshalers.c.diff;patch=1 \ + file://gtkmarshalers.h.diff;patch=1 \ + file://gtkmenu.c.diff;patch=1 \ + file://gtkmenu.h.diff;patch=1 \ + file://gtkmenuitem.c.diff;patch=1 \ + file://gtkmenuitem.h.diff;patch=1 \ + file://gtkmenushell.c.diff;patch=1 \ + file://gtkmenushell.h.diff;patch=1 \ + file://gtknotebook.c.diff;patch=1 \ + file://gtkprogress.c.diff;patch=1 \ + file://gtkprogressbar.c.diff;patch=1 \ + file://gtkradiobutton.c.diff;patch=1 \ + file://gtkrange.c.diff;patch=1 \ + file://gtkrange.h.diff;patch=1 \ + file://gtkrbtree.c.diff;patch=1 \ + file://gtkrc.c.diff;patch=1 \ + file://gtkrc.h.diff;patch=1 \ + file://gtkscrolledwindow.c.diff;patch=1 \ + file://gtkseparator.c.diff;patch=1 \ + file://gtkseparatortoolitem.c.diff;patch=1 \ + file://gtksettings.c.diff;patch=1 \ + file://gtkspinbutton.c.diff;patch=1 \ + file://gtkstyle.c.diff;patch=1 \ + file://gtkstyle.h.diff;patch=1 \ + file://gtktable.c.diff;patch=1 \ + file://gtktextbuffer.c.diff;patch=1 \ + file://gtktextbuffer.h.diff;patch=1 \ + file://gtktextbufferserialize.c.diff;patch=1 \ + file://gtktextbufferserialize.h.diff;patch=1 \ + file://gtktextview.c.diff;patch=1 \ + file://gtktoolbar.c.diff;patch=1 \ + file://gtktoolbutton.c.diff;patch=1 \ + file://gtktoolbutton.h.diff;patch=1 \ + file://gtktreemodelfilter.c.diff;patch=1 \ + file://gtktreemodelsort.c.diff;patch=1 \ + file://gtktreeprivate.h.diff;patch=1 \ + file://gtktreeselection.c.diff;patch=1 \ + file://gtktreeview.c.diff;patch=1 \ + file://gtktreeview.h.diff;patch=1 \ + file://gtktreeviewcolumn.c.diff;patch=1 \ + file://gtktypebuiltins.c.diff;patch=1 \ + file://gtktypebuiltins.h.diff;patch=1 \ + file://gtkvseparator.c.diff;patch=1 \ + file://gtkwidget.c.diff;patch=1 \ + file://gtkwidget.h.diff;patch=1 \ + file://gtkwindow.c.diff;patch=1 \ + file://gtkwindow.h.diff;patch=1 \ + file://io-gif-animation.c.diff;patch=1 \ + file://io-gif.c.diff;patch=1" + +inherit autotools pkgconfig + +FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \ + ${bindir}/gtk-query-immodules-2.0 \ + ${libdir}/lib*.so.* \ + ${datadir}/themes ${sysconfdir} \ + ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so" +FILES_${PN}-dev += "${datadir}/gtk-2.0/include ${libdir}/gtk-2.0/include ${bindir}/gdk-pixbuf-csource" + +RRECOMMENDS_${PN} = "glibc-gconv-iso8859-1" + +EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration" +# --disable-cruft + +LIBV = "2.4.0" + +do_stage () { + oe_libinstall -so -C gtk libgtk-x11-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gdk libgdk-x11-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C contrib/gdk-pixbuf-xlib libgdk_pixbuf_xlib-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gdk-pixbuf libgdk_pixbuf-2.0 ${STAGING_LIBDIR} + + autotools_stage_includes + + mkdir -p ${STAGING_LIBDIR}/gtk-2.0/include + install -m 0644 gdk/gdkconfig.h ${STAGING_LIBDIR}/gtk-2.0/include/gdkconfig.h + + install -m 0644 m4macros/gtk-2.0.m4 ${STAGING_DATADIR}/aclocal/ +} + +do_install_append () { + install -d ${D}${sysconfdir}/gtk-2.0 +} + +python populate_packages_prepend () { + import os.path + + gtk_libdir = bb.data.expand('${libdir}/gtk-2.0/${LIBV}', d) + loaders_root = os.path.join(gtk_libdir, 'loaders') + immodules_root = os.path.join(gtk_libdir, 'immodules') + + do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', 'gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders') + do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s', 'gtk-query-immodules > /etc/gtk-2.0/gtk.immodules') + + if (bb.data.getVar('DEBIAN_NAMES', d, 1)): + bb.data.setVar('PKG_${PN}', 'libgtk-2.0', d) +} diff --git a/openembedded/packages/gtk+/gtk+_2.6.7.bb b/openembedded/packages/gtk+/gtk+_2.6.7.bb new file mode 100644 index 0000000000..2e81792799 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+_2.6.7.bb @@ -0,0 +1,82 @@ +LICENSE = "LGPL" +DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \ +set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites." +HOMEPAGE = "http://www.gtk.org" +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Philip Blundell <pb@handhelds.org>" +DEPENDS = "glib-2.0 pango atk jpeg libpng xext libxcursor gtk-doc libgcrypt" +PR = "r1" + +SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.6/gtk+-${PV}.tar.bz2 \ + file://no-demos.patch;patch=1 \ + file://no-xwc.patch;patch=1 \ + file://automake-lossage.patch;patch=1 \ + file://gtk+-handhelds.patch;patch=1 \ + file://spinbutton.patch;patch=1 \ + file://hardcoded_libtool.patch;patch=1 \ + file://disable-tooltips.patch;patch=1 \ + file://gtklabel-resize-patch;patch=1 \ + file://menu-deactivate.patch;patch=1 \ + file://xsettings.patch;patch=1 \ + file://scroll-timings.patch;patch=1 \ + file://small-gtkfilesel.patch;patch=1 \ + file://migration.patch;patch=1;pnum=0 \ + file://single-click.patch;patch=1" + +inherit autotools pkgconfig + +FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \ + ${bindir}/gtk-query-immodules-2.0 \ + ${libdir}/lib*.so.* \ + ${datadir}/themes ${sysconfdir} \ + ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so" +FILES_${PN}-dev += "${datadir}/gtk-2.0/include ${libdir}/gtk-2.0/include ${bindir}/gdk-pixbuf-csource" + +RRECOMMENDS_${PN} = "glibc-gconv-iso8859-1" + +EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration" +# --disable-cruft + +LIBV = "2.4.0" + +do_stage () { + oe_libinstall -so -C gtk libgtk-x11-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gdk libgdk-x11-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C contrib/gdk-pixbuf-xlib libgdk_pixbuf_xlib-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gdk-pixbuf libgdk_pixbuf-2.0 ${STAGING_LIBDIR} + + autotools_stage_includes + + mkdir -p ${STAGING_LIBDIR}/gtk-2.0/include + install -m 0644 gdk/gdkconfig.h ${STAGING_LIBDIR}/gtk-2.0/include/gdkconfig.h + + install -m 0644 m4macros/gtk-2.0.m4 ${STAGING_DATADIR}/aclocal/ +} + +do_install_append () { + install -d ${D}${sysconfdir}/gtk-2.0 +} + +postinst_prologue() { +if [ "x$D" != "x" ]; then + exit 1 +fi + +} + +python populate_packages_prepend () { + import os.path + + prologue = bb.data.getVar("postinst_prologue", d, 1) + + gtk_libdir = bb.data.expand('${libdir}/gtk-2.0/${LIBV}', d) + loaders_root = os.path.join(gtk_libdir, 'loaders') + immodules_root = os.path.join(gtk_libdir, 'immodules') + + do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', prologue + 'gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders') + do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s', prologue + 'gtk-query-immodules > /etc/gtk-2.0/gtk.immodules') + + if (bb.data.getVar('DEBIAN_NAMES', d, 1)): + bb.data.setVar('PKG_${PN}', 'libgtk-2.0', d) +} diff --git a/openembedded/packages/gtk+/gtk+_2.8.3.bb b/openembedded/packages/gtk+/gtk+_2.8.3.bb new file mode 100644 index 0000000000..126bc22307 --- /dev/null +++ b/openembedded/packages/gtk+/gtk+_2.8.3.bb @@ -0,0 +1,82 @@ +LICENSE = "LGPL" +DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \ +set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites." +HOMEPAGE = "http://www.gtk.org" +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Philip Blundell <pb@handhelds.org>" +DEPENDS = "glib-2.0 pango atk jpeg libpng xext libxcursor gtk-doc libgcrypt cairo" +PR = "r0" + +SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.8/gtk+-${PV}.tar.bz2 \ + file://no-xwc.patch;patch=1 \ + file://automake-lossage.patch;patch=1 \ + file://spinbutton.patch;patch=1 \ + file://hardcoded_libtool.patch;patch=1 \ + file://disable-tooltips.patch;patch=1 \ + file://gtklabel-resize-patch;patch=1 \ + file://menu-deactivate.patch;patch=1 \ + file://xsettings.patch;patch=1 \ + file://scroll-timings.patch;patch=1 \ + file://small-gtkfilesel.patch;patch=1 \ + file://migration.patch;patch=1;pnum=0" +# file://no-demos.patch;patch=1 +# file://gtk+-handhelds.patch;patch=1 +# file://single-click.patch;patch=1 + +inherit autotools pkgconfig + +FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \ + ${bindir}/gtk-query-immodules-2.0 \ + ${libdir}/lib*.so.* \ + ${datadir}/themes ${sysconfdir} \ + ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so" +FILES_${PN}-dev += "${datadir}/gtk-2.0/include ${libdir}/gtk-2.0/include ${bindir}/gdk-pixbuf-csource" + +RRECOMMENDS_${PN} = "glibc-gconv-iso8859-1" + +EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration" +# --disable-cruft + +LIBV = "2.4.0" + +do_stage () { + oe_libinstall -so -C gtk libgtk-x11-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gdk libgdk-x11-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C contrib/gdk-pixbuf-xlib libgdk_pixbuf_xlib-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gdk-pixbuf libgdk_pixbuf-2.0 ${STAGING_LIBDIR} + + autotools_stage_includes + + mkdir -p ${STAGING_LIBDIR}/gtk-2.0/include + install -m 0644 gdk/gdkconfig.h ${STAGING_LIBDIR}/gtk-2.0/include/gdkconfig.h + + install -m 0644 m4macros/gtk-2.0.m4 ${STAGING_DATADIR}/aclocal/ +} + +do_install_append () { + install -d ${D}${sysconfdir}/gtk-2.0 +} + +postinst_prologue() { +if [ "x$D" != "x" ]; then + exit 1 +fi + +} + +python populate_packages_prepend () { + import os.path + + prologue = bb.data.getVar("postinst_prologue", d, 1) + + gtk_libdir = bb.data.expand('${libdir}/gtk-2.0/${LIBV}', d) + loaders_root = os.path.join(gtk_libdir, 'loaders') + immodules_root = os.path.join(gtk_libdir, 'immodules') + + do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', prologue + 'gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders') + do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s', prologue + 'gtk-query-immodules > /etc/gtk-2.0/gtk.immodules') + + if (bb.data.getVar('DEBIAN_NAMES', d, 1)): + bb.data.setVar('PKG_${PN}', 'libgtk-2.0', d) +} |