gtk+: Drop old 2.10.* and 2.13* versions

This commit is contained in:
Richard Purdie
2009-01-02 17:03:34 +00:00
parent cf093fa0f3
commit 23486c1532
37 changed files with 0 additions and 22929 deletions

View File

@@ -1,32 +0,0 @@
Index: gtk/gtkcellrenderer.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcellrenderer.c,v
retrieving revision 1.55
diff -u -r1.55 gtkcellrenderer.c
--- gtk/gtkcellrenderer.c 14 May 2006 04:25:28 -0000 1.55
+++ gtk/gtkcellrenderer.c 30 Jun 2006 10:57:43 -0000
@@ -551,6 +551,7 @@
if (cell->cell_background_set && !selected)
{
+#ifdef USE_CAIRO_INTERNALLY
cairo_t *cr = gdk_cairo_create (window);
gdk_cairo_rectangle (cr, background_area);
@@ -558,6 +559,16 @@
cairo_fill (cr);
cairo_destroy (cr);
+#else
+ GdkGC *gc;
+
+ gc = gdk_gc_new (window);
+ gdk_gc_set_rgb_fg_color (gc, &priv->cell_background);
+ gdk_draw_rectangle (window, gc, TRUE,
+ background_area->x, background_area->y,
+ background_area->width, background_area->height);
+ g_object_unref (gc);
+#endif
}
GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell,

View File

