Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eee9ed8dc7 | ||
|
|
c2733c7d49 | ||
| c782bc8a3f | |||
|
|
477a6bb19c |
6 changed files with 9 additions and 176 deletions
|
|
@ -1 +0,0 @@
|
|||
xfce-mcs-manager-4.4.1.tar.bz2
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
xfce-mcs-manager-4.4.2.tar.bz2
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: xfce-mcs-manager
|
||||
# $Id$
|
||||
NAME := xfce-mcs-manager
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
8fd3613d5aa0a146226718a9ea2c0242 xfce-mcs-manager-4.4.1.tar.bz2
|
||||
876a4b5d582de8fdc01457df2e7e1339 xfce-mcs-manager-4.4.2.tar.bz2
|
||||
|
|
|
|||
|
|
@ -1,148 +0,0 @@
|
|||
--- xfce-mcs-manager/xfce-mcs-manager/xfce-mcs-manager.c (revision 24722)
|
||||
+++ xfce-mcs-manager/xfce-mcs-manager/xfce-mcs-manager.c (revision 25758)
|
||||
@@ -79,14 +79,16 @@
|
||||
|
||||
static McsManager *manager;
|
||||
|
||||
-static enum
|
||||
+enum
|
||||
{
|
||||
NOSIGNAL,
|
||||
RESTART,
|
||||
QUIT,
|
||||
NUM_SIGNALS
|
||||
-} sigstate = NOSIGNAL;
|
||||
+};
|
||||
|
||||
+static int signal_pipe[2] = { -1, -1 };
|
||||
+
|
||||
G_MODULE_EXPORT gchar * mcs_plugin_check_version (gint version)
|
||||
{
|
||||
if (XFCE_MCS_PLUGIN_VERSION == version)
|
||||
@@ -311,6 +313,8 @@
|
||||
static void
|
||||
sighandler (int signo)
|
||||
{
|
||||
+ guint32 sigstate;
|
||||
+
|
||||
switch (signo)
|
||||
{
|
||||
case SIGUSR1:
|
||||
@@ -319,28 +323,46 @@
|
||||
|
||||
default:
|
||||
sigstate = QUIT;
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
+ write (signal_pipe[1], &sigstate, sizeof (sigstate));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
-check_signal_state (void)
|
||||
+signal_pipe_io (GIOChannel *source,
|
||||
+ GIOCondition condition,
|
||||
+ gpointer data)
|
||||
{
|
||||
- if (sigstate == RESTART)
|
||||
+ guint32 sigstate = 0;
|
||||
+ gsize bread = 0;
|
||||
+
|
||||
+ if (G_IO_ERROR_NONE == g_io_channel_read (source, (gchar *)&sigstate,
|
||||
+ sizeof (sigstate), &bread)
|
||||
+ && sizeof (sigstate) == bread)
|
||||
{
|
||||
- /* unload all plugins and destroy the manager */
|
||||
- unload_plugins ();
|
||||
- mcs_manager_destroy (manager);
|
||||
+ switch (sigstate)
|
||||
+ {
|
||||
+ case RESTART:
|
||||
+ /* unload all plugins and destroy the manager */
|
||||
+ unload_plugins ();
|
||||
+ mcs_manager_destroy (manager);
|
||||
|
||||
- /* just run the MCS manager from scratch */
|
||||
- execvp (rargv[0], rargv);
|
||||
- _exit (EXIT_SUCCESS);
|
||||
+ /* just run the MCS manager from scratch */
|
||||
+ execvp (rargv[0], rargv);
|
||||
+ _exit (EXIT_SUCCESS);
|
||||
+ break;
|
||||
+
|
||||
+ case QUIT:
|
||||
+ gtk_main_quit ();
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
- else if (sigstate == QUIT)
|
||||
- {
|
||||
- gtk_main_quit ();
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -354,6 +376,8 @@
|
||||
gboolean daemon_mode;
|
||||
gboolean std_mgr;
|
||||
int i;
|
||||
+ GIOChannel *signal_io;
|
||||
+ guint signal_watch = 0;
|
||||
|
||||
/* save argv for restart */
|
||||
rargv = g_strdupv (argv);
|
||||
@@ -400,6 +424,29 @@
|
||||
|
||||
plugin_load_all ();
|
||||
gdk_flush ();
|
||||
+
|
||||
+ if (pipe (signal_pipe))
|
||||
+ g_warning ("Unable to create signal-watch pipe: %s. Signals will be ignored.", strerror(errno));
|
||||
+ else
|
||||
+ {
|
||||
+ /* set writing end to non-blocking */
|
||||
+ int oldflags = fcntl (signal_pipe[1], F_GETFL);
|
||||
+ if(fcntl (signal_pipe[1], F_SETFL, oldflags | O_NONBLOCK))
|
||||
+ {
|
||||
+ g_warning ("Unable to set signal-watch pipe to non-blocking mode: %s. Signals will be ignored.", strerror(errno));
|
||||
+ close (signal_pipe[0]);
|
||||
+ close (signal_pipe[1]);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ signal_io = g_io_channel_unix_new (signal_pipe[0]);
|
||||
+ g_io_channel_set_encoding (signal_io, NULL, NULL);
|
||||
+ g_io_channel_set_close_on_unref (signal_io, FALSE);
|
||||
+ signal_watch = g_io_add_watch (signal_io, G_IO_IN | G_IO_PRI,
|
||||
+ signal_pipe_io, NULL);
|
||||
+ g_io_channel_unref (signal_io);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
#ifdef HAVE_SIGACTION
|
||||
act.sa_handler = sighandler;
|
||||
@@ -453,11 +500,14 @@
|
||||
else
|
||||
g_message ("Daemon mode disabled (for debug purpose only!)");
|
||||
|
||||
- /* Establish signal-check timer */
|
||||
- g_timeout_add (500, (GSourceFunc) check_signal_state, NULL);
|
||||
-
|
||||
gtk_main ();
|
||||
|
||||
+ if (signal_watch) {
|
||||
+ g_source_remove (signal_watch);
|
||||
+ close (signal_pipe[0]);
|
||||
+ close (signal_pipe[1]);
|
||||
+ }
|
||||
+
|
||||
unload_plugins ();
|
||||
|
||||
mcs_manager_destroy (manager);
|
||||
|
|
@ -1,11 +1,10 @@
|
|||
Summary: Multi channel settings manager
|
||||
Name: xfce-mcs-manager
|
||||
Version: 4.4.1
|
||||
Release: 3%{?dist}
|
||||
Version: 4.4.2
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: http://www.xfce.org/
|
||||
Source0: http://www.xfce.org/archive/xfce-4.4.1/src/xfce-mcs-manager-4.4.1.tar.bz2
|
||||
Patch0: xfce-mcs-manager-4.4.1-wakeups.patch
|
||||
Source0: http://www.xfce.org/archive/xfce-4.4.2/src/xfce-mcs-manager-4.4.2.tar.bz2
|
||||
Group: User Interface/Desktops
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
Requires: libxfce4mcs >= %{version}
|
||||
|
|
@ -32,7 +31,6 @@ mcs plugins.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .wakeups
|
||||
|
||||
%build
|
||||
%configure
|
||||
|
|
@ -70,6 +68,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%{_includedir}/xfce4/xfce-mcs-manager
|
||||
|
||||
%changelog
|
||||
* Sun Nov 18 2007 Kevin Fenzi <kevin@tummy.com> - 4.4.2-1
|
||||
- Update to 4.4.2
|
||||
- Remove unneeded patch
|
||||
|
||||
* Sun Aug 26 2007 Kevin Fenzi <kevin@tummy.com> - 4.4.1-3
|
||||
- Update License tag
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue