diff options
author | Joshua Nichols <nichoj@gentoo.org> | 2006-12-30 19:04:27 +0000 |
---|---|---|
committer | Joshua Nichols <nichoj@gentoo.org> | 2006-12-30 19:04:27 +0000 |
commit | 66992d276c6fdb7d9d42fdd6ec87b1e69305488d (patch) | |
tree | 6e24a071bb82d0df67e08530f9d1b4256a1265e2 /xfce-base | |
parent | remove broken versions. (diff) | |
download | gentoo-2-66992d276c6fdb7d9d42fdd6ec87b1e69305488d.tar.gz gentoo-2-66992d276c6fdb7d9d42fdd6ec87b1e69305488d.tar.bz2 gentoo-2-66992d276c6fdb7d9d42fdd6ec87b1e69305488d.zip |
Added a patch to fix erratic icon behavior. See http://bugzilla.xfce.org/show_bug.cgi?id=1546 for details.
(Portage version: 2.1.2_rc4-r1)
Diffstat (limited to 'xfce-base')
-rw-r--r-- | xfce-base/xfdesktop/ChangeLog | 9 | ||||
-rw-r--r-- | xfce-base/xfdesktop/files/digest-xfdesktop-4.3.99.2-r1 | 3 | ||||
-rw-r--r-- | xfce-base/xfdesktop/files/xfdesktop-4.3.99.2-icons.patch | 281 | ||||
-rw-r--r-- | xfce-base/xfdesktop/xfdesktop-4.3.99.2-r1.ebuild | 52 |
4 files changed, 344 insertions, 1 deletions
diff --git a/xfce-base/xfdesktop/ChangeLog b/xfce-base/xfdesktop/ChangeLog index 785d68d5a551..0ba82d636c68 100644 --- a/xfce-base/xfdesktop/ChangeLog +++ b/xfce-base/xfdesktop/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for xfce-base/xfdesktop # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfdesktop/ChangeLog,v 1.72 2006/12/07 04:08:08 nichoj Exp $ +# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfdesktop/ChangeLog,v 1.73 2006/12/30 19:04:27 nichoj Exp $ + +*xfdesktop-4.3.99.2-r1 (30 Dec 2006) + + 30 Dec 2006; Joshua Nichols <nichoj@gentoo.org> + +files/xfdesktop-4.3.99.2-icons.patch, +xfdesktop-4.3.99.2-r1.ebuild: + Added a patch to fix erratic icon behavior. See + http://bugzilla.xfce.org/show_bug.cgi?id=1546 for details. 07 Dec 2006; Joshua Nichols <nichoj@gentoo.org> -xfdesktop-4.2.1.ebuild, -xfdesktop-4.2.2.ebuild, -xfdesktop-4.2.2-r1.ebuild, diff --git a/xfce-base/xfdesktop/files/digest-xfdesktop-4.3.99.2-r1 b/xfce-base/xfdesktop/files/digest-xfdesktop-4.3.99.2-r1 new file mode 100644 index 000000000000..f11fc4649003 --- /dev/null +++ b/xfce-base/xfdesktop/files/digest-xfdesktop-4.3.99.2-r1 @@ -0,0 +1,3 @@ +MD5 d44a81b9da9598425d9dd8dcd1cd5485 xfdesktop-4.3.99.2.tar.bz2 3087043 +RMD160 b9b7ffbad30df8b6d7dcda1a87930798bfa62167 xfdesktop-4.3.99.2.tar.bz2 3087043 +SHA256 427df09a88f9b4a38fbed68d8154090bf0c11fbdc132c26247dc5568ee5ae910 xfdesktop-4.3.99.2.tar.bz2 3087043 diff --git a/xfce-base/xfdesktop/files/xfdesktop-4.3.99.2-icons.patch b/xfce-base/xfdesktop/files/xfdesktop-4.3.99.2-icons.patch new file mode 100644 index 000000000000..89bcc1ce10eb --- /dev/null +++ b/xfce-base/xfdesktop/files/xfdesktop-4.3.99.2-icons.patch @@ -0,0 +1,281 @@ +Index: src/xfdesktop-icon-view.c +=================================================================== +--- src/xfdesktop-icon-view.c (revision 23748) ++++ src/xfdesktop-icon-view.c (working copy) +@@ -45,8 +45,8 @@ + #define DEFAULT_ICON_SIZE 32 + + #define ICON_SIZE (icon_view->priv->icon_size) +-#define TEXT_WIDTH (icon_view->priv->font_size * 9) +-#define CELL_PADDING 4 ++#define TEXT_WIDTH ((ICON_SIZE << 1) + (ICON_SIZE >> 1)) /* aka 2.5x */ ++#define CELL_PADDING 6 + #define CELL_SIZE (TEXT_WIDTH + CELL_PADDING * 2) + #define SPACING 6 + #define SCREEN_MARGIN 8 +@@ -277,7 +277,12 @@ + static void xfdesktop_icon_view_modify_font_size(XfdesktopIconView *icon_view, + gint size); + static void xfdesktop_ird_free(XfdesktopIdleRepaintData *ird); ++static void xfdesktop_icon_view_add_item_internal(XfdesktopIconView *icon_view, ++ XfdesktopIcon *icon); ++static gboolean xfdesktop_icon_view_icon_find_position(XfdesktopIconView *icon_view, ++ XfdesktopIcon *icon); + ++ + enum + { + TARGET_XFDESKTOP_ICON = 9999, +@@ -1323,7 +1328,7 @@ + PangoContext *pctx; + GdkScreen *gscreen; + GdkWindow *groot; +- GList *l; ++ GList *l, *leftovers = NULL; + + icon_view->priv->parent_window = gtk_widget_get_toplevel(widget); + g_return_if_fail(icon_view->priv->parent_window); +@@ -1399,12 +1404,14 @@ + icon_view); + + for(l = icon_view->priv->pending_icons; l; l = l->next) { +- g_object_set_data(G_OBJECT(l->data), "--xfdesktop-icon-view", NULL); +- xfdesktop_icon_view_add_item(icon_view, XFDESKTOP_ICON(l->data)); +- g_object_unref(G_OBJECT(l->data)); ++ XfdesktopIcon *icon = XFDESKTOP_ICON(l->data); ++ if(xfdesktop_icon_view_icon_find_position(icon_view, icon)) ++ xfdesktop_icon_view_add_item_internal(icon_view, icon); ++ else ++ leftovers = g_list_prepend(leftovers, icon); + } + g_list_free(icon_view->priv->pending_icons); +- icon_view->priv->pending_icons = NULL; ++ icon_view->priv->pending_icons = g_list_reverse(leftovers); + } + + static void +@@ -1458,10 +1465,9 @@ + g_signal_handlers_disconnect_by_func(G_OBJECT(l->data), + G_CALLBACK(xfdesktop_icon_view_clear_icon_extents), + icon_view); +- icon_view->priv->pending_icons = g_list_prepend(icon_view->priv->pending_icons, +- l->data); + } +- g_list_free(icon_view->priv->icons); ++ icon_view->priv->pending_icons = g_list_concat(icon_view->priv->icons, ++ icon_view->priv->pending_icons); + icon_view->priv->icons = NULL; + + g_free(icon_view->priv->grid_layout); +@@ -2046,17 +2052,16 @@ + static void + xfdesktop_grid_do_resize(XfdesktopIconView *icon_view) + { +- GList *l; ++ GList *l, *leftovers = NULL; + + /* move all icons into the pending_icons list */ + for(l = icon_view->priv->icons; l; l = l->next) { + g_signal_handlers_disconnect_by_func(G_OBJECT(l->data), + G_CALLBACK(xfdesktop_icon_view_clear_icon_extents), + icon_view); +- icon_view->priv->pending_icons = g_list_prepend(icon_view->priv->pending_icons, +- l->data); + } +- g_list_free(icon_view->priv->icons); ++ icon_view->priv->pending_icons = g_list_concat(icon_view->priv->icons, ++ icon_view->priv->pending_icons); + icon_view->priv->icons = NULL; + + DUMP_GRID_LAYOUT(icon_view); +@@ -2071,12 +2076,14 @@ + + /* add all icons back */ + for(l = icon_view->priv->pending_icons; l; l = l->next) { +- g_object_set_data(G_OBJECT(l->data), "--xfdesktop-icon-view", NULL); +- xfdesktop_icon_view_add_item(icon_view, XFDESKTOP_ICON(l->data)); +- g_object_unref(G_OBJECT(l->data)); ++ XfdesktopIcon *icon = XFDESKTOP_ICON(l->data); ++ if(xfdesktop_icon_view_icon_find_position(icon_view, icon)) ++ xfdesktop_icon_view_add_item_internal(icon_view, icon); ++ else ++ leftovers = g_list_prepend(leftovers, icon); + } + g_list_free(icon_view->priv->pending_icons); +- icon_view->priv->pending_icons = NULL; ++ icon_view->priv->pending_icons = g_list_reverse(leftovers); + + gtk_widget_queue_draw(GTK_WIDGET(icon_view)); + } +@@ -2168,8 +2175,11 @@ + guint16 row, + guint16 col) + { +- g_return_val_if_fail(row < icon_view->priv->nrows +- && col < icon_view->priv->ncols, FALSE); ++ if(row >= icon_view->priv->nrows ++ || col >= icon_view->priv->ncols) ++ { ++ return FALSE; ++ } + + return !icon_view->priv->grid_layout[col * icon_view->priv->nrows + row]; + } +@@ -2484,63 +2494,89 @@ + return GTK_WIDGET(icon_view); + } + ++static void ++xfdesktop_icon_view_add_item_internal(XfdesktopIconView *icon_view, ++ XfdesktopIcon *icon) ++{ ++ guint16 row, col; ++ GdkRectangle fake_area; ++ ++ /* sanity check: at this point this should be taken care of */ ++ g_return_if_fail(xfdesktop_icon_get_position(icon, &row, &col)); ++ ++ xfdesktop_grid_unset_position_free(icon_view, icon); ++ ++ icon_view->priv->icons = g_list_prepend(icon_view->priv->icons, icon); ++ ++ g_signal_connect_swapped(G_OBJECT(icon), "pixbuf-changed", ++ G_CALLBACK(xfdesktop_icon_view_clear_icon_extents), ++ icon_view); ++ g_signal_connect_swapped(G_OBJECT(icon), "label-changed", ++ G_CALLBACK(xfdesktop_icon_view_clear_icon_extents), ++ icon_view); ++ ++ fake_area.x = SCREEN_MARGIN + icon_view->priv->xorigin + col * CELL_SIZE; ++ fake_area.y = SCREEN_MARGIN + icon_view->priv->yorigin + row * CELL_SIZE; ++ fake_area.width = fake_area.height = CELL_SIZE; ++ xfdesktop_icon_view_paint_icon(icon_view, icon, &fake_area); ++} ++ ++static gboolean ++xfdesktop_icon_view_icon_find_position(XfdesktopIconView *icon_view, ++ XfdesktopIcon *icon) ++{ ++ guint16 row, col; ++ ++ if(!xfdesktop_icon_get_position(icon, &row, &col) ++ || !xfdesktop_grid_is_free_position(icon_view, row, col)) ++ { ++ if(xfdesktop_grid_get_next_free_position(icon_view, &row, &col)) { ++ DBG("old position didn't exist or isn't free, got (%d,%d) instead", ++ row, col); ++ xfdesktop_icon_set_position(icon, row, col); ++ } else { ++ DBG("can't fit icon on screen"); ++ return FALSE; ++ } ++ } ++ ++ return TRUE; ++} ++ + void + xfdesktop_icon_view_add_item(XfdesktopIconView *icon_view, + XfdesktopIcon *icon) + { +- gboolean icon_has_pos; + guint16 row, col; +- GdkRectangle fake_area; + + g_return_if_fail(XFDESKTOP_IS_ICON_VIEW(icon_view) + && XFDESKTOP_IS_ICON(icon)); + +- icon_has_pos = xfdesktop_icon_get_position(icon, &row, &col); +- + /* ensure the icon isn't already in an icon view */ + g_return_if_fail(!g_object_get_data(G_OBJECT(icon), + "--xfdesktop-icon-view")); + + g_object_set_data(G_OBJECT(icon), "--xfdesktop-icon-view", icon_view); ++ g_object_ref(G_OBJECT(icon)); + + if(!GTK_WIDGET_REALIZED(GTK_WIDGET(icon_view))) { +- if(icon_has_pos) { ++ /* if we aren't realized, we don't know what our grid looks like, so ++ * just hang onto the icon for later */ ++ if(xfdesktop_icon_get_position(icon, &row, &col)) { + icon_view->priv->pending_icons = g_list_prepend(icon_view->priv->pending_icons, +- g_object_ref(G_OBJECT(icon))); ++ icon); + } else { + icon_view->priv->pending_icons = g_list_append(icon_view->priv->pending_icons, +- g_object_ref(G_OBJECT(icon))); ++ icon); + } +- return; ++ } else { ++ if(xfdesktop_icon_view_icon_find_position(icon_view, icon)) ++ xfdesktop_icon_view_add_item_internal(icon_view, icon); ++ else { ++ icon_view->priv->pending_icons = g_list_append(icon_view->priv->pending_icons, ++ icon); ++ } + } +- +- if(!icon_has_pos || !xfdesktop_grid_is_free_position(icon_view, row, col)) { +- if(xfdesktop_grid_get_next_free_position(icon_view, &row, &col)) { +- DBG("old position didn't exist or isn't free, got (%d,%d) instead", +- row, col); +- xfdesktop_icon_set_position(icon, row, col); +- } else { +- DBG("can't fit icon on screen"); +- return; +- } +- } +- +- xfdesktop_grid_unset_position_free(icon_view, icon); +- +- icon_view->priv->icons = g_list_prepend(icon_view->priv->icons, +- g_object_ref(G_OBJECT(icon))); +- +- g_signal_connect_swapped(G_OBJECT(icon), "pixbuf-changed", +- G_CALLBACK(xfdesktop_icon_view_clear_icon_extents), +- icon_view); +- g_signal_connect_swapped(G_OBJECT(icon), "label-changed", +- G_CALLBACK(xfdesktop_icon_view_clear_icon_extents), +- icon_view); +- +- fake_area.x = SCREEN_MARGIN + icon_view->priv->xorigin + col * CELL_SIZE; +- fake_area.y = SCREEN_MARGIN + icon_view->priv->yorigin + row * CELL_SIZE; +- fake_area.width = fake_area.height = CELL_SIZE; +- xfdesktop_icon_view_paint_icon(icon_view, icon, &fake_area); + } + + void +@@ -2592,7 +2628,6 @@ + xfdesktop_icon_view_remove_all(XfdesktopIconView *icon_view) + { + GList *l; +- gboolean realized; + guint16 row, col; + + g_return_if_fail(XFDESKTOP_IS_ICON_VIEW(icon_view)); +@@ -2607,12 +2642,9 @@ + icon_view->priv->pending_icons = NULL; + } + +- realized = GTK_WIDGET_REALIZED(GTK_WIDGET(icon_view)); + for(l = icon_view->priv->icons; l; l = l->next) { +- if(realized) { +- if(xfdesktop_icon_get_position(XFDESKTOP_ICON(l->data), &row, &col)) +- xfdesktop_grid_set_position_free(icon_view, row, col); +- } ++ if(xfdesktop_icon_get_position(XFDESKTOP_ICON(l->data), &row, &col)) ++ xfdesktop_grid_set_position_free(icon_view, row, col); + + g_signal_handlers_disconnect_by_func(G_OBJECT(l->data), + G_CALLBACK(xfdesktop_icon_view_clear_icon_extents), +@@ -2635,7 +2667,7 @@ + icon_view->priv->last_clicked_item = NULL; + icon_view->priv->first_clicked_item = NULL; + +- if(realized) ++ if(GTK_WIDGET_REALIZED(icon_view)) + gtk_widget_queue_draw(GTK_WIDGET(icon_view)); + } + diff --git a/xfce-base/xfdesktop/xfdesktop-4.3.99.2-r1.ebuild b/xfce-base/xfdesktop/xfdesktop-4.3.99.2-r1.ebuild new file mode 100644 index 000000000000..9e228551e00c --- /dev/null +++ b/xfce-base/xfdesktop/xfdesktop-4.3.99.2-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfdesktop/xfdesktop-4.3.99.2-r1.ebuild,v 1.1 2006/12/30 19:04:27 nichoj Exp $ + +inherit xfce44 eutils + +xfce44_beta + +DESCRIPTION="Xfce 4 desktop manager" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" + +IUSE="exo panel-plugin thunar-vfs" + +DEPEND="sys-apps/dbus" +RDEPEND="|| ( ( + x11-libs/libX11 + x11-libs/libICE + x11-libs/libSM ) + virtual/x11 ) + >=dev-libs/glib-2.2 + >=x11-libs/gtk+-2.2 + ~xfce-base/libxfce4mcs-${PV} + ~xfce-base/libxfce4util-${PV} + ~xfce-base/libxfcegui4-${PV} + thunar-vfs? ( ~xfce-base/thunar-0.5.0_rc2 ) + panel-plugin? ( ~xfce-base/xfce4-panel-${PV} ) + ~xfce-base/xfce-mcs-manager-${PV} + media-libs/libpng + exo? ( >=xfce-extra/exo-0.3.1.12_rc2 ) + ${DEPEND}" + +if ! use thunar-vfs; then + XFCE_CONFIG="--disable-thunar-vfs --disable-thunarx" +fi + +if ! use exo; then + XFCE_CONFIG="${XFCE_CONFIG} --disable-exo" +fi + +if ! use panel-plugin; then + XFCE_CONFIG="${XFCE_CONFIG} --disable-panel-plugin" +fi + +xfce44_core_package + +src_unpack() { + unpack ${A} + cd ${S} + # fixes erratic icon behavior, see + # http://bugzilla.xfce.org/show_bug.cgi?id=1546 + epatch ${FILESDIR}/${P}-icons.patch +} |