@@ -1,66 +0,0 @@
Index: gtk/gtkcombobox.c
===================================================================
--- gtk/gtkcombobox.c.orig 2007-08-21 11:10:15.000000000 +0000
+++ gtk/gtkcombobox.c 2007-08-21 11:13:00.000000000 +0000
@@ -692,6 +692,25 @@
FALSE,
GTK_PARAM_READABLE));
+ /**
+ * GtkComboBox:arrow-size:
+ *
+ * Sets the minimum size of the arrow in the combo box. Note
+ * that the arrow size is coupled to the font size, so in case
+ * a larger font is used, the arrow will be larger than set
+ * by arrow size.
+ *
+ * Since: 2.12
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("arrow-size",
+ P_("Arrow Size"),
+ P_("The minimum size of the arrow in the combo box"),
+ 0,
+ G_MAXINT,
+ 15,
+ GTK_PARAM_READABLE));
+
g_type_class_add_private (object_class, sizeof (GtkComboBoxPrivate));
}
@@ -1926,8 +1945,13 @@
{
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
gint focus_width, focus_pad;
+ gint font_size;
+ gint arrow_size;
GtkAllocation child;
GtkRequisition req;
+ PangoContext *context;
+ PangoFontMetrics *metrics;
+ PangoFontDescription *font_desc;
gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
widget->allocation = *allocation;
@@ -1935,8 +1959,21 @@
gtk_widget_style_get (GTK_WIDGET (widget),
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
+ "arrow-size", &arrow_size,
NULL);
+ font_desc = GTK_BIN (widget)->child->style->font_desc;
+ context = gtk_widget_get_pango_context (widget);
+ metrics = pango_context_get_metrics (context, font_desc,
+ pango_context_get_language (context));
+ font_size = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
+ pango_font_metrics_get_descent (metrics));
+ pango_font_metrics_unref (metrics);
+
+ arrow_size = MAX (arrow_size, font_size);
+
+ gtk_widget_set_size_request (combo_box->priv->arrow, arrow_size, arrow_size);
+
if (!combo_box->priv->tree_view)
{
if (combo_box->priv->cell_view)

View File

@@ -1,50 +0,0 @@
--- gtk+-2.10.0/configure.in~ 2006-07-05 18:11:44.000000000 +0200
+++ gtk+-2.10.0/configure.in 2006-07-05 18:11:44.000000000 +0200
@@ -1539,26 +1539,27 @@
# Printing system checks
################################################################
-AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
-if test "x$CUPS_CONFIG" != "xno"; then
- CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
- CUPS_LIBS=`cups-config --libs`
-
- CUPS_API_VERSION=`cups-config --api-version`
- CUPS_API_MAJOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $1}'`
- CUPS_API_MINOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $2}'`
-
- if test $CUPS_API_MAJOR -gt 1 -o \
- $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
- AC_DEFINE(HAVE_CUPS_API_1_2)
- fi
-
- AC_SUBST(CUPS_API_MAJOR)
- AC_SUBST(CUPS_API_MINOR)
- AC_SUBST(CUPS_CFLAGS)
- AC_SUBST(CUPS_LIBS)
-fi
-AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
+#AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
+#if test "x$CUPS_CONFIG" != "xno"; then
+# CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
+# CUPS_LIBS=`cups-config --libs`
+#
+# CUPS_API_VERSION=`cups-config --api-version`
+# CUPS_API_MAJOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $1}'`
+# CUPS_API_MINOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $2}'`
+#
+# if test $CUPS_API_MAJOR -gt 1 -o \
+# $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
+# AC_DEFINE(HAVE_CUPS_API_1_2)
+# fi
+#
+# AC_SUBST(CUPS_API_MAJOR)
+# AC_SUBST(CUPS_API_MINOR)
+# AC_SUBST(CUPS_CFLAGS)
+# AC_SUBST(CUPS_LIBS)
+#fi
+#AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
+AM_CONDITIONAL(HAVE_CUPS,false)
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"

View File

@@ -1,103 +0,0 @@
Index: gtk/gtkentry.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
retrieving revision 1.317
diff -u -r1.317 gtkentry.c
--- gtk/gtkentry.c 29 Jun 2006 09:18:05 -0000 1.317
+++ gtk/gtkentry.c 2 Jul 2006 14:14:24 -0000
@@ -3337,7 +3337,9 @@
if (GTK_WIDGET_DRAWABLE (entry))
{
PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
+#ifdef USE_CAIRO_INTERNALLY
cairo_t *cr;
+#endif
gint x, y;
gint start_pos, end_pos;
@@ -3345,23 +3347,35 @@
get_layout_position (entry, &x, &y);
+#ifdef USE_CAIRO_INTERNALLY
cr = gdk_cairo_create (entry->text_area);
cairo_move_to (cr, x, y);
gdk_cairo_set_source_color (cr, &widget->style->text [widget->state]);
pango_cairo_show_layout (cr, layout);
+#else
+ gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state],
+ x, y,
+ layout);
+#endif
if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start_pos, &end_pos))
{
gint *ranges;
gint n_ranges, i;
PangoRectangle logical_rect;
- GdkColor *selection_color, *text_color;
GtkBorder inner_border;
+#ifdef USE_CAIRO_INTERNALLY
+ GdkColor *selection_color, *text_color;
+#else
+ GdkGC *selection_gc, *text_gc;
+ GdkRegion *clip_region;
+#endif
pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
gtk_entry_get_pixel_ranges (entry, &ranges, &n_ranges);
+#ifdef USE_CAIRO_INTERNALLY
if (GTK_WIDGET_HAS_FOCUS (entry))
{
selection_color = &widget->style->base [GTK_STATE_SELECTED];
@@ -3390,11 +3404,46 @@
cairo_move_to (cr, x, y);
gdk_cairo_set_source_color (cr, text_color);
pango_cairo_show_layout (cr, layout);
-
+#else
+ if (GTK_WIDGET_HAS_FOCUS (entry))
+ {
+ selection_gc = widget->style->base_gc [GTK_STATE_SELECTED];
+ text_gc = widget->style->text_gc [GTK_STATE_SELECTED];
+ }
+ else
+ {
+ selection_gc = widget->style->base_gc [GTK_STATE_ACTIVE];
+ text_gc = widget->style->text_gc [GTK_STATE_ACTIVE];
+ }
+
+ clip_region = gdk_region_new ();
+ for (i = 0; i < n_ranges; ++i)
+ {
+ GdkRectangle rect;
+
+ rect.x = inner_border.left - entry->scroll_offset + ranges[2 * i];
+ rect.y = y;
+ rect.width = ranges[2 * i + 1];
+ rect.height = logical_rect.height;
+
+ gdk_draw_rectangle (entry->text_area, selection_gc, TRUE,
+ rect.x, rect.y, rect.width, rect.height);
+
+ gdk_region_union_with_rect (clip_region, &rect);
+ }
+
+ gdk_gc_set_clip_region (text_gc, clip_region);
+ gdk_draw_layout (entry->text_area, text_gc,
+ x, y,
+ layout);
+ gdk_gc_set_clip_region (text_gc, NULL);
+ gdk_region_destroy (clip_region);
+#endif
g_free (ranges);
}
-
+#ifdef USE_CAIRO_INTERNALLY
cairo_destroy (cr);
+#endif
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,77 +0,0 @@
Index: gtk+-2.10.14/gtk/gtkfilechooserdialog.c
===================================================================
--- gtk+-2.10.14.orig/gtk/gtkfilechooserdialog.c 2007-08-29 18:03:04.000000000 +0100
+++ gtk+-2.10.14/gtk/gtkfilechooserdialog.c 2007-08-29 18:04:27.000000000 +0100
@@ -50,8 +50,6 @@
static void gtk_file_chooser_dialog_map (GtkWidget *widget);
static void gtk_file_chooser_dialog_unmap (GtkWidget *widget);
-static void gtk_file_chooser_dialog_style_set (GtkWidget *widget,
- GtkStyle *previous_style);
static void response_cb (GtkDialog *dialog,
gint response_id);
@@ -73,7 +71,6 @@
widget_class->map = gtk_file_chooser_dialog_map;
widget_class->unmap = gtk_file_chooser_dialog_unmap;
- widget_class->style_set = gtk_file_chooser_dialog_style_set;
_gtk_file_chooser_install_properties (gobject_class);
@@ -86,10 +83,16 @@
GtkFileChooserDialogPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog,
GTK_TYPE_FILE_CHOOSER_DIALOG,
GtkFileChooserDialogPrivate);
+
+ GtkDialog *fc_dialog = GTK_DIALOG (dialog);
+
dialog->priv = priv;
dialog->priv->response_requested = FALSE;
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+ gtk_dialog_set_has_separator (fc_dialog, FALSE);
+ gtk_container_set_border_width (GTK_CONTAINER (fc_dialog), 5);
+ gtk_box_set_spacing (GTK_BOX (fc_dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
+ gtk_container_set_border_width (GTK_CONTAINER (fc_dialog->action_area), 5);
/* We do a signal connection here rather than overriding the method in
* class_init because GtkDialog::response is a RUN_LAST signal. We want *our*
@@ -285,6 +288,7 @@
g_signal_connect (priv->widget, "response-requested",
G_CALLBACK (file_chooser_widget_response_requested), object);
+ gtk_container_set_border_width (GTK_CONTAINER (priv->widget), 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox), priv->widget, TRUE, TRUE, 0);
gtk_widget_show (priv->widget);
@@ -414,29 +418,6 @@
gtk_widget_unmap (priv->widget);
}
-static void
-gtk_file_chooser_dialog_style_set (GtkWidget *widget,
- GtkStyle *previous_style)
-{
- GtkDialog *dialog;
-
- if (GTK_WIDGET_CLASS (gtk_file_chooser_dialog_parent_class)->style_set)
- GTK_WIDGET_CLASS (gtk_file_chooser_dialog_parent_class)->style_set (widget, previous_style);
-
- dialog = GTK_DIALOG (widget);
-
- /* Override the style properties with HIG-compliant spacings. Ugh.
- * http://developer.gnome.org/projects/gup/hig/1.0/layout.html#layout-dialogs
- * http://developer.gnome.org/projects/gup/hig/1.0/windows.html#alert-spacing
- */
-
- gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox), 12);
- gtk_box_set_spacing (GTK_BOX (dialog->vbox), 24);
-
- gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 0);
- gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
-}
-
/* GtkDialog::response handler */
static void
response_cb (GtkDialog *dialog,

View File

@@ -1,32 +0,0 @@
Index: gtk+-2.10.14/gtk/gtkfilechooserutils.h
===================================================================
--- gtk+-2.10.14.orig/gtk/gtkfilechooserutils.h 2007-08-24 08:37:40.000000000 +0100
+++ gtk+-2.10.14/gtk/gtkfilechooserutils.h 2007-08-24 08:51:59.000000000 +0100
@@ -41,7 +41,9 @@
GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE,
GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN,
GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION,
- GTK_FILE_CHOOSER_PROP_LAST = GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION
+ GTK_FILE_CHOOSER_PROP_ROOT_FOLDER,
+ GTK_FILE_CHOOSER_PROP_SHOW_CREATE_FOLDER,
+ GTK_FILE_CHOOSER_PROP_LAST = GTK_FILE_CHOOSER_PROP_SHOW_CREATE_FOLDER
} GtkFileChooserProp;
void _gtk_file_chooser_install_properties (GObjectClass *klass);
Index: gtk+-2.10.14/gtk/gtkfilechooserutils.c
===================================================================
--- gtk+-2.10.14.orig/gtk/gtkfilechooserutils.c 2007-08-24 08:37:28.000000000 +0100
+++ gtk+-2.10.14/gtk/gtkfilechooserutils.c 2007-08-24 08:51:47.000000000 +0100
@@ -117,6 +117,12 @@
g_object_class_override_property (klass,
GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION,
"do-overwrite-confirmation");
+ g_object_class_override_property (klass,
+ GTK_FILE_CHOOSER_PROP_ROOT_FOLDER,
+ "root-folder");
+ g_object_class_override_property (klass,
+ GTK_FILE_CHOOSER_PROP_SHOW_CREATE_FOLDER,
+ "show-create-folder");
}
/**

View File

@@ -1,25 +0,0 @@
Index: gtk+-2.10.14/gtk/gtkfilechooser.c
===================================================================
--- gtk+-2.10.14.orig/gtk/gtkfilechooser.c 2007-08-24 08:52:32.000000000 +0100
+++ gtk+-2.10.14/gtk/gtkfilechooser.c 2007-08-24 08:57:21.000000000 +0100
@@ -272,6 +272,20 @@
"if necessary."),
FALSE,
GTK_PARAM_READWRITE));
+
+ g_object_interface_install_property (g_iface,
+ g_param_spec_string ("root-folder",
+ P_("File System Root"),
+ P_("Root folder for the file system below which the user should not be able to switch"),
+ NULL,
+ G_PARAM_WRITABLE));
+
+ g_object_interface_install_property (g_iface,
+ g_param_spec_boolean ("show-create-folder",
+ P_("Show Create Folder button"),
+ P_("Whether the Create Folder button should be visible on the bar"),
+ TRUE,
+ G_PARAM_READWRITE));
}
/**

View File

@@ -1,198 +0,0 @@
Index: gtk+-2.10.14/gtk/gtkfilesystemunix.c
===================================================================
--- gtk+-2.10.14.orig/gtk/gtkfilesystemunix.c 2007-07-16 20:44:17.000000000 +0100
+++ gtk+-2.10.14/gtk/gtkfilesystemunix.c 2007-08-24 08:29:43.000000000 +0100
@@ -38,6 +38,7 @@
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
+#include <sys/statvfs.h>
#include <sys/types.h>
#include <pwd.h>
#ifdef HAVE_UNISTD_H
@@ -475,7 +476,55 @@
static GSList *
gtk_file_system_unix_list_volumes (GtkFileSystem *file_system)
{
- return g_slist_append (NULL, get_root_volume ());
+ struct statvfs stv;
+ struct stat st;
+ GSList * l = g_slist_append (NULL, get_root_volume ());
+
+ if (!statvfs ("/.", &stv))
+ {
+ fsblkcnt_t root_blocks = stv.f_blocks;
+ fsfilcnt_t root_files = stv.f_files;
+
+ GDir * dir;
+ if ((dir = g_dir_open ("/media", 0, NULL)) != NULL)
+ {
+ const gchar * name;
+ while ((name = g_dir_read_name (dir)) != NULL)
+ {
+ gchar * abs_name;
+
+ /* Skip ram disks */
+ if (!strcmp (name, "ram"))
+ continue;
+
+ abs_name = g_strconcat ("/media/", name, NULL);
+
+ if (!stat (abs_name, &st) && S_ISDIR (st.st_mode))
+ {
+ gchar * dot = g_strconcat (abs_name, "/.", NULL);
+ if (!statvfs (dot, &stv) &&
+ (stv.f_blocks != root_blocks ||
+ stv.f_files != root_files))
+ {
+ GtkFilePath * path =
+ gtk_file_system_filename_to_path (file_system,
+ abs_name);
+
+ if (path)
+ l = g_slist_append (l, path);
+ }
+
+ g_free (dot);
+ }
+
+ g_free (abs_name);
+ }
+
+ g_dir_close (dir);
+ }
+ }
+
+ return l;
}
static GtkFileSystemVolume *
@@ -489,13 +538,18 @@
remove_trailing_slash (const char *filename)
{
int len;
-
+
len = strlen (filename);
- if (len > 1 && filename[len - 1] == '/')
- return g_strndup (filename, len - 1);
- else
- return g_memdup (filename, len + 1);
+ if (len > 1)
+ {
+ gchar *c = g_utf8_prev_char (filename + len);
+
+ if (c && *c == '/')
+ return g_strndup (filename, len - 1);
+ }
+
+ return g_memdup (filename, len + 1);
}
/* Delay callback dispatching
@@ -1143,7 +1197,7 @@
gtk_file_system_unix_volume_get_base_path (GtkFileSystem *file_system,
GtkFileSystemVolume *volume)
{
- return gtk_file_path_new_dup ("/");
+ return gtk_file_path_copy ((GtkFilePath*)volume);
}
static gboolean
@@ -1177,7 +1231,32 @@
gtk_file_system_unix_volume_get_display_name (GtkFileSystem *file_system,
GtkFileSystemVolume *volume)
{
- return g_strdup (_("File System")); /* Same as Nautilus */
+ gchar * slash;
+ gchar * path;
+ gchar * c;
+
+ g_return_val_if_fail (file_system && volume, NULL);
+
+ path = gtk_file_system_path_to_filename (file_system, (GtkFilePath*) volume);
+
+ g_return_val_if_fail (path && *path, NULL);
+
+ if (path[0] == '/' && !path[1])
+ return g_strdup (_("Filesystem")); /* Same as Nautilus */
+
+ /* Now the media volumes */
+ /* strip trailing / if any */
+ c = g_utf8_prev_char (path + strlen(path));
+
+ if (*c == '/')
+ *c = 0;
+
+ slash = g_utf8_strrchr (path, -1, '/');
+
+ if (!slash)
+ return g_strdup (path);
+
+ return g_strdup (slash + 1);
}
static IconType
@@ -1265,10 +1344,57 @@
GtkFileSystemVolume *volume,
GError **error)
{
- /* FIXME: maybe we just always want to return GTK_STOCK_HARDDISK here?
- * or the new tango icon name?
- */
- return g_strdup ("gnome-dev-harddisk");
+ gchar * c;
+ gchar * slash;
+ gchar * path = NULL;
+ GtkFilePath * fpath;
+ const gchar * id = NULL;
+
+ g_return_val_if_fail (file_system && volume, NULL);
+
+ fpath = gtk_file_system_volume_get_base_path (file_system, volume);
+
+ if (!fpath)
+ goto out;
+
+ path = gtk_file_system_path_to_filename (file_system, fpath);
+ gtk_file_path_free (fpath);
+
+ if (!path || !*path || (*path == '/' && !path[1]))
+ goto out;
+
+ /* Now the media volumes */
+ /* strip trailing / if any */
+ c = g_utf8_prev_char (path + strlen(path));
+
+ if (*c == '/')
+ *c = 0;
+
+ slash = g_utf8_strrchr (path, -1, '/');
+
+ if (slash)
+ {
+ slash++;
+
+ if (!strcmp (slash, "card"))
+ id = "gnome-dev-media-sdmmc";
+ else if (!strcmp (slash, "cf"))
+ id = "gnome-dev-media-cf";
+ else if (!strncmp (slash, "mmc", 3))
+ id = "gnome-dev-media-sdmmc";
+ else if (!strcmp (slash, "usbhdd"))
+ id = "gnome-dev-removable-usb";
+ else
+ id = "gnome-dev-removable";
+ }
+
+ out:
+ g_free (path);
+
+ if (!id)
+ id = "gnome-fs-blockdev";
+
+ return g_strdup (id);
}
static char *

