summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <drac@gentoo.org>2007-03-27 16:58:35 +0000
committerSamuli Suominen <drac@gentoo.org>2007-03-27 16:58:35 +0000
commit8cdfb00f44e03c15c1ae9fef9b951abfee558494 (patch)
treea8708ad53b0bb466d0ac7b1f93d42248aa1a587a /xfce-base/xfce4-panel
parentAdd ~ia64 wrt bug 100784 (diff)
downloadgentoo-2-8cdfb00f44e03c15c1ae9fef9b951abfee558494.tar.gz
gentoo-2-8cdfb00f44e03c15c1ae9fef9b951abfee558494.tar.bz2
gentoo-2-8cdfb00f44e03c15c1ae9fef9b951abfee558494.zip
Upstream patch for bugs 170336 and 171667. Thanks to Leonardo Valeri Manera for reporting.
(Portage version: 2.1.2.2)
Diffstat (limited to 'xfce-base/xfce4-panel')
-rw-r--r--xfce-base/xfce4-panel/ChangeLog11
-rw-r--r--xfce-base/xfce4-panel/files/digest-xfce4-panel-4.4.0-r2 (renamed from xfce-base/xfce4-panel/files/digest-xfce4-panel-4.4.0-r1)0
-rw-r--r--xfce-base/xfce4-panel/files/xfce4-panel-4.4.0-actions-and-orientation.patch235
-rw-r--r--xfce-base/xfce4-panel/files/xfce4-panel-4.4.0-actions.patch33
-rw-r--r--xfce-base/xfce4-panel/xfce4-panel-4.4.0-r2.ebuild (renamed from xfce-base/xfce4-panel/xfce4-panel-4.4.0-r1.ebuild)4
5 files changed, 247 insertions, 36 deletions
diff --git a/xfce-base/xfce4-panel/ChangeLog b/xfce-base/xfce4-panel/ChangeLog
index 07bb6ade6822..f776a6a3e8f0 100644
--- a/xfce-base/xfce4-panel/ChangeLog
+++ b/xfce-base/xfce4-panel/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for xfce-base/xfce4-panel
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-panel/ChangeLog,v 1.93 2007/03/15 13:25:24 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-panel/ChangeLog,v 1.94 2007/03/27 16:58:35 drac Exp $
+
+*xfce4-panel-4.4.0-r2 (27 Mar 2007)
+
+ 27 Mar 2007; Samuli Suominen <drac@gentoo.org>
+ -files/xfce4-panel-4.4.0-actions.patch,
+ +files/xfce4-panel-4.4.0-actions-and-orientation.patch,
+ -xfce4-panel-4.4.0-r1.ebuild, +xfce4-panel-4.4.0-r2.ebuild:
+ Upstream patch for bugs 170336 and 171667. Thanks to Leonardo Valeri Manera
+ for reporting.
15 Mar 2007; Markus Rothe <corsair@gentoo.org> xfce4-panel-4.4.0.ebuild:
Stable on ppc64; bug #169987
diff --git a/xfce-base/xfce4-panel/files/digest-xfce4-panel-4.4.0-r1 b/xfce-base/xfce4-panel/files/digest-xfce4-panel-4.4.0-r2
index b6a88e44d63f..b6a88e44d63f 100644
--- a/xfce-base/xfce4-panel/files/digest-xfce4-panel-4.4.0-r1
+++ b/xfce-base/xfce4-panel/files/digest-xfce4-panel-4.4.0-r2
diff --git a/xfce-base/xfce4-panel/files/xfce4-panel-4.4.0-actions-and-orientation.patch b/xfce-base/xfce4-panel/files/xfce4-panel-4.4.0-actions-and-orientation.patch
new file mode 100644
index 000000000000..66b08c8c1bce
--- /dev/null
+++ b/xfce-base/xfce4-panel/files/xfce4-panel-4.4.0-actions-and-orientation.patch
@@ -0,0 +1,235 @@
+diff -ur xfce4-panel-4.4.0.orig/panel/panel-properties.c xfce4-panel-4.4.0/panel/panel-properties.c
+--- xfce4-panel-4.4.0.orig/panel/panel-properties.c 2007-01-20 18:33:00.000000000 +0200
++++ xfce4-panel-4.4.0/panel/panel-properties.c 2007-03-27 19:36:28.000000000 +0300
+@@ -928,7 +928,7 @@
+ x = xmon->geometry.x;
+ y = xmon->geometry.y;
+
+- if (priv->xoffset > 0 && priv->yoffset > 0)
++ if (priv->xoffset > -1 && priv->yoffset > -1)
+ {
+ x += priv->xoffset;
+ y += priv->yoffset;
+Only in xfce4-panel-4.4.0/panel: panel-properties.c.orig
+diff -ur xfce4-panel-4.4.0.orig/plugins/actions/actions.c xfce4-panel-4.4.0/plugins/actions/actions.c
+--- xfce4-panel-4.4.0.orig/plugins/actions/actions.c 2007-01-20 18:32:58.000000000 +0200
++++ xfce4-panel-4.4.0/plugins/actions/actions.c 2007-03-27 19:39:53.000000000 +0300
+@@ -51,9 +51,13 @@
+ GtkWidget *image1;
+ GtkWidget *button2;
+ GtkWidget *image2;
++
++ GtkWidget *box;
+
+ int screen_id;
+ int style_id;
++
++ GtkOrientation orientation;
+ }
+ Action;
+
+@@ -110,40 +114,44 @@
+ static gboolean
+ actions_set_size (XfcePanelPlugin *plugin, int size, Action *action)
+ {
+- int width;
++ gint width;
+ GdkPixbuf *pb = NULL;
+- int border;
+
+- if (xfce_panel_plugin_get_orientation (plugin) ==
+- GTK_ORIENTATION_HORIZONTAL)
+- {
+- border = 2 + 2 * GTK_WIDGET(plugin)->style->ythickness;
+- }
+- else
+- {
+- border = 2 + 2 * GTK_WIDGET(plugin)->style->xthickness;
+- }
++ width = size - 2 - 2 * MAX (action->button1->style->xthickness,
++ action->button1->style->ythickness);
+
+ switch (action->type)
+ {
+ case ACTION_QUIT_LOCK:
+- width = size / 2 - 2 * border;
++ if (xfce_panel_plugin_get_orientation (plugin) != action->orientation)
++ {
++ width = (size / 2) - 4 - 4 * MAX (action->button1->style->xthickness,
++ action->button1->style->ythickness);
++ width = MAX (width, 5);
++ }
++ else
++ {
++ gtk_widget_set_size_request (GTK_WIDGET (action->button1), size, size);
++ gtk_widget_set_size_request (GTK_WIDGET (action->button2), size, size);
++ }
++
++ gtk_widget_set_size_request (GTK_WIDGET (plugin), -1, -1);
++
+ pb = actions_load_icon (ACTION_LOCK, width);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (action->image1), pb);
+ g_object_unref (G_OBJECT (pb));
+
+ pb = actions_load_icon (ACTION_QUIT, width);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (action->image2), pb);
+- g_object_unref (G_OBJECT (pb));
+-
++ g_object_unref (G_OBJECT (pb));
+ break;
++
+ case ACTION_QUIT:
+ case ACTION_LOCK:
+- width = MIN(size - border, MAX(16, size/2 - border));
+ pb = actions_load_icon (action->type, width);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (action->image1), pb);
+ g_object_unref (G_OBJECT (pb));
+-
++ gtk_widget_set_size_request (GTK_WIDGET (plugin), size, size);
+ break;
+ }
+
+@@ -155,6 +163,7 @@
+ {
+ char *file;
+ XfceRc *rc;
++ GtkOrientation orientation = GTK_ORIENTATION_VERTICAL;
+ int type = ACTION_QUIT;
+
+ if ((file = xfce_panel_plugin_lookup_rc_file (plugin)) != NULL)
+@@ -165,12 +174,14 @@
+ if (rc != NULL)
+ {
+ type = xfce_rc_read_int_entry (rc, "type", ACTION_QUIT);
++ orientation = (xfce_rc_read_int_entry (rc, "orientation", 1) == 0 ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
+
+ xfce_rc_close (rc);
+ }
+ }
+
+ action->type = type;
++ action->orientation = orientation;
+ }
+
+ static void
+@@ -189,6 +200,7 @@
+ return;
+
+ xfce_rc_write_int_entry (rc, "type", action->type);
++ xfce_rc_write_int_entry (rc, "orientation", action->orientation == GTK_ORIENTATION_HORIZONTAL ? 0 : 1);
+
+ xfce_rc_close (rc);
+ }
+@@ -233,19 +245,13 @@
+ actions_create_widgets (XfcePanelPlugin *plugin, Action *action)
+ {
+ GtkWidget *widget, *box, *button, *img;
+- GtkOrientation orientation;
+
+ widget = GTK_WIDGET (plugin);
+
+ switch (action->type)
+ {
+ case ACTION_QUIT_LOCK:
+- orientation = (xfce_panel_plugin_get_orientation (plugin) ==
+- GTK_ORIENTATION_HORIZONTAL) ?
+- GTK_ORIENTATION_VERTICAL :
+- GTK_ORIENTATION_HORIZONTAL;
+-
+- box = xfce_hvbox_new (orientation, TRUE, 0);
++ box = xfce_hvbox_new (action->orientation, TRUE, 0);
+ gtk_widget_show (box);
+ gtk_container_add (GTK_CONTAINER (plugin), box);
+
+@@ -368,6 +374,9 @@
+ action_type_changed (GtkComboBox *box, Action *action)
+ {
+ action->type = gtk_combo_box_get_active (box);
++
++ /* orientation only sensitive when 2 buttons are shown */
++ gtk_widget_set_sensitive (action->box, action->type == 2 ? TRUE : FALSE);
+
+ gtk_widget_destroy (GTK_BIN (action->plugin)->child);
+ actions_create_widgets (action->plugin, action);
+@@ -377,6 +386,19 @@
+ }
+
+ static void
++orientation_changed (GtkComboBox *box, Action *action)
++{
++ action->orientation = (gtk_combo_box_get_active (box) == 0 ?
++ GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
++
++ gtk_widget_destroy (GTK_BIN (action->plugin)->child);
++ actions_create_widgets (action->plugin, action);
++
++ actions_set_size (action->plugin,
++ xfce_panel_plugin_get_size (action->plugin), action);
++}
++
++static void
+ actions_dialog_response (GtkWidget *dlg, int reponse, Action *action)
+ {
+ g_object_set_data (G_OBJECT (action->plugin), "dialog", NULL);
+@@ -389,7 +411,8 @@
+ static void
+ actions_properties_dialog (XfcePanelPlugin *plugin, Action *action)
+ {
+- GtkWidget *dlg, *vbox, *hbox, *label, *box;
++ GtkWidget *dlg, *vbox, *hbox, *label, *box, *box2;
++ GtkSizeGroup *sg;
+
+ xfce_panel_plugin_block_menu (plugin);
+
+@@ -411,6 +434,8 @@
+
+ gtk_container_set_border_width (GTK_CONTAINER (dlg), 2);
+
++ sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
++
+ vbox = gtk_vbox_new (FALSE, 8);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+ gtk_widget_show (vbox);
+@@ -423,6 +448,7 @@
+
+ label = gtk_label_new (_("Select action type:"));
+ gtk_widget_show (label);
++ gtk_size_group_add_widget (sg, label);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+ box = gtk_combo_box_new_text ();
+@@ -437,6 +463,34 @@
+
+ g_signal_connect (box, "changed", G_CALLBACK (action_type_changed),
+ action);
++
++ hbox = gtk_hbox_new (FALSE, 8);
++ gtk_widget_show (hbox);
++ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
++
++ label = gtk_label_new (_("Orientation:"));
++ gtk_widget_show (label);
++ gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
++ gtk_size_group_add_widget (sg, label);
++ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
++
++ box2 = action->box = gtk_combo_box_new_text ();
++ gtk_widget_show (box2);
++ gtk_box_pack_start (GTK_BOX (hbox), box2, TRUE, TRUE, 0);
++
++ /* only sensitive when 2 buttons are shown */
++ gtk_widget_set_sensitive (action->box, action->type == 2 ? TRUE : FALSE);
++
++ gtk_combo_box_append_text (GTK_COMBO_BOX (box2), _("Horizontal"));
++ gtk_combo_box_append_text (GTK_COMBO_BOX (box2), _("Vertical"));
++
++ gtk_combo_box_set_active (GTK_COMBO_BOX (box2),
++ action->orientation == GTK_ORIENTATION_HORIZONTAL ? 0 : 1);
++
++ g_signal_connect (box2, "changed", G_CALLBACK (orientation_changed),
++ action);
++
++ g_object_unref (G_OBJECT (sg));
+
+ gtk_widget_show (dlg);
+ }
diff --git a/xfce-base/xfce4-panel/files/xfce4-panel-4.4.0-actions.patch b/xfce-base/xfce4-panel/files/xfce4-panel-4.4.0-actions.patch
deleted file mode 100644
index ee83c4da6bc6..000000000000
--- a/xfce-base/xfce4-panel/files/xfce4-panel-4.4.0-actions.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -ur xfce4-panel-4.4.0.orig/plugins/actions/actions.c xfce4-panel-4.4.0/plugins/actions/actions.c
---- xfce4-panel-4.4.0.orig/plugins/actions/actions.c 2007-01-20 18:32:58.000000000 +0200
-+++ xfce4-panel-4.4.0/plugins/actions/actions.c 2007-03-11 01:28:23.000000000 +0200
-@@ -81,7 +81,7 @@
- {
- xfce_hvbox_set_orientation (XFCE_HVBOX (GTK_BIN (plugin)->child),
- (orientation == GTK_ORIENTATION_HORIZONTAL) ?
-- GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL);
-+ GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
- }
- }
-
-@@ -127,7 +127,7 @@
- switch (action->type)
- {
- case ACTION_QUIT_LOCK:
-- width = size / 2 - 2 * border;
-+ width = MIN(size - border, MAX(16, size/2 - border));
- pb = actions_load_icon (ACTION_LOCK, width);
- gtk_image_set_from_pixbuf (GTK_IMAGE (action->image1), pb);
- g_object_unref (G_OBJECT (pb));
-@@ -241,9 +241,8 @@
- {
- case ACTION_QUIT_LOCK:
- orientation = (xfce_panel_plugin_get_orientation (plugin) ==
-- GTK_ORIENTATION_HORIZONTAL) ?
-- GTK_ORIENTATION_VERTICAL :
-- GTK_ORIENTATION_HORIZONTAL;
-+ GTK_ORIENTATION_VERTICAL) ?
-+ GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL;
-
- box = xfce_hvbox_new (orientation, TRUE, 0);
- gtk_widget_show (box);
diff --git a/xfce-base/xfce4-panel/xfce4-panel-4.4.0-r1.ebuild b/xfce-base/xfce4-panel/xfce4-panel-4.4.0-r2.ebuild
index 8543a2ced94f..5c27a3594937 100644
--- a/xfce-base/xfce4-panel/xfce4-panel-4.4.0-r1.ebuild
+++ b/xfce-base/xfce4-panel/xfce4-panel-4.4.0-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-panel/xfce4-panel-4.4.0-r1.ebuild,v 1.1 2007/03/10 23:50:25 drac Exp $
+# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-panel/xfce4-panel-4.4.0-r2.ebuild,v 1.1 2007/03/27 16:58:35 drac Exp $
inherit eutils xfce44
@@ -32,5 +32,5 @@ xfce44_core_package
src_unpack() {
unpack ${A}
cd "${S}"
- epatch "${FILESDIR}"/${P}-actions.patch
+ epatch "${FILESDIR}"/${P}-actions-and-orientation.patch
}