diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2009-09-22 20:28:05 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2009-09-22 20:28:05 +0000 |
commit | 19357c06972cb657f2e969b576bf0cdd39042316 (patch) | |
tree | 13ccad873d1768298a20f05f2358edecc298abdd /xfce-extra | |
parent | Stable for HPPA (bug #283632). (diff) | |
download | gentoo-2-19357c06972cb657f2e969b576bf0cdd39042316.tar.gz gentoo-2-19357c06972cb657f2e969b576bf0cdd39042316.tar.bz2 gentoo-2-19357c06972cb657f2e969b576bf0cdd39042316.zip |
Fix tooltips with new dev-libs/glib and x11-libs/gtk+ wrt #274024.
(Portage version: 2.2_rc41/cvs/Linux x86_64)
Diffstat (limited to 'xfce-extra')
3 files changed, 134 insertions, 1 deletions
diff --git a/xfce-extra/xfce4-netload-plugin/ChangeLog b/xfce-extra/xfce4-netload-plugin/ChangeLog index 9db514c9a9cb..ddffee1970c0 100644 --- a/xfce-extra/xfce4-netload-plugin/ChangeLog +++ b/xfce-extra/xfce4-netload-plugin/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for xfce-extra/xfce4-netload-plugin # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-netload-plugin/ChangeLog,v 1.1 2009/08/25 07:52:46 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-netload-plugin/ChangeLog,v 1.2 2009/09/22 20:28:05 ssuominen Exp $ + +*xfce4-netload-plugin-0.4.0-r1 (22 Sep 2009) + + 22 Sep 2009; Samuli Suominen <ssuominen@gentoo.org> + +xfce4-netload-plugin-0.4.0-r1.ebuild, + +files/xfce4-netload-plugin-0.4.0-fix-tooltips-gtk2.16.patch: + Fix tooltips with new dev-libs/glib and x11-libs/gtk+ wrt #274024. *xfce4-netload-plugin-0.4.0 (25 Aug 2009) diff --git a/xfce-extra/xfce4-netload-plugin/files/xfce4-netload-plugin-0.4.0-fix-tooltips-gtk2.16.patch b/xfce-extra/xfce4-netload-plugin/files/xfce4-netload-plugin-0.4.0-fix-tooltips-gtk2.16.patch new file mode 100644 index 000000000000..95522393aa58 --- /dev/null +++ b/xfce-extra/xfce4-netload-plugin/files/xfce4-netload-plugin-0.4.0-fix-tooltips-gtk2.16.patch @@ -0,0 +1,90 @@ +http://bugzilla.xfce.org/show_bug.cgi?id=5175 +http://bugs.gentoo.org/show_bug.cgi?id=274024 + +diff -ur xfce4-netload-plugin-0.4.0.orig/panel-plugin/netload.c xfce4-netload-plugin-0.4.0/panel-plugin/netload.c +--- xfce4-netload-plugin-0.4.0.orig/panel-plugin/netload.c 2005-10-09 12:08:01.000000000 +0300 ++++ xfce4-netload-plugin-0.4.0/panel-plugin/netload.c 2009-09-22 23:27:12.000000000 +0300 +@@ -30,8 +30,6 @@ + #include <libxfce4panel/xfce-panel-plugin.h> + + +-static GtkTooltips *tooltips = NULL; +- + #define BORDER 8 + + /* Defaults */ +@@ -219,7 +217,7 @@ + "Incoming: %s kByte/s\nOutgoing: %s kByte/s\nTotal: %s kByte/s"), + get_name(&(global->monitor->data)), ip ? ip : _("no IP address"), + HISTSIZE_CALCULATE, buffer[IN], buffer[OUT], buffer[TOT]); +- gtk_tooltips_set_tip(tooltips, GTK_WIDGET(global->ebox), caption, NULL); ++ gtk_widget_set_tooltip_text(GTK_WIDGET(global->ebox), caption); + } + + return TRUE; +@@ -237,6 +235,14 @@ + + if (global->monitor->options.update_interval > 0) + { ++#if GLIB_CHECK_VERSION( 2,14,0 ) ++ if (global->monitor->options.update_interval % 1000 == 0) ++ { ++ global->timeout_id = g_timeout_add_seconds(global->monitor-> ++ options.update_interval / 1000, (GtkFunction)update_monitors, global); ++ } ++ else ++#endif + global->timeout_id = g_timeout_add( global->monitor->options.update_interval, + (GtkFunction)update_monitors, global); + } +@@ -368,11 +374,6 @@ + global->plugin = plugin; + xfce_panel_plugin_add_action_widget (plugin, global->ebox); + +- if (!tooltips) +- { +- tooltips = gtk_tooltips_new(); +- } +- + global->monitor = g_new(t_monitor, 1); + global->monitor->options.label_text = g_strdup(DEFAULT_TEXT); + global->monitor->options.network_device = g_strdup(""); +@@ -819,6 +820,10 @@ + GtkWidget *sep1, *sep2; + GtkBox *update_hbox; + GtkWidget *update_label, *update_unit_label; ++#if GLIB_CHECK_VERSION( 2,14,0 ) ++ GtkBox *update_hint_hbox; ++ GtkWidget *update_hint_label; ++#endif + GtkWidget *color_label[SUM]; + GtkWidget *align; + GtkBox *color_hbox[SUM]; +@@ -935,7 +940,7 @@ + gtk_misc_set_alignment(GTK_MISC(update_label), 0, 0.5); + gtk_box_pack_start(GTK_BOX(update_hbox), GTK_WIDGET(update_label), FALSE, FALSE, 0); + +- global->monitor->update_spinner = gtk_spin_button_new_with_range (0.1, 10.0, 0.05); ++ global->monitor->update_spinner = gtk_spin_button_new_with_range (1.0, 10.0, 0.25); + gtk_spin_button_set_digits( GTK_SPIN_BUTTON(global->monitor->update_spinner), 2 ); + gtk_spin_button_set_value( GTK_SPIN_BUTTON(global->monitor->update_spinner), + global->monitor->options.update_interval / 1000.0 ); +@@ -948,6 +953,18 @@ + + gtk_widget_show_all(GTK_WIDGET(update_hbox)); + gtk_size_group_add_widget(sg, update_label); ++ ++#if GLIB_CHECK_VERSION( 2,14,0 ) ++ /* Update interval hint */ ++ update_hint_hbox = GTK_BOX(gtk_hbox_new(FALSE, 5)); ++ update_hint_label = gtk_label_new(_("Note: Whole seconds are more power-efficient")); ++ gtk_label_set_line_wrap(GTK_LABEL(update_hint_label), TRUE); ++ gtk_box_pack_start(GTK_BOX(update_hint_hbox), GTK_WIDGET(update_hint_label), ++ FALSE, FALSE, 0); ++ gtk_box_pack_start(GTK_BOX(global->monitor->opt_vbox), ++ GTK_WIDGET(update_hint_hbox), FALSE, FALSE, 0); ++ gtk_widget_show_all(GTK_WIDGET(update_hint_hbox)); ++#endif + + + sep1 = gtk_hseparator_new(); diff --git a/xfce-extra/xfce4-netload-plugin/xfce4-netload-plugin-0.4.0-r1.ebuild b/xfce-extra/xfce4-netload-plugin/xfce4-netload-plugin-0.4.0-r1.ebuild new file mode 100644 index 000000000000..b48c4cfebda2 --- /dev/null +++ b/xfce-extra/xfce4-netload-plugin/xfce4-netload-plugin-0.4.0-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-netload-plugin/xfce4-netload-plugin-0.4.0-r1.ebuild,v 1.1 2009/09/22 20:28:05 ssuominen Exp $ + +EAUTORECONF=yes +EINTLTOOLIZE=yes +EAPI=2 +inherit xfconf + +DESCRIPTION="Netload plugin for Xfce4 panel" +HOMEPAGE="http://www.xfce.org/" +SRC_URI="mirror://xfce/src/panel-plugins/${PN}/0.4/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="debug" + +RDEPEND=">=xfce-base/xfce4-panel-4.3.20" +DEPEND="${RDEPEND} + dev-util/pkgconfig + dev-util/intltool" + +pkg_setup() { + PATCHES=( "${FILESDIR}/${P}-asneeded.patch" + "${FILESDIR}/${P}-fix-tooltips-gtk2.16.patch" ) + DOCS="AUTHORS ChangeLog README" + XFCONF="--disable-dependency-tracking + $(use_enable debug)" +} + +src_prepare() { + sed -i -e "/^AC_INIT/s/netload_version()/netload_version/" configure.ac \ + || die "sed failed" + xfconf_src_prepare +} |