View File

@@ -1,10 +0,0 @@
--- 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

View File

@@ -1,29 +0,0 @@
--- /tmp/configure.in 2007-01-08 17:50:49.000000000 +0100
+++ gtk+-2.10.7/configure.in 2007-01-08 17:52:33.495251000 +0100
@@ -371,7 +371,7 @@
case $enable_explicit_deps in
auto)
export SED
- deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh`
+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo $deplibs_check_method') | sh`
if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
enable_explicit_deps=yes
else
@@ -773,7 +773,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/'`
@@ -1611,7 +1611,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 SED
-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//"`

View File

@@ -1,51 +0,0 @@
--- gtk+-2.10.0/gtk/gtkmenushell.c.orig 2006-07-05 17:17:34.000000000 +0200
+++ gtk+-2.10.0/gtk/gtkmenushell.c 2006-07-05 17:19:01.000000000 +0200
@@ -42,7 +42,7 @@
#include "gtkintl.h"
#include "gtkalias.h"
-#define MENU_SHELL_TIMEOUT 500
+#define MENU_SHELL_TIMEOUT 2000
#define PACK_DIRECTION(m) \
(GTK_IS_MENU_BAR (m) \
@@ -203,6 +203,8 @@
G_DEFINE_TYPE (GtkMenuShell, gtk_menu_shell, GTK_TYPE_CONTAINER)
+static int last_crossing_time;
+
static void
gtk_menu_shell_class_init (GtkMenuShellClass *klass)
{
@@ -517,6 +519,7 @@
gtk_grab_add (GTK_WIDGET (menu_shell));
menu_shell->have_grab = TRUE;
menu_shell->active = TRUE;
+ last_crossing_time = 0;
}
}
@@ -669,6 +672,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)
{
@@ -716,6 +726,8 @@
{
menu_item = gtk_get_event_widget ((GdkEvent*) event);
+ last_crossing_time = event->time;
+
if (!menu_item ||
(GTK_IS_MENU_ITEM (menu_item) &&
!_gtk_menu_item_is_selectable (menu_item)))

View File

@@ -1,10 +0,0 @@
--- gtk+-2.10.1/Makefile.am.orig 2006-08-08 12:37:30.000000000 +0100
+++ gtk+-2.10.1/Makefile.am 2006-08-08 12:37:48.000000000 +0100
@@ -1,6 +1,6 @@
## Makefile.am for GTK+
-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib
+SRC_SUBDIRS = gdk-pixbuf gdk gtk modules tests perf contrib
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
# require automake 1.4

File diff suppressed because it is too large Load Diff

View File

@@ -1,41 +0,0 @@
Index: gtk/gtkrange.c
===================================================================
--- gtk/gtkrange.c (revision 18523)
+++ gtk/gtkrange.c (working copy)
@@ -99,6 +99,8 @@
GtkSensitivityType lower_sensitivity;
GtkSensitivityType upper_sensitivity;
+
+ guint motion_idle;
};
@@ -1721,6 +1723,16 @@
&handled);
}
+static gboolean
+update_slider_position_idle (GtkRange *range)
+{
+ update_slider_position (range, range->layout->mouse_x,range->layout->mouse_y);
+
+ range->layout->motion_idle = 0;
+
+ return FALSE;
+}
+
static void
stop_scrolling (GtkRange *range)
{
@@ -1860,8 +1872,8 @@
if (gtk_range_update_mouse_location (range))
gtk_widget_queue_draw (widget);
- if (range->layout->grab_location == MOUSE_SLIDER)
- update_slider_position (range, x, y);
+ if (range->layout->grab_location == MOUSE_SLIDER && !range->layout->motion_idle)
+ range->layout->motion_idle = g_idle_add ((GSourceFunc)update_slider_position_idle, range);
/* We handled the event if the mouse was in the range_rect */
return range->layout->mouse_location != MOUSE_OUTSIDE;

View File

@@ -1,19 +0,0 @@
--- /tmp/Makefile.am 2007-01-08 17:44:47.000000000 +0100
+++ gtk+-2.10.7/gtk/Makefile.am 2007-01-08 17:45:17.025251000 +0100
@@ -1128,11 +1128,11 @@
./gtk-update-icon-cache
endif
-gtkbuiltincache.h: @REBUILD@ stamp-icons
- $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
- $(gtk_update_icon_cache_program) --force --ignore-theme-index \
- --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
- mv gtkbuiltincache.h.tmp gtkbuiltincache.h
+#gtkbuiltincache.h: @REBUILD@ stamp-icons
+# $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
+# $(gtk_update_icon_cache_program) --force --ignore-theme-index \
+# --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
+# mv gtkbuiltincache.h.tmp gtkbuiltincache.h
EXTRA_DIST += \
$(STOCK_ICONS) \

View File

@@ -1,35 +0,0 @@
Index: gtk/gtkscrolledwindow.c
===================================================================
--- gtk/gtkscrolledwindow.c (revision 18493)
+++ gtk/gtkscrolledwindow.c (working copy)
@@ -885,7 +885,7 @@
if (GTK_IS_SCROLLED_WINDOW (widget))
{
gtk_scrolled_window_update_real_placement (GTK_SCROLLED_WINDOW (widget));
- gtk_widget_queue_draw (widget);
+ gtk_widget_queue_resize (widget);
}
else if (GTK_IS_CONTAINER (widget))
gtk_container_forall (GTK_CONTAINER (widget), traverse_container, NULL);
Index: gdk/x11/gdksettings.c
===================================================================
--- gdk/x11/gdksettings.c (revision 18493)
+++ gdk/x11/gdksettings.c (working copy)
@@ -65,7 +65,8 @@
"Xft/RGBA\0" "gtk-xft-rgba\0"
"Xft/DPI\0" "gtk-xft-dpi\0"
"Net/FallbackIconTheme\0" "gtk-fallback-icon-theme\0"
- "Gtk/TouchscreenMode\0" "gtk-touchscreen-mode\0";
+ "Gtk/TouchscreenMode\0" "gtk-touchscreen-mode\0"
+ "Gtk/ScrolledWindowPlacement\0" "gtk-scrolled-window-placement\0";
static const struct
{
@@ -107,5 +108,6 @@
{ 1197, 1206 },
{ 1219, 1227 },
{ 1239, 1261 },
- { 1285, 1305 }
+ { 1285, 1305 },
+ { 1326, 1354 }
};

View File

@@ -1,100 +0,0 @@
Index: gtk/gtkcellrenderertoggle.c
===================================================================
--- gtk/gtkcellrenderertoggle.c (revision 18523)
+++ gtk/gtkcellrenderertoggle.c (working copy)
@@ -71,6 +71,8 @@
PROP_INDICATOR_SIZE
};
+/* This is a hard-coded default which promptly gets overridden by a size
+ calculated from the font size. */
#define TOGGLE_WIDTH 12
static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
@@ -80,8 +82,9 @@
typedef struct _GtkCellRendererTogglePrivate GtkCellRendererTogglePrivate;
struct _GtkCellRendererTogglePrivate
{
- gint indicator_size;
-
+ gint indicator_size; /* This is the real size */
+ gint override_size; /* This is the size set from the indicator-size property */
+ GtkWidget *cached_widget;
guint inconsistent : 1;
};
@@ -104,6 +107,7 @@
GTK_CELL_RENDERER (celltoggle)->ypad = 2;
priv->indicator_size = TOGGLE_WIDTH;
+ priv->override_size = 0;
priv->inconsistent = FALSE;
}
@@ -210,7 +214,7 @@
g_value_set_boolean (value, celltoggle->radio);
break;
case PROP_INDICATOR_SIZE:
- g_value_set_int (value, priv->indicator_size);
+ g_value_set_int (value, priv->override_size ? priv->override_size : priv->indicator_size);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -245,7 +249,7 @@
celltoggle->radio = g_value_get_boolean (value);
break;
case PROP_INDICATOR_SIZE:
- priv->indicator_size = g_value_get_int (value);
+ priv->override_size = g_value_get_int (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -273,6 +277,27 @@
}
static void
+on_widget_style_set (GtkWidget *widget, GtkStyle *previous, gpointer user_data)
+{
+ GtkCellRendererTogglePrivate *priv = user_data;
+ PangoContext *context;
+ PangoFontMetrics *metrics;
+ int height;
+
+ context = gtk_widget_get_pango_context (widget);
+ metrics = pango_context_get_metrics (context,
+ widget->style->font_desc,
+ pango_context_get_language (context));
+
+ height = pango_font_metrics_get_ascent (metrics) +
+ pango_font_metrics_get_descent (metrics);
+
+ pango_font_metrics_unref (metrics);
+
+ priv->indicator_size = PANGO_PIXELS (height * 0.85);
+}
+
+static void
gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
GdkRectangle *cell_area,
@@ -287,6 +312,20 @@
priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell);
+ if (priv->override_size) {
+ priv->indicator_size = priv->override_size;
+ } else if (priv->cached_widget != widget) {
+ if (priv->cached_widget) {
+ g_object_remove_weak_pointer (widget, &priv->cached_widget);
+ g_signal_handlers_disconnect_by_func (priv->cached_widget, on_widget_style_set, priv);
+ }
+ priv->cached_widget = widget;
+ g_object_add_weak_pointer (widget, &priv->cached_widget);
+ g_signal_connect (widget, "style-set", on_widget_style_set, priv);
+
+ on_widget_style_set (widget, NULL, priv);
+ }
+
calc_width = (gint) cell->xpad * 2 + priv->indicator_size;
calc_height = (gint) cell->ypad * 2 + priv->indicator_size;

