[resapplet/f14/master] update to 0.1.4, drop s-c-d dependency
Radek Vokál
rvokal at fedoraproject.org
Fri Sep 3 05:34:14 UTC 2010
commit 309b1e26a1b9048599eff76112912a2db032bd1f
Author: Radek Vokal <rvokal at redhat.com>
Date: Fri Sep 3 07:34:15 2010 +0200
update to 0.1.4, drop s-c-d dependency
.gitignore | 1 +
resapplet-0.1.4-properties.patch | 12 +++
resapplet-fix-novell-146622-rml-1.patch | 51 -------------
resapplet-i18n.patch | 122 -------------------------------
resapplet-rotate-wacom.patch | 113 ++++++++++++++++++++++++++++
resapplet-susebug25115.patch | 11 +++
resapplet.desktop.in | 2 +-
resapplet.spec | 50 +++++++------
s-c-display.patch | 11 ---
sources | 3 +-
10 files changed, 166 insertions(+), 210 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index df5dff6..44a4846 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
resapplet-0.1.1.tar.bz2
resapplet-po.tar.bz2
+/resapplet-0.1.4.tar.bz2
diff --git a/resapplet-0.1.4-properties.patch b/resapplet-0.1.4-properties.patch
new file mode 100644
index 0000000..32bb7a6
--- /dev/null
+++ b/resapplet-0.1.4-properties.patch
@@ -0,0 +1,12 @@
+diff -up resapplet-0.1.4/src/resapplet.c.gnomesu resapplet-0.1.4/src/resapplet.c
+--- resapplet-0.1.4/src/resapplet.c.gnomesu 2010-09-03 06:28:21.000000000 +0200
++++ resapplet-0.1.4/src/resapplet.c 2010-09-03 06:32:08.141193686 +0200
+@@ -28,7 +28,7 @@
+ #include "eggtrayicon.h"
+
+ #define REVERT_COUNT 20
+-#define YAST2_ARGV { "/usr/bin/gnomesu", "/sbin/yast2", "x11", NULL }
++#define YAST2_ARGV { "/usr/bin/gnome-display-properties", "/usr/bin/gnome-display-properties", "x11", NULL }
+
+ typedef struct {
+ int current_width;
diff --git a/resapplet-rotate-wacom.patch b/resapplet-rotate-wacom.patch
new file mode 100644
index 0000000..1894e51
--- /dev/null
+++ b/resapplet-rotate-wacom.patch
@@ -0,0 +1,113 @@
+diff -up resapplet-0.1.4/src/resapplet.c.wacom resapplet-0.1.4/src/resapplet.c
+--- resapplet-0.1.4/src/resapplet.c.wacom 2010-09-03 06:51:57.543319038 +0200
++++ resapplet-0.1.4/src/resapplet.c 2010-09-03 06:51:57.548318935 +0200
+@@ -84,6 +84,7 @@ enum {
+ };
+
+ static Resapplet *resapplet;
++static gchar *wacom_util_path;
+
+ static void populate_popup_menu (void);
+ static char *get_str_for_res (int width, int height, Rotation rotation);
+@@ -251,6 +252,64 @@ get_current_rotation (ScreenInfo *screen
+ return screen_info->user_set_rotation;
+ }
+
++static void
++set_wacom_cursors (Rotation rot)
++{
++ gchar *output = NULL, *p = NULL, *nl = NULL;
++ int status = 1;
++
++ if (!wacom_util_path)
++ return;
++
++ g_spawn_command_line_sync ("xsetwacom list",
++ &output, NULL,
++ &status, NULL);
++ if (!output || status) {
++ g_printerr ("Failed to get cursor list from xsetwacom\n");
++ return;
++ }
++
++ for (p = output; *p != '\0'; p = nl + 1) {
++ gchar *cmd, *arg, *end;
++
++ nl = strchr (p, '\n');
++ if (!nl)
++ break;
++
++ *nl = '\0';
++ if (!strstr (p, "stylus"))
++ continue;
++
++ for (end = p; *end == '\0' || !g_ascii_isspace (*end); end++);
++ *end = '\0';
++
++ switch (rot) {
++ case RR_Rotate_90:
++ arg = "CW";
++ break;
++ case RR_Rotate_180:
++ arg = "HALF";
++ break;
++ case RR_Rotate_270:
++ arg = "CCW";
++ break;
++ default:
++ arg = "NONE";
++ break;
++ }
++
++ cmd = g_strconcat ("xsetwacom set ", p, " Rotate ", arg, NULL);
++ g_print ("Running '%s'\n", cmd);
++ g_spawn_command_line_sync (cmd, NULL, NULL, &status, NULL);
++ g_free (cmd);
++
++ if (status)
++ g_printerr ("Failed to rotate stylus %s\n", p);
++ }
++
++ g_free (output);
++}
++
+ static gboolean
+ apply_config (DisplayInfo *info)
+ {
+@@ -302,6 +361,9 @@ apply_config (DisplayInfo *info)
+ new_res,
+ new_rotation,
+ GDK_CURRENT_TIME);
++
++ if (new_rotation != screen_info->current_rotation)
++ set_wacom_cursors (new_rotation);
+ }
+ }
+
+@@ -345,7 +407,9 @@ revert_config (DisplayInfo *info)
+ screen_info->old_rotation,
+ screen_info->old_rate,
+ GDK_CURRENT_TIME);
+-
++
++ if (screen_info->old_rotation != screen_info->current_rotation)
++ set_wacom_cursors (screen_info->old_rotation);
+ }
+
+ update_display_info (info, display);
+@@ -1128,6 +1192,8 @@ main (int argc, char *argv[])
+
+ gtk_init (&argc, &argv);
+
++ wacom_util_path = g_find_program_in_path ("xsetwacom");
++
+ resapplet = resapplet_new ();
+ resapplet_set_icon ();
+
+@@ -1139,5 +1205,6 @@ main (int argc, char *argv[])
+
+ gtk_main ();
+
++ g_free (wacom_util_path);
+ return 0;
+ }
diff --git a/resapplet-susebug25115.patch b/resapplet-susebug25115.patch
new file mode 100644
index 0000000..cabc4a5
--- /dev/null
+++ b/resapplet-susebug25115.patch
@@ -0,0 +1,11 @@
+--- src/resapplet.c
++++ src/resapplet.c
+@@ -28,7 +28,7 @@
+ #include "eggtrayicon.h"
+
+ #define REVERT_COUNT 20
+-#define YAST2_ARGV { "/opt/gnome/bin/gnomesu", "/sbin/yast2", "x11", NULL }
++#define YAST2_ARGV { "/usr/bin/gnomesu", "/sbin/yast2", "x11", NULL }
+
+ typedef struct {
+ int current_width;
diff --git a/resapplet.desktop.in b/resapplet.desktop.in
index bd446d7..2609d89 100644
--- a/resapplet.desktop.in
+++ b/resapplet.desktop.in
@@ -6,6 +6,6 @@ Icon=resapplet
Terminal=false
Type=Application
TryExec=resapplet
-Categories=GNOME;Application;System;X-Ximian-System-Toplevel;
+Categories=GNOME;GTK;Application;System;X-Ximian-System-Toplevel;
StartupNotify=false
Encoding=UTF-8
diff --git a/resapplet.spec b/resapplet.spec
index f499e94..935365e 100644
--- a/resapplet.spec
+++ b/resapplet.spec
@@ -1,26 +1,25 @@
Summary: Resolution Switching Applet
Name: resapplet
-Version: 0.1.1
-Release: 10%{?dist}
+Version: 0.1.4
+Release: 2%{?dist}
License: GPLv2+ and GPLv2
# This is the best we have to silence rpmlint:
URL: http://svn.gnome.org/viewcvs/resapplet/
Group: User Interface/Desktops
# Source obtained from OpenSuSE
Source: resapplet-%{version}.tar.bz2
-Source1: resapplet-po.tar.bz2
-Source2: resapplet.desktop.in
-Patch0: resapplet-fix-novell-146622-rml-1.patch
+Source1: resapplet.desktop.in
Patch1: resapplet-transparent-trayicon.patch
-Patch2: resapplet-i18n.patch
-Patch3: s-c-display.patch
+Patch2: resapplet-susebug25115.patch
+Patch3: resapplet-rotate-wacom.patch
Patch4: resapplet-0.1.1-link_X11.patch
+Patch5: resapplet-0.1.4-properties.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gnome-icon-theme gnome-themes libgnomeui-devel
BuildRequires: intltool, automake, gettext, desktop-file-utils
Requires: libgnomeui >= 2.2 gtk2 >= 2.4
#Requires: gconf-editor >= 2.6
-Requires: gnome-icon-theme, system-config-display
+Requires: gnome-icon-theme
%description
Resapplet is a simple utility that sits in the system notification area
@@ -32,20 +31,16 @@ It works in both GNOME and KDE, because it uses the system notification
area.
%prep
-%setup -q -a 1
-cp -a %{S:2} . ; rm resapplet.desktop
-if %version != 0.1.1 ; then
-echo "Please remove Source2 and Source3 and verify that translations work."
-exit 1
-fi
-%patch0 -p0
+%setup -q
+cp -a %{S:1} .
%patch1 -p0
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
+%patch2 -p0
+%patch3 -p1 -b .wacom
+%patch4 -p1 -b .lX11
+%patch5 -p1
%build
-glib-gettextize
+#glib-gettextize
aclocal
intltoolize --force
autoheader
@@ -59,6 +54,7 @@ export CFLAGS="$RPM_OPT_FLAGS"
--prefix=%{_prefix}
make
+
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
@@ -91,12 +87,20 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/resapplet
%{_datadir}/applications/fedora-resapplet.desktop
%{_datadir}/gnome/autostart/fedora-resapplet.desktop
-%{_datadir}/icons/gnome/16x16/apps/resapplet.png
-%{_datadir}/icons/gnome/32x32/apps/resapplet.png
-%{_datadir}/icons/gnome/24x24/apps/resapplet.png
-%{_datadir}/icons/gnome/48x48/apps/resapplet.png
+%{_datadir}/icons/hicolor/16x16/apps/resapplet.png
+%{_datadir}/icons/hicolor/22x22/apps/resapplet.png
+%{_datadir}/icons/hicolor/24x24/apps/resapplet.png
+%{_datadir}/icons/hicolor/32x32/apps/resapplet.png
+%{_datadir}/icons/hicolor/scalable/apps/resapplet.svg
%changelog
+* Fri Sep 3 2010 Radek Vokal <rvokal at redhat.com> - 0.1.4-2
+- recreated wacom patch
+
+* Fri Sep 3 2010 Radek Vokal <rvokal at redhat.com> - 0.1.4-1
+- update to 0.1.4 from Suse trunk
+- drop dependency on s-c-display
+
* Tue Mar 23 2010 Radek Vokal <rvokal at redhat.com>
- patch from bruno at wolff.to fixes DSO Linking (#564599)
diff --git a/sources b/sources
index 3bf0d91..360c2d6 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-0f1d30b02182ff1ec463b3bc37e9326c resapplet-0.1.1.tar.bz2
-8eccc3dcafef264829601ea06899ec70 resapplet-po.tar.bz2
+00020d95e72d6784c3bb1456e1f7503e resapplet-0.1.4.tar.bz2
More information about the scm-commits
mailing list