diff options
author | Marinus Schraal <foser@gentoo.org> | 2004-08-19 13:13:48 +0000 |
---|---|---|
committer | Marinus Schraal <foser@gentoo.org> | 2004-08-19 13:13:48 +0000 |
commit | 752d330c30698beb786de029a4d8825c58c8d632 (patch) | |
tree | 987e1c6f21239278447fd406e9348cbb70e329de /x11-libs/gtk+ | |
parent | Version bump (bug #59778), webapp.eclass (bug #53749) (diff) | |
download | historical-752d330c30698beb786de029a4d8825c58c8d632.tar.gz historical-752d330c30698beb786de029a4d8825c58c8d632.tar.bz2 historical-752d330c30698beb786de029a4d8825c58c8d632.zip |
new release
Diffstat (limited to 'x11-libs/gtk+')
-rw-r--r-- | x11-libs/gtk+/ChangeLog | 8 | ||||
-rw-r--r-- | x11-libs/gtk+/Manifest | 5 | ||||
-rw-r--r-- | x11-libs/gtk+/files/digest-gtk+-2.4.7 | 1 | ||||
-rw-r--r-- | x11-libs/gtk+/files/gtk+-2.4-smoothscroll.patch | 1074 | ||||
-rw-r--r-- | x11-libs/gtk+/gtk+-2.4.7.ebuild | 92 |
5 files changed, 1178 insertions, 2 deletions
diff --git a/x11-libs/gtk+/ChangeLog b/x11-libs/gtk+/ChangeLog index 8d71d9ba48f1..ca159a7a80f9 100644 --- a/x11-libs/gtk+/ChangeLog +++ b/x11-libs/gtk+/ChangeLog @@ -1,7 +1,13 @@ # ChangeLog for x11-libs/gtk+ # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/ChangeLog,v 1.112 2004/08/07 22:24:07 lv Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/ChangeLog,v 1.113 2004/08/19 13:13:48 foser Exp $ +*gtk+-2.4.7 (19 Aug 2004) + + 19 Aug 2004; foser <foser@gentoo.org> gtk+-2.4.7.ebuild : + New release + Add smoothscroll patch from gnome bugzilla for testing + 07 Aug 2004; Travis Tilley <lv@gentoo.org> gtk+-2.4.4.ebuild: stable on amd64 diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest index 37a57a092194..36bb4039cad2 100644 --- a/x11-libs/gtk+/Manifest +++ b/x11-libs/gtk+/Manifest @@ -1,21 +1,24 @@ MD5 0a52107792b68e9c43b82ffd484ca1da gtk+-1.2.10-r11.ebuild 1798 MD5 c11d7af6bd3c90b412c77d1868d07750 gtk+-2.2.4-r1.ebuild 2414 +MD5 38b530c2c771c15a8598dd088660d791 gtk+-2.4.7.ebuild 2267 MD5 745da6d8feb5c80670d33a3c43400bf5 gtk+-1.2.10-r10.ebuild 1719 MD5 440e6e34f53e4a86a4dae0651ecdb2b1 gtk+-2.4.4.ebuild 2215 MD5 7572f07f74e9cf6573ce75cd9fbfaef0 gtk+-2.4.0-r1.ebuild 2400 MD5 51ddda17c1767592ffd50921310ec0d5 gtk+-2.4.1.ebuild 2239 -MD5 7758ff270f0e4f6988b08770743fc051 ChangeLog 17288 +MD5 b4551ad02bee9300d365a171cdfe3637 ChangeLog 17452 MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158 MD5 fe3cd76194831c7f63d03688eb872550 gtk+-2.4.3-r1.ebuild 2358 MD5 408bfe64dce99ca0abfdcb6da7596116 gtk+-2.4.3.ebuild 2257 MD5 18620b7ba0f3cf18b663d7e314669aa7 files/digest-gtk+-2.4.1 64 MD5 9b79edfc3c0ad59155dc0dff5fd6d4a5 files/digest-gtk+-2.4.3 64 MD5 8ee4e2846ed44ba2856dd8ae364d38d8 files/digest-gtk+-2.4.4 64 +MD5 d675fdf10da4dc4b223b36809ae0457a files/digest-gtk+-2.4.7 64 MD5 621a7db3e7e6856c66eec5caeea1e88e files/digest-gtk+-1.2.10-r10 138 MD5 621a7db3e7e6856c66eec5caeea1e88e files/digest-gtk+-1.2.10-r11 138 MD5 36d00cf3b4035e6cb9873ade9ed1a9ce files/gtkrc 627 MD5 5e3ff7fa761495300d3f30c9207c13f8 files/gtk+-1.2-locale_fix.patch 419 MD5 897d9bcb56e9f9303b1e35c6f521ae35 files/gtk+-2.2-notificationarea_loop.patch 440 +MD5 df6efc98861d335b1a09eab5c6011620 files/gtk+-2.4-smoothscroll.patch 29006 MD5 69a6335566f344b004a5db02b68008ed files/gtk+-2.0.6-exportsymbols.patch 558 MD5 c979d9262eccf5bdf8dbfa50b8d57b13 files/gtk+-2-xftprefs.patch 6711 MD5 0ab7928b5279c384b39e7aaf56e3aa69 files/gtk+-wm.patch 11496 diff --git a/x11-libs/gtk+/files/digest-gtk+-2.4.7 b/x11-libs/gtk+/files/digest-gtk+-2.4.7 new file mode 100644 index 000000000000..06e36acdb8ff --- /dev/null +++ b/x11-libs/gtk+/files/digest-gtk+-2.4.7 @@ -0,0 +1 @@ +MD5 2cd21398a463ef205e6e7b28e54b936d gtk+-2.4.7.tar.bz2 8920441 diff --git a/x11-libs/gtk+/files/gtk+-2.4-smoothscroll.patch b/x11-libs/gtk+/files/gtk+-2.4-smoothscroll.patch new file mode 100644 index 000000000000..8ce2966fbed0 --- /dev/null +++ b/x11-libs/gtk+/files/gtk+-2.4-smoothscroll.patch @@ -0,0 +1,1074 @@ +? 119804.patch +? ChangeLog.new +? accels +? accepttab +? adsf +? asdf +? beta +? birnan +? blah +? complete.diff +? crack.patch +? defer_phase1 +? dizzy2.patch +? dizzybar.patch +? draw-as-radio.patch +? emfle +? extra.patch +? frugt +? gd +? goback.patch +? good-install.patch +? gtk-noexpose-scroll.diff +? gtkd +? hasspinner.patch +? head-unchanged-gtk+-diff +? hmm +? hmm.patch +? huh +? instrument.patch +? jazz.patch +? jazz2.patch +? mactreeplus.patch +? mbdraw.patch +? menu-redraw +? no-flicker-old.patch +? nopackend +? paintstack-3.diff +? paintstack.diff +? paintstack2.diff +? patches +? phase1 +? profiler.diff +? profiler.log +? signalspeedup +? simple_scroll.patch +? simplify.patch +? slet +? smooth2.patch +? statu +? string-bugs.patch +? td2 +? textdiff +? textview-cursor-move.patch +? tool-current.patch +? tool13 +? tooldiff +? tooldiff4 +? toolfix +? whatelse +? demos/gtk-demo/core.3957 +? gdk/gc-caching.patch +? gdk/newgccache.patch +? gdk/paintfix +? gdk/profiler.c +? gdk/profiler.h +? gdk/profiler.log +? gdk/spam +? gdk/timing.c +? gdk/x11/119722.patch +? gdk/x11/bug117579.patch +? gdk/x11/gravity.patch +? gdk/x11/problem +? gdk/x11/xidfix +? gdk/x11/xsettings.patch +? gtk/accels +? gtk/adjd +? gtk/adsfasdf +? gtk/arrows.patch +? gtk/asdf +? gtk/asdfasdfasdf +? gtk/asdfqwer +? gtk/attempt.diff +? gtk/bardiff +? gtk/birnan +? gtk/bodies +? gtk/bt +? gtk/calls +? gtk/commitcand.patch +? gtk/core.11617 +? gtk/core.13415 +? gtk/core.16181 +? gtk/core.17238 +? gtk/core.1944 +? gtk/core.19975 +? gtk/core.23401 +? gtk/core.24368 +? gtk/core.26526 +? gtk/core.27892 +? gtk/core.30053 +? gtk/core.30067 +? gtk/core.30080 +? gtk/core.32237 +? gtk/core.4428 +? gtk/core.9619 +? gtk/dizzy.patch +? gtk/emfle +? gtk/fixtodo +? gtk/gtkmenu.ac +? gtk/gtkmenuitem.ac +? gtk/gtknotebook.ac +? gtk/gtkpaned.hack.c +? gtk/gtkradiobutton.ac +? gtk/gtkstyle.mac.c +? gtk/gtkstyle.orig.c +? gtk/gtktoolbar.125 +? gtk/gtktoolbar.ac +? gtk/gtktoolbar.c.current +? gtk/gtktoolbar.c.draft +? gtk/gtktoolbar.conflict-resolved.c +? gtk/gtktoolbar.cvs +? gtk/gtktoolbar.defer.c +? gtk/gtktoolbar.hacked.c +? gtk/gtktoolbar.hacked.h +? gtk/gtktoolbar.smooth.c +? gtk/gtktoolbar.smooth.h +? gtk/gtktoolbar.splitalloc.c +? gtk/gtktooltips.broken.c +? gtk/gwp +? gtk/handlefix.patch +? gtk/highlight +? gtk/hsdf +? gtk/huh +? gtk/huh2 +? gtk/idles +? gtk/menuimprovements +? gtk/minw.patch +? gtk/paned-rtl.diff +? gtk/profiler.log +? gtk/qwer +? gtk/qwer2 +? gtk/sofar +? gtk/tb +? gtk/td +? gtk/testtoolbar.diff +? gtk/tit +? gtk/tool.ac +? gtk/tool.diff +? gtk/toolchange.patch +? gtk/tooldiff +? gtk/toolfix +? gtk/toolitem.diff +? gtk/tt +? tests/accels +? tests/asdf +? tests/core.22082 +? tests/core.24504 +? tests/core.7041 +? tests/testtoolbar.hacked.c +? tests/tt.diff +Index: gdk/gdkwindow.c +=================================================================== +RCS file: /cvs/gnome/gtk+/gdk/gdkwindow.c,v +retrieving revision 1.157 +diff -u -p -u -r1.157 gdkwindow.c +--- gdk/gdkwindow.c 18 Feb 2004 17:03:46 -0000 1.157 ++++ gdk/gdkwindow.c 29 Feb 2004 23:54:21 -0000 +@@ -1963,6 +1963,7 @@ gdk_window_copy_to_image (GdkDrawable + static GSList *update_windows = NULL; + static guint update_idle = 0; + static gboolean debug_updates = FALSE; ++static gint update_serial = 1; + + static void + gdk_window_process_updates_internal (GdkWindow *window) +@@ -1988,6 +1989,8 @@ gdk_window_process_updates_internal (Gdk + GdkRegion *window_region; + gint width, height; + ++ ++update_serial; ++ + if (debug_updates) + { + /* Make sure we see the red invalid area before redrawing. */ +@@ -2056,6 +2059,7 @@ flush_all_displays (void) + void + gdk_window_process_all_updates (void) + { ++ gboolean retval = FALSE; + GSList *old_update_windows = update_windows; + GSList *tmp_list = update_windows; + +@@ -2065,6 +2069,9 @@ gdk_window_process_all_updates (void) + update_windows = NULL; + update_idle = 0; + ++ if (old_update_windows) ++ retval = TRUE; ++ + g_slist_foreach (old_update_windows, (GFunc)g_object_ref, NULL); + + while (tmp_list) +@@ -2079,6 +2086,12 @@ gdk_window_process_all_updates (void) + flush_all_displays (); + } + ++gint ++gdk_window_get_update_serial (void) ++{ ++ return update_serial; ++} ++ + static gboolean + gdk_window_update_idle (gpointer data) + { +Index: gdk/gdkwindow.h +=================================================================== +RCS file: /cvs/gnome/gtk+/gdk/gdkwindow.h,v +retrieving revision 1.49 +diff -u -p -u -r1.49 gdkwindow.h +--- gdk/gdkwindow.h 26 Jan 2004 20:20:42 -0000 1.49 ++++ gdk/gdkwindow.h 29 Feb 2004 23:54:25 -0000 +@@ -542,6 +542,7 @@ GdkRegion *gdk_window_get_update_area + void gdk_window_freeze_updates (GdkWindow *window); + void gdk_window_thaw_updates (GdkWindow *window); + ++gint gdk_window_get_update_serial (void); + void gdk_window_process_all_updates (void); + void gdk_window_process_updates (GdkWindow *window, + gboolean update_children); +Index: gtk/gtkadjustment.c +=================================================================== +RCS file: /cvs/gnome/gtk+/gtk/gtkadjustment.c,v +retrieving revision 1.29 +diff -u -p -u -r1.29 gtkadjustment.c +--- gtk/gtkadjustment.c 3 Feb 2004 21:43:10 -0000 1.29 ++++ gtk/gtkadjustment.c 29 Feb 2004 23:54:26 -0000 +@@ -27,6 +27,8 @@ + #include "gtkadjustment.h" + #include "gtkintl.h" + #include "gtkmarshalers.h" ++#include <math.h> ++ + + enum + { +@@ -46,9 +48,19 @@ enum { + }; + + +-static void gtk_adjustment_class_init (GtkAdjustmentClass *klass); +-static void gtk_adjustment_init (GtkAdjustment *adjustment); ++typedef struct _GtkAdjustmentPrivate GtkAdjustmentPrivate; ++struct _GtkAdjustmentPrivate ++{ ++ GTimer *timer; ++ gdouble start_value; ++ gdouble goal_value; ++ guint idle_id; ++}; + ++static void gtk_adjustment_private_finalize (GtkAdjustmentPrivate *private); ++static void gtk_adjustment_class_init (GtkAdjustmentClass *klass); ++static void gtk_adjustment_init (GtkAdjustment *adjustment); ++static GtkAdjustmentPrivate *gtk_adjustment_get_private (GtkAdjustment *adjustment); + static void gtk_adjustment_get_property (GObject *object, + guint prop_id, + GValue *value, +@@ -160,7 +172,6 @@ gtk_adjustment_class_init (GtkAdjustment + 0.0, + G_PARAM_READWRITE)); + +- + adjustment_signals[CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (class), +@@ -190,6 +201,44 @@ gtk_adjustment_init (GtkAdjustment *adju + adjustment->page_size = 0.0; + } + ++static GtkAdjustmentPrivate * ++gtk_adjustment_get_private (GtkAdjustment *adjustment) ++{ ++ GtkAdjustmentPrivate *private; ++ static GQuark private_quark = 0; ++ ++ if (!private_quark) ++ private_quark = g_quark_from_static_string ("gtk-adjustment-private"); ++ ++ private = g_object_get_qdata (G_OBJECT (adjustment), private_quark); ++ ++ if (!private) ++ { ++ private = g_new0 (GtkAdjustmentPrivate, 1); ++ ++ private->timer = g_timer_new (); ++ private->start_value = 0.0; ++ private->goal_value = 0.0; ++ private->idle_id = 0; ++ ++ g_object_set_qdata_full (G_OBJECT (adjustment), private_quark, ++ private, ++ (GDestroyNotify) gtk_adjustment_private_finalize); ++ } ++ ++ return private; ++} ++ ++static void ++gtk_adjustment_private_finalize (GtkAdjustmentPrivate *private) ++{ ++ if (private->idle_id) ++ g_source_remove (private->idle_id); ++ ++ g_timer_destroy (private->timer); ++ g_free (private); ++} ++ + static void + gtk_adjustment_get_property (GObject *object, guint prop_id, GValue *value, + GParamSpec *pspec) +@@ -334,11 +383,26 @@ gtk_adjustment_changed (GtkAdjustment + g_signal_emit (adjustment, adjustment_signals[CHANGED], 0); + } + ++static void ++gtk_adjustment_value_changed_unchecked (GtkAdjustment *adjustment) ++{ ++ g_signal_emit (adjustment, adjustment_signals[VALUE_CHANGED], 0); ++} ++ + void + gtk_adjustment_value_changed (GtkAdjustment *adjustment) + { ++ GtkAdjustmentPrivate *priv; ++ + g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); + ++ priv = gtk_adjustment_get_private (adjustment); ++ if (priv->idle_id) ++ { ++ g_source_remove (priv->idle_id); ++ priv->idle_id = 0; ++ } ++ gtk_adjustment_value_changed_unchecked (adjustment); + g_signal_emit (adjustment, adjustment_signals[VALUE_CHANGED], 0); + g_object_notify (G_OBJECT (adjustment), "value"); + } +@@ -371,3 +435,171 @@ gtk_adjustment_clamp_page (GtkAdjustment + if (need_emission) + gtk_adjustment_value_changed (adjustment); + } ++ ++#define UPDATE_TIME 0.1 ++ ++static gboolean ++adjustment_update_idle (gpointer data) ++{ ++ GtkAdjustment *adj = data; ++ GtkAdjustmentPrivate *priv = gtk_adjustment_get_private (adj); ++ ++ gdouble new_value; ++ gdouble elapsed = g_timer_elapsed (priv->timer, NULL); ++ ++ GDK_THREADS_ENTER(); ++ ++ new_value = priv->start_value + ++ (elapsed / UPDATE_TIME) * (priv->goal_value - priv->start_value); ++ ++ /* make sure new_value is betweeen start_value and goal_value */ ++ if (!((new_value >= priv->start_value && new_value <= priv->goal_value) || ++ (new_value <= priv->start_value && new_value >= priv->goal_value))) ++ { ++ new_value = priv->goal_value; ++ } ++ ++ if (new_value > adj->upper - adj->page_size) ++ new_value = adj->upper - adj->page_size; ++ ++ if (new_value < adj->lower) ++ new_value = adj->lower; ++ ++ if (new_value != adj->value) ++ { ++ gint update_serial_before = gdk_window_get_update_serial(); ++ ++ adj->value = new_value; ++ ++ gtk_adjustment_value_changed_unchecked (adj); ++ ++ /* if anything was drawn during the signal emission, synchronize ++ * with the X server to avoid swamping it with updates ++ */ ++ gdk_window_process_all_updates (); ++ if (update_serial_before != gdk_window_get_update_serial()) ++ gdk_flush (); ++ } ++ ++ if (adj->value == priv->goal_value || ++ adj->value == adj->lower || ++ adj->value == adj->upper - adj->page_size) ++ { ++ priv->idle_id = 0; ++ ++ GDK_THREADS_LEAVE(); ++ return FALSE; ++ } ++ ++ GDK_THREADS_LEAVE(); ++ return TRUE; ++} ++ ++static void ++gtk_adjustment_change_value (GtkAdjustment *adjustment, ++ gdouble delta) ++{ ++ GtkAdjustmentPrivate *priv; ++ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ priv = gtk_adjustment_get_private (adjustment); ++ ++ if (delta > -1 && delta < 1) ++ return; ++ ++ priv->start_value = adjustment->value; ++ g_timer_reset (priv->timer); ++ ++ if (!priv->idle_id) ++ { ++ priv->idle_id = g_idle_add_full (GDK_PRIORITY_REDRAW + 3, adjustment_update_idle, adjustment, NULL); ++ priv->goal_value = adjustment->value + delta; ++ } ++ else ++ priv->goal_value = priv->goal_value + delta; ++} ++ ++void ++gtk_adjustment_step_up (GtkAdjustment *adjustment) ++{ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ gtk_adjustment_change_value (adjustment, -adjustment->step_increment); ++} ++ ++void ++gtk_adjustment_step_down (GtkAdjustment *adjustment) ++{ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ gtk_adjustment_change_value (adjustment, adjustment->step_increment); ++} ++ ++void ++gtk_adjustment_wheel_up (GtkAdjustment *adjustment) ++{ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ gtk_adjustment_change_value (adjustment, ++ -pow (adjustment->page_size, 2.0/3.0)); ++} ++ ++void ++gtk_adjustment_wheel_down (GtkAdjustment *adjustment) ++{ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ gtk_adjustment_change_value (adjustment, ++ pow (adjustment->page_size, 2.0/3.0)); ++} ++ ++void ++gtk_adjustment_page_up (GtkAdjustment *adjustment) ++{ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ gtk_adjustment_change_value (adjustment, -adjustment->page_increment); ++} ++ ++void ++gtk_adjustment_page_down (GtkAdjustment *adjustment) ++{ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ gtk_adjustment_change_value (adjustment, adjustment->page_increment); ++} ++ ++void ++gtk_adjustment_home (GtkAdjustment *adjustment) ++{ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ gtk_adjustment_goto_value (adjustment, 0.0); ++} ++ ++void ++gtk_adjustment_end (GtkAdjustment *adjustment) ++{ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ gtk_adjustment_goto_value (adjustment, adjustment->upper - adjustment->page_size); ++} ++ ++void ++gtk_adjustment_goto_value (GtkAdjustment *adjustment, ++ gdouble value) ++{ ++ GtkAdjustmentPrivate *priv; ++ ++ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); ++ ++ priv = gtk_adjustment_get_private (adjustment); ++ ++ priv->start_value = adjustment->value; ++ priv->goal_value = value; ++ g_timer_reset (priv->timer); ++ ++ if (!priv->idle_id) ++ priv->idle_id = g_idle_add_full (GDK_PRIORITY_REDRAW + 3, adjustment_update_idle, adjustment, NULL); ++} +Index: gtk/gtkadjustment.h +=================================================================== +RCS file: /cvs/gnome/gtk+/gtk/gtkadjustment.h,v +retrieving revision 1.18 +diff -u -p -u -r1.18 gtkadjustment.h +--- gtk/gtkadjustment.h 9 Oct 2002 22:25:17 -0000 1.18 ++++ gtk/gtkadjustment.h 29 Feb 2004 23:54:26 -0000 +@@ -75,21 +75,32 @@ struct _GtkAdjustmentClass + }; + + +-GType gtk_adjustment_get_type (void) G_GNUC_CONST; +-GtkObject* gtk_adjustment_new (gdouble value, +- gdouble lower, +- gdouble upper, +- gdouble step_increment, +- gdouble page_increment, +- gdouble page_size); +-void gtk_adjustment_changed (GtkAdjustment *adjustment); +-void gtk_adjustment_value_changed (GtkAdjustment *adjustment); +-void gtk_adjustment_clamp_page (GtkAdjustment *adjustment, +- gdouble lower, +- gdouble upper); +-gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment); +-void gtk_adjustment_set_value (GtkAdjustment *adjustment, +- gdouble value); ++GType gtk_adjustment_get_type (void) G_GNUC_CONST; ++GtkObject* gtk_adjustment_new (gdouble value, ++ gdouble lower, ++ gdouble upper, ++ gdouble step_increment, ++ gdouble page_increment, ++ gdouble page_size); ++void gtk_adjustment_changed (GtkAdjustment *adjustment); ++void gtk_adjustment_value_changed (GtkAdjustment *adjustment); ++void gtk_adjustment_clamp_page (GtkAdjustment *adjustment, ++ gdouble lower, ++ gdouble upper); ++gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment); ++void gtk_adjustment_set_value (GtkAdjustment *adjustment, ++ gdouble value); ++ ++void gtk_adjustment_goto_value (GtkAdjustment *adjustment, ++ gdouble value); ++void gtk_adjustment_home (GtkAdjustment *adjustment); ++void gtk_adjustment_end (GtkAdjustment *adjustment); ++void gtk_adjustment_step_up (GtkAdjustment *adjustment); ++void gtk_adjustment_step_down (GtkAdjustment *adjustment); ++void gtk_adjustment_wheel_up (GtkAdjustment *adjustment); ++void gtk_adjustment_wheel_down (GtkAdjustment *adjustment); ++void gtk_adjustment_page_up (GtkAdjustment *adjustment); ++void gtk_adjustment_page_down (GtkAdjustment *adjustment); + + #ifdef __cplusplus + } +Index: gtk/gtkrange.c +=================================================================== +RCS file: /cvs/gnome/gtk+/gtk/gtkrange.c,v +retrieving revision 1.96 +diff -u -p -u -r1.96 gtkrange.c +--- gtk/gtkrange.c 29 Feb 2004 18:21:57 -0000 1.96 ++++ gtk/gtkrange.c 29 Feb 2004 23:54:32 -0000 +@@ -27,6 +27,7 @@ + + #include <stdio.h> + #include <math.h> ++#include <string.h> + #include "gtkintl.h" + #include "gtkmain.h" + #include "gtkmarshalers.h" +@@ -34,8 +35,8 @@ + #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 SCROLL_INITIAL_DELAY 225 /* must hold button this long before ... */ ++#define SCROLL_LATER_DELAY 55 /* ... it starts repeating at this rate */ + #define UPDATE_DELAY 300 /* Delay for queued update */ + + enum { +@@ -701,6 +702,12 @@ should_invert (GtkRange *range) + return range->inverted; + } + ++static gboolean ++can_be_smooth (GtkRange *range) ++{ ++ return (range->round_digits < 0 && range->update_policy == GTK_UPDATE_CONTINUOUS); ++} ++ + static void + gtk_range_finalize (GObject *object) + { +@@ -1366,39 +1373,6 @@ gtk_range_button_release (GtkWidget + return FALSE; + } + +-/** +- * _gtk_range_get_wheel_delta: +- * @range: a #GtkRange +- * @direction: A #GdkScrollDirection +- * +- * Returns a good step value for the mouse wheel. +- * +- * Return value: A good step value for the mouse wheel. +- * +- * Since: 2.4 +- **/ +-gdouble +-_gtk_range_get_wheel_delta (GtkRange *range, +- GdkScrollDirection direction) +-{ +- GtkAdjustment *adj = range->adjustment; +- gdouble delta; +- +- if (GTK_IS_SCROLLBAR (range)) +- delta = pow (adj->page_size, 2.0 / 3.0); +- else +- delta = adj->step_increment * 2; +- +- if (direction == GDK_SCROLL_UP || +- direction == GDK_SCROLL_LEFT) +- delta = - delta; +- +- if (range->inverted) +- delta = - delta; +- +- return delta; +-} +- + static gint + gtk_range_scroll_event (GtkWidget *widget, + GdkEventScroll *event) +@@ -1408,19 +1382,59 @@ gtk_range_scroll_event (GtkWidget * + if (GTK_WIDGET_REALIZED (range)) + { + GtkAdjustment *adj = GTK_RANGE (range)->adjustment; +- gdouble delta; ++ GdkScrollDirection direction = event->direction; + +- delta = _gtk_range_get_wheel_delta (range, event->direction); +- gtk_range_internal_set_value (range, adj->value + delta); ++ if (direction == GDK_SCROLL_UP || ++ direction == GDK_SCROLL_LEFT) ++ { ++ direction = GDK_SCROLL_UP; ++ } ++ else ++ { ++ direction = GDK_SCROLL_DOWN; ++ } + +- /* Policy DELAYED makes sense with scroll events, +- * but DISCONTINUOUS doesn't, so we update immediately +- * for DISCONTINUOUS +- */ +- if (range->update_policy == GTK_UPDATE_DISCONTINUOUS) +- gtk_range_update_value (range); ++ if (should_invert (range)) ++ { ++ if (direction == GDK_SCROLL_UP) ++ direction = GDK_SCROLL_DOWN; ++ else ++ direction = GDK_SCROLL_UP; ++ } ++ ++ if (can_be_smooth (range) && GTK_IS_SCROLLBAR (range)) ++ { ++ if (direction == GDK_SCROLL_UP) ++ gtk_adjustment_wheel_up (adj); ++ else ++ gtk_adjustment_wheel_down (adj); ++ ++ range->need_recalc = TRUE; ++ gtk_widget_queue_draw (GTK_WIDGET (range)); ++ } ++ else ++ { ++ gdouble increment; ++ ++ if (GTK_IS_SCROLLBAR (widget)) ++ increment = pow (adj->page_size, 2.0/3.0); ++ else ++ increment = 2 * adj->step_increment; ++ ++ if (direction == GDK_SCROLL_UP) ++ increment *= -1; ++ ++ gtk_range_internal_set_value (range, adj->value + increment); ++ ++ /* Policy DELAYED makes sense with scroll events, ++ * but DISCONTINUOUS doesn't, so we update immediately ++ * for DISCONTINUOUS ++ */ ++ if (range->update_policy == GTK_UPDATE_DISCONTINUOUS) ++ gtk_range_update_value (range); ++ } + } +- ++ + return TRUE; + } + +@@ -1517,14 +1531,22 @@ gtk_range_adjustment_value_changed (GtkA + gpointer data) + { + GtkRange *range = GTK_RANGE (data); ++ GtkRangeLayout old_layout; ++ ++ old_layout = *range->layout; + + range->need_recalc = TRUE; ++ gtk_range_calc_layout (range, adjustment->value); ++ ++ if (memcmp (&old_layout, range->layout, sizeof (GtkRangeLayout)) != 0) ++ { ++ gtk_widget_queue_draw (GTK_WIDGET (range)); ++ ++ /* This is so we don't lag the widget being scrolled. */ ++ if (GTK_WIDGET_REALIZED (range)) ++ gdk_window_process_updates (GTK_WIDGET (range)->window, FALSE); ++ } + +- gtk_widget_queue_draw (GTK_WIDGET (range)); +- /* This is so we don't lag the widget being scrolled. */ +- if (GTK_WIDGET_REALIZED (range)) +- gdk_window_process_updates (GTK_WIDGET (range)->window, FALSE); +- + /* Note that we don't round off to range->round_digits here. + * that's because it's really broken to change a value + * in response to a change signal on that value; round_digits +@@ -1550,53 +1572,80 @@ gtk_range_style_set (GtkWidget *widget, + static void + step_back (GtkRange *range) + { +- gdouble newval; +- +- newval = range->adjustment->value - range->adjustment->step_increment; +- gtk_range_internal_set_value (range, newval); +-} ++ GtkAdjustment *adj = range->adjustment; + +-static void +-step_forward (GtkRange *range) +-{ +- gdouble newval; ++ if (can_be_smooth (range)) ++ { ++ gtk_adjustment_step_up (adj); ++ range->need_recalc = TRUE; ++ gtk_widget_queue_draw (GTK_WIDGET (range)); ++ } ++ else ++ { ++ gdouble newval; + +- newval = range->adjustment->value + range->adjustment->step_increment; +- gtk_range_internal_set_value (range, newval); ++ newval = adj->value - adj->step_increment; ++ gtk_range_internal_set_value (range, newval); ++ } + } + +- + static void +-page_back (GtkRange *range) ++step_forward (GtkRange *range) + { +- gdouble newval; ++ GtkAdjustment *adj = range->adjustment; ++ ++ if (can_be_smooth (range)) ++ { ++ gtk_adjustment_step_down (adj); ++ range->need_recalc = TRUE; ++ gtk_widget_queue_draw (GTK_WIDGET (range)); ++ } ++ else ++ { ++ gdouble newval; + +- newval = range->adjustment->value - range->adjustment->page_increment; +- gtk_range_internal_set_value (range, newval); ++ newval = adj->value + adj->step_increment; ++ gtk_range_internal_set_value (range, newval); ++ } + } + + static void +-page_forward (GtkRange *range) ++page_back (GtkRange *range) + { +- gdouble newval; ++ GtkAdjustment *adj = range->adjustment; + +- newval = range->adjustment->value + range->adjustment->page_increment; +- gtk_range_internal_set_value (range, newval); +-} ++ if (can_be_smooth (range)) ++ { ++ gtk_adjustment_page_up (adj); ++ range->need_recalc = TRUE; ++ gtk_widget_queue_draw (GTK_WIDGET (range)); ++ } ++ else ++ { ++ gdouble newval; + +-static void +-scroll_begin (GtkRange *range) +-{ +- gtk_range_internal_set_value (range, range->adjustment->lower); ++ newval = adj->value - adj->page_increment; ++ gtk_range_internal_set_value (range, newval); ++ } + } + + static void +-scroll_end (GtkRange *range) ++page_forward (GtkRange *range) + { +- gdouble newval; ++ GtkAdjustment *adj = range->adjustment; + +- newval = range->adjustment->upper - range->adjustment->page_size; +- gtk_range_internal_set_value (range, newval); ++ if (can_be_smooth (range)) ++ { ++ gtk_adjustment_page_down (adj); ++ range->need_recalc = TRUE; ++ gtk_widget_queue_draw (GTK_WIDGET (range)); ++ } ++ else ++ { ++ gdouble newval; ++ newval = adj->value - adj->page_increment; ++ gtk_range_internal_set_value (range, newval); ++ } + } + + static void +@@ -1678,11 +1727,27 @@ gtk_range_scroll (GtkRange *range, + break; + + case GTK_SCROLL_START: +- scroll_begin (range); ++ if (can_be_smooth (range)) ++ { ++ gtk_adjustment_home (range->adjustment); ++ range->need_recalc = TRUE; ++ gtk_widget_queue_draw (GTK_WIDGET (range)); ++ } ++ else ++ gtk_range_internal_set_value (range, ++ range->adjustment->lower); + break; + + case GTK_SCROLL_END: +- scroll_end (range); ++ if (can_be_smooth (range)) ++ { ++ gtk_adjustment_end (range->adjustment); ++ range->need_recalc = TRUE; ++ gtk_widget_queue_draw (GTK_WIDGET (range)); ++ } ++ else ++ gtk_range_internal_set_value (range, ++ range->adjustment->upper - range->adjustment->page_size); + break; + + case GTK_SCROLL_JUMP: +Index: gtk/gtkrange.h +=================================================================== +RCS file: /cvs/gnome/gtk+/gtk/gtkrange.h,v +retrieving revision 1.28 +diff -u -p -u -r1.28 gtkrange.h +--- gtk/gtkrange.h 29 Feb 2004 18:21:57 -0000 1.28 ++++ gtk/gtkrange.h 29 Feb 2004 23:54:33 -0000 +@@ -149,9 +149,6 @@ void gtk_range_set_value + gdouble value); + gdouble gtk_range_get_value (GtkRange *range); + +-gdouble _gtk_range_get_wheel_delta (GtkRange *range, +- GdkScrollDirection direction); +- + #ifdef __cplusplus + } + #endif /* __cplusplus */ +Index: gtk/gtkscrolledwindow.c +=================================================================== +RCS file: /cvs/gnome/gtk+/gtk/gtkscrolledwindow.c,v +retrieving revision 1.70 +diff -u -p -u -r1.70 gtkscrolledwindow.c +--- gtk/gtkscrolledwindow.c 29 Feb 2004 18:21:57 -0000 1.70 ++++ gtk/gtkscrolledwindow.c 29 Feb 2004 23:54:37 -0000 +@@ -794,98 +794,65 @@ gtk_scrolled_window_scroll_child (GtkScr + GtkScrollType scroll, + gboolean horizontal) + { +- GtkAdjustment *adjustment = NULL; ++ GtkAdjustment *hadj = NULL; ++ GtkAdjustment *vadj = NULL; ++ ++ if (scrolled_window->hscrollbar) ++ hadj = gtk_range_get_adjustment (GTK_RANGE (scrolled_window->hscrollbar)); ++ ++ if (scrolled_window->vscrollbar) ++ vadj = gtk_range_get_adjustment (GTK_RANGE (scrolled_window->vscrollbar)); + + switch (scroll) + { + case GTK_SCROLL_STEP_UP: +- scroll = GTK_SCROLL_STEP_BACKWARD; +- horizontal = FALSE; ++ case GTK_SCROLL_STEP_BACKWARD: ++ if (vadj) ++ gtk_adjustment_step_up (vadj); + break; + case GTK_SCROLL_STEP_DOWN: +- scroll = GTK_SCROLL_STEP_FORWARD; +- horizontal = FALSE; ++ case GTK_SCROLL_STEP_FORWARD: ++ if (vadj) ++ gtk_adjustment_step_down (vadj); + break; + case GTK_SCROLL_STEP_LEFT: +- scroll = GTK_SCROLL_STEP_BACKWARD; +- horizontal = TRUE; ++ if (hadj) ++ gtk_adjustment_step_up (hadj); + break; + case GTK_SCROLL_STEP_RIGHT: +- scroll = GTK_SCROLL_STEP_FORWARD; +- horizontal = TRUE; ++ if (hadj) ++ gtk_adjustment_step_down (hadj); + break; + case GTK_SCROLL_PAGE_UP: +- scroll = GTK_SCROLL_PAGE_BACKWARD; +- horizontal = FALSE; ++ case GTK_SCROLL_PAGE_BACKWARD: ++ if (vadj) ++ gtk_adjustment_page_up (vadj); + break; + case GTK_SCROLL_PAGE_DOWN: +- scroll = GTK_SCROLL_PAGE_FORWARD; +- horizontal = FALSE; ++ case GTK_SCROLL_PAGE_FORWARD: ++ if (vadj) ++ gtk_adjustment_page_down (vadj); + break; + case GTK_SCROLL_PAGE_LEFT: +- scroll = GTK_SCROLL_STEP_BACKWARD; +- horizontal = TRUE; ++ if (hadj) ++ gtk_adjustment_page_up (hadj); + break; + case GTK_SCROLL_PAGE_RIGHT: +- scroll = GTK_SCROLL_STEP_FORWARD; +- horizontal = TRUE; ++ if (hadj) ++ gtk_adjustment_page_down (hadj); + break; +- case GTK_SCROLL_STEP_BACKWARD: +- case GTK_SCROLL_STEP_FORWARD: +- case GTK_SCROLL_PAGE_BACKWARD: +- case GTK_SCROLL_PAGE_FORWARD: + case GTK_SCROLL_START: ++ if (vadj) ++ gtk_adjustment_home (vadj); ++ break; + case GTK_SCROLL_END: ++ if (vadj) ++ gtk_adjustment_end (vadj); + break; + default: + g_warning ("Invalid scroll type %d for GtkSpinButton::change-value", scroll); + return; + } +- +- if (horizontal) +- { +- if (scrolled_window->hscrollbar) +- adjustment = gtk_range_get_adjustment (GTK_RANGE (scrolled_window->hscrollbar)); +- } +- else +- { +- if (scrolled_window->vscrollbar) +- adjustment = gtk_range_get_adjustment (GTK_RANGE (scrolled_window->vscrollbar)); +- } +- +- if (adjustment) +- { +- gdouble value = adjustment->value; +- +- switch (scroll) +- { +- case GTK_SCROLL_STEP_FORWARD: +- value += adjustment->step_increment; +- break; +- case GTK_SCROLL_STEP_BACKWARD: +- value -= adjustment->step_increment; +- break; +- case GTK_SCROLL_PAGE_FORWARD: +- value += adjustment->page_increment; +- break; +- case GTK_SCROLL_PAGE_BACKWARD: +- value -= adjustment->page_increment; +- break; +- case GTK_SCROLL_START: +- value = adjustment->lower; +- break; +- case GTK_SCROLL_END: +- value = adjustment->upper; +- break; +- default: +- g_assert_not_reached (); +- break; +- } +- +- value = CLAMP (value, adjustment->lower, adjustment->upper - adjustment->page_size); +- +- gtk_adjustment_set_value (adjustment, value); +- } + } + + static void +@@ -1226,15 +1193,18 @@ gtk_scrolled_window_scroll_event (GtkWid + + if (range && GTK_WIDGET_VISIBLE (range)) + { +- GtkAdjustment *adj = GTK_RANGE (range)->adjustment; +- gdouble delta, new_value; +- +- delta = _gtk_range_get_wheel_delta (GTK_RANGE (range), event->direction); +- +- new_value = CLAMP (adj->value + delta, adj->lower, adj->upper - adj->page_size); ++ GtkAdjustment *adjustment = GTK_RANGE (range)->adjustment; ++ ++ if (event->direction == GDK_SCROLL_UP || ++ event->direction == GDK_SCROLL_LEFT) ++ { ++ gtk_adjustment_wheel_up (adjustment); ++ } ++ else ++ { ++ gtk_adjustment_wheel_down (adjustment); ++ } + +- gtk_adjustment_set_value (adj, new_value); +- + return TRUE; + } + diff --git a/x11-libs/gtk+/gtk+-2.4.7.ebuild b/x11-libs/gtk+/gtk+-2.4.7.ebuild new file mode 100644 index 000000000000..181b5d2b837d --- /dev/null +++ b/x11-libs/gtk+/gtk+-2.4.7.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/gtk+-2.4.7.ebuild,v 1.1 2004/08/19 13:13:48 foser Exp $ + +inherit libtool flag-o-matic eutils + +DESCRIPTION="Gimp ToolKit +" +HOMEPAGE="http://www.gtk.org/" +SRC_URI="ftp://ftp.gtk.org/pub/gtk/v2.4/${P}.tar.bz2" + +LICENSE="LGPL-2" +SLOT="2" +KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64" +IUSE="doc tiff jpeg" + +RDEPEND="virtual/x11 + >=dev-libs/glib-2.4 + >=dev-libs/atk-1.0.1 + >=x11-libs/pango-1.4 + x11-misc/shared-mime-info + >=media-libs/libpng-1.2.1 + jpeg? ( >=media-libs/jpeg-6b-r2 ) + tiff? ( >=media-libs/tiff-3.5.7 )" + +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.12.0 + sys-devel/autoconf + doc? ( >=dev-util/gtk-doc-1 )" + +src_unpack() { + + unpack ${A} + + cd ${S} + # Turn of --export-symbols-regex for now, since it removes + # the wrong symbols + epatch ${FILESDIR}/gtk+-2.0.6-exportsymbols.patch + # beautifying patch for disabled icons + epatch ${FILESDIR}/${PN}-2.2.1-disable_icons_smooth_alpha.patch + # add smoothscroll support for usability reasons + # http://bugzilla.gnome.org/show_bug.cgi?id=103811 + epatch ${FILESDIR}/${PN}-2.4-smoothscroll.patch + + autoconf || die + +} + +src_compile() { + + # bug 8762 + replace-flags "-O3" "-O2" + + elibtoolize + + econf \ + `use_enable doc gtk-doc` \ + `use_with jpeg libjpeg` \ + `use_with tiff libtiff` \ + --with-png \ + --with-gdktarget=x11 \ + --with-xinput \ + || die + + # gtk+ isn't multithread friendly due to some obscure code generation bug + MAKEOPTS="${MAKEOPTS} -j1" emake || die + +} + +src_install() { + + dodir /etc/gtk-2.0 + + make DESTDIR=${D} install || die + + # Enable xft in environment as suggested by <utx@gentoo.org> + dodir /etc/env.d + echo "GDK_USE_XFT=1" >${D}/etc/env.d/50gtk2 + + dodoc AUTHORS ChangeLog* HACKING INSTALL NEWS* README* + +} + +pkg_postinst() { + + gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules + gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders + + einfo "For gtk themes to work correctly after an update, you might have to rebuild your theme engines." + einfo "Executing 'qpkg -f -nc /usr/lib/gtk-2.0/2.2.0/engines | xargs emerge' should do the trick if" + einfo "you upgrade from gtk+-2.2 to 2.4 (requires gentoolkit)." + +} |