packages: xfce4-places-plugin/xfce4-places-plugin.spec, xfce4-places-plugin...
baggins
baggins at pld-linux.org
Thu Mar 3 13:47:02 CET 2011
Author: baggins Date: Thu Mar 3 12:47:02 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 7
- work around menu position not being updated after plugin movement by providing
our menu position hook
---- Files affected:
packages/xfce4-places-plugin:
xfce4-places-plugin.spec (1.15 -> 1.16) , xfce4-places-plugin-position.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/xfce4-places-plugin/xfce4-places-plugin.spec
diff -u packages/xfce4-places-plugin/xfce4-places-plugin.spec:1.15 packages/xfce4-places-plugin/xfce4-places-plugin.spec:1.16
--- packages/xfce4-places-plugin/xfce4-places-plugin.spec:1.15 Tue Feb 22 08:11:05 2011
+++ packages/xfce4-places-plugin/xfce4-places-plugin.spec Thu Mar 3 13:46:57 2011
@@ -3,7 +3,7 @@
Summary(pl.UTF-8): Wtyczka places dla panelu Xfce
Name: xfce4-places-plugin
Version: 1.2.0
-Release: 6
+Release: 7
License: GPL v2
Group: X11/Applications
Source0: http://archive.xfce.org/src/panel-plugins/xfce4-places-plugin/1.2/%{name}-%{version}.tar.bz2
@@ -11,6 +11,7 @@
Patch0: port-to-exo-1.patch
Patch1: %{name}-ui.patch
Patch2: %{name}-gio.patch
+Patch3: %{name}-position.patch
URL: http://goodies.xfce.org/projects/panel-plugins/xfce4-places-plugin
BuildRequires: Thunar-devel >= 1.2.0
BuildRequires: autoconf
@@ -56,6 +57,7 @@
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%{__libtoolize}
@@ -93,6 +95,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.16 2011/03/03 12:46:57 baggins
+- rel 7
+- work around menu position not being updated after plugin movement by providing
+ our menu position hook
+
Revision 1.15 2011/02/22 07:11:05 baggins
- rel 6
================================================================
Index: packages/xfce4-places-plugin/xfce4-places-plugin-position.patch
diff -u /dev/null packages/xfce4-places-plugin/xfce4-places-plugin-position.patch:1.1
--- /dev/null Thu Mar 3 13:47:02 2011
+++ packages/xfce4-places-plugin/xfce4-places-plugin-position.patch Thu Mar 3 13:46:57 2011
@@ -0,0 +1,69 @@
+diff -ur xfce4-places-plugin-1.2.0/panel-plugin/view.c xfce4-places-plugin-1.2.0-position/panel-plugin/view.c
+--- xfce4-places-plugin-1.2.0/panel-plugin/view.c 2011-03-03 13:43:31.938573607 +0100
++++ xfce4-places-plugin-1.2.0-position/panel-plugin/view.c 2011-03-03 13:42:28.099573608 +0100
+@@ -734,6 +734,55 @@
+ }
+
+ static void
++pview_position_menu (GtkMenu *menu,
++ gint *x,
++ gint *y,
++ gboolean *push_in,
++ PlacesView *view)
++{
++ GtkWidget *button;
++ GtkRequisition requisition;
++ GtkOrientation orientation;
++
++ button = view->button;
++ orientation = xfce_panel_plugin_get_orientation (view->plugin);
++ gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
++ gdk_window_get_origin (GTK_WIDGET (view->plugin)->window, x, y);
++
++ switch (orientation)
++ {
++ case GTK_ORIENTATION_HORIZONTAL:
++ if (*y + button->allocation.height + requisition.height > gdk_screen_height ())
++ /* Show menu above */
++ *y -= requisition.height;
++ else
++ /* Show menu below */
++ *y += button->allocation.height;
++
++ if (*x + requisition.width > gdk_screen_width ())
++ /* Adjust horizontal position */
++ *x = gdk_screen_width () - requisition.width;
++ break;
++
++ case GTK_ORIENTATION_VERTICAL:
++ if (*x + button->allocation.width + requisition.width > gdk_screen_width ())
++ /* Show menu on the right */
++ *x -= requisition.width;
++ else
++ /* Show menu on the left */
++ *x += button->allocation.width;
++
++ if (*y + requisition.height > gdk_screen_height ())
++ /* Adjust vertical position */
++ *y = gdk_screen_height () - requisition.height;
++ break;
++
++ default:
++ break;
++ }
++}
++
++static void
+ pview_open_menu(PlacesView *pd)
+ {
+ /* check if menu is needed, or it needs an update */
+@@ -745,8 +794,7 @@
+
+ /* popup menu */
+ gtk_menu_popup (GTK_MENU (pd->menu), NULL, NULL,
+- xfce_panel_plugin_position_menu,
+- pd->plugin, 0,
++ (GtkMenuPositionFunc)pview_position_menu, pd, 0,
+ gtk_get_current_event_time ());
+
+ /* menu timeout to poll for model changes */
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/xfce4-places-plugin/xfce4-places-plugin.spec?r1=1.15&r2=1.16&f=u
More information about the pld-cvs-commit
mailing list