View File

@@ -1,16 +0,0 @@
--- 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

View File

@@ -1,32 +0,0 @@
Index: gtk/gtkcellrenderer.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcellrenderer.c,v
retrieving revision 1.55
diff -u -r1.55 gtkcellrenderer.c
--- gtk/gtkcellrenderer.c 14 May 2006 04:25:28 -0000 1.55
+++ gtk/gtkcellrenderer.c 30 Jun 2006 10:57:43 -0000
@@ -551,6 +551,7 @@
if (cell->cell_background_set && !selected)
{
+#ifdef USE_CAIRO_INTERNALLY
cairo_t *cr = gdk_cairo_create (window);
gdk_cairo_rectangle (cr, background_area);
@@ -558,6 +559,16 @@
cairo_fill (cr);
cairo_destroy (cr);
+#else
+ GdkGC *gc;
+
+ gc = gdk_gc_new (window);
+ gdk_gc_set_rgb_fg_color (gc, &priv->cell_background);
+ gdk_draw_rectangle (window, gc, TRUE,
+ background_area->x, background_area->y,
+ background_area->width, background_area->height);
+ g_object_unref (gc);
+#endif
}
GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell,

View File

@@ -1,67 +0,0 @@
Index: gtk/gtkcombobox.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcombobox.c,v
retrieving revision 1.185
diff -u -p -r1.185 gtkcombobox.c
--- gtk/gtkcombobox.c 12 Oct 2006 13:48:07 -0000 1.185
+++ gtk/gtkcombobox.c 1 Nov 2006 19:01:09 -0000
@@ -756,6 +756,25 @@ gtk_combo_box_class_init (GtkComboBoxCla
FALSE,
GTK_PARAM_READABLE));
+ /**
+ * GtkComboBox:arrow-size:
+ *
+ * Sets the minimum size of the arrow in the combo box. Note
+ * that the arrow size is coupled to the font size, so in case
+ * a larger font is used, the arrow will be larger than set
+ * by arrow size.
+ *
+ * Since: 2.12
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("arrow-size",
+ P_("Arrow Size"),
+ P_("The minimum size of the arrow in the combo box"),
+ 0,
+ G_MAXINT,
+ 15,
+ GTK_PARAM_READABLE));
+
g_type_class_add_private (object_class, sizeof (GtkComboBoxPrivate));
}
@@ -1897,7 +1916,12 @@ gtk_combo_box_size_request (GtkWidget
{
gint width, height;
gint focus_width, focus_pad;
+ gint font_size;
+ gint arrow_size;
GtkRequisition bin_req;
+ PangoContext *context;
+ PangoFontMetrics *metrics;
+ PangoFontDescription *font_desc;
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
@@ -1910,7 +1934,20 @@ gtk_combo_box_size_request (GtkWidget
gtk_widget_style_get (GTK_WIDGET (widget),
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
+ "arrow-size", &arrow_size,
NULL);
+
+ font_desc = GTK_BIN (widget)->child->style->font_desc;
+ context = gtk_widget_get_pango_context (widget);
+ metrics = pango_context_get_metrics (context, font_desc,
+ pango_context_get_language (context));
+ font_size = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
+ pango_font_metrics_get_descent (metrics));
+ pango_font_metrics_unref (metrics);
+
+ arrow_size = MAX (arrow_size, font_size);
+
+ gtk_widget_set_size_request (combo_box->priv->arrow, arrow_size, arrow_size);
if (!combo_box->priv->tree_view)
{

View File

@@ -1,103 +0,0 @@
Index: gtk/gtkentry.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
retrieving revision 1.317
diff -u -r1.317 gtkentry.c
--- gtk/gtkentry.c 29 Jun 2006 09:18:05 -0000 1.317
+++ gtk/gtkentry.c 2 Jul 2006 14:14:24 -0000
@@ -3337,7 +3337,9 @@
if (GTK_WIDGET_DRAWABLE (entry))
{
PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
+#ifdef USE_CAIRO_INTERNALLY
cairo_t *cr;
+#endif
gint x, y;
gint start_pos, end_pos;
@@ -3345,23 +3347,35 @@
get_layout_position (entry, &x, &y);
+#ifdef USE_CAIRO_INTERNALLY
cr = gdk_cairo_create (entry->text_area);
cairo_move_to (cr, x, y);
gdk_cairo_set_source_color (cr, &widget->style->text [widget->state]);
pango_cairo_show_layout (cr, layout);
+#else
+ gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state],
+ x, y,
+ layout);
+#endif
if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start_pos, &end_pos))
{
gint *ranges;
gint n_ranges, i;
PangoRectangle logical_rect;
- GdkColor *selection_color, *text_color;
GtkBorder inner_border;
+#ifdef USE_CAIRO_INTERNALLY
+ GdkColor *selection_color, *text_color;
+#else
+ GdkGC *selection_gc, *text_gc;
+ GdkRegion *clip_region;
+#endif
pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
gtk_entry_get_pixel_ranges (entry, &ranges, &n_ranges);
+#ifdef USE_CAIRO_INTERNALLY
if (GTK_WIDGET_HAS_FOCUS (entry))
{
selection_color = &widget->style->base [GTK_STATE_SELECTED];
@@ -3390,11 +3404,46 @@
cairo_move_to (cr, x, y);
gdk_cairo_set_source_color (cr, text_color);
pango_cairo_show_layout (cr, layout);
-
+#else
+ if (GTK_WIDGET_HAS_FOCUS (entry))
+ {
+ selection_gc = widget->style->base_gc [GTK_STATE_SELECTED];
+ text_gc = widget->style->text_gc [GTK_STATE_SELECTED];
+ }
+ else
+ {
+ selection_gc = widget->style->base_gc [GTK_STATE_ACTIVE];
+ text_gc = widget->style->text_gc [GTK_STATE_ACTIVE];
+ }
+
+ clip_region = gdk_region_new ();
+ for (i = 0; i < n_ranges; ++i)
+ {
+ GdkRectangle rect;
+
+ rect.x = inner_border.left - entry->scroll_offset + ranges[2 * i];
+ rect.y = y;
+ rect.width = ranges[2 * i + 1];
+ rect.height = logical_rect.height;
+
+ gdk_draw_rectangle (entry->text_area, selection_gc, TRUE,
+ rect.x, rect.y, rect.width, rect.height);
+
+ gdk_region_union_with_rect (clip_region, &rect);
+ }
+
+ gdk_gc_set_clip_region (text_gc, clip_region);
+ gdk_draw_layout (entry->text_area, text_gc,
+ x, y,
+ layout);
+ gdk_gc_set_clip_region (text_gc, NULL);
+ gdk_region_destroy (clip_region);
+#endif
g_free (ranges);
}
-
+#ifdef USE_CAIRO_INTERNALLY
cairo_destroy (cr);
+#endif
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,57 +0,0 @@
Index: gtk+-2.12.3/gtk/gtkfilechooser.c
===================================================================
--- gtk+-2.12.3.orig/gtk/gtkfilechooser.c 2007-12-04 16:52:08.000000000 +0000
+++ gtk+-2.12.3/gtk/gtkfilechooser.c 2008-01-02 13:15:38.000000000 +0000
@@ -272,6 +272,20 @@
"if necessary."),
FALSE,
GTK_PARAM_READWRITE));
+
+ g_object_interface_install_property (g_iface,
+ g_param_spec_string ("root-folder",
+ P_("File System Root"),
+ P_("Root folder for the file system below which the user should not be able to switch"),
+ NULL,
+ G_PARAM_WRITABLE));
+
+ g_object_interface_install_property (g_iface,
+ g_param_spec_boolean ("show-create-folder",
+ P_("Show Create Folder button"),
+ P_("Whether the Create Folder button should be visible on the bar"),
+ TRUE,
+ G_PARAM_READWRITE));
}
/**
Index: gtk+-2.12.3/gtk/gtkfilechooserutils.h
===================================================================
--- gtk+-2.12.3.orig/gtk/gtkfilechooserutils.h 2007-12-04 16:52:08.000000000 +0000
+++ gtk+-2.12.3/gtk/gtkfilechooserutils.h 2008-01-02 13:15:17.000000000 +0000
@@ -41,7 +41,9 @@
GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE,
GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN,
GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION,
- GTK_FILE_CHOOSER_PROP_LAST = GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION
+ GTK_FILE_CHOOSER_PROP_ROOT_FOLDER,
+ GTK_FILE_CHOOSER_PROP_SHOW_CREATE_FOLDER,
+ GTK_FILE_CHOOSER_PROP_LAST = GTK_FILE_CHOOSER_PROP_SHOW_CREATE_FOLDER
} GtkFileChooserProp;
void _gtk_file_chooser_install_properties (GObjectClass *klass);
Index: gtk+-2.12.3/gtk/gtkfilechooserutils.c
===================================================================
--- gtk+-2.12.3.orig/gtk/gtkfilechooserutils.c 2007-12-04 16:52:08.000000000 +0000
+++ gtk+-2.12.3/gtk/gtkfilechooserutils.c 2008-01-02 13:15:17.000000000 +0000
@@ -117,6 +117,12 @@
g_object_class_override_property (klass,
GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION,
"do-overwrite-confirmation");
+ g_object_class_override_property (klass,
+ GTK_FILE_CHOOSER_PROP_ROOT_FOLDER,
+ "root-folder");
+ g_object_class_override_property (klass,
+ GTK_FILE_CHOOSER_PROP_SHOW_CREATE_FOLDER,
+ "show-create-folder");
}
/**

View File

@@ -1,35 +0,0 @@
--- gtk+-2.12.7.orig/gtk/gtkfilechooserdialog.c
+++ gtk+-2.12.7/gtk/gtkfilechooserdialog.c
@@ -165,10 +165,10 @@
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
if (width)
- *width = MIN (*width, (monitor.width * 3) / 4);
+ *width = MIN (*width, monitor.width);
if (height)
- *height = MIN (*height, (monitor.height * 3) / 4);
+ *height = MIN (*height, monitor.height);
}
static void
@@ -183,6 +183,7 @@
priv = GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog);
+#if 0
/* Unset any previously set size */
gtk_widget_set_size_request (GTK_WIDGET (dialog), -1, -1);
@@ -209,6 +210,11 @@
/* Ideal target size plus any extra size */
width = default_width + width + (2 * GTK_CONTAINER (dialog)->border_width);
height = default_height + height + (2 * GTK_CONTAINER (dialog)->border_width);
+#endif
+
+ /* for small screens we just hard code a sensible value */
+ width = 350;
+ height = 350;
if (GTK_WIDGET_REALIZED (dialog))
clamp_to_screen (GTK_WIDGET (dialog), &width, &height);

