summaryrefslogtreecommitdiff
path: root/recipes/gtk+/gtk+-2.14.2
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/gtk+/gtk+-2.14.2
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/gtk+/gtk+-2.14.2')
-rw-r--r--recipes/gtk+/gtk+-2.14.2/hardcoded_libtool.patch31
-rw-r--r--recipes/gtk+/gtk+-2.14.2/no-demos.patch10
-rw-r--r--recipes/gtk+/gtk+-2.14.2/run-iconcache.patch19
-rw-r--r--recipes/gtk+/gtk+-2.14.2/smallscreen_filechooser.patch235
-rw-r--r--recipes/gtk+/gtk+-2.14.2/toggle-font.diff100
5 files changed, 395 insertions, 0 deletions
diff --git a/recipes/gtk+/gtk+-2.14.2/hardcoded_libtool.patch b/recipes/gtk+/gtk+-2.14.2/hardcoded_libtool.patch
new file mode 100644
index 0000000000..82fbbac8d7
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.14.2/hardcoded_libtool.patch
@@ -0,0 +1,31 @@
+Index: gtk+-2.14.2/configure.in
+===================================================================
+--- gtk+-2.14.2.orig/configure.in 2008-09-23 15:52:44.000000000 +0100
++++ gtk+-2.14.2/configure.in 2008-09-23 15:53:51.000000000 +0100
+@@ -401,7 +401,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
+@@ -759,7 +759,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/'`
+@@ -1893,7 +1893,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//"`
diff --git a/recipes/gtk+/gtk+-2.14.2/no-demos.patch b/recipes/gtk+/gtk+-2.14.2/no-demos.patch
new file mode 100644
index 0000000000..0fc4c48d1a
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.14.2/no-demos.patch
@@ -0,0 +1,10 @@
+--- 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
diff --git a/recipes/gtk+/gtk+-2.14.2/run-iconcache.patch b/recipes/gtk+/gtk+-2.14.2/run-iconcache.patch
new file mode 100644
index 0000000000..ac15e9ab24
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.14.2/run-iconcache.patch
@@ -0,0 +1,19 @@
+--- /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) \
diff --git a/recipes/gtk+/gtk+-2.14.2/smallscreen_filechooser.patch b/recipes/gtk+/gtk+-2.14.2/smallscreen_filechooser.patch
new file mode 100644
index 0000000000..2d3b2aa8fb
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.14.2/smallscreen_filechooser.patch
@@ -0,0 +1,235 @@
+diff -Naur gtk+-2.14.3.orig/gtk/gtkfilechooserdefault.c gtk+-2.14.3/gtk/gtkfilechooserdefault.c
+--- gtk+-2.14.3.orig/gtk/gtkfilechooserdefault.c 2008-09-22 22:33:15.000000000 +0400
++++ gtk+-2.14.3/gtk/gtkfilechooserdefault.c 2008-10-06 00:42:01.000000000 +0400
+@@ -252,7 +252,9 @@
+ /* Icon size for if we can't get it from the theme */
+ #define FALLBACK_ICON_SIZE 16
+
+-#define PREVIEW_HBOX_SPACING 12
++#define PREVIEW_HBOX_SPACING 2
++#define NORMAL_SPACING 2
++#define DOUBLE_SPACING 2
+ #define NUM_LINES 45
+ #define NUM_CHARS 60
+
+@@ -460,6 +462,17 @@
+
+
+
++int
++_gtk_is_pda_mode()
++{
++ /* PDA mode is when we have small screen width, plus small overall screen area
++ too. What we want to do when it is active is to prefer vertical packing over
++ horizontal (so we can show user filenames of as long length as possible), yet
++ still layout vertical space in such way so user can be able to see as many
++ files as possible. And of course, we save space overall - no big spacings and
++ borders. */
++ return gdk_screen_width() < 490;
++}
+
+
+ /* Drag and drop interface declarations */
+@@ -803,7 +816,7 @@
+ impl->operation_mode = OPERATION_MODE_BROWSE;
+ impl->recent_manager = gtk_recent_manager_get_default ();
+
+- gtk_box_set_spacing (GTK_BOX (impl), 12);
++ gtk_box_set_spacing (GTK_BOX (impl), DOUBLE_SPACING);
+
+ set_file_system_backend (impl);
+
+@@ -3969,8 +3982,9 @@
+ GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *widget;
++ gboolean is_pda = _gtk_is_pda_mode();
+
+- vbox = gtk_vbox_new (FALSE, 6);
++ vbox = (is_pda?gtk_hbox_new:gtk_vbox_new) (FALSE, NORMAL_SPACING);
+ gtk_widget_show (vbox);
+
+ /* Shortcuts tree */
+@@ -3980,7 +3994,7 @@
+
+ /* Box for buttons */
+
+- hbox = gtk_hbox_new (TRUE, 6);
++ hbox = (is_pda?gtk_vbox_new:gtk_hbox_new) (TRUE, NORMAL_SPACING);
+ gtk_size_group_add_widget (size_group, hbox);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ gtk_widget_show (hbox);
+@@ -3988,7 +4002,7 @@
+ /* Add bookmark button */
+
+ impl->browse_shortcuts_add_button = button_new (impl,
+- _("_Add"),
++ "",
+ GTK_STOCK_ADD,
+ FALSE,
+ TRUE,
+@@ -4000,15 +4014,25 @@
+ /* Remove bookmark button */
+
+ impl->browse_shortcuts_remove_button = button_new (impl,
+- _("_Remove"),
++ "",
+ GTK_STOCK_REMOVE,
+ FALSE,
+ TRUE,
+ G_CALLBACK (remove_bookmark_button_clicked_cb));
++ if (!is_pda) {
++/* Remove button is pretty reduntant, as that choice is available from popup
++ * menu (and would be intuitively expected to be there; compare that with
++ * the "Add to shortucts" in popup in files pane - most users would never
++ * try that and never new what shortcuts are).
++ * If we suspect we can be short of screen space (PDA device is what often
++ * has portrait layout), don't pack it, to allow more visually pleasing
++ * layout when minimizing location pane. Note that we still instantiate it,
++ * as it is referenced thruout the code. */
++
+ gtk_box_pack_start (GTK_BOX (hbox), impl->browse_shortcuts_remove_button, TRUE, TRUE, 0);
+ gtk_widget_set_tooltip_text (impl->browse_shortcuts_remove_button,
+ _("Remove the selected bookmark"));
+-
++ }
+ return vbox;
+ }
+
+@@ -4661,7 +4685,7 @@
+ GtkWidget *hbox;
+ GtkWidget *widget;
+
+- vbox = gtk_vbox_new (FALSE, 6);
++ vbox = gtk_vbox_new (FALSE, NORMAL_SPACING);
+ gtk_widget_show (vbox);
+
+ /* Box for lists and preview */
+@@ -4677,13 +4701,13 @@
+
+ /* Preview */
+
+- impl->preview_box = gtk_vbox_new (FALSE, 12);
++ impl->preview_box = gtk_vbox_new (FALSE, DOUBLE_SPACING);
+ gtk_box_pack_start (GTK_BOX (hbox), impl->preview_box, FALSE, FALSE, 0);
+ /* Don't show preview box initially */
+
+ /* Filter combo */
+
+- impl->filter_combo_hbox = gtk_hbox_new (FALSE, 12);
++ impl->filter_combo_hbox = gtk_hbox_new (FALSE, DOUBLE_SPACING);
+
+ widget = filter_create (impl);
+
+@@ -4835,13 +4859,13 @@
+
+ location_switch_to_path_bar (impl);
+
+- vbox = gtk_vbox_new (FALSE, 12);
++ vbox = gtk_vbox_new (FALSE, DOUBLE_SPACING);
+
+ table = gtk_table_new (2, 2, FALSE);
+ gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
+ gtk_widget_show (table);
+- gtk_table_set_row_spacings (GTK_TABLE (table), 12);
+- gtk_table_set_col_spacings (GTK_TABLE (table), 12);
++ gtk_table_set_row_spacings (GTK_TABLE (table), DOUBLE_SPACING);
++ gtk_table_set_col_spacings (GTK_TABLE (table), DOUBLE_SPACING);
+
+ /* Label */
+
+@@ -5175,10 +5199,10 @@
+
+ /* size group is used by the [+][-] buttons and the filter combo */
+ size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
+- vbox = gtk_vbox_new (FALSE, 12);
++ vbox = gtk_vbox_new (FALSE, DOUBLE_SPACING);
+
+ /* Location widgets */
+- hbox = gtk_hbox_new (FALSE, 12);
++ hbox = gtk_hbox_new (FALSE, DOUBLE_SPACING);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ gtk_widget_show (hbox);
+ impl->browse_path_bar_hbox = hbox;
+@@ -5201,7 +5225,7 @@
+
+ /* Box for the location label and entry */
+
+- impl->location_entry_box = gtk_hbox_new (FALSE, 12);
++ impl->location_entry_box = gtk_hbox_new (FALSE, DOUBLE_SPACING);
+ gtk_box_pack_start (GTK_BOX (vbox), impl->location_entry_box, FALSE, FALSE, 0);
+
+ impl->location_label = gtk_label_new_with_mnemonic (_("_Location:"));
+@@ -5209,12 +5233,16 @@
+ gtk_box_pack_start (GTK_BOX (impl->location_entry_box), impl->location_label, FALSE, FALSE, 0);
+
+ /* Paned widget */
+- hpaned = gtk_hpaned_new ();
++ if (_gtk_is_pda_mode())
++ hpaned = gtk_vpaned_new ();
++ else
++ hpaned = gtk_hpaned_new ();
++
+ gtk_widget_show (hpaned);
+ gtk_box_pack_start (GTK_BOX (vbox), hpaned, TRUE, TRUE, 0);
+
+ widget = shortcuts_pane_create (impl, size_group);
+- gtk_paned_pack1 (GTK_PANED (hpaned), widget, FALSE, FALSE);
++ gtk_paned_pack1 (GTK_PANED (hpaned), widget, FALSE, TRUE); /* Shortcuts can shrink beyond requested size */
+ widget = file_pane_create (impl, size_group);
+ gtk_paned_pack2 (GTK_PANED (hpaned), widget, TRUE, FALSE);
+
+diff -Naur gtk+-2.14.3.orig/gtk/gtkfilechooserdialog.c gtk+-2.14.3/gtk/gtkfilechooserdialog.c
+--- gtk+-2.14.3.orig/gtk/gtkfilechooserdialog.c 2008-09-19 08:44:03.000000000 +0400
++++ gtk+-2.14.3/gtk/gtkfilechooserdialog.c 2008-10-10 12:37:38.000000000 +0400
+@@ -32,8 +32,12 @@
+
+ #include <stdarg.h>
+
++#define NORMAL_SPACING 1
++#define DOUBLE_SPACING 2
++
+ #define GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE(o) (GTK_FILE_CHOOSER_DIALOG (o)->priv)
+
++extern int _gtk_is_pda_mode(void);
+ static void gtk_file_chooser_dialog_finalize (GObject *object);
+
+ static GObject* gtk_file_chooser_dialog_constructor (GType type,
+@@ -89,9 +93,9 @@
+ dialog->priv->response_requested = 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);
++ gtk_container_set_border_width (GTK_CONTAINER (fc_dialog), NORMAL_SPACING);
++ gtk_box_set_spacing (GTK_BOX (fc_dialog->vbox), NORMAL_SPACING);
++ gtk_container_set_border_width (GTK_CONTAINER (fc_dialog->action_area), NORMAL_SPACING);
+
+ /* 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*
+@@ -170,8 +174,13 @@
+
+ gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+
+- if (width)
+- *width = MIN (*width, (monitor.width * 3) / 4);
++ if (width) {
++ if (_gtk_is_pda_mode())
++ /* If width is physically small, use it all */
++ *width = monitor.width;
++ else
++ *width = MIN (*width, (monitor.width * 3) / 4);
++ }
+
+ if (height)
+ *height = MIN (*height, (monitor.height * 3) / 4);
+@@ -279,7 +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_container_set_border_width (GTK_CONTAINER (priv->widget), NORMAL_SPACING);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox), priv->widget, TRUE, TRUE, 0);
+
+ gtk_widget_show (priv->widget);
diff --git a/recipes/gtk+/gtk+-2.14.2/toggle-font.diff b/recipes/gtk+/gtk+-2.14.2/toggle-font.diff
new file mode 100644
index 0000000000..59ad150b2f
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.14.2/toggle-font.diff
@@ -0,0 +1,100 @@
+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;
+