View File

@@ -1,198 +0,0 @@
Index: gtk+-2.12.3/gtk/gtkfilesystemunix.c
===================================================================
--- gtk+-2.12.3.orig/gtk/gtkfilesystemunix.c 2007-12-04 16:52:08.000000000 +0000
+++ gtk+-2.12.3/gtk/gtkfilesystemunix.c 2008-01-02 13:15:02.000000000 +0000
@@ -38,6 +38,7 @@
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
+#include <sys/statvfs.h>
#include <sys/types.h>
#include <pwd.h>
#ifdef HAVE_UNISTD_H
@@ -474,7 +475,55 @@
static GSList *
gtk_file_system_unix_list_volumes (GtkFileSystem *file_system)
{
- return g_slist_append (NULL, get_root_volume ());
+ struct statvfs stv;
+ struct stat st;
+ GSList * l = g_slist_append (NULL, get_root_volume ());
+
+ if (!statvfs ("/.", &stv))
+ {
+ fsblkcnt_t root_blocks = stv.f_blocks;
+ fsfilcnt_t root_files = stv.f_files;
+
+ GDir * dir;
+ if ((dir = g_dir_open ("/media", 0, NULL)) != NULL)
+ {
+ const gchar * name;
+ while ((name = g_dir_read_name (dir)) != NULL)
+ {
+ gchar * abs_name;
+
+ /* Skip ram disks */
+ if (!strcmp (name, "ram"))
+ continue;
+
+ abs_name = g_strconcat ("/media/", name, NULL);
+
+ if (!stat (abs_name, &st) && S_ISDIR (st.st_mode))
+ {
+ gchar * dot = g_strconcat (abs_name, "/.", NULL);
+ if (!statvfs (dot, &stv) &&
+ (stv.f_blocks != root_blocks ||
+ stv.f_files != root_files))
+ {
+ GtkFilePath * path =
+ gtk_file_system_filename_to_path (file_system,
+ abs_name);
+
+ if (path)
+ l = g_slist_append (l, path);
+ }
+
+ g_free (dot);
+ }
+
+ g_free (abs_name);
+ }
+
+ g_dir_close (dir);
+ }
+ }
+
+ return l;
}
static GtkFileSystemVolume *
@@ -488,13 +537,18 @@
remove_trailing_slash (const char *filename)
{
int len;
-
+
len = strlen (filename);
- if (len > 1 && filename[len - 1] == '/')
- return g_strndup (filename, len - 1);
- else
- return g_memdup (filename, len + 1);
+ if (len > 1)
+ {
+ gchar *c = g_utf8_prev_char (filename + len);
+
+ if (c && *c == '/')
+ return g_strndup (filename, len - 1);
+ }
+
+ return g_memdup (filename, len + 1);
}
/* Delay callback dispatching
@@ -1128,7 +1182,7 @@
gtk_file_system_unix_volume_get_base_path (GtkFileSystem *file_system,
GtkFileSystemVolume *volume)
{
- return gtk_file_path_new_dup ("/");
+ return gtk_file_path_copy ((GtkFilePath*)volume);
}
static gboolean
@@ -1162,7 +1216,32 @@
gtk_file_system_unix_volume_get_display_name (GtkFileSystem *file_system,
GtkFileSystemVolume *volume)
{
- return g_strdup (_("File System")); /* Same as Nautilus */
+ gchar * slash;
+ gchar * path;
+ gchar * c;
+
+ g_return_val_if_fail (file_system && volume, NULL);
+
+ path = gtk_file_system_path_to_filename (file_system, (GtkFilePath*) volume);
+
+ g_return_val_if_fail (path && *path, NULL);
+
+ if (path[0] == '/' && !path[1])
+ return g_strdup (_("Filesystem")); /* Same as Nautilus */
+
+ /* Now the media volumes */
+ /* strip trailing / if any */
+ c = g_utf8_prev_char (path + strlen(path));
+
+ if (*c == '/')
+ *c = 0;
+
+ slash = g_utf8_strrchr (path, -1, '/');
+
+ if (!slash)
+ return g_strdup (path);
+
+ return g_strdup (slash + 1);
}
static IconType
@@ -1250,10 +1329,57 @@
GtkFileSystemVolume *volume,
GError **error)
{
- /* FIXME: maybe we just always want to return GTK_STOCK_HARDDISK here?
- * or the new tango icon name?
- */
- return g_strdup ("gnome-dev-harddisk");
+ gchar * c;
+ gchar * slash;
+ gchar * path = NULL;
+ GtkFilePath * fpath;
+ const gchar * id = NULL;
+
+ g_return_val_if_fail (file_system && volume, NULL);
+
+ fpath = gtk_file_system_volume_get_base_path (file_system, volume);
+
+ if (!fpath)
+ goto out;
+
+ path = gtk_file_system_path_to_filename (file_system, fpath);
+ gtk_file_path_free (fpath);
+
+ if (!path || !*path || (*path == '/' && !path[1]))
+ goto out;
+
+ /* Now the media volumes */
+ /* strip trailing / if any */
+ c = g_utf8_prev_char (path + strlen(path));
+
+ if (*c == '/')
+ *c = 0;
+
+ slash = g_utf8_strrchr (path, -1, '/');
+
+ if (slash)
+ {
+ slash++;
+
+ if (!strcmp (slash, "card"))
+ id = "gnome-dev-media-sdmmc";
+ else if (!strcmp (slash, "cf"))
+ id = "gnome-dev-media-cf";
+ else if (!strncmp (slash, "mmc", 3))
+ id = "gnome-dev-media-sdmmc";
+ else if (!strcmp (slash, "usbhdd"))
+ id = "gnome-dev-removable-usb";
+ else
+ id = "gnome-dev-removable";
+ }
+
+ out:
+ g_free (path);
+
+ if (!id)
+ id = "gnome-fs-blockdev";
+
+ return g_strdup (id);
}
static char *

View File

@@ -1,10 +0,0 @@
--- 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

View File

@@ -1,29 +0,0 @@
--- /tmp/configure.in 2007-01-08 17:50:49.000000000 +0100
+++ gtk+-2.10.7/configure.in 2007-01-08 17:52:33.495251000 +0100
@@ -371,7 +371,7 @@
case $enable_explicit_deps in
auto)
export SED
- deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh`
+ deplibs_check_method=`($host_alias-libtool --config; echo 'eval echo $deplibs_check_method') | sh`
if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
enable_explicit_deps=yes
else
@@ -773,7 +773,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/'`
@@ -1611,7 +1611,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 SED
-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//"`

View File

@@ -1,51 +0,0 @@
--- gtk+-2.10.0/gtk/gtkmenushell.c.orig 2006-07-05 17:17:34.000000000 +0200
+++ gtk+-2.10.0/gtk/gtkmenushell.c 2006-07-05 17:19:01.000000000 +0200
@@ -42,7 +42,7 @@
#include "gtkintl.h"
#include "gtkalias.h"
-#define MENU_SHELL_TIMEOUT 500
+#define MENU_SHELL_TIMEOUT 2000
#define PACK_DIRECTION(m) \
(GTK_IS_MENU_BAR (m) \
@@ -203,6 +203,8 @@
G_DEFINE_TYPE (GtkMenuShell, gtk_menu_shell, GTK_TYPE_CONTAINER)
+static int last_crossing_time;
+
static void
gtk_menu_shell_class_init (GtkMenuShellClass *klass)
{
@@ -517,6 +519,7 @@
gtk_grab_add (GTK_WIDGET (menu_shell));
menu_shell->have_grab = TRUE;
menu_shell->active = TRUE;
+ last_crossing_time = 0;
}
}
@@ -669,6 +672,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)
{
@@ -716,6 +726,8 @@
{
menu_item = gtk_get_event_widget ((GdkEvent*) event);
+ last_crossing_time = event->time;
+
if (!menu_item ||
(GTK_IS_MENU_ITEM (menu_item) &&
!_gtk_menu_item_is_selectable (menu_item)))

View File

@@ -1,10 +0,0 @@
--- gtk+-2.10.1/Makefile.am.orig 2006-08-08 12:37:30.000000000 +0100
+++ gtk+-2.10.1/Makefile.am 2006-08-08 12:37:48.000000000 +0100
@@ -1,6 +1,6 @@
## Makefile.am for GTK+
-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib
+SRC_SUBDIRS = gdk-pixbuf gdk gtk modules tests perf contrib
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
# require automake 1.4

File diff suppressed because it is too large Load Diff

View File

@@ -1,127 +0,0 @@
5f084ea0849d5967a3c22821542ecaaa8accb398
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index bd95351..64e0e59 100644
--- gtk/gtkrange.c
+++ gtk/gtkrange.c
@@ -109,6 +109,8 @@ struct _GtkRangeLayout
GtkSensitivityType upper_sensitivity;
gdouble fill_level;
+
+ guint motion_idle_id;
};
@@ -205,6 +207,8 @@ static gboolean gtk_range_real_change_value (GtkRange *range,
static void gtk_range_update_value (GtkRange *range);
static gboolean gtk_range_key_press (GtkWidget *range,
GdkEventKey *event);
+static void gtk_range_add_motion_idle (GtkRange *range);
+static void gtk_range_remove_motion_idle (GtkRange *range);
static guint signals[LAST_SIGNAL];
@@ -1167,6 +1171,7 @@ gtk_range_destroy (GtkObject *object)
gtk_range_remove_step_timer (range);
gtk_range_remove_update_timer (range);
+ gtk_range_remove_motion_idle (range);
if (range->adjustment)
{
@@ -1276,6 +1281,7 @@ gtk_range_unrealize (GtkWidget *widget)
gtk_range_remove_step_timer (range);
gtk_range_remove_update_timer (range);
+ gtk_range_remove_motion_idle (range);
gdk_window_set_user_data (range->event_window, NULL);
gdk_window_destroy (range->event_window);
@@ -2165,7 +2171,7 @@ gtk_range_motion_notify (GtkWidget *widget,
gtk_widget_queue_draw (widget);
if (range->layout->grab_location == MOUSE_SLIDER)
- update_slider_position (range, x, y);
+ gtk_range_add_motion_idle (range);
/* We handled the event if the mouse was in the range_rect */
return range->layout->mouse_location != MOUSE_OUTSIDE;
@@ -3335,9 +3341,10 @@ initial_timeout (gpointer data)
g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
range = GTK_RANGE (data);
- range->timer->timeout_id = gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR,
- second_timeout,
- range);
+ range->timer->timeout_id =
+ gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR,
+ second_timeout,
+ range);
/* remove self */
return FALSE;
}
@@ -3357,9 +3364,8 @@ gtk_range_add_step_timer (GtkRange *range,
range->timer = g_new (GtkRangeStepTimer, 1);
- range->timer->timeout_id = gdk_threads_add_timeout (timeout,
- initial_timeout,
- range);
+ range->timer->timeout_id =
+ gdk_threads_add_timeout (timeout, initial_timeout, range);
range->timer->step = step;
gtk_range_scroll (range, range->timer->step);
@@ -3397,9 +3403,8 @@ gtk_range_reset_update_timer (GtkRange *range)
{
gtk_range_remove_update_timer (range);
- range->update_timeout_id = gdk_threads_add_timeout (UPDATE_DELAY,
- update_timeout,
- range);
+ range->update_timeout_id =
+ gdk_threads_add_timeout (UPDATE_DELAY, update_timeout, range);
}
static void
@@ -3412,5 +3417,40 @@ gtk_range_remove_update_timer (GtkRange *range)
}
}
+static gboolean
+motion_idle (gpointer data)
+{
+ GtkRange *range = data;
+ GtkRangeLayout *layout = range->layout;
+
+ update_slider_position (range, layout->mouse_x, layout->mouse_y);
+
+ layout->motion_idle_id = 0;
+
+ return FALSE;
+}
+
+static void
+gtk_range_add_motion_idle (GtkRange *range)
+{
+ if (!range->layout->motion_idle_id)
+ {
+ range->layout->motion_idle_id =
+ gdk_threads_add_idle_full (GDK_PRIORITY_REDRAW,
+ motion_idle, range,
+ NULL);
+ }
+}
+
+static void
+gtk_range_remove_motion_idle (GtkRange *range)
+{
+ if (range->layout->motion_idle_id != 0)
+ {
+ g_source_remove (range->layout->motion_idle_id);
+ range->layout->motion_idle_id = 0;
+ }
+}
+
#define __GTK_RANGE_C__
#include "gtkaliasdef.c"

View File

@@ -1,19 +0,0 @@
--- /tmp/Makefile.am 2007-01-08 17:44:47.000000000 +0100
+++ gtk+-2.10.7/gtk/Makefile.am 2007-01-08 17:45:17.025251000 +0100
@@ -1128,11 +1128,11 @@
./gtk-update-icon-cache
endif
-gtkbuiltincache.h: @REBUILD@ stamp-icons
- $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
- $(gtk_update_icon_cache_program) --force --ignore-theme-index \
- --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
- mv gtkbuiltincache.h.tmp gtkbuiltincache.h
+#gtkbuiltincache.h: @REBUILD@ stamp-icons
+# $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
+# $(gtk_update_icon_cache_program) --force --ignore-theme-index \
+# --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
+# mv gtkbuiltincache.h.tmp gtkbuiltincache.h
EXTRA_DIST += \
$(STOCK_ICONS) \

View File

@@ -1,100 +0,0 @@
Index: gtk/gtkcellrenderertoggle.c
===================================================================
--- gtk/gtkcellrenderertoggle.c (revision 18523)
+++ gtk/gtkcellrenderertoggle.c (working copy)
@@ -71,6 +71,8 @@
PROP_INDICATOR_SIZE
};
+/* This is a hard-coded default which promptly gets overridden by a size
+ calculated from the font size. */
#define TOGGLE_WIDTH 13
static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
@@ -80,8 +82,9 @@
typedef struct _GtkCellRendererTogglePrivate GtkCellRendererTogglePrivate;
struct _GtkCellRendererTogglePrivate
{
- gint indicator_size;
-
+ gint indicator_size; /* This is the real size */
+ gint override_size; /* This is the size set from the indicator-size property */
+ GtkWidget *cached_widget;
guint inconsistent : 1;
};
@@ -104,6 +107,7 @@
GTK_CELL_RENDERER (celltoggle)->ypad = 2;
priv->indicator_size = TOGGLE_WIDTH;
+ priv->override_size = 0;
priv->inconsistent = FALSE;
}
@@ -210,7 +214,7 @@
g_value_set_boolean (value, celltoggle->radio);
break;
case PROP_INDICATOR_SIZE:
- g_value_set_int (value, priv->indicator_size);
+ g_value_set_int (value, priv->override_size ? priv->override_size : priv->indicator_size);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -245,7 +249,7 @@
celltoggle->radio = g_value_get_boolean (value);
break;
case PROP_INDICATOR_SIZE:
- priv->indicator_size = g_value_get_int (value);
+ priv->override_size = g_value_get_int (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -273,6 +277,27 @@
}
static void
+on_widget_style_set (GtkWidget *widget, GtkStyle *previous, gpointer user_data)
+{
+ GtkCellRendererTogglePrivate *priv = user_data;
+ PangoContext *context;
+ PangoFontMetrics *metrics;
+ int height;
+
+ context = gtk_widget_get_pango_context (widget);
+ metrics = pango_context_get_metrics (context,
+ widget->style->font_desc,
+ pango_context_get_language (context));
+
+ height = pango_font_metrics_get_ascent (metrics) +
+ pango_font_metrics_get_descent (metrics);
+
+ pango_font_metrics_unref (metrics);
+
+ priv->indicator_size = PANGO_PIXELS (height * 0.85);
+}
+
+static void
gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
GdkRectangle *cell_area,
@@ -287,6 +312,20 @@
priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell);
+ if (priv->override_size) {
+ priv->indicator_size = priv->override_size;
+ } else if (priv->cached_widget != widget) {
+ if (priv->cached_widget) {
+ g_object_remove_weak_pointer (widget, &priv->cached_widget);
+ g_signal_handlers_disconnect_by_func (priv->cached_widget, on_widget_style_set, priv);
+ }
+ priv->cached_widget = widget;
+ g_object_add_weak_pointer (widget, &priv->cached_widget);
+ g_signal_connect (widget, "style-set", on_widget_style_set, priv);
+
+ on_widget_style_set (widget, NULL, priv);
+ }
+
calc_width = (gint) cell->xpad * 2 + priv->indicator_size;
calc_height = (gint) cell->ypad * 2 + priv->indicator_size;

View File

@@ -1,16 +0,0 @@
--- 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

View File

@@ -1,50 +0,0 @@
require gtk+.inc
PR = "r20"
SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \
file://gtklabel-resize-patch;patch=1 \
file://menu-deactivate.patch;patch=1 \
file://run-iconcache.patch;patch=1 \
file://disable-print.patch;patch=1 \
file://hardcoded_libtool.patch;patch=1 \
file://no-demos.patch;patch=1 \
file://cellrenderer-cairo.patch;patch=1;pnum=0 \
file://entry-cairo.patch;patch=1;pnum=0 \
file://toggle-font.diff;patch=1;pnum=0 \
file://combo-arrow-size.patch;patch=1;pnum=0 \
file://range-no-redraw.patch;patch=1;pnum=0 \
file://scrolled-placement.patch;patch=1;pnum=0 \
file://filesystem-volumes.patch;patch=1 \
file://filechooser-utils.patch;patch=1 \
file://filechooser.patch;patch=1 \
file://filechooser-default.patch;patch=1 \
file://filechooser-respect-style.patch;patch=1"
#file://xsettings.patch;patch=1 \
#file://pangoxft2.10.6.diff;patch=1"
EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration"
LIBV = "2.10.0"
PACKAGES_DYNAMIC = "gdk-pixbuf-loader-* gtk-immodule-* gtk-printbackend-*"
python populate_packages_prepend () {
import os.path
prologue = bb.data.getVar("postinst_prologue", d, 1)
postinst_pixbufloader = bb.data.getVar("postinst_pixbufloader", 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')
printmodules_root = os.path.join(gtk_libdir, 'printbackends');
do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', postinst_pixbufloader)
do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s', prologue + 'gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules')
do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
if (bb.data.getVar('DEBIAN_NAMES', d, 1)):
bb.data.setVar('PKG_${PN}', 'libgtk-2.0', d)
}

View File

@@ -1,47 +0,0 @@
require gtk+.inc
PR = "r1"
SRC_URI = "http://download.gnome.org/sources/gtk+/2.13/gtk+-${PV}.tar.bz2 \
file://xsettings.patch;patch=1 \
file://run-iconcache.patch;patch=1 \
file://hardcoded_libtool.patch;patch=1 \
file://no-demos.patch;patch=1 \
file://cellrenderer-cairo.patch;patch=1;pnum=0 \
file://entry-cairo.patch;patch=1;pnum=0 \
file://toggle-font.diff;patch=1;pnum=0 \
# TO MERGE
# file://filesystem-volumes.patch;patch=1 \
# file://filechooser-props.patch;patch=1 \
# file://filechooser-default.patch;patch=1 \
# file://filechooser-sizefix.patch;patch=1 \
# temporary
# file://gtklabel-resize-patch;patch=1 \
# file://menu-deactivate.patch;patch=1 \
# file://combo-arrow-size.patch;patch=1;pnum=0 \
"
EXTRA_OECONF = "--without-libtiff --without-libjasper --disable-xkb --disable-glibtest --disable-cups"
LIBV = "2.10.0"
PACKAGES_DYNAMIC = "gdk-pixbuf-loader-* gtk-immodule-* gtk-printbackend-*"
python populate_packages_prepend () {
import os.path
prologue = bb.data.getVar("postinst_prologue", d, 1)
postinst_pixbufloader = bb.data.getVar("postinst_pixbufloader", 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')
printmodules_root = os.path.join(gtk_libdir, 'printbackends');
do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', postinst_pixbufloader)
do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s', prologue + 'gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules')
do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
if (bb.data.getVar('DEBIAN_NAMES', d, 1)):
bb.data.setVar('PKG_${PN}', 'libgtk-2.0', d)
}