[Xfce4-commits] transd:master drop libxfcegui4 dep, use libwnck-3.0 and gtk3

2012-04-11 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to aa8f6ee292b47f2a7b9e473a981173bc2db74816 (commit)
   from b89d7823fb2a7835b5cdcd2eab910fbba8255896 (commit)

commit aa8f6ee292b47f2a7b9e473a981173bc2db74816
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Apr 10 14:55:20 2012 -0700

drop libxfcegui4 dep, use libwnck-3.0 and gtk3

 configure.ac|4 ++-
 src/Makefile.am |   17 ++
 src/main.c  |   19 +--
 src/transd.c|   67 --
 src/transd.h|6 +---
 5 files changed, 63 insertions(+), 50 deletions(-)

diff --git a/configure.ac b/configure.ac
index fe30914..2b1fb45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,9 @@ dnl Check for X11 installed
 XDT_CHECK_LIBX11_REQUIRE
 
 dnl required
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.2.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.2.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.0.0])
+XDT_CHECK_PACKAGE([WNCK], [libwnck-3.0], [3.0.0])
 
 dnl check for debugging support
 XDT_FEATURE_DEBUG
diff --git a/src/Makefile.am b/src/Makefile.am
index a33b823..5702cb3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,14 +5,21 @@ transd_SOURCES = \
transd.c \
transd.h
 
+transd_CPPFLAGS = \
+   -DWNCK_I_KNOW_THIS_IS_UNSTABLE
+
 transd_CFLAGS = \
-DLOCALEDIR=\$(localedir)\ \
-   @LIBX11_CFLAGS@ \
-   @LIBXFCEGUI4_CFLAGS@
+   $(LIBXFCE4UTIL_CFLAGS) \
+   $(X11_CFLAGS) \
+   $(GTK_CFLAGS) \
+   $(WNCK_CFLAGS)
 
 transd_LDFLAGS = \
-   @LIBX11_LDFLAGS@
+   $(X11_LDFLAGS)
 
 transd_LDADD = \
-   @LIBX11_LIBS@ \
-   @LIBXFCEGUI4_LIBS@
+   $(LIBXFCE4UTIL_LIBS) \
+   $(X11_LIBS) \
+   $(GTK_LIBS) \
+   $(WNCK_LIBS)
diff --git a/src/main.c b/src/main.c
index 6d3460b..508bf49 100644
--- a/src/main.c
+++ b/src/main.c
@@ -51,7 +51,7 @@
 
 #include gtk/gtk.h
 
-#include libxfcegui4/libxfcegui4.h
+#include libwnck/libwnck.h
 
 #include transd.h
 
@@ -65,9 +65,9 @@ setup_transd(Transd *transd)
 
 nscreens = gdk_display_get_n_screens(gdk_display_get_default());
 for(i = 0; i  nscreens; i++) {
-NetkScreen *netk_screen = netk_screen_get(i);
-netk_screen_force_update(netk_screen);
-transd_add_screen(transd, netk_screen);
+WnckScreen *wnck_screen = wnck_screen_get(i);
+wnck_screen_force_update(wnck_screen);
+transd_add_screen(transd, wnck_screen);
 }
 }
 
@@ -116,12 +116,15 @@ main(int argc, char **argv)
 for(i = getdtablesize() - 1; i = 0; i--)
 close(i);
 
-xsession_errors = xfce_get_homefile(.xsession-errors,
-NULL);
+xsession_errors = g_build_filename(g_get_home_dir(),
+   .xsession-errors,
+   NULL);
 open(/dev/null, O_RDONLY);  /* stdin */
 i = open(xsession_errors, O_CREAT|O_APPEND, 600);  /* 
stdout */
-if(i = 0)
-dup(i);  /* stderr */
+if(i = 0) {
+if (dup(i))  /* stderr */
+g_printerr(Failed to dup() stdout for stderr\n);
+}
 g_free(xsession_errors);
 }
 break;
diff --git a/src/transd.c b/src/transd.c
index 47067c4..29ff1f2 100644
--- a/src/transd.c
+++ b/src/transd.c
@@ -34,12 +34,14 @@
 #endif
 
 #include X11/Xlib.h
+#include X11/Xatom.h
 
 #include glib.h
 #include gdk/gdk.h
+#include gdk/gdkx.h
+#include gtk/gtk.h
 
 #include libxfce4util/libxfce4util.h
-#include libxfcegui4/libxfcegui4.h
 
 #include transd.h
 
@@ -49,7 +51,7 @@
 
 struct _Transd
 {
-GList *screens; /* (NetkScreen *) */
+GList *screens; /* (WnckScreen *) */
 GHashTable *rules;  /* (gchar *) - (TransdClassRule *) */
 };
 
@@ -79,8 +81,8 @@ transd_window_get_role(Window xid)
 
 g_return_val_if_fail(xid != None, NULL);
 
-if(Success == XGetWindowProperty(GDK_DISPLAY(), xid,
- XInternAtom(GDK_DISPLAY(), _XA_ROLE, 
False),
+if(Success == XGetWindowProperty(gdk_x11_get_default_xdisplay(), xid,
+ 
XInternAtom(gdk_x11_get_default_xdisplay(), _XA_ROLE, False),
  0L, 8192, False, XA_STRING, actual_type,
  actual_format, nitems, bytes_after,
  prop_return))
@@ -112,10 +114,7 @@ transd_read_config(Transd *transd, const gchar *filename)
 return FALSE;
 
 if(!xfce_rc_has_group(rcfile, transd-global-config)) {
-xfce_message_dialog(NULL, Transd, GTK_STOCK_DIALOG_ERROR,
-_(Configuration

[Xfce4-commits] transd:master kill gdk/gtk/libwnck dep

2012-04-11 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 39aa5ec62816e6c0c108a72001cf8961a93e69d6 (commit)
   from aa8f6ee292b47f2a7b9e473a981173bc2db74816 (commit)

commit 39aa5ec62816e6c0c108a72001cf8961a93e69d6
Author: Brian J. Tarricone br...@tarricone.org
Date:   Wed Apr 11 02:50:28 2012 -0700

kill gdk/gtk/libwnck dep

 configure.ac|2 -
 src/Makefile.am |   11 +--
 src/main.c  |   67 +++---
 src/transd.c|  272 ---
 src/transd.h|   10 ++-
 5 files changed, 242 insertions(+), 120 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2b1fb45..9a650c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,8 +41,6 @@ XDT_CHECK_LIBX11_REQUIRE
 
 dnl required
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.2.0])
-XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.0.0])
-XDT_CHECK_PACKAGE([WNCK], [libwnck-3.0], [3.0.0])
 
 dnl check for debugging support
 XDT_FEATURE_DEBUG
diff --git a/src/Makefile.am b/src/Makefile.am
index 5702cb3..13f35ee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,21 +5,14 @@ transd_SOURCES = \
transd.c \
transd.h
 
-transd_CPPFLAGS = \
-   -DWNCK_I_KNOW_THIS_IS_UNSTABLE
-
 transd_CFLAGS = \
-DLOCALEDIR=\$(localedir)\ \
$(LIBXFCE4UTIL_CFLAGS) \
-   $(X11_CFLAGS) \
-   $(GTK_CFLAGS) \
-   $(WNCK_CFLAGS)
+   $(X11_CFLAGS)
 
 transd_LDFLAGS = \
$(X11_LDFLAGS)
 
 transd_LDADD = \
$(LIBXFCE4UTIL_LIBS) \
-   $(X11_LIBS) \
-   $(GTK_LIBS) \
-   $(WNCK_LIBS)
+   -lX11
diff --git a/src/main.c b/src/main.c
index 508bf49..f1a3cbe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -49,55 +49,56 @@
 #include signal.h
 #endif
 
-#include gtk/gtk.h
-
-#include libwnck/libwnck.h
+#include X11/Xlib.h
+#include glib.h
 
 #include transd.h
 
 static Transd *__g_transd = NULL;
+static Display *__g_dpy = NULL;
+static gboolean running = FALSE;
 
 
 static void
-setup_transd(Transd *transd)
-{
-gint i, nscreens;
-
-nscreens = gdk_display_get_n_screens(gdk_display_get_default());
-for(i = 0; i  nscreens; i++) {
-WnckScreen *wnck_screen = wnck_screen_get(i);
-wnck_screen_force_update(wnck_screen);
-transd_add_screen(transd, wnck_screen);
-}
-}
-
-static void
 sighandler(int sig)
 {
 switch(sig) {
-case SIGINT:
-case SIGTERM:
-gtk_main_quit();
-break;
-
 case SIGHUP:
 case SIGUSR1:
 transd_free(__g_transd);
-__g_transd = transd_new();
-setup_transd(__g_transd);
+__g_transd = transd_new(__g_dpy);
 break;
 }
 }
 
+static void
+x_main(Display *dpy,
+   Transd *transd)
+{
+while (running) {
+XEvent xev;
+XNextEvent(dpy, xev);
+
+if (xev.type == MapNotify) {
+g_debug(got map notify);
+transd_window_mapped(transd, xev.xmap);
+}else if (xev.type == PropertyNotify)
+transd_property_changed(transd, xev.xproperty);
+}
+}
+
 int
 main(int argc, char **argv)
 {
 gint i;
 gboolean daemon_mode = TRUE;
+const char *display_name = NULL;
 
 for(i = 1; i  argc; i++) {
 if(!strcmp(argv[i], --debug))
 daemon_mode = FALSE;
+else if (!strncmp(argv[1], --display=, 10))
+display_name = argv[1] + 10;
 }
 
 if(daemon_mode) {
@@ -135,20 +136,22 @@ main(int argc, char **argv)
 }
 }
 
-gtk_init(argc, argv);
-
-signal(SIGINT, sighandler);
-signal(SIGTERM, sighandler);
+__g_dpy = XOpenDisplay(display_name);
+if (!__g_dpy) {
+g_printerr(Unable to open display %s\n, display_name ? display_name 
: :0);
+return EXIT_FAILURE;
+}
+
 signal(SIGHUP, sighandler);
 signal(SIGUSR1, sighandler);
 
-__g_transd = transd_new();
-
-setup_transd(__g_transd);
+__g_transd = transd_new(__g_dpy);
 
-gtk_main();
+running = TRUE;
+x_main(__g_dpy, __g_transd);
 
 transd_free(__g_transd);
+XCloseDisplay(__g_dpy);
 
-return 0;
+return EXIT_SUCCESS;
 }
diff --git a/src/transd.c b/src/transd.c
index 29ff1f2..fb8a75a 100644
--- a/src/transd.c
+++ b/src/transd.c
@@ -37,21 +37,20 @@
 #include X11/Xatom.h
 
 #include glib.h
-#include gdk/gdk.h
-#include gdk/gdkx.h
-#include gtk/gtk.h
-
 #include libxfce4util/libxfce4util.h
 
 #include transd.h
 
 #define _XA_OPACITY   _NET_WM_WINDOW_OPACITY
+#define _XA_WM_CLASS  WM_CLASS
+#define _XA_WM_NAME   WM_NAME
+#define _XA_NET_WM_NAME   _NET_WM_NAME
 #define _XA_ROLE  WM_WINDOW_ROLE
 #define TRANSD_RULES_CONFIG   transd/rules.rc
 
 struct _Transd
 {
-GList *screens; /* (WnckScreen *) */
+Display *dpy;
 GHashTable *rules;  /* (gchar *) - (TransdClassRule *) */
 };
 
@@ -61,6 +60,36 @@ typedef struct
 GHashTable *roles;  /* (gchar *) - (gint

[Xfce4-commits] transd:master suppress debugging

2012-04-11 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to bf345481baa2f5d4d4acf155bed3ff9c8ac5c97c (commit)
   from 6e931aba881db555c60ce5b5619fa0581b8ce130 (commit)

commit bf345481baa2f5d4d4acf155bed3ff9c8ac5c97c
Author: Brian J. Tarricone br...@tarricone.org
Date:   Wed Apr 11 02:57:48 2012 -0700

suppress debugging

 src/main.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/main.c b/src/main.c
index f1a3cbe..3266dfe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -79,10 +79,9 @@ x_main(Display *dpy,
 XEvent xev;
 XNextEvent(dpy, xev);
 
-if (xev.type == MapNotify) {
-g_debug(got map notify);
+if (xev.type == MapNotify)
 transd_window_mapped(transd, xev.xmap);
-}else if (xev.type == PropertyNotify)
+else if (xev.type == PropertyNotify)
 transd_property_changed(transd, xev.xproperty);
 }
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master emit closed signal on correct object

2011-09-26 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to ad77e8aa48201c1c10226b54f7ab006989f2f4d5 (commit)
   from 117884d7760657156dfd06fc9624c82e5f789260 (commit)

commit ad77e8aa48201c1c10226b54f7ab006989f2f4d5
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Sep 26 00:07:31 2011 -0700

emit closed signal on correct object

'widget' is actually the GtkButton when an action is clicked.  this is
why notifications were never dismissed when an action got clicked.
long-standing bug finally fixed!

 xfce4-notifyd/xfce-notify-window.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 41316b8..8364d7a 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -718,7 +718,7 @@ xfce_notify_window_button_clicked(GtkWidget *widget,
 
 g_signal_emit(G_OBJECT(window), signals[SIG_ACTION_INVOKED], 0,
   action_id);
-g_signal_emit(G_OBJECT(widget), signals[SIG_CLOSED], 0,
+g_signal_emit(G_OBJECT(window), signals[SIG_CLOSED], 0,
   XFCE_NOTIFY_CLOSE_REASON_DISMISSED);
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master update NEWS

2011-09-26 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to c775d42914243dbde576a503d418075858876fae (commit)
   from ad77e8aa48201c1c10226b54f7ab006989f2f4d5 (commit)

commit c775d42914243dbde576a503d418075858876fae
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Sep 26 00:20:18 2011 -0700

update NEWS

 NEWS |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index f51a40f..e4c6406 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@
 | Xfce Notify Daemon |
 ++
 
+Version 0.2.3git:
+
+* Fix notifications not disappearing after clicking an action button.
+
 Version 0.2.2 (06 August 2011):
 
 * New cleaner settings dialog with preview on theme change.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-session:master explicitly link to libm where needed (bug #7953)

2011-09-26 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to eeaea26d3b777afb98c21317ad83170e3f725fd0 (commit)
   from 5b6b22c9e1e9c0c1cfc618b9546695b4966d19b3 (commit)

commit eeaea26d3b777afb98c21317ad83170e3f725fd0
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Sep 26 01:18:48 2011 -0700

explicitly link to libm where needed (bug #7953)

we use rint() but aren't linking to libm; probably getting picked up
implicitly by a dependency like libpng, which recently dropped that flag
from its .pc file.

 configure.in.in   |4 
 engines/balou/Makefile.am |3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 141d427..8eff947 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -63,6 +63,10 @@ AC_CHECK_HEADERS([asm/unistd.h errno.h fcntl.h limits.h \
 AC_CHECK_FUNCS([getaddrinfo gethostbyname gethostname getpwuid setsid \
 sigaction strdup sync vfork])
 
+dnl Check for required libraries
+AC_CHECK_LIBM
+AC_SUBST(LIBM)
+
 dnl Check for X11 installed
 XDT_CHECK_LIBX11_REQUIRE()
 
diff --git a/engines/balou/Makefile.am b/engines/balou/Makefile.am
index 96ae5c5..d049a35 100644
--- a/engines/balou/Makefile.am
+++ b/engines/balou/Makefile.am
@@ -31,7 +31,8 @@ libbalou_la_LDFLAGS = 
\
 libbalou_la_LIBADD =   \
$(top_builddir)/libxfsm/libxfsm-4.6.la  \
$(LIBXFCE4UI_LIBS)  \
-   $(XFCONF_LIBS)
+   $(XFCONF_LIBS)  \
+   $(LIBM)
 
 
 libbalou_la_DEPENDENCIES = \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-session:master remove .cvsignore files

2011-09-26 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to f5d3001d480ff74eb6e5ddcbf60ea309e82d53d3 (commit)
   from eeaea26d3b777afb98c21317ad83170e3f725fd0 (commit)

commit f5d3001d480ff74eb6e5ddcbf60ea309e82d53d3
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Sep 26 01:22:02 2011 -0700

remove .cvsignore files

what?!  how are these still here...

 .cvsignore  |   10 --
 doc/.cvsignore  |1 -
 doc/manual/images/.cvsignore|1 -
 engines/.cvsignore  |1 -
 engines/balou/.cvsignore|9 -
 engines/balou/scripts/.cvsignore|1 -
 engines/balou/themes/.cvsignore |1 -
 engines/balou/themes/Default/.cvsignore |1 -
 engines/mice/.cvsignore |6 --
 engines/simple/.cvsignore   |5 -
 icons/.cvsignore|1 -
 icons/128x128/.cvsignore|1 -
 icons/48x48/.cvsignore  |1 -
 icons/64x64/.cvsignore  |1 -
 icons/72x72/.cvsignore  |1 -
 icons/scalable/.cvsignore   |1 -
 libxfsm/.cvsignore  |6 --
 settings/.cvsignore |3 ---
 themes/.cvsignore   |1 -
 themes/Default/.cvsignore   |1 -
 xfce4-session-logout/.cvsignore |5 -
 xfce4-session/.cvsignore|8 
 xfsm-shutdown-helper/.cvsignore |4 
 23 files changed, 0 insertions(+), 70 deletions(-)

diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 092fdd6..000
--- a/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-Makefile
-autom4te.cache
-config.h
-config.log
-config.status
-configure.lineno
-libtool
-stamp-h1
-xfce4-session.spec
-.*.swp
diff --git a/doc/.cvsignore b/doc/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/doc/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/doc/manual/images/.cvsignore b/doc/manual/images/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/doc/manual/images/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/engines/.cvsignore b/engines/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/engines/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/engines/balou/.cvsignore b/engines/balou/.cvsignore
deleted file mode 100644
index fb21864..000
--- a/engines/balou/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.deps
-.libs
-Makefile
-libbalou.la
-libbalou_la-balou-theme.lo
-libbalou_la-balou.lo
-libbalou_la-config.lo
-libbalou_la-engine.lo
-libbalou_la-gnome-uri.lo
diff --git a/engines/balou/scripts/.cvsignore b/engines/balou/scripts/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/engines/balou/scripts/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/engines/balou/themes/.cvsignore b/engines/balou/themes/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/engines/balou/themes/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/engines/balou/themes/Default/.cvsignore 
b/engines/balou/themes/Default/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/engines/balou/themes/Default/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/engines/mice/.cvsignore b/engines/mice/.cvsignore
deleted file mode 100644
index 5a52270..000
--- a/engines/mice/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-generate
-libmice.la
-libmice_la-mice.lo
diff --git a/engines/simple/.cvsignore b/engines/simple/.cvsignore
deleted file mode 100644
index 2c9b25b..000
--- a/engines/simple/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.deps
-.libs
-Makefile
-libsimple.la
-libsimple_la-simple.lo
diff --git a/icons/.cvsignore b/icons/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/icons/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/icons/128x128/.cvsignore b/icons/128x128/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/icons/128x128/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/icons/48x48/.cvsignore b/icons/48x48/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/icons/48x48/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/icons/64x64/.cvsignore b/icons/64x64/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/icons/64x64/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/icons/72x72/.cvsignore b/icons/72x72/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/icons/72x72/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/icons/scalable/.cvsignore b/icons/scalable/.cvsignore
deleted file mode 100644
index f3c7a7c..000
--- a/icons/scalable/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/libxfsm/.cvsignore b/libxfsm/.cvsignore
deleted file mode 100644
index a91da2b..000

[Xfce4-commits] xfce4-session:master add .gitignore

2011-09-26 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 9329388a20df19c688be894173d2400c89f30acf (commit)
   from f5d3001d480ff74eb6e5ddcbf60ea309e82d53d3 (commit)

commit 9329388a20df19c688be894173d2400c89f30acf
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Sep 26 01:24:20 2011 -0700

add .gitignore

how has this never been added before...

 .gitignore |   67 
 1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..83077af
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,67 @@
+*.o
+*.lo
+*.la
+*.so
+*.gmo
+
+Makefile
+Makefile.in
+.deps
+.libs
+
+INSTALL
+aclocal.m4
+autom4te.cache
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+configure.in
+depcomp
+engines/mice/generate
+engines/mice/preview.h
+engines/mice/slide.h
+engines/simple/fallback.h
+engines/simple/preview.h
+install-sh
+intltool-extract.in
+intltool-merge.in
+intltool-update.in
+libtool
+libxfsm/xfce4-session-2.0.pc
+ltmain.sh
+missing
+mkinstalldirs
+panel-plugin/xfsm-logout-plugin-ui.h
+panel-plugin/xfsm-logout-plugin.desktop
+po/.intltool-merge-cache
+po/Makefile.in.in
+po/POTFILES
+po/stamp-it
+scripts/startxfce4
+scripts/xinitrc
+scripts/xinitrc.in
+settings/stamp-xfce4-session-marshal.h
+settings/xfce-session-settings.desktop
+settings/xfce4-session-marshal.c
+settings/xfce4-session-marshal.h
+settings/xfce4-session-settings
+settings/xfce4-session-settings_ui.h
+settings/xfsm-client-dbus-client.h
+settings/xfsm-manager-dbus-client.h
+stamp-h1
+xfce.desktop
+xfce4-session-logout/xfce4-session-logout
+xfce4-session-logout/xfce4-session-logout.desktop
+xfce4-session.spec
+xfce4-session/chooser-icon.h
+xfce4-session/stamp-xfsm-marshal.h
+xfce4-session/xfce4-session
+xfce4-session/xfsm-manager-dbus.h
+xfce4-session/xfsm-marshal.c
+xfce4-session/xfsm-marshal.h
+xfsm-shutdown-helper/xfsm-shutdown-helper
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Fix a segfault when using the summary-bold property.

2010-04-12 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 87e2f71e95310c4b53d8acd1bc05695ecae71780 (commit)
   from f23c20c4a3e80fbb7019bff1a842a64be68f242d (commit)

commit 87e2f71e95310c4b53d8acd1bc05695ecae71780
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 27 11:53:29 2009 +0100

Fix a segfault when using the summary-bold property.

When initializing an XfceNotifyWindow, gtk_widget_ensure_style was
called before initializing window-summary. As a result, in
xfce_notify_window_style_set, gtk_widget_get_style returned a wrong
value (NULL) which caused a crash in pango_font_description_copy.
Initializing window-summary at the beginning of the init function
is enough to fix this.

 xfce4-notifyd/xfce-notify-window.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index d33d3b9..93fa112 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -211,6 +211,8 @@ xfce_notify_window_init(XfceNotifyWindow *window)
 window-expire_timeout = DEFAULT_EXPIRE_TIMEOUT;
 window-normal_opacity = DEFAULT_NORMAL_OPACITY;
 window-fade_transparent = TRUE;
+/* The summary widget needs to be initialized before style_set is called. 
gtk_widget_ensure_style calls style_set */
+window-summary = gtk_label_new(NULL);
 
 gtk_window_set_keep_above(GTK_WINDOW(window), TRUE);
 gtk_window_stick(GTK_WINDOW(window));
@@ -257,7 +259,6 @@ xfce_notify_window_init(XfceNotifyWindow *window)
 gtk_widget_show(vbox);
 gtk_box_pack_start(GTK_BOX(tophbox), vbox, TRUE, TRUE, 0);
 
-window-summary = gtk_label_new(NULL);
 gtk_label_set_line_wrap(GTK_LABEL(window-summary), TRUE);
 gtk_misc_set_alignment(GTK_MISC(window-summary), 0.0, 0.0);
 gtk_box_pack_start(GTK_BOX(vbox), window-summary, FALSE, FALSE, 0);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Cache the workarea.

2010-04-12 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 0d1cc1c70c0fb28b095c868abad9cc8f53e844d5 (commit)
   from 87e2f71e95310c4b53d8acd1bc05695ecae71780 (commit)

commit 0d1cc1c70c0fb28b095c868abad9cc8f53e844d5
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Nov 12 21:39:20 2009 +0100

Cache the workarea.

 xfce4-notifyd/xfce-notify-daemon.c |   84 +---
 1 files changed, 68 insertions(+), 16 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-daemon.c 
b/xfce4-notifyd/xfce-notify-daemon.c
index 6f5d69e..5b2fd36 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -32,6 +32,8 @@
 #include libxfce4util/libxfce4util.h
 #include libxfce4ui/libxfce4ui.h
 
+#include gdk/gdkx.h
+
 #include dbus/dbus-glib.h
 #include dbus/dbus-glib-lowlevel.h
 #include xfconf/xfconf.h
@@ -57,6 +59,7 @@ struct _XfceNotifyDaemon
 
 GTree *active_notifications;
 GList ***reserved_rectangles;
+GdkRectangle **monitors_workarea;
 
 gint changed_screen;
 
@@ -91,6 +94,10 @@ static void xfce_notify_daemon_finalize(GObject *obj);
 
 static GQuark xfce_notify_daemon_get_n_monitors_quark(void);
 
+static GdkFilterReturn xfce_notify_rootwin_watch_workarea(GdkXEvent *gxevent,
+  GdkEvent *event,
+  gpointer user_data);
+
 static void xfce_gdk_rectangle_largest_box(GdkRectangle *src1,
GdkRectangle *src2,
GdkRectangle *dest);
@@ -193,6 +200,36 @@ xfce_notify_daemon_get_n_monitors_quark(void)
 return quark;
 }
 
+static GdkFilterReturn
+xfce_notify_rootwin_watch_workarea(GdkXEvent *gxevent,
+   GdkEvent *event,
+   gpointer user_data)
+{
+XfceNotifyDaemon *xndaemon = XFCE_NOTIFY_DAEMON(user_data);
+XPropertyEvent *xevt = (XPropertyEvent *)gxevent;
+
+if(xevt-type == PropertyNotify
+XInternAtom(xevt-display, _NET_WORKAREA, False) == xevt-atom)
+{
+GdkScreen *screen = gdk_event_get_screen(event);
+int screen_number = gdk_screen_get_number (screen);
+int nmonitor = gdk_screen_get_n_monitors (screen);
+int j;
+
+DBG(got _NET_WORKAREA change on rootwin!);
+
+for(j = 0; j  nmonitor; j++) {
+GdkRectangle workarea;
+
+if(!xfce_notify_daemon_get_workarea(screen, j, workarea))
+gdk_screen_get_monitor_geometry(screen, j, workarea);
+xndaemon-monitors_workarea[screen_number][j] = workarea;
+}
+}
+
+return GDK_FILTER_CONTINUE;
+}
+
 static void
 xfce_notify_daemon_screen_changed(GdkScreen *screen,
   gpointer user_data)
@@ -211,6 +248,9 @@ xfce_notify_daemon_screen_changed(GdkScreen *screen,
 g_list_free(xndaemon-reserved_rectangles[screen_number][j]);
 
 g_free(xndaemon-reserved_rectangles[screen_number]);
+g_free(xndaemon-monitors_workarea[screen_number]);
+
+xndaemon-monitors_workarea[screen_number] = g_new0(GdkRectangle, 
new_nmonitor);
 
 /* Initialize a new reserved rectangles array for screen */
 xndaemon-reserved_rectangles[screen_number] = g_new0(GList *, 
new_nmonitor);
@@ -232,10 +272,13 @@ xfce_notify_daemon_init(XfceNotifyDaemon *xndaemon)
NULL, NULL,

(GDestroyNotify)gtk_widget_destroy);
 xndaemon-reserved_rectangles = g_new(GList **, nscreen);
+xndaemon-monitors_workarea = g_new(GdkRectangle *, nscreen);
 
 for(i = 0; i  nscreen; ++i) {
 GdkScreen *screen = gdk_display_get_screen(gdk_display_get_default(), 
i);
 gint nmonitor = gdk_screen_get_n_monitors(screen);
+GdkWindow *groot;
+int j;
 
 g_object_set_qdata(G_OBJECT(screen), XND_N_MONITORS, 
GINT_TO_POINTER(nmonitor));
 
@@ -243,6 +286,20 @@ xfce_notify_daemon_init(XfceNotifyDaemon *xndaemon)
  G_CALLBACK(xfce_notify_daemon_screen_changed), 
xndaemon);
 
 xndaemon-reserved_rectangles[i] = g_new0(GList *, nmonitor);
+xndaemon-monitors_workarea[i] = g_new0(GdkRectangle, nmonitor);
+
+for(j = 0; j  nmonitor; j++) {
+GdkRectangle workarea;
+
+if(!xfce_notify_daemon_get_workarea(screen, j, workarea))
+  gdk_screen_get_monitor_geometry(screen, j, workarea);
+xndaemon-monitors_workarea[i][j] = workarea;
+}
+
+/* Monitor root window changes */
+groot = gdk_screen_get_root_window(screen);
+gdk_window_set_events(groot, gdk_window_get_events(groot) | 
GDK_PROPERTY_CHANGE_MASK);
+gdk_window_add_filter(groot, xfce_notify_rootwin_watch_workarea, 
xndaemon);
 }
 
 xndaemon-last_notification_id = 1;
@@ -257,17 +314,22 @@ xfce_notify_daemon_finalize(GObject 

[Xfce4-commits] xfce4-notifyd:master update NEWS and README

2010-04-11 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to f23c20c4a3e80fbb7019bff1a842a64be68f242d (commit)
   from f1169d86075b1ce972b173ed999ca6bcdad3f97f (commit)

commit f23c20c4a3e80fbb7019bff1a842a64be68f242d
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Apr 11 17:52:46 2010 -0700

update NEWS and README

 NEWS   |1 +
 README |5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index e73fef4..e914fcc 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,7 @@ Version 0.1.0git:
   there are multiple on the screen.  This also uses a custom workarea
   calculation to avoid placing notifications where docked windows have
   set struts (Jérôme Guelfucci, bug 5248).
+* Port to libxfce4ui, drop libxfcegui4 dep (Romain Bouvier, bug 6375).
 
   Bugfixes:
 * Use correct COPYING file (GPLv2, not GPLv3).
diff --git a/README b/README
index 879ac2e..e8c1881 100644
--- a/README
+++ b/README
@@ -10,12 +10,11 @@ interface.
 
 Requirements:
 
-* gtk+ 2.10.0
-* libglade 2.6.0
+* gtk+ 2.14.0
 * dbus 1.0.0
 * dbus-glib 0.72
 * libxfce4util 4.4.0
-* libxfcegui4 4.5.2svn-r26594
+* libxfce4ui 4.7.0
 * xfconf 0.1.0svn-r26876
 * libsexy 0.1.6 (optional)
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Port xfce4-notifyd to libxfce4ui and GtkBuilder

2010-04-11 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to f1169d86075b1ce972b173ed999ca6bcdad3f97f (commit)
   from 5b9e6a3f628b1f534eb3c56e97a3949fab931f23 (commit)

commit f1169d86075b1ce972b173ed999ca6bcdad3f97f
Author: Romain Bouvier skun...@archlinux.fr
Date:   Sun Apr 11 17:30:08 2010 +0200

Port xfce4-notifyd to libxfce4ui and GtkBuilder

 Makefile.am |   18 ++--
 configure.ac.in |5 +-
 xfce4-notifyd-config/main.c |   41 
 xfce4-notifyd-config/xfce4-notifyd-config.glade |  136 ++-
 xfce4-notifyd/main.c|2 +-
 xfce4-notifyd/xfce-notify-daemon.c  |9 +-
 xfce4-notifyd/xfce-notify-window.c  |   17 +++-
 7 files changed, 137 insertions(+), 91 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7310806..c396e21 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,13 +30,13 @@ xfce4_notifyd_xfce4_notifyd_SOURCES = \
 
 xfce4_notifyd_config_xfce4_notifyd_config_SOURCES = \
xfce4-notifyd-config/main.c \
-   xfce4-notifyd-config/xfce4-notifyd-config.glade.h
+   xfce4-notifyd-config/xfce4-notifyd-config.ui.h
 
 common_cflags = \
-DLOCALEDIR=\$(localedir)\ \
$(GTK_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
-   $(LIBXFCEGUI4_CFLAGS) \
+   $(LIBXFCE4UI_CFLAGS) \
$(DBUS_GLIB_CFLAGS) \
$(XFCONF_CFLAGS)
 
@@ -47,13 +47,12 @@ xfce4_notifyd_xfce4_notifyd_CFLAGS = \
 
 xfce4_notifyd_config_xfce4_notifyd_config_CFLAGS = \
-DG_LOG_DOMAIN=\xfce4-notifyd-config\ \
-   $(common_cflags) \
-   $(LIBGLADE_CFLAGS)
+   $(common_cflags)
 
 common_ldadd = \
$(GTK_LIBS) \
$(LIBXFCE4UTIL_LIBS) \
-   $(LIBXFCEGUI4_LIBS) \
+   $(LIBXFCE4UI_LIBS) \
$(DBUS_GLIB_LIBS) \
$(XFCONF_LIBS)
 
@@ -62,8 +61,7 @@ xfce4_notifyd_xfce4_notifyd_LDADD = \
$(LIBSEXY_LIBS)
 
 xfce4_notifyd_config_xfce4_notifyd_config_LDADD = \
-   $(common_ldadd) \
-   $(LIBGLADE_LIBS)
+   $(common_ldadd) 
 
 
 servicedir = $(datadir)/dbus-1/services
@@ -116,7 +114,7 @@ built_xfce4_notifyd += \
xfce4-notifyd/xfce-notify-enum-types.h
 
 built_xfce4_notifyd_config = \
-   xfce4-notifyd-config/xfce4-notifyd-config.glade.h
+   xfce4-notifyd-config/xfce4-notifyd-config.ui.h
 
 clean_xfce4_notifyd += \
xfce4-notifyd/stamp-xfce-notify-enum-types.h \
@@ -201,8 +199,8 @@ xfce4-notifyd/xfce-notify-enum-types.c: 
xfce4-notifyd/xfce-notify-window.h Makef
 cp xfce4-notifyd/xgen-xnetc xfce4-notifyd/xfce-notify-enum-types.c \
 rm -f xfce4-notifyd/xgen-xnetc
 
-xfce4-notifyd-config/xfce4-notifyd-config.glade.h: 
$(srcdir)/xfce4-notifyd-config/xfce4-notifyd-config.glade
-   $(EXO_CSOURCE) --static --name=xfce4_notifyd_config_glade $ $@
+xfce4-notifyd-config/xfce4-notifyd-config.ui.h: 
$(srcdir)/xfce4-notifyd-config/xfce4-notifyd-config.glade
+   $(EXO_CSOURCE) --static --name=xfce4_notifyd_config_ui $ $@
 
 endif
 
diff --git a/configure.ac.in b/configure.ac.in
index 6058490..0306eec 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -49,12 +49,11 @@ XDT_I18N([...@linguas@])
 
 dnl required
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0])
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.5.2svn-r26504])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.7.0])
 XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [0.1.0svn-r26876])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
 XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.0.0])
 XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.72])
-XDT_CHECK_PACKAGE([LIBGLADE], [libglade-2.0], [2.6.0])
 
 XDT_CHECK_OPTIONAL_PACKAGE([LIBSEXY], [libsexy], [0.1.6], [libsexy],
[libsexy support (for clickable URLs) 
(default=yes)],
diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index 2977b73..753ff1b 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -30,14 +30,13 @@
 #endif
 
 #include gtk/gtk.h
-#include glade/glade.h
 
 #include dbus/dbus-glib.h
 
 #include xfconf/xfconf.h
-#include libxfcegui4/libxfcegui4.h
+#include libxfce4ui/libxfce4ui.h
 
-#include xfce4-notifyd-config.glade.h
+#include xfce4-notifyd-config.ui.h
 
 /* unfortunately, currently we have to kill the daemon to
  * change themes.  this is only annoying because existing notifications
@@ -209,7 +208,7 @@ xfce4_notifyd_config_setup_treeview(GtkWidget *treeview,
 }
 
 static GtkWidget *
-xfce4_notifyd_config_setup_dialog(GladeXML *gxml)
+xfce4_notifyd_config_setup_dialog(GtkBuilder *builder)
 {
 XfconfChannel *channel;
 GtkWidget *dlg, *btn, *sbtn, *slider, *chk, *treeview, *combo;
@@ -218,11 +217,11 @@ xfce4_notifyd_config_setup_dialog(GladeXML *gxml)
 GError *error = NULL;
 gchar *current_theme;
 
-glade_xml_signal_autoconnect(gxml);
+gtk_builder_connect_signals(builder, 

[Xfce4-commits] xfce4-session:build-system-rework Creating branch build-system-rework

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/build-system-rework
 as new branch
 to cfaeaeeb62f354e0060c1c036d8a04b41f4349bb (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/build-system-rework

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-session:dbus-api-additions WIP

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/dbus-api-additions
 to c5315ad04d59b70fb7c39727514691444cf356a9 (commit)
   from cfaeaeeb62f354e0060c1c036d8a04b41f4349bb (commit)

commit c5315ad04d59b70fb7c39727514691444cf356a9
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Jul 27 04:50:45 2009 -0700

WIP

 xfce4-session/xfsm-manager-dbus.xml |   62 ++
 xfce4-session/xfsm-manager.c|  122 +--
 2 files changed, 163 insertions(+), 21 deletions(-)

diff --git a/xfce4-session/xfsm-manager-dbus.xml 
b/xfce4-session/xfsm-manager-dbus.xml
index 69c652c..8682d53 100644
--- a/xfce4-session/xfsm-manager-dbus.xml
+++ b/xfce4-session/xfsm-manager-dbus.xml
@@ -35,6 +35,20 @@
 /method
 
 !--
+String[] org.xfce.Session.Manager.GetCapabilities()
+
+Retrieves a list of stuff the session manager is
+capable of doing.  Current possibilities:
+suspend
+hibernate
+reboot
+shutdown
+--
+method name=GetCapabilities
+arg direction=out type=as/
+/method
+
+!--
  ObjectPath[] org.xfce.Session.Manager.ListClients()
 
  Retrieves a list of session clients from the session
@@ -81,6 +95,36 @@
 /method
 
 !--
+void org.xfce.Session.Manager.SessionControl(String action,
+ Dict[] options)
+
+@action: Action to request.  Currently-recognized
+ values are:
+ show-logout-dialog
+ logout
+ suspend
+ hibernate
+ reboot
+ shutdown
+@options: An array of (String, Variant) pairs.  Currently-
+  recognized options are:
+  fast (bool): Whether or not to allow
+   applications connected to the
+   SM a chance to close cleanly.
+  allow-interact (bool): Whether or not to allow
+ applications connected
+ to the SM to interact
+ with the user during
+ shutdown.
+  These two options are ignored for all @action values
+  except 'reboot' and 'shutdown'.
+--
+method name=SessionControl
+arg direction=in name=action type=s/
+arg direction=in name=options type=a{sv}/
+/method
+
+!--
  void org.xfce.Session.Manager.Shutdown(Unsigned Int type,
 Boolean save)
 
@@ -96,6 +140,10 @@
   immediately.  Note that this parameter is
   ignored for type==0.
 
+ NOTE: This method is deprecated and should not be used in
+ newly-written code.  See the SessionControl() method for
+ a replacement.
+
  Instructs the session manager to shut down.  Type 0 will
  prompt the user for a shutdown type.  All other types will
  take immediate action without user input.
@@ -143,5 +191,19 @@
  cancelled.
 --
 signal name=ShutdownCancelled/
+
+!--
+void org.xfce.Session.Manager.CapabilitiesChanged(String[] 
caps_added,
+  String[] 
caps_removed)
+
+@caps_added: A list of new capabilities available.
+@caps_removed: A list of capabilities lost.
+
+Emitted when the list of capabilities is changed.
+--
+signal name=CapabilitiesChanged
+arg name=caps_added type=as/
+arg name=caps_removed type=as/
+/signal
 /interface
 /node
diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c
index 49f6cd2..f674f22 100644
--- a/xfce4-session/xfsm-manager.c
+++ b/xfce4-session/xfsm-manager.c
@@ -1,7 +1,7 @@
 /* $Id$ */
 /*-
  * Copyright (c) 2003-2006 Benedikt Meurer be...@xfce.org
- * Copyright (c) 2008 Brian Tarricone bj...@cornell.edu
+ * Copyright (c) 2008-2009 Brian Tarricone bj...@cornell.edu
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -146,8 +146,9 @@ typedef struct
 {
   XfsmManager *manager;
   XfsmShutdownType type;
-  gboolean allow_save;
-} ShutdownIdleData;
+  gboolean fast;
+  gboolean allow_interact;
+} XfsmSessionControlIdleData;
 
 enum
 {
@@ -1776,6 +1777,10 @@ static gboolean xfsm_manager_dbus_get_state (XfsmManager 
*manager,
 static gboolean xfsm_manager_dbus_checkpoint

[Xfce4-commits] xfce4-session:dbus-add-client Creating branch dbus-add-client

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/dbus-add-client
 as new branch
 to aaa53bbbc0ddf236a1977b1fbd4bdb5270275a4b (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/dbus-add-client

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:new-icon-view Creating branch new-icon-view

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/new-icon-view
 as new branch
 to 0b5552ed866bf7f68f97e85bc3cbe1d98de8b33f (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/new-icon-view

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:new-icon-view WIP: cell layout support

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/new-icon-view
 to 0b5552ed866bf7f68f97e85bc3cbe1d98de8b33f (commit)
   from eebe64cc5ea7f56c18007ace69c71cbeecb1b079 (commit)

commit 0b5552ed866bf7f68f97e85bc3cbe1d98de8b33f
Author: Brian J. Tarricone bj...@cornell.edu
Date:   Sat Dec 13 14:59:15 2008 -0800

WIP: cell layout support

 src/xfdesktop-icon-view.c |   52 -
 1 files changed, 51 insertions(+), 1 deletions(-)

diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index a94c700..1ccc2fe 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -167,8 +167,43 @@ struct _XfdesktopIconViewPrivate
 gdouble cell_text_width_proportion;
 
 gboolean ellipsize_icon_labels;
+
+GSList *cells;
 };
 
+typedef struct
+{
+GtkCellRenderer *render;
+gboolean expand;
+GtkPackType pack;
+} CellInfo;
+
+static void xfdesktop_icon_view_cell_layout_init(GtkCellLayoutIface *iface);
+
+static void xfdesktop_icon_view_cell_pack_start(GtkCellLayout *cell_layout,
+GtkCellRenderer *cell,
+gboolean expand);
+static void xfdesktop_icon_view_cell_pack_end(GtkCellLayout *cell_layout,
+  GtkCellRenderer *cell,
+  gboolean expand);
+static void xfdesktop_icon_view_cell_clear(GtkCellLayout *cell_layout);
+static void xfdesktop_icon_view_cell_add_attribute(GtkCellLayout *cell_layout,
+   GtkCellRenderer *cell,
+   const gchar *attribute,
+   gint column);
+static void xfdesktop_icon_view_cell_set_cell_data_func(GtkCellLayout 
*cell_layout,
+GtkCellRenderer *cell,
+GtkCellLayoutDataFunc 
func,
+gpointer func_data,
+GDestroyNotify 
destroy);
+static void xfdesktop_icon_view_cell_clear_attributes(GtkCellLayout 
*cell_layout,
+  GtkCellRenderer *cell);
+static void xfdesktop_icon_view_cell_reorder(GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell,
+ gint position);
+static GList *xfdesktop_icon_view_cell_get_cells(GtkCellLayout *cell_layout);
+
+
 static gboolean xfdesktop_icon_view_button_press(GtkWidget *widget,
  GdkEventButton *evt,
  gpointer user_data);
@@ -332,7 +367,9 @@ static guint __signals[SIG_N_SIGNALS] = { 0, };
 static GQuark xfdesktop_cell_highlight_quark = 0;
 
 
-G_DEFINE_TYPE(XfdesktopIconView, xfdesktop_icon_view, GTK_TYPE_WIDGET)
+G_DEFINE_TYPE_WITH_CODE(XfdesktopIconView, xfdesktop_icon_view, 
GTK_TYPE_WIDGET,
+G_IMPLEMENT_INTERFACE(GTK_TYPE_CELL_LAYOUT,
+  
xfdesktop_icon_view_cell_layout_init))
 
 
 static void
@@ -586,6 +623,19 @@ xfdesktop_icon_view_class_init(XfdesktopIconViewClass 
*klass)
 }
 
 static void
+xfdesktop_icon_view_cell_layout_init(GtkCellLayoutIface *iface)
+{
+iface-pack_start = xfdesktop_icon_view_cell_pack_start;
+iface-pack_end = xfdesktop_icon_view_cell_pack_end;
+iface-clear = xfdesktop_icon_view_cell_clear;
+iface-add_attribute = xfdesktop_icon_biew_cell_add_attribute;
+iface-set_cell_data_func = xfdesktop_icon_view_cell_set_cell_data_func;
+iface-clear_attributes = xfdesktop_icon_view_cell_clear_attributes;
+iface-reorder = xfdesktop_icon_view_cell_reorder;
+iface-get_cells = xfdesktop_icon_view_cell_get_cells;
+}
+
+static void
 xfdesktop_icon_view_init(XfdesktopIconView *icon_view)
 {
 icon_view-priv = G_TYPE_INSTANCE_GET_PRIVATE(icon_view,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-session:session-desktop-files WIP

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/session-desktop-files
 to acad4963f56ca608e130e4c5461491dfc5b38185 (commit)
   from f1b1f61c9929594652a3cbd48afda9312d5fb5a3 (commit)

commit acad4963f56ca608e130e4c5461491dfc5b38185
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Jul 20 18:36:40 2009 -0700

WIP

 xfce4-session/xfsm-client.c |  135 +++
 xfce4-session/xfsm-client.h |6 ++
 xfce4-session/xfsm-manager.c|   73 +++--
 xfce4-session/xfsm-properties.c |   41 +++-
 xfce4-session/xfsm-properties.h |3 +-
 5 files changed, 202 insertions(+), 56 deletions(-)

diff --git a/xfce4-session/xfsm-client.c b/xfce4-session/xfsm-client.c
index 491d013..eb8d141 100644
--- a/xfce4-session/xfsm-client.c
+++ b/xfce4-session/xfsm-client.c
@@ -24,10 +24,18 @@
 #include config.h
 #endif
 
+#ifdef HAVE_UNISTD_H
+#include unistd.h
+#endif
+
 #ifdef HAVE_STRING_H
 #include string.h
 #endif
 
+#ifdef HAVE_ERRNO_H
+#include errno.h
+#endif
+
 #include dbus/dbus-glib.h
 
 #include libxfsm/xfsm-util.h
@@ -48,6 +56,7 @@ struct _XfsmClient
 
   gchar   *id;
   gchar   *object_path;
+  gchar   *desktop_id;
 
   XfsmClientState  state;
   XfsmProperties  *properties;
@@ -162,6 +171,7 @@ xfsm_client_finalize (GObject *obj)
 
   g_free (client-id);
   g_free (client-object_path);
+  g_free (client-desktop_id);
 
   G_OBJECT_CLASS (xfsm_client_parent_class)-finalize (obj);
 }
@@ -387,7 +397,132 @@ xfsm_client_get_object_path (XfsmClient *client)
   return client-object_path;
 }
 
+G_CONST_RETURN gchar *
+xfsm_client_get_desktop_id (XfsmClient *client)
+{
+  g_return_val_if_fail (XFSM_IS_CLIENT (client), NULL);
+
+  if (!client-desktop_id)
+{
+  client-desktop_id = g_strdup_printf(%s_%s,
+   xfsm_properties_get_string 
(client-properties,
+   
SmProgram),
+   client-id);
+}
+
+  return client-desktop_id;
+}
+
+static gboolean
+xfsm_client_quick_copy (const gchar *src_path,
+const gchar *dst_path)
+{
+  gboolean ret = FALSE;
+  gchar *file_contents = NULL;
+  gsize  len;
+
+  if (g_file_get_contents (src_path, file_contents, len, NULL))
+if (g_file_set_contents (dst_path, file_contents, len, NULL))
+  ret = TRUE;
+
+  g_free (file_contents);
+
+  return ret;
+}
+
+gboolean
+xfsm_client_save (XfsmClient  *client,
+  const gchar *session_name,
+  GError **error)
+{
+  gboolean ret = FALSE;
+  gchar *session_resource;
+  XfceRc *rcfile = NULL;
+  gchar session_group[1024];
+  const gchar *desktop_file;
+
+  g_return_val_if_fail (XFSM_IS_CLIENT (client)  (!error || !*error), FALSE);
 
+  session_resource = g_strdup_printf (autostart/%s.desktop,
+  xfsm_client_get_desktop_id (client));
+  rcfile = xfce_rc_config_open (XFCE_RESOURCE_CONFIG, session_resource, FALSE);
+
+  if (G_UNLIKELY (!rcfile))
+{
+  if (error)
+g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _(Couldn't write to session data file for client 
\%s\),
+ xfsm_client_get_desktop_id ());
+  goto out;
+}
+
+  xfce_rc_set_group (rcfile, Desktop Entry);
+
+  xfce_rc_write_entry (rcfile, Version, 1.0);
+  xfce_rc_write_entry (rcfile, Type, Application);
+  xfce_rc_write_entry (rcfile, OnlyShowIn, XFCE;);
+  xfce_rc_write_bool_entry (rcfile, NoDisplay, TRUE);
+  xfce_rc_write_bool_entry (rcfile, Hidden, TRUE);
+
+  desktop_file = xfsm_properties_get_string (client-properties, 
GsmDesktopFile);
+  if (desktop_file)
+{
+  XfceRc *rcfile_desktop = xfce_rc_simple_open (desktop_file, TRUE);
+  if (rcfile_desktop)
+{
+  const gchar *val_str;
+
+  if ((val_str = xfce_rc_read_entry (rcfile_desktop, Name, NULL)))
+xfce_rc_write_entry (rcfile, Name, val_str);
+  if ((val_str = xfce_rc_read_entry (rcfile_desktop, Comment, NULL)))
+xfce_rc_write_entry (rcfile, Comment, val_str);
+  if ((val_str = xfce_rc_read_entry (rcfile_desktop, Icon, NULL)))
+xfce_rc_write_entry (rcfile, Icon, val_str);
+  if ((val_str = xfce_rc_read_entry (rcfile_desktop, Exec, NULL)))
+xfce_rc_write_entry (rcfile, Exec, val_str);
+  if (xfce_rc_has_entry (rcfile_desktop, StartupNotify))
+{
+  xfce_rc_write_bool_entry (rcfile, StartupNotify,
+xfce_rc_read_bool_entry 
(rcfile_desktop,
+ 
StartupNotify,
+ FALSE));
+}
+
+  xfce_rc_close (rcfile_desktop);
+}
+}
+
+  xfce_rc_set_group (rcfile, X-XfceSession);
+  xfce_rc_write_bool_entry (rcfile

[Xfce4-commits] xfdesktop:menu-diff-button Creating branch menu-diff-button

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/menu-diff-button
 as new branch
 to 4c8f55b63a6c50f7dca88754ce7507f569186b8a (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/menu-diff-button

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:fuse-module Creating branch fuse-module

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/fuse-module
 as new branch
 to a9eafef43216cd31d26c0116f1af806ecc076acc (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/fuse-module

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:docs-consolidation Creating branch docs-consolidation

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/docs-consolidation
 as new branch
 to 7d3781bb1a674583515d4cc08e76175972e1f56c (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/docs-consolidation

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:backend-refactor WIP: separate out proptree stuff

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/backend-refactor
 to b1b2a1eeb11dd064730611b25657b626bc400403 (commit)
   from f7effe6907669d8ed9d1ee4fa2c09bc451df66cd (commit)

commit b1b2a1eeb11dd064730611b25657b626bc400403
Author: Brian J. Tarricone bj...@cornell.edu
Date:   Sat Sep 20 20:06:12 2008 -0700

WIP: separate out proptree stuff

 xfconfd/Makefile.am |2 +
 xfconfd/xfconf-backend-perchannel-xml.c |  237 +--
 xfconfd/xfconf-proptree.c   |  188 
 xfconfd/xfconf-proptree.h   |   53 +++
 4 files changed, 244 insertions(+), 236 deletions(-)

diff --git a/xfconfd/Makefile.am b/xfconfd/Makefile.am
index 611f401..fcfb820 100644
--- a/xfconfd/Makefile.am
+++ b/xfconfd/Makefile.am
@@ -20,6 +20,8 @@ xfconfd_SOURCES = \
xfconf-dbus-server.h \
xfconf-locking-utils.c \
xfconf-locking-utils.h \
+   xfconf-proptree.c \
+   xfconf-proptree.h \
$(xfconf_backend_sources) \
$(top_srcdir)/common/xfconf-types.c
 
diff --git a/xfconfd/xfconf-backend-perchannel-xml.c 
b/xfconfd/xfconf-backend-perchannel-xml.c
index d764e58..a2b635a 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -60,17 +60,15 @@
 #include xfconf-gvaluefuncs.h
 #include xfconf/xfconf-types.h
 #include xfconf-common-private.h
+#include xfconf-proptree.h
 
 #define FILE_VERSION_MAJOR  1
 #define FILE_VERSION_MINOR  0
 
-#define PROP_NAME_IS_VALID(name) ( (name)  (name)[0] == '/'  (name)[1] != 
0  !strstr((name), //) )
-
 #define CONFIG_DIR_STEM  xfce4/xfconf/ XFCONF_BACKEND_PERCHANNEL_XML_TYPE_ID 
/
 #define CONFIG_FILE_FMT  CONFIG_DIR_STEM %s.xml
 #define CACHE_TIMEOUT(20*60*1000)  /* 20 minutes */
 #define WRITE_TIMEOUT(5*1000)  /* 5 seconds */
-#define MAX_PROP_PATH(4096)
 
 struct _XfconfBackendPerchannelXml
 {
@@ -92,20 +90,6 @@ typedef struct _XfconfBackendPerchannelXmlClass
 GObjectClass parent;
 } XfconfBackendPerchannelXmlClass;
 
-typedef struct
-{
-GNode *properties;
-gboolean locked;
-} XfconfChannel;
-
-typedef struct
-{
-gchar *name;
-GValue value;
-GValue system_value;
-gboolean locked;
-} XfconfProperty;
-
 typedef enum
 {
 ELEM_NONE = 0,
@@ -187,25 +171,6 @@ static gboolean 
xfconf_backend_perchannel_xml_flush_channel(XfconfBackendPerchan
 const gchar 
*channel_name,
 GError **error);
 
-static GNode *xfconf_proptree_add_property(GNode *proptree,
-   const gchar *name,
-   const GValue *value,
-   const GValue *system_value,
-   gboolean locked);
-static XfconfProperty *xfconf_proptree_lookup(GNode *proptree,
-  const gchar *name);
-static GNode *xfconf_proptree_lookup_node(GNode *proptree,
-  const gchar *name);
-static gboolean xfconf_proptree_reset(GNode *proptree,
-  const gchar *name);
-static void xfconf_proptree_destroy(GNode *proptree);
-static gchar *xfconf_proptree_build_propname(GNode *prop_node,
- gchar *buf,
- gsize buflen);
-
-static void xfconf_channel_destroy(XfconfChannel *channel);
-static void xfconf_property_free(XfconfProperty *property);
-
 
 G_DEFINE_TYPE_WITH_CODE(XfconfBackendPerchannelXml, 
xfconf_backend_perchannel_xml, G_TYPE_OBJECT,
 G_IMPLEMENT_INTERFACE(XFCONF_TYPE_BACKEND,
@@ -765,206 +730,6 @@ 
xfconf_backend_perchannel_xml_register_property_changed_func(XfconfBackend *back
 
 
 
-static GNode *
-xfconf_proptree_lookup_node(GNode *proptree,
-const gchar *name)
-{
-GNode *found_node = NULL;
-gchar **parts;
-GNode *parent, *node;
-gint i;
-
-g_return_val_if_fail(PROP_NAME_IS_VALID(name), NULL);
-
-parts = g_strsplit_set(name+1, /, -1);
-parent = proptree;
-
-for(i = 0; parts[i]; ++i) {
-for(node = g_node_first_child(parent);
-node;
-node = g_node_next_sibling(node))
-{
-if(!strcmp(((XfconfProperty *)node-data)-name, parts[i])) {
-if(!parts[i+1])
-found_node = node;
-else
-parent = node;
-break;
-}
-}
-
-if(found_node || !node)
-break;
-}
-
-g_strfreev(parts);
-
-return found_node;
-}
-
-static XfconfProperty *
-xfconf_proptree_lookup(GNode *proptree,
-   const gchar *name)
-{
-GNode *node;
-XfconfProperty *prop = NULL;
-
-node = xfconf_proptree_lookup_node(proptree, name);
-if(node

[Xfce4-commits] xfconf:metadata-dbus-api Creating branch metadata-dbus-api

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/metadata-dbus-api
 as new branch
 to a58c5aec4f3d694d13f1cfd51478508c952fd76a (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/metadata-dbus-api

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:gvalue-array-conv Creating branch gvalue-array-conv

2010-01-28 Thread Brian J . Tarricone
Updating branch refs/heads/gvalue-array-conv
 as new branch
 to dc429d734fb39bb73791b16220edc0f33eb94d46 (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/gvalue-array-conv

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce-utils:master start ssh-agent before dbus so dbus has the env vars set

2009-12-08 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 0ba88f762767b035a50f8bd806d8968f5a027125 (commit)
   from ffcf9ec74492453cc4dc89e7d2a4a540a33cb3c2 (commit)

commit 0ba88f762767b035a50f8bd806d8968f5a027125
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Dec 8 23:06:09 2009 -0800

start ssh-agent before dbus so dbus has the env vars set

 scripts/xinitrc.in.in |   76 
 1 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/scripts/xinitrc.in.in b/scripts/xinitrc.in.in
index fdca950..524c363 100755
--- a/scripts/xinitrc.in.in
+++ b/scripts/xinitrc.in.in
@@ -100,44 +100,6 @@ cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
 test -r $HOME/.Xmodmap  xmodmap $HOME/.Xmodmap
 
 
-# Use dbus-launch if installed.
-if test x$DBUS_SESSION_BUS_ADDRESS = x; then
-if type dbus-launch /dev/null 21; then
-   eval `dbus-launch --sh-syntax --exit-with-session`
-# some older versions of dbus don't export the var properly
-export DBUS_SESSION_BUS_ADDRESS
-else
-echo Could not find dbus-launch; Xfce will not work properly 2
-   fi
-fi
-
-
-# launch a screensaver if enabled.  do not launch if we're root or if
-# we're in a VNC session.
-screensaver_enabled=`xfconf-query -c xfce4-session -p 
/startup/screensaver/enabled`
-if test $UID -gt 0 -a -z $VNCSESSION -a $screensaver_enabled != false; 
then
-screensaver_type=`xfconf-query -c xfce4-session -p 
/startup/screensaver/type`
-
-case $screensaver_type in
-xscreensaver)
-xscreensaver -no-splash 
-;;
-
-gnome-screensaver)
-gnome-screensaver 
-;;
-
-*)
-if test x`which xscreensaver 2/dev/null` != x; then
-xscreensaver -no-splash 
-elif test x`which gnome-screensaver 2/dev/null` != x; then
-gnome-screensaver 
-fi
-;;
-esac
-fi
-
-
 # launch gpg-agent or ssh-agent if enabled.
 ssh_agent_enabled=`xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled`
 if test $ssh_agent_enabled != false; then
@@ -193,6 +155,44 @@ if test $ssh_agent_enabled != false; then
 fi
 
 
+# Use dbus-launch if installed.
+if test x$DBUS_SESSION_BUS_ADDRESS = x; then
+if type dbus-launch /dev/null 21; then
+   eval `dbus-launch --sh-syntax --exit-with-session`
+# some older versions of dbus don't export the var properly
+export DBUS_SESSION_BUS_ADDRESS
+else
+echo Could not find dbus-launch; Xfce will not work properly 2
+   fi
+fi
+
+
+# launch a screensaver if enabled.  do not launch if we're root or if
+# we're in a VNC session.
+screensaver_enabled=`xfconf-query -c xfce4-session -p 
/startup/screensaver/enabled`
+if test $UID -gt 0 -a -z $VNCSESSION -a $screensaver_enabled != false; 
then
+screensaver_type=`xfconf-query -c xfce4-session -p 
/startup/screensaver/type`
+
+case $screensaver_type in
+xscreensaver)
+xscreensaver -no-splash 
+;;
+
+gnome-screensaver)
+gnome-screensaver 
+;;
+
+*)
+if test x`which xscreensaver 2/dev/null` != x; then
+xscreensaver -no-splash 
+elif test x`which gnome-screensaver 2/dev/null` != x; then
+gnome-screensaver 
+fi
+;;
+esac
+fi
+
+
 # Run xfce4-session if installed
 if type xfce4-session /dev/null 21; then
 xfce4-session
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce-git-hooks:master print out which rev caused the hook failure

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 3a4be28ec739ff8fbd3e2c969777f0454bca5d41 (commit)
   from d424099dc1121ca88950cc7fb362d84869425207 (commit)

commit 3a4be28ec739ff8fbd3e2c969777f0454bca5d41
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Nov 21 18:51:43 2009 -0800

print out which rev caused the hook failure

 hooks/update-01-history-integrity |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hooks/update-01-history-integrity 
b/hooks/update-01-history-integrity
index f3a317c..abea04b 100755
--- a/hooks/update-01-history-integrity
+++ b/hooks/update-01-history-integrity
@@ -80,7 +80,10 @@ committer_info_ok_range() {
 fi
 
 for rev in $revlist; do
-committer_info_ok $rev || return 1
+if ! committer_info_ok $rev; then
+echo Failed at rev $rev 2
+return 1
+fi
 done
 
 return 0
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep Creating branch no-foundation-dep

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 as new branch
 to 77118dd5d7cfd682cef9ae5c7ff0a2a1fcc39c7a (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/no-foundation-dep

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep allow passing flags to aclocal, automake, autoconf

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 134adf46aff635eedce5c6f5f131c2b0f55268ba (commit)
   from 181172f4b868f2ca449e390c5da824b634033122 (commit)

commit 134adf46aff635eedce5c6f5f131c2b0f55268ba
Author: Brian Tarricone br...@tarricone.org
Date:   Sun Jun 28 23:58:27 2009 -0700

allow passing flags to aclocal, automake, autoconf

 autogen.sh |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index d9052e6..fc98cdf 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -24,10 +24,10 @@ fi
 sed s/@REVISION@/$REVISION/g configure.ac.in configure.ac
 
 run_first_found glibtoolize libtoolize --force --copy --automake 
-run_first_found aclocal-1.10 aclocal-1.9 aclocal-1.8 aclocal-1.7 aclocal 
+run_first_found aclocal-1.10 aclocal-1.9 aclocal-1.8 aclocal-1.7 aclocal 
$ACLOCAL_FLAGS 
 run_first_found autoheader-2.61 autoheader-2.60 autoheader-2.59 
autoheader-2.53 autoheader 
-run_first_found automake-1.10 automake-1.9 automake-1.8 automake-1.7 
automake --force-missing --add-missing --copy --gnu 
-run_first_found autoconf-2.61 autoconf-2.60 autoconf-2.59 autoconf-2.32 
autoconf || exit 1
+run_first_found automake-1.10 automake-1.9 automake-1.8 automake-1.7 
automake --force-missing --add-missing --copy --gnu $AM_FLAGS 
+run_first_found autoconf-2.61 autoconf-2.60 autoconf-2.59 autoconf-2.32 
autoconf $AC_FLAGS || exit 1
 
 if test x$NOCONFIGURE = x; then
 CONFIGURE_FLAGS=--enable-maintainer-mode $@
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep add module description file

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 5d668fb41e824ee61dbd3ef9c7bc5a10886c7c14 (commit)
   from 134adf46aff635eedce5c6f5f131c2b0f55268ba (commit)

commit 5d668fb41e824ee61dbd3ef9c7bc5a10886c7c14
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Aug 11 03:37:38 2009 -0700

add module description file

 module.xml |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/module.xml b/module.xml
new file mode 100644
index 000..5e645be
--- /dev/null
+++ b/module.xml
@@ -0,0 +1,18 @@
+?xml version='1.0' encoding='UTF-8'?
+Project xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#;
+ xmlns:rdfs=http://www.w3.org/2000/01/rdf-schema#;
+ xmlns:foaf=http://xmlns.com/foaf/0.1/;
+ xmlns:gnome=http://api.gnome.org/doap-extensions#;
+ xmlns=http://usefulinc.com/ns/doap#;
+
+  name xml:lang=englib-objc/name
+  shortdesc xml:lang=enObjective-C bindings for Glib/GObject 
2.x/shortdesc
+
+  maintainer
+foaf:Person
+  foaf:nameBrian Tarricone/foaf:name
+  foaf:mboxmailto:kel...@xfce.org/foaf:mbox
+  gnome:useridkelnos/gnome:userid
+/foaf:Person
+  /maintainer
+/Project
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep add .gitignore

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to e98f4f9043edbd976712a42be026d215d32debd6 (commit)
   from 5d668fb41e824ee61dbd3ef9c7bc5a10886c7c14 (commit)

commit e98f4f9043edbd976712a42be026d215d32debd6
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Jul 5 14:41:23 2009 -0700

add .gitignore

 .gitignore |   30 ++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..2141f62
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,30 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+*.pc
+.*.swp
+.*.swo
+*~
+.deps
+.libs
+
+INSTALL
+aclocal.m4
+autom4te.cache
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+configure.ac
+depcomp
+install-sh
+libtool
+ltmain.sh
+missing
+stamp-h1
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep move GOCNumber from glib to gobject wrapper and remove GOCHashTable dep

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 8fd6b78b38c3de1c26f31e4d46d4ad7b179e7b12 (commit)
   from 241eb7a8ddeb35a25cebc5db3533c2845bab6e83 (commit)

commit 8fd6b78b38c3de1c26f31e4d46d4ad7b179e7b12
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Jul 6 15:31:12 2009 -0700

move GOCNumber from glib to gobject wrapper and remove GOCHashTable dep

 glib-objc/GOCHashTable.m|   12 +++-
 glib-objc/Makefile.am   |2 --
 glib-objc/glib-objc.h   |1 -
 {glib-objc = gobject-objc}/GOCNumber.h |0
 {glib-objc = gobject-objc}/GOCNumber.m |0
 gobject-objc/Makefile.am|2 ++
 6 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/glib-objc/GOCHashTable.m b/glib-objc/GOCHashTable.m
index c188eb2..bbab67c 100644
--- a/glib-objc/GOCHashTable.m
+++ b/glib-objc/GOCHashTable.m
@@ -24,7 +24,6 @@
 #include glib.h
 
 #import GOCHashTable.h
-#import GOCNumber.h
 
 @implementation GOCHashTableIter
 
@@ -198,14 +197,9 @@ ght_foreach_remove(gpointer key,
gpointer user_data)
 {
 GHTForeachData *fedata = user_data;
-id (*cb)(id,SEL,id,id,id) = (id (*)(id,SEL,id,id,id))fedata-callback;
-id ret;
-
-ret = cb(fedata-object, fedata-selector, (id)key, (id)value, 
fedata-userData);
-if(!ret || [ret class] != [GOCNumber class])
-return FALSE;
-else
-return [(GOCNumber *)ret boolValue];
+BOOL (*cb)(id,SEL,id,id,id) = (BOOL (*)(id,SEL,id,id,id))fedata-callback;
+
+return cb(fedata-object, fedata-selector, (id)key, (id)value, 
fedata-userData);
 }
 
 - (unsigned int)removeBySelector:(SEL)selector
diff --git a/glib-objc/Makefile.am b/glib-objc/Makefile.am
index 50a58a1..2aa3fc6 100644
--- a/glib-objc/Makefile.am
+++ b/glib-objc/Makefile.am
@@ -10,7 +10,6 @@ glibobjcinclude_HEADERS = \
GOCHashTable.h \
GOCIterable.h \
GOCList.h \
-   GOCNumber.h \
GOCObjectBase.h
 
 libglib_objc_2_0_la_SOURCES = \
@@ -18,7 +17,6 @@ libglib_objc_2_0_la_SOURCES = \
$(glibobjcinclude_HEADERS) \
GOCHashTable.m \
GOCList.m \
-   GOCNumber.m \
GOCObjectBase.m
 
 libglib_objc_2_0_la_CFLAGS = \
diff --git a/glib-objc/glib-objc.h b/glib-objc/glib-objc.h
index 6b75ad2..86a5ddd 100644
--- a/glib-objc/glib-objc.h
+++ b/glib-objc/glib-objc.h
@@ -27,7 +27,6 @@
 #import glib-objc/GOCHashTable.h
 #import glib-objc/GOCIterable.h
 #import glib-objc/GOCList.h
-#import glib-objc/GOCNumber.h
 #import glib-objc/GOCObjectBase.h
 
 #undef __IN_GLIB_OBJC_H
diff --git a/glib-objc/GOCNumber.h b/gobject-objc/GOCNumber.h
similarity index 100%
rename from glib-objc/GOCNumber.h
rename to gobject-objc/GOCNumber.h
diff --git a/glib-objc/GOCNumber.m b/gobject-objc/GOCNumber.m
similarity index 100%
rename from glib-objc/GOCNumber.m
rename to gobject-objc/GOCNumber.m
diff --git a/gobject-objc/Makefile.am b/gobject-objc/Makefile.am
index d61b930..de9dc8a 100644
--- a/gobject-objc/Makefile.am
+++ b/gobject-objc/Makefile.am
@@ -7,6 +7,7 @@ gobjectobjcincludedir = $(glibobjcmainincludedir)/gobject-objc
 gobjectobjcinclude_HEADERS = \
GOCBoxedValue.h \
GOCObject.h \
+   GOCNumber.h \
GOCValue.h
 
 libgobject_objc_2_0_la_SOURCES = \
@@ -14,6 +15,7 @@ libgobject_objc_2_0_la_SOURCES = \
$(gobjectobjcinclude_HEADERS) \
GOCBoxedValue.m \
GOCObject.m \
+   GOCNumber.m \
GOCValue.m \
glib-objc-private.m \
glib-objc-private.h
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep great renaming: GLIB prefix to GOC prefix. doesn't compile

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 241eb7a8ddeb35a25cebc5db3533c2845bab6e83 (commit)
   from 058838de888fbdcfcace5547a7750a53a49fa346 (commit)

commit 241eb7a8ddeb35a25cebc5db3533c2845bab6e83
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Jul 6 15:30:15 2009 -0700

great renaming: GLIB prefix to GOC prefix.  doesn't compile

 gobject-objc/GLIBBoxedValue.h  |   44 -
 .../GOCBoxedValue.h|   40 ++-
 gobject-objc/{GLIBBoxedValue.m = GOCBoxedValue.m} |8 ++--
 gobject-objc/{GLIBObject.h = GOCObject.h} |8 ++--
 gobject-objc/{GLIBObject.m = GOCObject.m} |8 ++--
 gobject-objc/{GLIBParamSpec.h = GOCParamSpec.h}   |8 ++--
 gobject-objc/{GLIBValue.h = GOCValue.h}   |8 ++--
 gobject-objc/{GLIBValue.m = GOCValue.m}   |8 ++--
 gobject-objc/Makefile.am   |   27 --
 gobject-objc/glib-objc.h   |   33 
 ...{glib-objc-private.h = gobject-objc-private.h} |   20 +++-
 ...{glib-objc-private.m = gobject-objc-private.m} |   11 ++--
 .../GOCHashable.h = gobject-objc/gobject-objc.h   |   19 +++
 gobject-objc/ns-object-boxed.h |   37 --
 gobject-objc/ns-object-boxed.m |   52 
 15 files changed, 72 insertions(+), 259 deletions(-)

diff --git a/gobject-objc/GLIBBoxedValue.h b/gobject-objc/GLIBBoxedValue.h
deleted file mode 100644
index 34d1112..000
--- a/gobject-objc/GLIBBoxedValue.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  glib-objc - objective-c bindings for glib/gobject
- *
- *  Copyright (c) 2008 Brian Tarricone bj...@cornell.edu
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; version 2 of the License ONLY.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#ifndef __GLIB_OBJC_BOXED_VALUE_H__
-#define __GLIB_OBJC_BOXED_VALUE_H__
-
-#if !defined(GLIB_OBJC_COMPILATION)  !defined(__IN_GLIB_OBJC_H)
-#error Do not include GLIBBoxedValue.h directly, as this file may change or 
disappear in the future.  Include glib-objc/glib-objc.h instead.
-#endif
-
-#import Foundation/Foundation.h
-
-...@interface GLIBBoxedValue : NSValue
-{
-...@private
-gpointer _boxedValue;
-}
-
-+ (id)valueWithBoxed:(gpointer)boxedValue;
-
-- (id)initWithBoxed:(gpointer)boxedValue;
-
-- (gpointer)boxedValue;
-
-...@end
-
-#endif  /* __GLIB_OBJC_BOXED_VALUE_H__ */
-
diff --git a/glib-objc/GOCObjectBase.m b/gobject-objc/GOCBoxedValue.h
similarity index 58%
copy from glib-objc/GOCObjectBase.m
copy to gobject-objc/GOCBoxedValue.h
index 263f527..d0e9647 100644
--- a/glib-objc/GOCObjectBase.m
+++ b/gobject-objc/GOCBoxedValue.h
@@ -1,7 +1,7 @@
 /*
  *  glib-objc - objective-c bindings for glib/gobject
  *
- *  Copyright (c) 2009 Brian Tarricone br...@tarricone.org
+ *  Copyright (c) 2008-2009 Brian Tarricone br...@tarricone.org
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published
@@ -17,37 +17,27 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-#ifdef HAVE_CONFIG_H
-#include config.h
-#endif
-
-#include glib.h
+#ifndef __GOC_BOXED_VALUE_H__
+#define __GOC_BOXED_VALUE_H__
 
-#import GOCObjectBase.h
+#if !defined(GLIB_OBJC_COMPILATION)  !defined(__IN_GOBJECT_OBJC_H)
+#error Do not include GOCBoxedValue.h directly, as this file may change or 
disappear in the future.  Include gobject-objc.h instead.
+#endif
 
-...@implementation GOCObjectBase
 
-- (id)init
+...@interface GOCBoxedValue : NSValue
 {
-self = [super init];
-if(self) {
-ref_count = 1;
-}
-return self;
+...@private
+gpointer _boxedValue;
 }
 
-- (id GOCObject)ref
-{
-g_atomic_int_inc(ref_count);
-return self;
-}
++ (id)valueWithBoxed:(gpointer)boxedValue;
 
-- (void)unref
-{
-if(g_atomic_int_dec_and_test(ref_count))
-return;
+- (id)initWithBoxed:(gpointer)boxedValue;
 
-[self free];
-}
+- (gpointer)boxedValue;
 
 @end
+
+#endif  /* __GLIB_OBJC_BOXED_VALUE_H__ */
+
diff --git a/gobject-objc/GLIBBoxedValue.m b/gobject-objc/GOCBoxedValue.m
similarity index 79%
rename from gobject-objc/GLIBBoxedValue.m
rename to gobject-objc/GOCBoxedValue.m
index a97574f..9fca143 100644
--- a/gobject-objc/GLIBBoxedValue.m
+++ b/gobject-objc

[Xfce4-commits] glib-objc:no-foundation-dep add initial glib wrapper with some utilities

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 058838de888fbdcfcace5547a7750a53a49fa346 (commit)
   from e98f4f9043edbd976712a42be026d215d32debd6 (commit)

commit 058838de888fbdcfcace5547a7750a53a49fa346
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Jul 5 14:41:34 2009 -0700

add initial glib wrapper with some utilities

there's a lot more to do here, but this is a decent start to removing
the Foundation dep

 Makefile.am|1 +
 configure.ac.in|   85 ++-
 glib-objc/GOCComparable.h  |   33 ++
 glib-objc/GOCHashTable.h   |  104 +++
 glib-objc/GOCHashTable.m   |  312 
 .../glib-objc.h = glib-objc/GOCHashable.h |   25 +-
 .../glib-objc.h = glib-objc/GOCIterable.h |   29 +-
 glib-objc/GOCList.h|   99 ++
 glib-objc/GOCList.m|  295 ++
 glib-objc/GOCNumber.h  |   79 +
 glib-objc/GOCNumber.m  |  269 +
 glib-objc/GOCObjectBase.h  |   44 +++
 glib-objc/GOCObjectBase.m  |   53 
 glib-objc/Makefile.am  |   44 +++
 glib-objc/glib-objc-2.0.pc.in  |   13 +
 {gobject-objc = glib-objc}/glib-objc.h|   20 +-
 gobject-objc/Makefile.am   |8 +-
 gobject-objc/gobject-objc-2.0.pc.in|6 +-
 18 files changed, 1410 insertions(+), 109 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0c4526e..24b3bbb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,4 @@
 SUBDIRS = \
+   glib-objc \
gobject-objc \
 tests
diff --git a/configure.ac.in b/configure.ac.in
index 0eb1718..8078e96 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -6,8 +6,8 @@ dnl Copyright (c) 2008 Brian Tarricone bj...@cornell.edu
 dnl
 
 dnl version info
-m4_define([libgobject_objc_verinfo], [0:0:0])
-m4_define([libgobject_objc_api_version], [2.0])
+m4_define([glib_objc_verinfo], [0:0:0])
+m4_define([glib_objc_api_version], [2.0])
 m4_define([go_version_major], [0])
 m4_define([go_version_minor], [1])
 m4_define([go_version_micro], [0])
@@ -41,13 +41,23 @@ AC_HEADER_STDC
 
 dnl version information
 GO_VERSION=go_version
-LIBGOBJECT_OBJC_VERINFO=libgobject_objc_verinfo
-LIBGOBJECT_OBJC_API_VERSION=libgobject_objc_api_version
+GLIB_OBJC_VERINFO=glib_objc_verinfo
+GLIB_OBJC_API_VERSION=glib_objc_api_version
 AC_SUBST(GO_VERSION)
-AC_SUBST(LIBGOBJECT_OBJC_VERINFO)
-AC_SUBST(LIBGOBJECT_OBJC_API_VERSION)
+AC_SUBST(GLIB_OBJC_VERINFO)
+AC_SUBST(GLIB_OBJC_API_VERSION)
 
 dnl required
+
+PKG_CHECK_MODULES([GLIB], [glib-2.0 = 2.12.0], , [AC_MSG_ERROR([
+*** Glib version 2.12.0 or greater is required.
+*** YOu can download it from http://gtk.org/
+])])
+AC_MSG_CHECKING([GLIB_CFLAGS])
+AC_MSG_RESULT([$GLIB_CFLAGS])
+AC_MSG_CHECKING([GLIB_LIBS])
+AC_MSG_RESULT([$GLIB_LIBS])
+
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 = 2.12.0], , [AC_MSG_ERROR([
 *** GObject (a part of the Glib library) version 2.12.0 or greater is required.
 *** You can download it from http://gtk.org/
@@ -57,67 +67,6 @@ AC_MSG_RESULT([$GOBJECT_CFLAGS])
 AC_MSG_CHECKING([GOBJECT_LIBS])
 AC_MSG_RESULT([$GOBJECT_LIBS])
 
-FOUNDATION_CFLAGS=
-FOUNDATION_LIBS=
-
-AC_ARG_WITH([gnustep],
-AC_HELP_STRING([--with-gnustep=PREFIX],
-   [Specify the root of where GNUStep is installed]),
-[gnustep_root=$withval])
-if test x$gnustep_root != x; then
-FOUNDATION_CFLAGS=-I$gnustep_root/System/Library/Headers
-if test x$GCC = xyes; then
-FOUNDATION_HACK_CFLAGS=-fconstant-string-class=NSConstantString
-fi
-FOUNDATION_LIBS=-L$gnustep_root/System/Library/Libraries -lgnustep-base
-else
-dnl check to see if we're on MacOS X
-case $host_os in
-[macos* | darwin[6-9]* | darwin[1-9][0-9]*)]
-FOUNDATION_CFLAGS=
-FOUNDATION_LIBS=-Wl,-framework,Foundation
-;;
-*)
-# we should try to search more places
-FOUNDATION_CFLAGS=
-FOUNDATION_LIBS=-lgnustep-base
-;;
-esac
-fi
-
-dnl make sure Foundation works
-AC_MSG_CHECKING([for a working Foundation])
-AC_LANG_PUSH([Objective C])
-saved_OBJCFLAGS=$CFLAGS
-saved_LIBS=$LIBS
-OBJCFLAGS=$OBJCFLAGS $FOUNDATION_CFLAGS
-LIBS=$LIBS $FOUNDATION_LIBS
-AC_LINK_IFELSE(
-[#include Foundation/Foundation.h
-int main() {
-NSAutoreleasePool alloc] init] release];]
-return 0;
-}
-]
-, [AC_MSG_RESULT([yes])],
-[
-AC_MSG_RESULT([no])
-echo '*** A working Foundation library was not found.  If using GNUStep, 
please'
-echo '*** specify the GNUStep root directory with --with-gnustep.  If 
compiling'
-echo '*** for MacOS X, file a bug, because this should

[Xfce4-commits] glib-objc:no-foundation-dep move _goc_return_*() macros to common/goc-private.h

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 29836ebf0aa99e27c66df659d9801153caa8eca2 (commit)
   from b3fa4c2f76cafac7035e99f3dbd809174e97c2bc (commit)

commit 29836ebf0aa99e27c66df659d9801153caa8eca2
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Jul 7 01:25:53 2009 -0700

move _goc_return_*() macros to common/goc-private.h

need to add #includes to gobject-objc/ files

 Makefile.am|1 +
 common/Makefile.am |2 +
 .../gobject-objc-private.h = common/goc-private.h |   19 ++
 configure.ac.in|1 +
 gobject-objc/gobject-objc-private.h|   37 
 5 files changed, 8 insertions(+), 52 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 24b3bbb..02714f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,5 @@
 SUBDIRS = \
+   common \
glib-objc \
gobject-objc \
 tests
diff --git a/common/Makefile.am b/common/Makefile.am
new file mode 100644
index 000..a18f7db
--- /dev/null
+++ b/common/Makefile.am
@@ -0,0 +1,2 @@
+EXTRA_DIST = \
+   goc-private.h
diff --git a/gobject-objc/gobject-objc-private.h b/common/goc-private.h
similarity index 83%
copy from gobject-objc/gobject-objc-private.h
copy to common/goc-private.h
index 13444e5..ba15d56 100644
--- a/gobject-objc/gobject-objc-private.h
+++ b/common/goc-private.h
@@ -17,12 +17,10 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-#ifndef __GOBJECT_OBJC_PRIVATE_H__
-#define __GOBJECT_OBJC_PRIVATE_H__
+#ifndef __GOC_PRIVATE_H__
+#define __GOC_PRIVATE_H__
 
-#include glib-object.h
-
-G_BEGIN_DECLS
+#include glib.h
 
 #if defined(__NetBSD__) || (defined(__STDC_VERSION__)  __STDC_VERSION__ = 
199901L)
 #define __DBG_FUNC____func__
@@ -60,13 +58,4 @@ G_BEGIN_DECLS
 return (val); \
 } G_STMT_END
 
-
-GType _glib_objc_gtype_from_signature(const char *objc_signature);
-#if 0
-BOOL _glib_objc_signatures_match(GType target_gtype,
- const char *objc_signature);
-#endif
-
-G_END_DECLS
-
-#endif  /* __GOBJECT_OBJC_PRIVATE_H__ */
+#endif  /* __GOC_PRIVATE_H__ */
diff --git a/configure.ac.in b/configure.ac.in
index 8078e96..c723d0f 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -94,6 +94,7 @@ AC_MSG_RESULT([$enable_debug])
 
 AC_OUTPUT([
 Makefile
+common/Makefile
 glib-objc/Makefile
 glib-objc/glib-objc-2.0.pc
 gobject-objc/Makefile
diff --git a/gobject-objc/gobject-objc-private.h 
b/gobject-objc/gobject-objc-private.h
index 13444e5..d39fc94 100644
--- a/gobject-objc/gobject-objc-private.h
+++ b/gobject-objc/gobject-objc-private.h
@@ -24,43 +24,6 @@
 
 G_BEGIN_DECLS
 
-#if defined(__NetBSD__) || (defined(__STDC_VERSION__)  __STDC_VERSION__ = 
199901L)
-#define __DBG_FUNC____func__
-#elif defined(__GNUC__)  __GNUC__ = 3
-#define __DBG_FUNC____FUNCTION__
-#elif defined(__SVR4)  defined(__sun)
-#define __DBG_FUNC____func__
-#else
-#define __DBG_FUNC__??
-#endif
-
-#define _goc_return_if_fail(expr) G_STMT_START{ \
-if(!(expr)) { \
-g_warning(%s(): assertion failed: %s, __DBG_FUNC__, \
-  G_STRINGIFY(expr)); \
-return; \
-} \
-}G_STMT_END
-
-#define _goc_return_val_if_fail(expr, val) G_STMT_START{ \
-if(!(expr)) { \
-g_warning(%s(): assertion failed: %s, __DBG_FUNC__, \
-  G_STRINGIFY(expr)); \
-return (val); \
-} \
-}G_STMT_END
-
-#define _goc_return_if_reached(msg) G_STMT_START{ \
-g_warning(%s(): %s, __DBG_FUNC__, msg); \
-return; \
-} G_STMT_END
-
-#define _goc_return_val_if_reached(msg, val) G_STMT_START{ \
-g_warning(%s(): %s, __DBG_FUNC__, msg); \
-return (val); \
-} G_STMT_END
-
-
 GType _glib_objc_gtype_from_signature(const char *objc_signature);
 #if 0
 BOOL _glib_objc_signatures_match(GType target_gtype,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep support automake 1.11 and autoconf 2.62 and 2.63

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to b3fa4c2f76cafac7035e99f3dbd809174e97c2bc (commit)
   from 8fd6b78b38c3de1c26f31e4d46d4ad7b179e7b12 (commit)

commit b3fa4c2f76cafac7035e99f3dbd809174e97c2bc
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Jul 6 15:31:33 2009 -0700

support automake 1.11 and autoconf 2.62 and 2.63

 autogen.sh |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index fc98cdf..4301e46 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -24,10 +24,10 @@ fi
 sed s/@REVISION@/$REVISION/g configure.ac.in configure.ac
 
 run_first_found glibtoolize libtoolize --force --copy --automake 
-run_first_found aclocal-1.10 aclocal-1.9 aclocal-1.8 aclocal-1.7 aclocal 
$ACLOCAL_FLAGS 
-run_first_found autoheader-2.61 autoheader-2.60 autoheader-2.59 
autoheader-2.53 autoheader 
-run_first_found automake-1.10 automake-1.9 automake-1.8 automake-1.7 
automake --force-missing --add-missing --copy --gnu $AM_FLAGS 
-run_first_found autoconf-2.61 autoconf-2.60 autoconf-2.59 autoconf-2.32 
autoconf $AC_FLAGS || exit 1
+run_first_found aclocal-1.11 aclocal-1.10 aclocal-1.9 aclocal-1.8 aclocal-1.7 
aclocal $ACLOCAL_FLAGS 
+run_first_found autoheader-2.63 autoheader-2.62 autoheader-2.61 
autoheader-2.60 autoheader-2.59 autoheader-2.53 autoheader 
+run_first_found automake-1.11 automake-1.10 automake-1.9 automake-1.8 
automake-1.7 automake --force-missing --add-missing --copy --gnu $AM_FLAGS 
+run_first_found autoconf-2.63 autoconf-2.62 autoconf-2.61 autoconf-2.60 
autoconf-2.59 autoconf-2.32 autoconf $AC_FLAGS || exit 1
 
 if test x$NOCONFIGURE = x; then
 CONFIGURE_FLAGS=--enable-maintainer-mode $@
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep add wrappers for GMainContext and GMainLoop

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to d921853cce5748585fda21b96a51ec75716736ba (commit)
   from 29836ebf0aa99e27c66df659d9801153caa8eca2 (commit)

commit d921853cce5748585fda21b96a51ec75716736ba
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Jul 7 01:27:25 2009 -0700

add wrappers for GMainContext and GMainLoop

 glib-objc/GOCMain.h   |   90 +
 glib-objc/GOCMain.m   |  266 +
 glib-objc/Makefile.am |3 +
 glib-objc/glib-objc.h |1 +
 4 files changed, 360 insertions(+), 0 deletions(-)

diff --git a/glib-objc/GOCMain.h b/glib-objc/GOCMain.h
new file mode 100644
index 000..3cdc548
--- /dev/null
+++ b/glib-objc/GOCMain.h
@@ -0,0 +1,90 @@
+/*
+ *  glib-objc - objective-c bindings for glib/gobject
+ *
+ *  Copyright (c) 2009 Brian Tarricone br...@tarricone.org
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser General Public License as published
+ *  by the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifndef __GOC_MAIN_LOOP_H__
+#define __GOC_MAIN_LOOP_H__
+
+#include glib.h
+
+#import glib-objc/GOCObjectBase.h
+
+typedef struct _GOCMainContextPriv  GOCMainContextPriv;
+typedef struct _GOCMainLoopPriv GOCMainLoopPriv;
+
+...@interface GOCMainContext : GOCObjectBase
+{
+  @private
+GOCMainContextPriv *priv;
+}
+
++ (id)defaultContext;
+
+- (BOOL)doIteration:(BOOL)mayBlock;
+- (BOOL)eventsPending;
+
+- (unsigned int)addTimeout:(unsigned int)interval
+  withCallback:(GSourceFunc)function
+   andData:(void *)data;
+- (unsigned int)addTimeout:(unsigned int)interval
+  withCallback:(GSourceFunc)function
+   andData:(void *)data
+andDestroyNotifier:(GDestroyNotify)notify
+atPriority:(int)priority;
+
+- (unsigned int)addTimeoutSeconds:(unsigned int)interval
+ withCallback:(GSourceFunc)function
+  andData:(void *)data;
+- (unsigned int)addTimeoutSeconds:(unsigned int)interval
+ withCallback:(GSourceFunc)function
+  andData:(void *)data
+   andDestroyNotifier:(GDestroyNotify)notify
+   atPriority:(int)priority;
+
+- (unsigned int)addIdleCallback:(GSourceFunc)function
+   withData:(void *)data;
+- (unsigned int)addIdleCallback:(GSourceFunc)function
+   withData:(void *)data
+ andDestroyNotifier:(GDestroyNotify)notify
+ atPriority:(int)priority;
+
+- (BOOL)removeSourceById:(unsigned int)sourceId;
+
+...@end
+
+
+...@interface GOCMainLoop : GOCObjectBase
+{
+  @private
+GOCMainLoopPriv *priv;
+}
+
+- (id)init;
+- (id)initWithContext:(GOCMainContext *)context;
+- (id)initWithContext:(GOCMainContext *)context
+isRunning:(BOOL)running;
+
+- (void)run;
+- (BOOL)running;
+- (void)quit;
+
+- (GOCMainContext *)context;
+
+...@end
+
+#endif  /* __GOC_MAIN_LOOP_H__ */
diff --git a/glib-objc/GOCMain.m b/glib-objc/GOCMain.m
new file mode 100644
index 000..56b510c
--- /dev/null
+++ b/glib-objc/GOCMain.m
@@ -0,0 +1,266 @@
+/*
+ *  glib-objc - objective-c bindings for glib/gobject
+ *
+ *  Copyright (c) 2009 Brian Tarricone br...@tarricone.org
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser General Public License as published
+ *  by the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
+#import GOCMain.h
+
+#include goc-private.h
+
+struct _GOCMainContextPriv
+{
+GMainContext *ctx_ptr;
+};
+
+...@implementation GOCMainContext
+
+- (id)init
+{
+self = [super init];
+if(self) {
+priv = g_slice_new0(GOCMainContextPriv);
+priv-ctx_ptr = g_main_context_new();
+}
+return self;
+}
+
+
+/* private */
+- (id

[Xfce4-commits] glib-objc:no-foundation-dep add compat functions to Object for Objc 2.0 compiles

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 74d6eb3048508eab2cd405d9947afcc17db1409f (commit)
   from 1d91dc5a0c829920f3fcace5d9bdf5fdcad4e357 (commit)

commit 74d6eb3048508eab2cd405d9947afcc17db1409f
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Jul 7 23:35:16 2009 -0700

add compat functions to Object for Objc 2.0 compiles

i'm not sure if this is actually needed, but it was fun to play with
the runtime

 glib-objc/GOCObjectBase.h |   32 -
 glib-objc/GOCObjectBase.m |  174 +
 2 files changed, 203 insertions(+), 3 deletions(-)

diff --git a/glib-objc/GOCObjectBase.h b/glib-objc/GOCObjectBase.h
index 46a9c06..dfe4e04 100644
--- a/glib-objc/GOCObjectBase.h
+++ b/glib-objc/GOCObjectBase.h
@@ -17,7 +17,6 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-
 #ifndef __GOC_OBJECT_BASE_H__
 #define __GOC_OBJECT_BASE_H__
 
@@ -38,9 +37,36 @@
 volatile int ref_count;
 }
 
-- (id GOCObject)ref;
-- (void)unref;
+...@end
+
+#if __OBJC2__
+
+/* ObjC 2.0 doesn't have these methods in Object because apparently Apple 
decided
+ * everyone in the world should use NSObject */
+
+...@interface Object (ObjC1Compat)
+
+- (id)init;
+
++ (id)new;
++ (id)alloc;
+- (void)free;
+
+- (Class)class;
+- (Class)superClass;
+- (const char *)name;
+
+- (BOOL)isKindOfClass:(Class)aClass;
+- (BOOL)isMemberOfClass:(Class)aClass;
+
+- (BOOL)respondsTo:(SEL)aSel;
+- (BOOL)conformsTo:(Protocol *)aProtocol;
+
++ (IMP)instanceMethodFor:(SEL)aSel;
+- (IMP)methodFor:(SEL)aSel;
 
 @end
 
+#endif  /* __OBJC2__ */
+
 #endif  /* __GOC_OBJECT_BASE_H__ */
diff --git a/glib-objc/GOCObjectBase.m b/glib-objc/GOCObjectBase.m
index bbe1210..1ace1a9 100644
--- a/glib-objc/GOCObjectBase.m
+++ b/glib-objc/GOCObjectBase.m
@@ -21,6 +21,16 @@
 #include config.h
 #endif
 
+#if __OBJC2__
+# if defined(__NEXT_RUNTIME__)
+#  include objc/objc-runtime.h
+# elif defined(__GNUC__)
+#  include objc/objc-api.h
+# else
+#  error We don't support your ObjC runtime!
+# endif
+#endif
+
 #include glib.h
 
 #import GOCObjectBase.h
@@ -63,3 +73,167 @@
 }
 
 @end
+
+
+#if __OBJC2__
+
+...@implementation Object (ObjC1Compat)
+
+- (id)init
+{
+return self;
+}
+
++ (id)new
+{
+return [[self alloc] init];
+}
+
++ (id)alloc
+{
+#if defined(__NEXT_RUNTIME__)
+return class_createInstance([self class], 0);
+#elif defined(__GNUC__)
+return class_create_instance([self class]);
+#endif
+}
+
+- (void)free
+{
+object_dispose(self);
+}
+
+- (Class)class
+{
+#if defined(__NEXT_RUNTIME__)
+return object_getClass(self);
+#elif defined(__GNUC__)
+return object_get_class(self);
+#endif
+}
+- (Class)superClass
+{
+#if defined(__NEXT_RUNTIME__)
+return class_getSuperclass([self class]);
+#elif defined(__GNUC__)
+return object_get_super_class(self);
+#endif
+}
+
+- (const char *)name
+{
+#if defined(__NEXT_RUNTIME__)
+return object_getClassName(self);
+#elif defined(__GNUC__)
+return object_get_class_name(self);
+#endif
+}
+
+- (BOOL)isKindOfClass:(Class)aClass
+{
+Class cur = aClass;
+Class ourClass = [self class];
+
+while(cur) {
+if(ourClass == cur)
+return YES;
+#if defined(__NEXT_RUNTIME__)
+cur = class_getSuperclass(cur);
+#elif defined(__GNUC__)
+cur = class_get_super_class(cur);
+#endif
+}
+
+return NO;
+}
+
+- (BOOL)isMemberOfClass:(Class)aClass
+{
+return [self class] == aClass ? YES : NO;
+}
+
+- (BOOL)respondsTo:(SEL)aSel
+{
+#if defined(__NEXT_RUNTIME__)
+return class_respondsToSelector([self class], aSel);
+#elif defined(__GNUC__)
+return class_get_instance_method([self class], aSel) ? YES : NO;
+#endif
+}
+
+- (BOOL)conformsTo:(Protocol *)aProtocol
+{
+#if defined(__NEXT_RUNTIME__)
+return class_conformsToProtocol([self class], aProtocol);
+#elif defined(__GNUC__)
+struct objc_class *cl = (struct objc_class *)[self class];
+struct objc_protocol_list *pl;
+size_t i;
+
+for(pl = cl-protocols; pl; pl = pl-next) {
+for(i = 0; i  pl-count; ++i) {
+if(pl-list[i] == aProtocol)
+return YES;
+}
+}
+
+return NO;
+#endif
+}
+
+static IMP
+try_get_instance_method(Class aClass,
+SEL aSel)
+{
+IMP impl = NULL;
+
+#if defined(__NEXT_RUNTIME__)
+Method method = class_getInstanceMethod(aClass, aSel);
+if(method)
+impl = method_getImplementation(method);
+#elif defined(__GNUC__)
+Method_t method = class_get_instance_method(aClass, aSel);
+if(method)
+impl = method_get_imp(method);
+#endif
+
+return impl;
+}
+
++ (IMP)instanceMethodFor:(SEL)aSel
+{
+IMP impl = NULL;
+
+#if defined(__NEXT_RUNTIME__)
+impl = class_getMethodImplementation(self, aSel);
+if(!impl)
+impl = class_getMethodImplementation_stret(self, aSel);
+if(!impl)
+impl = try_get_instance_method(self, aSel);
+#elif defined

[Xfce4-commits] glib-objc:no-foundation-dep turn GOCValue/Number into essentially NSValue/Number replacements

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 90c17545bc9353440cbb17f8d1a8c5db712ad49d (commit)
   from 74d6eb3048508eab2cd405d9947afcc17db1409f (commit)

commit 90c17545bc9353440cbb17f8d1a8c5db712ad49d
Author: Brian J. Tarricone br...@tarricone.org
Date:   Wed Jul 8 16:53:08 2009 -0700

turn GOCValue/Number into essentially NSValue/Number replacements

 gobject-objc/GOCNumber.h |   62 ++---
 gobject-objc/GOCNumber.m |  336 --
 gobject-objc/GOCValue.h  |   40 --
 gobject-objc/GOCValue.m  |  127 --
 4 files changed, 448 insertions(+), 117 deletions(-)

diff --git a/gobject-objc/GOCNumber.h b/gobject-objc/GOCNumber.h
index 2809436..b02ce15 100644
--- a/gobject-objc/GOCNumber.h
+++ b/gobject-objc/GOCNumber.h
@@ -20,32 +20,32 @@
 #ifndef __GOC_NUMBER_H__
 #define __GOC_NUMBER_H__
 
-#import glib-objc/GOCObjectBase.h
+#import gobject-objc/GOCValue.h
 
-...@interface GOCNumber : GOCObjectBase
-{
-  @protected
-int type;
+typedef struct _GOCNumberPriv  GOCNumberPriv;
 
+...@interface GOCNumber : GOCValue
+{
   @private
-union
-{
-BOOL b;
-unsigned char uc;
-char c;
-unsigned short us;
-short s;
-unsigned int ui;
-int i;
-unsigned long ul;
-long l;
-unsigned long long ull;
-long long ll;
-float f;
-double d;
-} data;
+GOCNumberPriv *gnpriv;
 }
 
++ (id)numberWithBool:(BOOL)boolValue;
++ (id)numberWithUChar:(unsigned char)uCharValue;
++ (id)numberWithChar:(char)charValue;
++ (id)numberWithUShort:(unsigned short)uShortValue;
++ (id)numberWithShort:(short)shortValue;
++ (id)numberWithUInt:(unsigned int)uIntValue;
++ (id)numberWithInt:(int)intValue;
++ (id)numberWithULong:(unsigned long)uLongValue;
++ (id)numberWithLong:(long)longValue;
++ (id)numberWithUInt64:(unsigned long long)uInt64Value;
++ (id)numberWithInt64:(long long)int64Value;
++ (id)numberWithFloat:(float)floatValue;
++ (id)numberWithDouble:(double)doubleValue;
++ (id)numberWithEnum:(int)enumValue;
++ (id)numberWithFlags:(unsigned int)flagsValue;
+
 - (id)initWithBool:(BOOL)boolValue;
 - (id)initWithUChar:(unsigned char)uCharValue;
 - (id)initWithChar:(char)charValue;
@@ -59,6 +59,24 @@
 - (id)initWithInt64:(long long)int64Value;
 - (id)initWithFloat:(float)floatValue;
 - (id)initWithDouble:(double)doubleValue;
+- (id)initWithEnum:(int)enumValue;
+- (id)initWithFlags:(unsigned int)flagsValue;
+
+- (BOOL)holdsBool;
+- (BOOL)holdsUChar;
+- (BOOL)holdsChar;
+- (BOOL)holdsUShort;
+- (BOOL)holdsShort;
+- (BOOL)holdsUInt;
+- (BOOL)holdsInt;
+- (BOOL)holdsULong;
+- (BOOL)holdsLong;
+- (BOOL)holdsUInt64;
+- (BOOL)holdsInt64;
+- (BOOL)holdsFloat;
+- (BOOL)holdsDouble;
+- (BOOL)holdsEnum;
+- (BOOL)holdsFlags;
 
 - (BOOL)boolValue;
 - (unsigned char)uCharValue;
@@ -73,6 +91,8 @@
 - (long long)int64Value;
 - (float)floatValue;
 - (double)doubleValue;
+- (int)enumValue;
+- (unsigned int)flagsValue;
 
 @end
 
diff --git a/gobject-objc/GOCNumber.m b/gobject-objc/GOCNumber.m
index 3977656..b7beb0d 100644
--- a/gobject-objc/GOCNumber.m
+++ b/gobject-objc/GOCNumber.m
@@ -32,7 +32,7 @@
 typedef enum
 {
 GN_TYPE_INVALID = 0,
-GN_TYPE_BOOL,
+GN_TYPE_BOOL = 0x1000,
 GN_TYPE_UCHAR,
 GN_TYPE_CHAR,
 GN_TYPE_USHORT,
@@ -45,225 +45,477 @@ typedef enum
 GN_TYPE_INT64,
 GN_TYPE_FLOAT,
 GN_TYPE_DOUBLE,
+GN_TYPE_ENUM,
+GN_TYPE_FLAGS,
 } GOCNumberType;
 
+struct _GOCNumberPriv
+{
+union
+{
+BOOL b;
+unsigned char uc;
+char c;
+unsigned short us;
+short s;
+unsigned int ui;
+int i;
+unsigned long ul;
+long l;
+unsigned long long ull;
+long long ll;
+float f;
+double d;
+} data;
+};
+
++ (id)numberWithBool:(BOOL)boolValue
+{
+return [[[GOCNumber alloc] initWithBool:boolValue] autounref];
+}
+
++ (id)numberWithUChar:(unsigned char)uCharValue
+{
+return [[[GOCNumber alloc] initWithUChar:uCharValue] autounref];
+}
+
++ (id)numberWithChar:(char)charValue
+{
+return [[[GOCNumber alloc] initWithChar:charValue] autounref];
+}
+
++ (id)numberWithUShort:(unsigned short)uShortValue
+{
+return [[[GOCNumber alloc] initWithUShort:uShortValue] autounref];
+}
+
++ (id)numberWithShort:(short)shortValue
+{
+return [[[GOCNumber alloc] initWithShort:shortValue] autounref];
+}
+
++ (id)numberWithUInt:(unsigned int)uIntValue
+{
+return [[[GOCNumber alloc] initWithUInt:uIntValue] autounref];
+}
+
++ (id)numberWithInt:(int)intValue
+{
+return [[[GOCNumber alloc] initWithInt:intValue] autounref];
+}
+
++ (id)numberWithULong:(unsigned long)uLongValue
+{
+return [[[GOCNumber alloc] initWithULong:uLongValue] autounref];
+}
+
++ (id)numberWithLong:(long)longValue
+{
+return [[[GOCNumber alloc] initWithLong:longValue] autounref];
+}
+
++ (id)numberWithUInt64:(unsigned long long)uInt64Value
+{
+return [[[GOCNumber

[Xfce4-commits] glib-objc:no-foundation-dep add private -storage method to GOCNumber/Value

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 07cbb4c44fad8967ee24c9db4393349d4501dd4e (commit)
   from 90c17545bc9353440cbb17f8d1a8c5db712ad49d (commit)

commit 07cbb4c44fad8967ee24c9db4393349d4501dd4e
Author: Brian J. Tarricone br...@tarricone.org
Date:   Fri Jul 10 13:24:52 2009 -0700

add private -storage method to GOCNumber/Value

 .../GOCNumber+GOCPrivate.h |   17 +++-
 gobject-objc/GOCNumber.m   |   45 
 .../GOCValue+GOCPrivate.h  |   16 +++
 gobject-objc/GOCValue.m|   20 +
 4 files changed, 77 insertions(+), 21 deletions(-)

diff --git a/glib-objc/GOCIterable.h b/gobject-objc/GOCNumber+GOCPrivate.h
similarity index 81%
copy from glib-objc/GOCIterable.h
copy to gobject-objc/GOCNumber+GOCPrivate.h
index 5e15e9e..19fc28c 100644
--- a/glib-objc/GOCIterable.h
+++ b/gobject-objc/GOCNumber+GOCPrivate.h
@@ -17,20 +17,15 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-#ifndef __GOC_ITERABLE_H__
-#define __GOC_ITERABLE_H__
+#ifndef __GOC_NUMBER__GOC_PRIVATE__
+#define __GOC_NUMBER__GOC_PRIVATE__
 
-...@protocol GOCIter
+#import GOCNumber.h
 
-- (id GOCObject)next;
+...@interface GOCNumber (GOCPrivate)
 
-...@end
-
-...@protocol GOCIterable
-
-- (id GOCIter)getIter;
+- (const void *)storage;
 
 @end
 
-
-#endif  /* __GOC_ITERABLE_H__ */
+#endif   /* __GOC_NUMBER__GOC_PRIVATE__ */
diff --git a/gobject-objc/GOCNumber.m b/gobject-objc/GOCNumber.m
index b7beb0d..354ceaf 100644
--- a/gobject-objc/GOCNumber.m
+++ b/gobject-objc/GOCNumber.m
@@ -26,6 +26,8 @@
 #include glib.h
 
 #import GOCNumber.h
+#import GOCValue+GOCPrivate.h
+#import GOCNumber+GOCPrivate.h
 
 @implementation GOCNumber
 
@@ -519,3 +521,46 @@ struct _GOCNumberPriv
 }
 
 @end
+
+
+...@implementation GOCNumber (GOCPrivate)
+
+- (const void *)storage
+{
+switch(type) {
+case GN_TYPE_BOOL:
+return gnpriv-data.b;
+case GN_TYPE_UCHAR:
+return gnpriv-data.uc;
+case GN_TYPE_CHAR:
+return gnpriv-data.c;
+case GN_TYPE_USHORT:
+return gnpriv-data.us;
+case GN_TYPE_SHORT:
+return gnpriv-data.s;
+case GN_TYPE_UINT:
+return gnpriv-data.ui;
+case GN_TYPE_INT:
+return gnpriv-data.i;
+case GN_TYPE_ULONG:
+return gnpriv-data.ul;
+case GN_TYPE_LONG:
+return gnpriv-data.l;
+case GN_TYPE_UINT64:
+return gnpriv-data.ull;
+case GN_TYPE_INT64:
+return gnpriv-data.ll;
+case GN_TYPE_FLOAT:
+return gnpriv-data.f;
+case GN_TYPE_DOUBLE:
+return gnpriv-data.d;
+case GN_TYPE_ENUM:
+return gnpriv-data.i;
+case GN_TYPE_FLAGS:
+return gnpriv-data.ui;
+}
+
+return [super storage];
+}
+
+...@end
diff --git a/glib-objc/GOCIterable.h b/gobject-objc/GOCValue+GOCPrivate.h
similarity index 81%
copy from glib-objc/GOCIterable.h
copy to gobject-objc/GOCValue+GOCPrivate.h
index 5e15e9e..b7b6a8d 100644
--- a/glib-objc/GOCIterable.h
+++ b/gobject-objc/GOCValue+GOCPrivate.h
@@ -17,20 +17,16 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-#ifndef __GOC_ITERABLE_H__
-#define __GOC_ITERABLE_H__
+#ifndef __GOC_VALUE__GOC_PRIVATE__
+#define __GOC_VALUE__GOC_PRIVATE__
 
-...@protocol GOCIter
+#import GOCValue.h
 
-- (id GOCObject)next;
+...@interface GOCValue (GOCPrivate)
 
-...@end
-
-...@protocol GOCIterable
-
-- (id GOCIter)getIter;
+- (const void *)storage;
 
 @end
 
+#endif   /* __GOC_VALUE__GOC_PRIVATE__ */
 
-#endif  /* __GOC_ITERABLE_H__ */
diff --git a/gobject-objc/GOCValue.m b/gobject-objc/GOCValue.m
index d6fb1c3..71e038c 100644
--- a/gobject-objc/GOCValue.m
+++ b/gobject-objc/GOCValue.m
@@ -24,6 +24,7 @@
 #include glib.h
 
 #import GOCValue.h
+#import GOCValue+GOCPrivate.h
 
 @implementation GOCValue
 
@@ -148,3 +149,22 @@ struct _GOCValuePriv
 }
 
 @end
+
+
+...@implementation GOCValue (GOCPrivate)
+
+- (const void *)storage
+{
+switch(type) {
+case GV_TYPE_VOID:
+return NULL;
+case GV_TYPE_OBJECT:
+return gvpriv-data.o;
+case GV_TYPE_POINTER:
+return gvpriv-data.p;
+}
+
+return NULL;
+}
+
+...@end
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep change some cosmetic naming issues in the build system

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 85cca33b1b3827211dd1d4cbd9fb2ef2f863efac (commit)
   from 07cbb4c44fad8967ee24c9db4393349d4501dd4e (commit)

commit 85cca33b1b3827211dd1d4cbd9fb2ef2f863efac
Author: Brian J. Tarricone br...@tarricone.org
Date:   Fri Jul 10 13:31:40 2009 -0700

change some cosmetic naming issues in the build system

 configure.ac.in |   29 +++--
 glib-objc/Makefile.am   |6 +++---
 glib-objc/glib-objc-2.0.pc.in   |7 ---
 gobject-objc/Makefile.am|6 +++---
 gobject-objc/gobject-objc-2.0.pc.in |8 
 5 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index c723d0f..bcf053c 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -6,17 +6,17 @@ dnl Copyright (c) 2008 Brian Tarricone bj...@cornell.edu
 dnl
 
 dnl version info
-m4_define([glib_objc_verinfo], [0:0:0])
-m4_define([glib_objc_api_version], [2.0])
-m4_define([go_version_major], [0])
-m4_define([go_version_minor], [1])
-m4_define([go_version_micro], [0])
-m4_define([go_version_build], [...@revision@])
-m4_define([go_version_tag], [git])
-m4_define([go_version], 
[go_version_major().go_version_minor().go_version_micro()ifelse(go_version_tag(),
 [git], [go_version_tag()-go_version_build()], [go_version_tag()])])
+m4_define([goc_verinfo], [0:0:0])
+m4_define([goc_api_version], [2.0])
+m4_define([goc_version_major], [0])
+m4_define([goc_version_minor], [1])
+m4_define([goc_version_micro], [0])
+m4_define([goc_version_build], [...@revision@])
+m4_define([goc_version_tag], [git])
+m4_define([goc_version], 
[goc_version_major().goc_version_minor().goc_version_micro()ifelse(goc_version_tag(),
 [git], [goc_version_tag()-goc_version_build()], [goc_version_tag()])])
 
 dnl init autoconf
-AC_INIT([glib-objc], [go_version], [bj...@cornell.edu])
+AC_INIT([glib-objc], [goc_version], [br...@tarricone.org])
 AC_PREREQ([2.59])
 
 dnl init automake
@@ -38,14 +38,15 @@ AC_PROG_LIBTOOL
 
 dnl check for standard header files
 AC_HEADER_STDC
+AC_CHECK_HEADERS([objc/objc-api.h objc/objc-runtime.h])
 
 dnl version information
-GO_VERSION=go_version
-GLIB_OBJC_VERINFO=glib_objc_verinfo
-GLIB_OBJC_API_VERSION=glib_objc_api_version
+GOC_VERSION=goc_version
+GOC_VERINFO=goc_verinfo
+GOC_API_VERSION=goc_api_version
 AC_SUBST(GO_VERSION)
-AC_SUBST(GLIB_OBJC_VERINFO)
-AC_SUBST(GLIB_OBJC_API_VERSION)
+AC_SUBST(GOC_VERINFO)
+AC_SUBST(GOC_API_VERSION)
 
 dnl required
 
diff --git a/glib-objc/Makefile.am b/glib-objc/Makefile.am
index c06efe2..3b313b9 100644
--- a/glib-objc/Makefile.am
+++ b/glib-objc/Makefile.am
@@ -1,6 +1,6 @@
 lib_LTLIBRARIES = libglib-objc-2.0.la
 
-glibobjcmainincludedir = $(includedir)/glib-objc-$(GLIB_OBJC_API_VERSION)
+glibobjcmainincludedir = $(includedir)/glib-objc-$(GOC_API_VERSION)
 glibobjcmaininclude_HEADERS = \
glib-objc.h
 glibobjcincludedir = $(glibobjcmainincludedir)/glib-objc
@@ -31,13 +31,13 @@ libglib_objc_2_0_la_CFLAGS = \
 libglib_objc_2_0_la_OBJCFLAGS = $(libglib_objc_2_0_la_CFLAGS)
 
 libglib_objc_2_0_la_LDFLAGS = \
-   -version-info $(GLIB_OBJC_VERINFO)
+   -version-info $(GOC_VERINFO)
 
 libglib_objc_2_0_la_LIBADD = \
$(GLIB_LIBS)
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_in_files = glib-objc-$(GLIB_OBJC_API_VERSION).pc.in
+pkgconfig_in_files = glib-objc-$(GOC_API_VERSION).pc.in
 pkgconfig_DATA = $(pkgconfig_in_files:.in=)
 
 DISTCLEANFILES = \
diff --git a/glib-objc/glib-objc-2.0.pc.in b/glib-objc/glib-objc-2.0.pc.in
index cc13945..4102f5e 100644
--- a/glib-objc/glib-objc-2.0.pc.in
+++ b/glib-objc/glib-objc-2.0.pc.in
@@ -3,11 +3,12 @@ exec_pref...@exec_prefix@
 libd...@libdir@
 included...@includedir@
 
-libglib_objc_api_versi...@glib_objc_api_version@
+api_versi...@goc_api_version@
+constant_string_cla...@goc_constant_string_class@
 
 Name: Glib-ObjC
 Description: Objective-C bindings for Glib
 Version: @VERSION@
 Requires: glib-2.0
-Libs: -lglib-objc-${libglib_objc_api_version}
-Cflags: -I${includedir}/glib-objc-${libglib_objc_api_version}
+Libs: -lglib-objc-${api_version}
+Cflags: -I${includedir}/glib-objc-${api_version} 
@GOC_CONSTANT_STRING_PCFILE_CFLAGS@
diff --git a/gobject-objc/Makefile.am b/gobject-objc/Makefile.am
index de9dc8a..e214396 100644
--- a/gobject-objc/Makefile.am
+++ b/gobject-objc/Makefile.am
@@ -1,6 +1,6 @@
 lib_LTLIBRARIES = libgobject-objc-2.0.la
 
-glibobjcmainincludedir = $(includedir)/glib-objc-$(GLIB_OBJC_API_VERSION)
+glibobjcmainincludedir = $(includedir)/glib-objc-$(GOC_API_VERSION)
 glibobjcmaininclude_HEADERS = \
gobject-objc.h
 gobjectobjcincludedir = $(glibobjcmainincludedir)/gobject-objc
@@ -27,13 +27,13 @@ libgobject_objc_2_0_la_CFLAGS = \
 libgobject_objc_2_0_la_OBJCFLAGS = $(libgobject_objc_2_0_la_CFLAGS)
 
 libgobject_objc_2_0_la_LDFLAGS = \
-   -version-info $(GLIB_OBJC_VERINFO)
+   -version-info $(GOC_VERINFO)
 
 libgobject_objc_2_0_la_LIBADD = \
$(GOBJECT_LIBS

[Xfce4-commits] glib-objc:no-foundation-dep add GOCAutoreleasePool

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 1d91dc5a0c829920f3fcace5d9bdf5fdcad4e357 (commit)
   from d921853cce5748585fda21b96a51ec75716736ba (commit)

commit 1d91dc5a0c829920f3fcace5d9bdf5fdcad4e357
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Jul 7 03:29:33 2009 -0700

add GOCAutoreleasePool

 .../{GOCComparable.h = GOCAutoreleasePool.h}  |   21 +-
 glib-objc/GOCAutoreleasePool.m |  272 
 glib-objc/GOCObjectBase.h  |2 +
 glib-objc/GOCObjectBase.m  |   12 +
 glib-objc/Makefile.am  |2 +
 5 files changed, 302 insertions(+), 7 deletions(-)

diff --git a/glib-objc/GOCComparable.h b/glib-objc/GOCAutoreleasePool.h
similarity index 70%
copy from glib-objc/GOCComparable.h
copy to glib-objc/GOCAutoreleasePool.h
index 5156add..9853e4d 100644
--- a/glib-objc/GOCComparable.h
+++ b/glib-objc/GOCAutoreleasePool.h
@@ -17,17 +17,24 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-
-#ifndef __GOC_COMPARABLE_H__
-#define __GOC_COMPARABLE_H__
+#ifndef __GOC_AUTORELEASE_POOL_H__
+#define __GOC_AUTORELEASE_POOL_H__
 
 #import glib-objc/GOCObjectBase.h
 
-...@protocol GOCComparableGOCObject
+typedef struct _GOCAutoreleasePoolPriv  GOCAutoreleasePoolPriv;
+
+...@interface GOCAutoreleasePool : GOCObjectBase
+{
+  @private
+GOCAutoreleasePoolPriv *priv;
+}
+
++ (void)addObject:(id GOCObject)obj;
+- (void)addObject:(id GOCObject)obj;
 
-- (int)compareTo:(id GOCComparable)otherComparable;
-- (BOOL)isEqualTo:(id GOCComparable)otherComparable;
+- (void)drain;
 
 @end
 
-#endif  /* __GOC_COMPARABLE_H__ */
+#endif  /* __GOC_AUTORELEASE_POOL_H__ */
diff --git a/glib-objc/GOCAutoreleasePool.m b/glib-objc/GOCAutoreleasePool.m
new file mode 100644
index 000..ada7a76
--- /dev/null
+++ b/glib-objc/GOCAutoreleasePool.m
@@ -0,0 +1,272 @@
+/*
+ *  glib-objc - objective-c bindings for glib/gobject
+ *
+ *  Copyright (c) 2009 Brian Tarricone br...@tarricone.org
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser General Public License as published
+ *  by the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
+#include glib.h
+
+#import GOCAutoreleasePool.h
+
+#define INITIAL_ARRAY_SIZE  32
+
+struct _GOCAutoreleasePoolPriv
+{
+GPtrArray *objects;
+};
+
+...@implementation GOCAutoreleasePool
+
+enum
+{
+THREADING_UNKNOWN = 0,
+THREADING_DISABLED,
+THREADING_ENABLED,
+};
+
+static int threading_state = THREADING_UNKNOWN;
+
+G_LOCK_DEFINE_STATIC(thread_pool);
+static GHashTable *thread_pool = NULL;
+/* GPrivate objects can't be destroyed, so we'll cache them when they're no 
longer
+ * used and then reuse them if new threads get created */
+static GSList *gprivate_cache = NULL;
+
+/* used only when threading is disabled */
+static GList *unthreaded_pools = NULL;
+
+static void
+thread_private_free(GPrivate *thpriv)
+{
+GList *pools = g_private_get(thpriv), *l;
+
+for(l = pools; l; l = l-next) {
+GOCAutoreleasePool *pool = l-data;
+[pool drain];
+}
+
+g_private_set(thpriv, NULL);
+
+G_LOCK(thread_pool);
+gprivate_cache = g_slist_prepend(gprivate_cache, thpriv);
+G_UNLOCK(thread_pool);
+}
+
+static void
+thread_destroyed(GList *pools)
+{
+/* we don't need to do anything with the pools, as thread_private_free() 
will
+ * take care of it when we remove it from the hash table */
+
+/* FIXME: be sure that this actually runs in the thread that's ending so
+ * g_thread_self() returns what we want */
+
+G_LOCK(thread_pool);
+g_hash_table_remove(thread_pool, g_thread_self());
+G_UNLOCK(thread_pool);
+}
+
++ (id)new
+{
+return [[self alloc] init];
+}
+
+- (id)init
+{
+if(threading_state == THREADING_UNKNOWN) {
+threading_state = g_thread_supported() ? THREADING_ENABLED : 
THREADING_DISABLED;
+
+if(threading_state == THREADING_ENABLED) {
+G_LOCK(thread_pool);
+thread_pool = g_hash_table_new_full(g_direct_hash, g_direct_equal, 
NULL,
+
(GDestroyNotify)thread_private_free);
+G_UNLOCK(thread_pool);
+}
+} else {
+/* sanity check */
+if(threading_state != THREADING_DISABLED  g_thread_supported())
+g_critical

[Xfce4-commits] glib-objc:no-foundation-dep WIP: get rid of NS in GOCObject

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to e8299b7a669ae9f65298ee9fd3133ddd2c5ac852 (commit)
   from 33329ae709dc907d02c613a4514f1fc16c41b00f (commit)

commit e8299b7a669ae9f65298ee9fd3133ddd2c5ac852
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Jul 7 03:30:09 2009 -0700

WIP: get rid of NS in GOCObject

 gobject-objc/GOCObject.h |   22 ++--
 gobject-objc/GOCObject.m |  279 +++---
 gobject-objc/Makefile.am |1 +
 3 files changed, 153 insertions(+), 149 deletions(-)

diff --git a/gobject-objc/GOCObject.h b/gobject-objc/GOCObject.h
index add4a8f..c0f7bcf 100644
--- a/gobject-objc/GOCObject.h
+++ b/gobject-objc/GOCObject.h
@@ -17,23 +17,25 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-#ifndef __OBCJ_GLIB_OBJECT_H__
-#define __OBJC_GLIB_OBJECT_H__
+#ifndef __GOC_OBJECT_H__
+#define __GOC_OBJECT_H__
 
 #if !defined(GLIB_OBJC_COMPILATION)  !defined(__IN_GLIB_OBJC_H)
-#error Do not include GLIBObject.h directly, as this file may change or 
disappear in the future.  Include glib-objc/glib-objc.h instead.
+#error Do not include GOCObject.h directly, as this file may change or 
disappear in the future.  Include glib-objc/glib-objc.h instead.
 #endif
 
-#import Foundation/Foundation.h
 #include glib-object.h
 
-...@interface GLIBObject : NSObject
+#import glib-objc/GOCObjectBase.h
+
+typedef struct _GOCObjectPriv  GOCObjectPriv;
+
+...@interface GOCObject : GOCObjectBase
 {
-...@protected
+  @protected
 GObject *_gobject_ptr;
-...@private
-GHashTable *_closures;
-NSMutableDictionary *_user_data;
+  @private
+GOCObjectPriv *priv;
 }
 
 /* used to map a native C GType to an ObjC class */
@@ -193,4 +195,4 @@
 
 @end
 
-#endif  /* __OBJC_GLIB_OBJECT_H__ */
+#endif  /* __GOC_OBJECT_H__ */
diff --git a/gobject-objc/GOCObject.m b/gobject-objc/GOCObject.m
index ff3af7c..1d7d61d 100644
--- a/gobject-objc/GOCObject.m
+++ b/gobject-objc/GOCObject.m
@@ -21,15 +21,22 @@
 #include config.h
 #endif
 
-#import GLIBObject.h
-#import GLIBValue.h
-#import GLIBBoxedValue.h
-#include glib-objc-private.h
-#include ns-object-boxed.h
+#import glib-objc/glib-objc.h
 
-#define GLIB_OBJC_OBJECT_QUARK(glib_objc_object_quark_get())
-#define GLIB_OBJC_TYPE_MAP_QUARK  (glib_objc_type_map_quark_get())
-#define GLIB_OBJC_PROP_ID_QUARK   (glib_objc_prop_id_quark_get())
+#import GOCObject.h
+#import GOCValue.h
+#import GOCBoxedValue.h
+#include gobject-objc-private.h
+#include goc-private.h
+
+#define GOC_OBJECT_QUARK(gobject_objc_object_quark_get())
+#define GOC_TYPE_MAP_QUARK  (gobject_objc_type_map_quark_get())
+#define GOC_PROP_ID_QUARK   (gobject_objc_prop_id_quark_get())
+
+struct _GOCObjectPriv
+{
+GHashTable *closures;
+};
 
 typedef struct
 {
@@ -38,7 +45,7 @@ typedef struct
 guint signal_id;
 GQuark detail;
 BOOL after;
-NSInvocation *invocation;
+NSInvocation *invocation;  /* FIXME: no-ns */
 } ObjCClosure;
 
 typedef struct
@@ -73,47 +80,41 @@ static GHashTable *__objc_class_map = NULL;
 
 
 static GQuark
-glib_objc_object_quark_get()
+gobject_objc_object_quark_get()
 {
-static GQuark __glib_objc_object_quark = 0;
+static GQuark __gobject_objc_object_quark = 0;
 
-if(!__glib_objc_object_quark)
-__glib_objc_object_quark = 
g_quark_from_static_string(--glib-objc-object);
+if(!__gobject_objc_object_quark)
+__gobject_objc_object_quark = 
g_quark_from_static_string(--glib-objc-object);
 
-return __glib_objc_object_quark;
+return __gobject_objc_object_quark;
 }
 
 static GQuark
-glib_objc_type_map_quark_get()
+gobject_objc_type_map_quark_get()
 {
-static GQuark __glib_objc_type_map_quark = 0;
+static GQuark __gobject_objc_type_map_quark = 0;
 
-if(!__glib_objc_type_map_quark)
-__glib_objc_type_map_quark = 
g_quark_from_static_string(--glib-objc-type-map);
+if(!__gobject_objc_type_map_quark)
+__gobject_objc_type_map_quark = 
g_quark_from_static_string(--glib-objc-type-map);
 
-return __glib_objc_type_map_quark;
+return __gobject_objc_type_map_quark;
 }
 
 static GQuark
-glib_objc_prop_id_quark_get()
+gobject_objc_prop_id_quark_get()
 {
-static GQuark __glib_objc_prop_id_quark = 0;
+static GQuark __gobject_objc_prop_id_quark = 0;
 
-if(!__glib_objc_prop_id_quark)
-__glib_objc_prop_id_quark = 
g_quark_from_static_string(--glib-objc-prop-id);
+if(!__gobject_objc_prop_id_quark)
+__gobject_objc_prop_id_quark = 
g_quark_from_static_string(--glib-objc-prop-id);
 
-return __glib_objc_prop_id_quark;
+return __gobject_objc_prop_id_quark;
 }
 
 
-static void
-glib_objc_nsobject_release(NSObject *nsobject)
-{
-[nsobject release];
-}
-
 static GType
-glib_objc_get_custom_type(Class aClass)
+gobject_objc_get_custom_type(Class aClass)
 {
 GType custom_type = 0;
 
@@ -123,8 +124,8 @@ glib_objc_get_custom_type(Class aClass

[Xfce4-commits] glib-objc:no-foundation-dep add GOCClosure... sorta like NSInvocation. untested

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 33329ae709dc907d02c613a4514f1fc16c41b00f (commit)
   from 85cca33b1b3827211dd1d4cbd9fb2ef2f863efac (commit)

commit 33329ae709dc907d02c613a4514f1fc16c41b00f
Author: Brian J. Tarricone br...@tarricone.org
Date:   Fri Jul 10 13:34:46 2009 -0700

add GOCClosure... sorta like NSInvocation.  untested

also add a platform-dependent header in $(libdir) to support this

 .gitignore|2 +
 Makefile.am   |   15 ++
 common/goc-private.h  |   24 +++
 configure.ac.in   |  132 +++--
 gobject-objc/GOCClosure.h |   99 +
 gobject-objc/GOCClosure.m |  502 +
 gobject-objc/Makefile.am  |8 +-
 7 files changed, 763 insertions(+), 19 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2141f62..c4d3d28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,8 +23,10 @@ config.sub
 configure
 configure.ac
 depcomp
+glib-objc-config.h
 install-sh
 libtool
 ltmain.sh
 missing
+stamp-goc-h
 stamp-h1
diff --git a/Makefile.am b/Makefile.am
index 02714f1..a16667b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,3 +3,18 @@ SUBDIRS = \
glib-objc \
gobject-objc \
 tests
+
+archdepdir = $(libdir)/glib-objc-$(GLIB_OBJC_API_VERSION)/include
+archdep_HEADERS = \
+   glib-objc-config.h
+
+BUILT_SOURCES = stamp-goc-h
+glib-objc-config.h: stamp-goc-h
+   @if test -f glib-objc-config.h; then :; \
+   else rm -f stamp-goc-h; $(MAKE) stamp-goc-h; fi
+stamp-goc-h: config.status
+   cd $(top_builddir)  $(SHELL) ./config.status glib-objc-config.h
+   echo timestamp  stamp-goc-h
+
+DISTCLEANFILES = \
+   glib-objc-config.h
diff --git a/common/goc-private.h b/common/goc-private.h
index ba15d56..2afc758 100644
--- a/common/goc-private.h
+++ b/common/goc-private.h
@@ -58,4 +58,28 @@
 return (val); \
 } G_STMT_END
 
+
+#define _goc_collect_varargs(arrayp, countp, first_param, var_args, do_strdup) 
 G_STMT_START{ \
+void *__cur; \
+int __max_params = 6; \
+\
+*(countp) = 0; \
+*(arrayp) = g_malloc(sizeof(void *) * (__max_params + 1)); \
+__cur = (void *)first_param; \
+while(__cur) { \
+if(*(countp) == __max_params) { \
+__max_params *= 2; \
+*(arrayp) = g_realloc(*(arrayp), sizeof(void *) * (__max_params + 
1)); \
+} \
+\
+if(do_strdup) \
+(*(arrayp))[(*(countp))++] = (void *)g_strdup(__cur); \
+else \
+(*(arrayp))[(*(countp))++] = __cur; \
+__cur = va_arg(var_args, void *); \
+} \
+(*(arrayp))[*(countp)] = NULL; \
+}G_STMT_END
+
+
 #endif  /* __GOC_PRIVATE_H__ */
diff --git a/configure.ac.in b/configure.ac.in
index bcf053c..72e3819 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -50,23 +50,89 @@ AC_SUBST(GOC_API_VERSION)
 
 dnl required
 
-PKG_CHECK_MODULES([GLIB], [glib-2.0 = 2.12.0], , [AC_MSG_ERROR([
-*** Glib version 2.12.0 or greater is required.
-*** YOu can download it from http://gtk.org/
-])])
-AC_MSG_CHECKING([GLIB_CFLAGS])
-AC_MSG_RESULT([$GLIB_CFLAGS])
-AC_MSG_CHECKING([GLIB_LIBS])
-AC_MSG_RESULT([$GLIB_LIBS])
-
-PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 = 2.12.0], , [AC_MSG_ERROR([
-*** GObject (a part of the Glib library) version 2.12.0 or greater is required.
-*** You can download it from http://gtk.org/
-])])
-AC_MSG_CHECKING([GOBJECT_CFLAGS])
-AC_MSG_RESULT([$GOBJECT_CFLAGS])
-AC_MSG_CHECKING([GOBJECT_LIBS])
-AC_MSG_RESULT([$GOBJECT_LIBS])
+#
+# BT_CHECK_PACKAGE(VAR, MODULE, MIN_VERSION, [WEBSITE])
+#
+AC_DEFUN([BT_CHECK_PACKAGE],
+[
+PKG_CHECK_MODULES([$1], [$2 = $3], ,
+[
+echo '***' $2 version $3 is required.
+if test x$4 != x; then
+echo '***' You can download it from $4
+fi
+exit 1
+])
+AC_MSG_CHECKING([$1_CFLAGS])
+AC_MSG_RESULT([$$1_CFLAGS])
+AC_MSG_CHECKING([$1_LIBS])
+AC_MSG_RESULT([$$1_LIBS])
+])
+
+BT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0], [http://gtk.org/])
+BT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.12.0], [http://gtk.org/])
+BT_CHECK_PACKAGE([LIBFFI], [libffi], [3.0.0], [http://sourceware.org/libffi])
+
+dnl figure out some semi-custom types
+
+# BT_CHECK_OBJC_SIG(VAR, TYPE_MACRO, FRIENDLY_NAME)
+AC_DEFUN([BT_CHECK_OBJC_SIG],
+[
+AC_LANG_PUSH([Objective C])
+
+AC_MSG_CHECKING([the type signature of $3])
+AC_RUN_IFELSE(
+[AC_LANG_PROGRAM(
+  [
+#include stdio.h
+#if defined(HAVE_OBJC_OBJC_RUNTIME_H)
+# include objc/objc-runtime.h
+#elif defined(HAVE_OBJC_OBJC_API_H)
+# include objc/objc-api.h
+#endif
+  ],
+  [
+FILE *fp = fopen(bt-conftest.out, w);
+if(!fp)
+return 1;
+fprintf(fp, %c\n, $2);
+fclose(fp);
+  ])
+], ,
+[
+AC_MSG_RESULT([failed])
+echo __EOERR
+*** Failed to figure out the type signature of $3.  Your Objective C runtime
+*** may

[Xfce4-commits] glib-objc:no-foundation-dep remove GOCBoxedValue. i think i don't want to expose boxed types

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to d5c7bec9bec6f9b8eade690b3c08d67211def16d (commit)
   from e8299b7a669ae9f65298ee9fd3133ddd2c5ac852 (commit)

commit d5c7bec9bec6f9b8eade690b3c08d67211def16d
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Jul 13 12:34:26 2009 -0700

remove GOCBoxedValue.  i think i don't want to expose boxed types

 gobject-objc/GOCBoxedValue.h |   43 ---
 gobject-objc/GOCBoxedValue.m |   58 --
 gobject-objc/Makefile.am |2 -
 3 files changed, 0 insertions(+), 103 deletions(-)

diff --git a/gobject-objc/GOCBoxedValue.h b/gobject-objc/GOCBoxedValue.h
deleted file mode 100644
index d0e9647..000
--- a/gobject-objc/GOCBoxedValue.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  glib-objc - objective-c bindings for glib/gobject
- *
- *  Copyright (c) 2008-2009 Brian Tarricone br...@tarricone.org
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published
- *  by the Free Software Foundation; version 2 of the License ONLY.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#ifndef __GOC_BOXED_VALUE_H__
-#define __GOC_BOXED_VALUE_H__
-
-#if !defined(GLIB_OBJC_COMPILATION)  !defined(__IN_GOBJECT_OBJC_H)
-#error Do not include GOCBoxedValue.h directly, as this file may change or 
disappear in the future.  Include gobject-objc.h instead.
-#endif
-
-
-...@interface GOCBoxedValue : NSValue
-{
-...@private
-gpointer _boxedValue;
-}
-
-+ (id)valueWithBoxed:(gpointer)boxedValue;
-
-- (id)initWithBoxed:(gpointer)boxedValue;
-
-- (gpointer)boxedValue;
-
-...@end
-
-#endif  /* __GLIB_OBJC_BOXED_VALUE_H__ */
-
diff --git a/gobject-objc/GOCBoxedValue.m b/gobject-objc/GOCBoxedValue.m
deleted file mode 100644
index 9fca143..000
--- a/gobject-objc/GOCBoxedValue.m
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  glib-objc - objective-c bindings for glib/gobject
- *
- *  Copyright (c) 2008-2009 Brian Tarricone br...@tarricone.org
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published
- *  by the Free Software Foundation; version 2 of the License ONLY.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include config.h
-#endif
-
-#include glib.h
-
-#import GLIBBoxedValue.h
-
-...@implementation GLIBBoxedValue
-
-+ (id)valueWithBoxed:(gpointer)boxedValue
-{
-return [[[GLIBBoxedValue alloc] initWithBoxed:boxedValue] autorelease];
-}
-
-- (id)initWithBoxed:(gpointer)boxedValue
-{
-if((self = [super init]))
-_boxedValue = boxedValue;
-
-return self;
-}
-
-- (id)init
-{
-return [self initWithBoxed:nil];
-}
-
-- (gpointer)boxedValue
-{
-return _boxedValue;
-}
-
-- (const char *)objCType
-{
-return @encode(gpointer);
-}
-
-...@end
diff --git a/gobject-objc/Makefile.am b/gobject-objc/Makefile.am
index 6de9855..b8bcc52 100644
--- a/gobject-objc/Makefile.am
+++ b/gobject-objc/Makefile.am
@@ -5,7 +5,6 @@ glibobjcmaininclude_HEADERS = \
gobject-objc.h
 gobjectobjcincludedir = $(glibobjcmainincludedir)/gobject-objc
 gobjectobjcinclude_HEADERS = \
-   GOCBoxedValue.h \
GOCClosure.h \
GOCObject.h \
GOCNumber.h \
@@ -14,7 +13,6 @@ gobjectobjcinclude_HEADERS = \
 libgobject_objc_2_0_la_SOURCES = \
$(gobjectobjcmaininclude_HEADERS) \
$(gobjectobjcinclude_HEADERS) \
-   GOCBoxedValue.m \
GOCClosure.m \
GOCObject.m \
GOCNumber.m \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:no-foundation-dep WIP: string stuff

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/no-foundation-dep
 to 77118dd5d7cfd682cef9ae5c7ff0a2a1fcc39c7a (commit)
   from d5c7bec9bec6f9b8eade690b3c08d67211def16d (commit)

commit 77118dd5d7cfd682cef9ae5c7ff0a2a1fcc39c7a
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Aug 11 03:36:44 2009 -0700

WIP: string stuff

 configure.ac.in  |   37 +++
 glib-objc/{GOCIterable.h = GOCConstantString.h} |   25 +-
 glib-objc/GOCString.h|  103 +++
 glib-objc/GOCString.m|  311 ++
 gobject-objc/GOCObject.m |   44 ++--
 5 files changed, 486 insertions(+), 34 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 72e3819..99e36eb 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -134,6 +134,40 @@ AC_MSG_CHECKING([the type signature of enums])
 GOC_ARGTYPE_ENUM='e'
 AC_MSG_RESULT([$GOC_ARGTYPE_ENUM])
 
+dnl figure out if we can use our own constant string class
+AC_MSG_CHECKING([if $CC supports -fconstant-string-class])
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS=$CPPFLAGS -fconstant-string-class=TestConstantString
+AC_LANG_PUSH([Objective C])
+AC_RUN_IFELSE(
+[AC_LANG_PROGRAM(
+  [
+#import objc/Object.h
+
+@interface TestConstantString : Object
+{
+const char *c_string;
+unsigned int length;
+}
+@end
+  ],
+  [
+TestConstantString *conststr = @this is a test;
+  ])],
+  [
+GOC_CONSTANT_STRING_CLASS=GOCConstantString
+
GOC_CONSTANT_STRING_PCFILE_CFLAGS=-fconstant-string-class=$GOC_CONSTANT_STRING_CLASS
+AC_MSG_RESULT([yes])
+  ],
+  [
+GOC_CONSTANT_STRING_CLASS=NXConstantString
+GOC_CONSTANT_STRING_CPPFLAGS=-DGOCConstantString=NXConstantString
+AC_MSG_RESULT([no])
+  ])
+CPPFLAGS=$saved_CPPFLAGS $GOC_CONSTANT_STRING_CPPFLAGS
+AC_SUBST(GOC_CONSTANT_STRING_PCFILE_CFLAGS)
+AC_SUBST(GOC_CONSTANT_STRING_CLASS)
+
 dnl check for debugging support
 AC_ARG_ENABLE([debug],
   [AC_HELP_STRING([--enable-debug=[full|yes|no]],
@@ -176,6 +210,8 @@ AC_CONFIG_COMMANDS([glib-objc-config.h],
 #define __GOC_ARGTYPE_FLAGS$argtype_flags
 #define __GOC_ARGTYPE_ENUM $argtype_enum
 
+#define GOC_CONSTANT_STRING_CLASS  $const_str_class
+
 #endif  /* __GLIB_OBJC_CONFIG_H__ */
 __EOF
 if cmp -s $outfile glib-objc-config.h; then
@@ -189,6 +225,7 @@ __EOF
 argtype_bool=$GOC_ARGTYPE_BOOL
 argtype_flags=$GOC_ARGTYPE_FLAGS
 argtype_enum=$GOC_ARGTYPE_ENUM
+const_str_class=$GOC_CONSTANT_STRING_CLASS
 ])
 
 AC_OUTPUT([
diff --git a/glib-objc/GOCIterable.h b/glib-objc/GOCConstantString.h
similarity index 79%
copy from glib-objc/GOCIterable.h
copy to glib-objc/GOCConstantString.h
index 5e15e9e..3e3d977 100644
--- a/glib-objc/GOCIterable.h
+++ b/glib-objc/GOCConstantString.h
@@ -17,20 +17,19 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-#ifndef __GOC_ITERABLE_H__
-#define __GOC_ITERABLE_H__
+#ifndef __GOC_CONSTANT_STRING__
+#define __GOC_CONSTANT_STRING__
 
-...@protocol GOCIter
+...@interface GOCConstantString
+{
+Class isa;
+char *c_string;
+unsigned int length;
+}
 
-- (id GOCObject)next;
+- (const char *)cString;
+- (unsigned int)length;
 
-...@end
+...@endif
 
-...@protocol GOCIterable
-
-- (id GOCIter)getIter;
-
-...@end
-
-
-#endif  /* __GOC_ITERABLE_H__ */
+#endif
diff --git a/glib-objc/GOCString.h b/glib-objc/GOCString.h
new file mode 100644
index 000..fcdff60
--- /dev/null
+++ b/glib-objc/GOCString.h
@@ -0,0 +1,103 @@
+/*
+ *  glib-objc - objective-c bindings for glib/gobject
+ *
+ *  Copyright (c) 2009 Brian Tarricone br...@tarricone.org
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser General Public License as published
+ *  by the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifndef __GOC_STRING_H__
+#define __GOC_STRING_H__
+
+
+#include glib.h
+#import glib-objc/GOCObjectBase.h
+
+typedef struct _GOCStringPriv  GOCStringPriv;
+
+...@interface GOCString : GOCObjectBase GOCComparable
+{
+  @private
+GOCStringPriv *gspriv;
+}
+
++ (id)stringWithCString:(const char *)cString
+   encoding:(const char *)encoding;
++ (id)stringWithUTF8String:(const char *)utf8String;
++ (id)stringWithFormat:(const char *)format,...;
++ (id)stringWithString:(GOCString *)aString;
+
+/* this is the designated initializer */
+- (id)initWithCString:(const char

[Xfce4-commits] xfce-git-hooks:master silence debugging printout

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 1ed3b1f9a55fc1facb8d0470293fccb69841c15c (commit)
   from 3a4be28ec739ff8fbd3e2c969777f0454bca5d41 (commit)

commit 1ed3b1f9a55fc1facb8d0470293fccb69841c15c
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Nov 21 19:02:12 2009 -0800

silence debugging printout

 hooks/update-03-send-commit-mails |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hooks/update-03-send-commit-mails 
b/hooks/update-03-send-commit-mails
index 62fe09f..e4df0a6 100755
--- a/hooks/update-03-send-commit-mails
+++ b/hooks/update-03-send-commit-mails
@@ -316,7 +316,7 @@ case $newref_type in
   revs=`git rev-parse --not --all | \
 git rev-list --reverse --stdin $newrev`
 
-  echo revs = $revs
+  # echo revs = $revs
 
   # Send commit mails for these revisions 
   for rev in $revs; do
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce-git-hooks:master hack to allow non-fast-forward merges per-repo (debugging only)

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to b0e25bc40e5730d4cad394e172251dc4d4a7dab0 (commit)
   from 1ed3b1f9a55fc1facb8d0470293fccb69841c15c (commit)

commit b0e25bc40e5730d4cad394e172251dc4d4a7dab0
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Nov 21 19:05:13 2009 -0800

hack to allow non-fast-forward merges per-repo (debugging only)

 hooks/update-01-history-integrity |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hooks/update-01-history-integrity 
b/hooks/update-01-history-integrity
index abea04b..05e8cba 100755
--- a/hooks/update-01-history-integrity
+++ b/hooks/update-01-history-integrity
@@ -14,6 +14,10 @@ fi
 
 is_fast_forward()
 {
+
+  # allow non-fast-forward if the override option is set
+  [ $(git config --get xfce.allow-nonff) = true ]  return 0
+
   old=$(git rev-parse $1 2/dev/null)
   new=$2
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:master add module description file

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 5d668fb41e824ee61dbd3ef9c7bc5a10886c7c14 (commit)
   from 134adf46aff635eedce5c6f5f131c2b0f55268ba (commit)

commit 5d668fb41e824ee61dbd3ef9c7bc5a10886c7c14
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Aug 11 03:37:38 2009 -0700

add module description file

 module.xml |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/module.xml b/module.xml
new file mode 100644
index 000..5e645be
--- /dev/null
+++ b/module.xml
@@ -0,0 +1,18 @@
+?xml version='1.0' encoding='UTF-8'?
+Project xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#;
+ xmlns:rdfs=http://www.w3.org/2000/01/rdf-schema#;
+ xmlns:foaf=http://xmlns.com/foaf/0.1/;
+ xmlns:gnome=http://api.gnome.org/doap-extensions#;
+ xmlns=http://usefulinc.com/ns/doap#;
+
+  name xml:lang=englib-objc/name
+  shortdesc xml:lang=enObjective-C bindings for Glib/GObject 
2.x/shortdesc
+
+  maintainer
+foaf:Person
+  foaf:nameBrian Tarricone/foaf:name
+  foaf:mboxmailto:kel...@xfce.org/foaf:mbox
+  gnome:useridkelnos/gnome:userid
+/foaf:Person
+  /maintainer
+/Project
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:master allow passing flags to aclocal, automake, autoconf

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 134adf46aff635eedce5c6f5f131c2b0f55268ba (commit)
   from 181172f4b868f2ca449e390c5da824b634033122 (commit)

commit 134adf46aff635eedce5c6f5f131c2b0f55268ba
Author: Brian Tarricone br...@tarricone.org
Date:   Sun Jun 28 23:58:27 2009 -0700

allow passing flags to aclocal, automake, autoconf

 autogen.sh |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index d9052e6..fc98cdf 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -24,10 +24,10 @@ fi
 sed s/@REVISION@/$REVISION/g configure.ac.in configure.ac
 
 run_first_found glibtoolize libtoolize --force --copy --automake 
-run_first_found aclocal-1.10 aclocal-1.9 aclocal-1.8 aclocal-1.7 aclocal 
+run_first_found aclocal-1.10 aclocal-1.9 aclocal-1.8 aclocal-1.7 aclocal 
$ACLOCAL_FLAGS 
 run_first_found autoheader-2.61 autoheader-2.60 autoheader-2.59 
autoheader-2.53 autoheader 
-run_first_found automake-1.10 automake-1.9 automake-1.8 automake-1.7 
automake --force-missing --add-missing --copy --gnu 
-run_first_found autoconf-2.61 autoconf-2.60 autoconf-2.59 autoconf-2.32 
autoconf || exit 1
+run_first_found automake-1.10 automake-1.9 automake-1.8 automake-1.7 
automake --force-missing --add-missing --copy --gnu $AM_FLAGS 
+run_first_found autoconf-2.61 autoconf-2.60 autoconf-2.59 autoconf-2.32 
autoconf $AC_FLAGS || exit 1
 
 if test x$NOCONFIGURE = x; then
 CONFIGURE_FLAGS=--enable-maintainer-mode $@
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] glib-objc:master add .gitignore

2009-11-21 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to e98f4f9043edbd976712a42be026d215d32debd6 (commit)
   from 5d668fb41e824ee61dbd3ef9c7bc5a10886c7c14 (commit)

commit e98f4f9043edbd976712a42be026d215d32debd6
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Jul 5 14:41:23 2009 -0700

add .gitignore

 .gitignore |   30 ++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..2141f62
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,30 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+*.pc
+.*.swp
+.*.swo
+*~
+.deps
+.libs
+
+INSTALL
+aclocal.m4
+autom4te.cache
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+configure.ac
+depcomp
+install-sh
+libtool
+ltmain.sh
+missing
+stamp-h1
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Don't allow notifications to be moved.

2009-10-31 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to b538e7e9d773d49b48b4ceff52909ac0e21a2915 (commit)
   from 9884628d26976afe1c676a0d25c107aa48e5c5d3 (commit)

commit b538e7e9d773d49b48b4ceff52909ac0e21a2915
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Mon Oct 26 13:17:03 2009 +0100

Don't allow notifications to be moved.

 xfce4-notifyd/xfce-notify-window.c |   62 +---
 1 files changed, 1 insertions(+), 61 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 3c43dfb..638193f 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -68,12 +68,6 @@ struct _XfceNotifyWindow
 guint fade_id;
 guint op_change_steps;
 gdouble op_change_delta;
-
-gboolean maybe_begin_drag;
-gboolean dragging;
-gint press_start_x;
-gint press_start_y;
-guint32 press_timestamp;
 };
 
 typedef struct
@@ -102,12 +96,8 @@ static gboolean xfce_notify_window_expose(GtkWidget *widget,
   GdkEventExpose *evt);
 static gboolean xfce_notify_window_enter_leave(GtkWidget *widget,
GdkEventCrossing *evt);
-static gboolean xfce_notify_window_button_press(GtkWidget *widget,
-GdkEventButton *evt);
 static gboolean xfce_notify_window_button_release(GtkWidget *widget,
   GdkEventButton *evt);
-static gboolean xfce_notify_window_motion_notify(GtkWidget *widget,
- GdkEventMotion *evt);
 static gboolean xfce_notify_window_configure_event(GtkWidget *widget,
GdkEventConfigure *evt);
 static void xfce_notify_window_style_set(GtkWidget *widget,
@@ -144,9 +134,7 @@ xfce_notify_window_class_init(XfceNotifyWindowClass *klass)
 widget_class-expose_event = xfce_notify_window_expose;
 widget_class-enter_notify_event = xfce_notify_window_enter_leave;
 widget_class-leave_notify_event = xfce_notify_window_enter_leave;
-widget_class-button_press_event = xfce_notify_window_button_press;
 widget_class-button_release_event = xfce_notify_window_button_release;
-widget_class-motion_notify_event = xfce_notify_window_motion_notify;
 widget_class-configure_event = xfce_notify_window_configure_event;
 widget_class-style_set = xfce_notify_window_style_set;
 
@@ -578,11 +566,6 @@ xfce_notify_window_enter_leave(GtkWidget *widget,
 XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(widget);
 
 if(evt-type == GDK_ENTER_NOTIFY) {
-/* after a drag, we don't get a button release, but we do get an
- * enter notify */
-window-maybe_begin_drag = FALSE;
-window-dragging = FALSE;
-
 if(window-expire_timeout) {
 if(window-expire_id) {
 g_source_remove(window-expire_id);
@@ -597,8 +580,7 @@ xfce_notify_window_enter_leave(GtkWidget *widget,
 window-mouse_hover = TRUE;
 gtk_widget_queue_draw(widget);
 } else if(evt-type == GDK_LEAVE_NOTIFY
-   evt-detail != GDK_NOTIFY_INFERIOR
-   !window-dragging)
+   evt-detail != GDK_NOTIFY_INFERIOR)
 {
 xfce_notify_window_start_expiration(window);
 window-mouse_hover = FALSE;
@@ -609,26 +591,6 @@ xfce_notify_window_enter_leave(GtkWidget *widget,
 }
 
 static gboolean
-xfce_notify_window_button_press(GtkWidget *widget,
-GdkEventButton *evt)
-{
-XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(widget);
-
-if(GDK_BUTTON_PRESS == evt-type  1 == evt-button) {
-window-maybe_begin_drag = TRUE;
-window-dragging = FALSE;
-window-press_start_x = evt-x_root;
-window-press_start_y = evt-y_root;
-window-press_timestamp = evt-time;
-} else {
-window-maybe_begin_drag = FALSE;
-window-dragging = FALSE;
-}
-
-return FALSE;
-}
-
-static gboolean
 xfce_notify_window_button_release(GtkWidget *widget,
   GdkEventButton *evt)
 {
@@ -648,28 +610,6 @@ xfce_notify_window_button_release(GtkWidget *widget,
 }
 
 static gboolean
-xfce_notify_window_motion_notify(GtkWidget *widget,
- GdkEventMotion *evt)
-{
-XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(widget);
-
-if(window-maybe_begin_drag) {
-if(gtk_drag_check_threshold(widget, window-press_start_x,
-window-press_start_y,
-evt-x_root, evt-y_root))
-{
-window-dragging = TRUE;
-gtk_window_begin_move_drag(GTK_WINDOW(widget), 1,
-   window-press_start_x,
-   window-press_start_y,
-   window-press_timestamp);
-}
-}
-
-  

[Xfce4-commits] xfce4-notifyd:master relayout the notification window and move close circle to top right

2009-10-31 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 29954e68952a0a5550f467e88480453afa6bbbfe (commit)
   from b538e7e9d773d49b48b4ceff52909ac0e21a2915 (commit)

commit 29954e68952a0a5550f467e88480453afa6bbbfe
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 31 02:03:09 2009 -0700

relayout the notification window and move close circle to top right

 xfce4-notifyd/xfce-notify-window.c |   66 ++--
 1 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 638193f..7db67d4 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -42,7 +42,7 @@
 #define FADE_CHANGE_TIMEOUT  50 
 #define DEFAULT_RADIUS   10.0
 #define DEFAULT_BORDER_WIDTH  2.0
-#define BORDER8
+#define BORDER6
 
 struct _XfceNotifyWindow
 {
@@ -58,6 +58,7 @@ struct _XfceNotifyWindow
 gboolean fade_transparent;
 gdouble normal_opacity;
 
+GtkWidget *icon_box;
 GtkWidget *icon;
 GtkWidget *summary;
 GtkWidget *body;
@@ -191,7 +192,8 @@ static void
 xfce_notify_window_init(XfceNotifyWindow *window)
 {
 GdkScreen *screen;
-GtkWidget *topvbox, *vbox, *hbox, *spacer;
+GtkWidget *tophbox, *align, *vbox;
+gdouble border_radius = DEFAULT_RADIUS;
 
 GTK_WINDOW(window)-type = GTK_WINDOW_TOPLEVEL;
 window-expire_timeout = DEFAULT_EXPIRE_TIMEOUT;
@@ -207,12 +209,12 @@ xfce_notify_window_init(XfceNotifyWindow *window)
 gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
 gtk_window_set_type_hint(GTK_WINDOW(window),
  GDK_WINDOW_TYPE_HINT_NOTIFICATION);
-gtk_container_set_border_width(GTK_CONTAINER(window), BORDER);
+gtk_container_set_border_width(GTK_CONTAINER(window), 0);
 gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE);
 gtk_widget_add_events(GTK_WIDGET(window),
   GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
   | GDK_POINTER_MOTION_MASK);
-
+
 screen = gtk_widget_get_screen(GTK_WIDGET(window));
 if(gdk_screen_is_composited(screen)) {
 GdkColormap *cmap = gdk_screen_get_rgba_colormap(screen);
@@ -220,34 +222,32 @@ xfce_notify_window_init(XfceNotifyWindow *window)
 gtk_widget_set_colormap(GTK_WIDGET(window), cmap);
 }
 
-topvbox = gtk_vbox_new(FALSE, BORDER);
-gtk_widget_show(topvbox);
-gtk_container_add(GTK_CONTAINER(window), topvbox);
-
-spacer = gtk_alignment_new(0.0, 0.0, 0.0, 0.0);
-gtk_widget_set_size_request(spacer, -1, 20 - BORDER * 2);
-gtk_widget_show(spacer);
-gtk_box_pack_start(GTK_BOX(topvbox), spacer, FALSE, FALSE, 0);
+gtk_widget_ensure_style(GTK_WIDGET(window));
+gtk_widget_style_get(GTK_WIDGET(window),
+ border-radius, border_radius,
+ NULL);
 
-hbox = gtk_hbox_new(FALSE, BORDER);
-gtk_widget_show(hbox);
-gtk_box_pack_start(GTK_BOX(topvbox), hbox, TRUE, TRUE, 0);
+tophbox = gtk_hbox_new(FALSE, BORDER);
+gtk_container_set_border_width(GTK_CONTAINER(tophbox), border_radius + 4);
+gtk_widget_show(tophbox);
+gtk_container_add(GTK_CONTAINER(window), tophbox);
 
-spacer = gtk_alignment_new(0.0, 0.0, 0.0, 0.0);
-gtk_widget_set_size_request(spacer, 20 - BORDER * 2, -1);
-gtk_widget_show(spacer);
-gtk_box_pack_start(GTK_BOX(hbox), spacer, FALSE, FALSE, 0);
+window-icon_box = align = gtk_alignment_new(0.0, 0.0, 0.0, 0.0);
+gtk_container_set_border_width(GTK_CONTAINER(align), 0);
+gtk_box_pack_start(GTK_BOX(tophbox), align, FALSE, TRUE, 0);
 
 window-icon = gtk_image_new();
-gtk_box_pack_start(GTK_BOX(hbox), window-icon, FALSE, FALSE, 0);
+gtk_widget_show(window-icon);
+gtk_container_add(GTK_CONTAINER(align), window-icon);
 
 vbox = gtk_vbox_new(FALSE, BORDER);
+gtk_container_set_border_width(GTK_CONTAINER(vbox), 0);
 gtk_widget_show(vbox);
-gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
+gtk_box_pack_start(GTK_BOX(tophbox), vbox, TRUE, TRUE, 0);
 
 window-summary = gtk_label_new(NULL);
 gtk_label_set_line_wrap(GTK_LABEL(window-summary), TRUE);
-gtk_misc_set_alignment(GTK_MISC(window-summary), 0.0, 0.5);
+gtk_misc_set_alignment(GTK_MISC(window-summary), 0.0, 0.0);
 gtk_box_pack_start(GTK_BOX(vbox), window-summary, FALSE, FALSE, 0);
 
 #ifdef HAVE_LIBSEXY
@@ -256,7 +256,7 @@ xfce_notify_window_init(XfceNotifyWindow *window)
 window-body = gtk_label_new(NULL);
 #endif
 gtk_label_set_line_wrap(GTK_LABEL(window-body), TRUE);
-gtk_misc_set_alignment(GTK_MISC(window-body), 0.0, 0.5);
+gtk_misc_set_alignment(GTK_MISC(window-body), 0.0, 0.0);
 gtk_box_pack_start(GTK_BOX(vbox), window-body, TRUE, TRUE, 0);
 #ifdef HAVE_LIBSEXY
 g_signal_connect(G_OBJECT(window-body), url-activated,
@@ -268,7 +268,7

[Xfce4-commits] xfce4-notifyd:master implement x-canonical-private-icon-only

2009-10-31 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to f756d429ce3737874b9e8eb32791520cce871320 (commit)
   from 29954e68952a0a5550f467e88480453afa6bbbfe (commit)

commit f756d429ce3737874b9e8eb32791520cce871320
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 31 02:17:51 2009 -0700

implement x-canonical-private-icon-only

this is a special layout by canonical that shows just the icon, centered
in the notification.  we add extra pading to the left and right to make
the notification more visible.

 xfce4-notifyd/xfce-notify-daemon.c |8 ++-
 xfce4-notifyd/xfce-notify-window.c |   43 +--
 xfce4-notifyd/xfce-notify-window.h |3 ++
 3 files changed, 50 insertions(+), 4 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-daemon.c 
b/xfce4-notifyd/xfce-notify-daemon.c
index 5be3b1a..749865c 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -276,7 +276,7 @@ notify_get_capabilities(XfceNotifyDaemon *xndaemon,
 {
 gint i = 0;
 
-*OUT_capabilities = g_new(gchar *, 6);
+*OUT_capabilities = g_new(gchar *, 7);
 (*OUT_capabilities)[i++] = g_strdup(actions);
 (*OUT_capabilities)[i++] = g_strdup(body);
 (*OUT_capabilities)[i++] = g_strdup(body-markup);
@@ -284,6 +284,7 @@ notify_get_capabilities(XfceNotifyDaemon *xndaemon,
 (*OUT_capabilities)[i++] = g_strdup(body-hyperlinks);
 #endif
 (*OUT_capabilities)[i++] = g_strdup(icon-static);
+(*OUT_capabilities)[i++] = g_strdup(x-canonical-private-icon-only);
 (*OUT_capabilities)[i++] = NULL;
 
 return TRUE;
@@ -398,6 +399,11 @@ notify_notify(XfceNotifyDaemon *xndaemon,
 }
 }
 
+if(g_hash_table_lookup(hints, x-canonical-private-icon-only))
+xfce_notify_window_set_icon_only(window, TRUE);
+else
+xfce_notify_window_set_icon_only(window, FALSE);
+
 gtk_widget_realize(GTK_WIDGET(window));
 xfce_notify_daemon_window_size_allocate(GTK_WIDGET(window),
 GTK_WIDGET(window)-allocation,
diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 7db67d4..f235442 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -55,11 +55,14 @@ struct _XfceNotifyWindow
 cairo_path_t *close_btn_path;
 GdkRegion *close_btn_region;
 
-gboolean fade_transparent;
 gdouble normal_opacity;
 
+guint32 fade_transparent:1,
+icon_only:1;
+
 GtkWidget *icon_box;
 GtkWidget *icon;
+GtkWidget *content_box;
 GtkWidget *summary;
 GtkWidget *body;
 GtkWidget *button_box;
@@ -240,7 +243,7 @@ xfce_notify_window_init(XfceNotifyWindow *window)
 gtk_widget_show(window-icon);
 gtk_container_add(GTK_CONTAINER(align), window-icon);
 
-vbox = gtk_vbox_new(FALSE, BORDER);
+window-content_box = vbox = gtk_vbox_new(FALSE, BORDER);
 gtk_container_set_border_width(GTK_CONTAINER(vbox), 0);
 gtk_widget_show(vbox);
 gtk_box_pack_start(GTK_BOX(tophbox), vbox, TRUE, TRUE, 0);
@@ -1187,7 +1190,7 @@ xfce_notify_window_set_fade_transparent(XfceNotifyWindow 
*window,
 if(fade_transparent == window-fade_transparent)
 return;
 
-window-fade_transparent = fade_transparent;
+window-fade_transparent = !!fade_transparent;
 
 /* if we're already realized, we don't actually do anything here */
 }
@@ -1226,6 +1229,40 @@ xfce_notify_window_get_opacity(XfceNotifyWindow *window)
 }
 
 void
+xfce_notify_window_set_icon_only(XfceNotifyWindow *window,
+ gboolean icon_only)
+{
+g_return_if_fail(XFCE_IS_NOTIFY_WINDOW(window));
+
+if(icon_only == window-icon_only)
+return;
+
+window-icon_only = !!icon_only;
+
+if(icon_only) {
+GtkRequisition req;
+
+if(!GTK_WIDGET_VISIBLE(window-icon_box)) {
+g_warning(Attempt to set icon-only mode with no icon);
+return;
+}
+
+gtk_widget_hide(window-content_box);
+
+/* set a wider size on the icon box so it takes up more space */
+gtk_widget_realize(window-icon);
+gtk_widget_size_request(window-icon, req);
+gtk_widget_set_size_request(window-icon_box, req.width * 4, -1);
+/* and center it */
+gtk_alignment_set(GTK_ALIGNMENT(window-icon_box), 0.5, 0.0, 0.0, 0.0);
+} else {
+gtk_alignment_set(GTK_ALIGNMENT(window-icon_box), 0.0, 0.0, 0.0, 0.0);
+gtk_widget_set_size_request(window-icon_box, -1, -1);
+gtk_widget_show(window-content_box);
+}
+}
+
+void
 xfce_notify_window_closed(XfceNotifyWindow *window,
   XfceNotifyCloseReason reason)
 {
diff --git a/xfce4-notifyd/xfce-notify-window.h 
b/xfce4-notifyd/xfce-notify-window.h
index 562906d..f0fad4d 100644
--- a/xfce4-notifyd/xfce-notify-window.h
+++ b/xfce4-notifyd/xfce-notify-window.h
@@ -77,6 +77,9 @@ void xfce_notify_window_set_opacity

[Xfce4-commits] xfce4-notifyd:master update news and todo

2009-10-31 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 63a67a1aa3c97470fb416f7391932f541336168a (commit)
   from 5857f821ba4b0c1ea03ec11b7494c8e42af54aeb (commit)

commit 63a67a1aa3c97470fb416f7391932f541336168a
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 31 03:19:03 2009 -0700

update news and todo

 NEWS |   11 +++
 TODO |2 --
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 1241651..8fd8294 100644
--- a/NEWS
+++ b/NEWS
@@ -14,10 +14,21 @@ Version 0.1.0git:
   to configure.
 * Add summary-bold style property to allow themes to set the
   summary field of the notification bold (bug 5773).
+* Add the spec_version parameter to the GetServerInformation method.
+  This behavior can be disabled by passing the
+  --enable-old-get-server-information-signature flag to
+  configure (bug 5602).
+* Make notifications unmovable (Jérôme Guelfucci, bug 5248).
+* Implement support for icon-only notifications (Canonical
+  extension).
+* Implement support for gauge notifications (Canonical extension).
 
   Bugfixes:
+* Use correct COPYING file (GPLv2, not GPLv3).
 * Fix ugliness with rounded corners on windows sometimes, both with
   compositing enabled and disabled.
+* Check for exo-csource at configure time when needed (bug 5783).
+* Check for dbus-binding-tool at configure time.
 
 
 Version 0.1.0 (24 Nov 2008):
diff --git a/TODO b/TODO
index e4a56d2..f7cd7c7 100644
--- a/TODO
+++ b/TODO
@@ -7,8 +7,6 @@
 * window shadow?  would rather the compositor just do this, need to figure out
   why xfwm4 won't -- olivier says shaped windows never get shadows
 * make more parts of the notification themable
-* support desktop_id hint?
 * find a way to completely ditch the old theme when switching to a new one --
   implemented workaround: kill daemon on theme change
 * prelight fill for close button circle?
-* save notification position after drag
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master minor cleanups

2009-10-31 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 4ee827f8b1b386b0d286bcfbc5b29f66c017c374 (commit)
   from 0e96c46360e4b94b0930519c31d4f7c1ba26c54f (commit)

commit 4ee827f8b1b386b0d286bcfbc5b29f66c017c374
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 31 15:19:30 2009 -0700

minor cleanups

 xfce4-notifyd/xfce-notify-daemon.c |   14 ++
 xfce4-notifyd/xfce-notify-window.c |4 ++--
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-daemon.c 
b/xfce4-notifyd/xfce-notify-daemon.c
index 8735409..1d833c1 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -370,7 +370,7 @@ xfce_gdk_rectangle_largest_box(GdkRectangle *src1, 
GdkRectangle *src2, GdkRectan
 }
 }
 
-inline static void
+static inline void
 translate_origin(GdkRectangle *src1, gint xoffset, gint yoffset)
 {
 src1-x += xoffset;
@@ -401,13 +401,9 @@ xfce_notify_daemon_get_workarea(GdkScreen *screen,
 for(l = g_list_first(windows_list); l != NULL; l = g_list_next(l)) {
 GdkWindow *window = l-data;
 
-DBG(Test if it's a dock);
-
 if(gdk_window_get_type_hint(window) == GDK_WINDOW_TYPE_HINT_DOCK) {
 GdkRectangle window_geom, intersection;
 
-DBG(It's a dock);
-
 gdk_window_get_frame_extents(window, window_geom);
 
 if(gdk_rectangle_intersect(workarea, window_geom, intersection)){
@@ -438,7 +434,7 @@ xfce_notify_daemon_window_size_allocate(GtkWidget *widget,
 XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(widget);
 GdkScreen *screen = NULL;
 gint x, y, monitor, screen_n, max_width;
-GdkRectangle geom, initial, workarea, widget_geom;
+GdkRectangle *geom_tmp, geom, initial, workarea, widget_geom;
 GList *list;
 gboolean found = FALSE;
 
@@ -449,8 +445,10 @@ xfce_notify_daemon_window_size_allocate(GtkWidget *widget,
 workarea.width = 0;
 workarea.height = 0;
 
-/* Notification has already been placed previously. Not sure if that can 
happen. */
-if(xfce_notify_window_get_geometry(window)) {
+geom_tmp = xfce_notify_window_get_geometry(window);
+if(geom_tmp-width != 0  geom_tmp-height != 0) {
+/* Notification has already been placed previously. Not sure if that
+ * can happen. */
 GList *old_list;
 
 screen_n = xfce_notify_window_get_last_screen(window);
diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 5cf32ac..f25b1d3 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -1040,8 +1040,8 @@ xfce_notify_window_set_geometry(XfceNotifyWindow *window,
 window-geometry = rectangle;
 }
 
-GdkRectangle
-*xfce_notify_window_get_geometry (XfceNotifyWindow *window)
+GdkRectangle *
+xfce_notify_window_get_geometry (XfceNotifyWindow *window)
 {
return window-geometry;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Implement smart notification placement.

2009-10-31 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 0e96c46360e4b94b0930519c31d4f7c1ba26c54f (commit)
   from 63a67a1aa3c97470fb416f7391932f541336168a (commit)

commit 0e96c46360e4b94b0930519c31d4f7c1ba26c54f
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Oct 31 09:17:33 2009 +0100

Implement smart notification placement.

 xfce4-notifyd/xfce-notify-daemon.c |  452 ++--
 xfce4-notifyd/xfce-notify-window.c |   50 -
 xfce4-notifyd/xfce-notify-window.h |   15 ++-
 3 files changed, 492 insertions(+), 25 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-daemon.c 
b/xfce4-notifyd/xfce-notify-daemon.c
index a7f99b1..8735409 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -1,7 +1,11 @@
 /*
  *  xfce4-notifyd
  *
- *  Copyright (c) 2008 Brian Tarricone bj...@cornell.edu
+ *  Copyright (c) 2008-2009 Brian Tarricone bj...@cornell.edu
+ *  Copyright (c) 2009 Jérôme Guelfucci jero...@xfce.org
+ *
+ *  The workarea per monitor code is taken from
+ *  
http://trac.galago-project.org/attachment/ticket/5/10-nd-improve-multihead-support.patch
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -36,6 +40,9 @@
 #include xfce-notify-window.h
 #include xfce-notify-marshal.h
 
+#define SPACE 16
+#define XND_N_MONITORS xfce_notify_daemon_get_n_monitors_quark()
+
 struct _XfceNotifyDaemon
 {
 GObject parent;
@@ -49,6 +56,9 @@ struct _XfceNotifyDaemon
 XfconfChannel *settings;
 
 GTree *active_notifications;
+GList ***reserved_rectangles;
+
+gint changed_screen;
 
 guint32 last_notification_id;
 };
@@ -72,8 +82,21 @@ enum
 URGENCY_CRITICAL,
 };
 
+static void xfce_notify_daemon_screen_changed(GdkScreen *screen,
+  gpointer userdata);
+static void xfce_notify_daemon_update_reserved_rectangles(gpointer key,
+  gpointer value,
+  gpointer data);
 static void xfce_notify_daemon_finalize(GObject *obj);
 
+static GQuark xfce_notify_daemon_get_n_monitors_quark(void);
+
+static void xfce_gdk_rectangle_largest_box(GdkRectangle *src1,
+   GdkRectangle *src2,
+   GdkRectangle *dest);
+static gboolean xfce_notify_daemon_get_workarea(GdkScreen *screen,
+guint monitor,
+GdkRectangle *rect);
 static gboolean notify_get_capabilities(XfceNotifyDaemon *xndaemon,
 gchar ***OUT_capabilities,
 GError *error);
@@ -159,12 +182,67 @@ xfce_direct_compare(gconstpointer a,
 return (gint)((gchar *)a - (gchar *)b);
 }
 
+static GQuark
+xfce_notify_daemon_get_n_monitors_quark(void)
+{
+static GQuark quark = 0;
+
+if(!quark)
+quark = g_quark_from_static_string(xnd-n-monitors);
+
+return quark;
+}
+
+static void
+xfce_notify_daemon_screen_changed(GdkScreen *screen, gpointer userdata)
+{
+XfceNotifyDaemon *xndaemon = XFCE_NOTIFY_DAEMON(userdata);
+gint j;
+gint new_nmonitor = gdk_screen_get_n_monitors(screen);
+gint screen_number = gdk_screen_get_number(screen);
+gint old_nmonitor = GPOINTER_TO_INT(g_object_get_qdata(G_OBJECT(screen), 
XND_N_MONITORS));
+
+/* Set the new number of monitors */
+g_object_set_qdata(G_OBJECT(screen), XND_N_MONITORS, 
GINT_TO_POINTER(new_nmonitor));
+
+/* Free the current reserved rectangles on screen */
+for(j = 0; j  old_nmonitor; j++)
+g_list_free(xndaemon-reserved_rectangles[screen_number][j]);
+
+g_free(xndaemon-reserved_rectangles[screen_number]);
+
+/* Initialize a new reserved rectangles array for screen */
+xndaemon-reserved_rectangles[screen_number] = g_new0(GList *, 
new_nmonitor);
+xndaemon-changed_screen = screen_number;
+
+/* Traverse the active notifications tree to fill the new reserved 
rectangles array for screen */
+g_tree_foreach(xndaemon-active_notifications,
+   
(GTraverseFunc)xfce_notify_daemon_update_reserved_rectangles,
+   xndaemon);
+}
+
 static void
 xfce_notify_daemon_init(XfceNotifyDaemon *xndaemon)
 {
+gint nscreen = gdk_display_get_n_screens(gdk_display_get_default());
+gint i;
+
 xndaemon-active_notifications = g_tree_new_full(xfce_direct_compare,
NULL, NULL,

(GDestroyNotify)gtk_widget_destroy);
+xndaemon-reserved_rectangles = g_new(GList **, nscreen);
+
+for(i = 0; i  nscreen; ++i) {
+GdkScreen *screen = gdk_display_get_screen(gdk_display_get_default(), 
i);
+gint nmonitor = gdk_screen_get_n_monitors(screen);
+
+  

[Xfce4-commits] xfce4-notifyd:master update news and todo again

2009-10-31 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 97c2823e99a9dcfd3d5bdaa38136ef5a59ebdbad (commit)
   from 4ee827f8b1b386b0d286bcfbc5b29f66c017c374 (commit)

commit 97c2823e99a9dcfd3d5bdaa38136ef5a59ebdbad
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 31 15:25:18 2009 -0700

update news and todo again

 NEWS |4 
 TODO |4 
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index 8fd8294..e73fef4 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,10 @@ Version 0.1.0git:
 * Implement support for icon-only notifications (Canonical
   extension).
 * Implement support for gauge notifications (Canonical extension).
+* Added proper placement of notifications so they don't overlap when
+  there are multiple on the screen.  This also uses a custom workarea
+  calculation to avoid placing notifications where docked windows have
+  set struts (Jérôme Guelfucci, bug 5248).
 
   Bugfixes:
 * Use correct COPYING file (GPLv2, not GPLv3).
diff --git a/TODO b/TODO
index f7cd7c7..341503e 100644
--- a/TODO
+++ b/TODO
@@ -1,9 +1,5 @@
 * listen to client when they request a position to 'point to', maybe have a
   little arrow thingy point off the notification window
-* set default positions based off _NET_WORKAREA
-* don't overlap notifications when more than one is on the screen
-* more default positions -- center, top center, bottom center, left center,
-  right center
 * window shadow?  would rather the compositor just do this, need to figure out
   why xfwm4 won't -- olivier says shaped windows never get shadows
 * make more parts of the notification themable
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master coding style fixes

2009-10-31 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 166a0bd642cc9916093d83037e5603c9a580 (commit)
   from 97c2823e99a9dcfd3d5bdaa38136ef5a59ebdbad (commit)

commit 166a0bd642cc9916093d83037e5603c9a580
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 31 15:29:51 2009 -0700

coding style fixes

 xfce4-notifyd/xfce-notify-daemon.c |   15 ++-
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-daemon.c 
b/xfce4-notifyd/xfce-notify-daemon.c
index 1d833c1..47970b5 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -83,7 +83,7 @@ enum
 };
 
 static void xfce_notify_daemon_screen_changed(GdkScreen *screen,
-  gpointer userdata);
+  gpointer user_data);
 static void xfce_notify_daemon_update_reserved_rectangles(gpointer key,
   gpointer value,
   gpointer data);
@@ -194,9 +194,10 @@ xfce_notify_daemon_get_n_monitors_quark(void)
 }
 
 static void
-xfce_notify_daemon_screen_changed(GdkScreen *screen, gpointer userdata)
+xfce_notify_daemon_screen_changed(GdkScreen *screen,
+  gpointer user_data)
 {
-XfceNotifyDaemon *xndaemon = XFCE_NOTIFY_DAEMON(userdata);
+XfceNotifyDaemon *xndaemon = XFCE_NOTIFY_DAEMON(user_data);
 gint j;
 gint new_nmonitor = gdk_screen_get_n_monitors(screen);
 gint screen_number = gdk_screen_get_number(screen);
@@ -330,7 +331,9 @@ xfce_notify_daemon_window_closed(XfceNotifyWindow *window,
 
 /* Gets the largest rectangle in src1 which does not contain src2. */
 static void
-xfce_gdk_rectangle_largest_box(GdkRectangle *src1, GdkRectangle *src2, 
GdkRectangle *dest)
+xfce_gdk_rectangle_largest_box(GdkRectangle *src1,
+   GdkRectangle *src2,
+   GdkRectangle *dest)
 {
 gint top = MAX(src2-y, src1-y);
 gint left = MAX(src2-x, src1-x);
@@ -371,7 +374,9 @@ xfce_gdk_rectangle_largest_box(GdkRectangle *src1, 
GdkRectangle *src2, GdkRectan
 }
 
 static inline void
-translate_origin(GdkRectangle *src1, gint xoffset, gint yoffset)
+translate_origin(GdkRectangle *src1,
+ gint xoffset,
+ gint yoffset)
 {
 src1-x += xoffset;
 src1-y += yoffset;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce-git-hooks:master include a utf-8 content-type header

2009-10-31 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to d424099dc1121ca88950cc7fb362d84869425207 (commit)
   from 5c3130cf469e2cd78677682622bbf5c89c457261 (commit)

commit d424099dc1121ca88950cc7fb362d84869425207
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 31 16:33:21 2009 -0700

include a utf-8 content-type header

 hooks/update-03-send-commit-mails |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hooks/update-03-send-commit-mails 
b/hooks/update-03-send-commit-mails
index 7ecfce2..62fe09f 100755
--- a/hooks/update-03-send-commit-mails
+++ b/hooks/update-03-send-commit-mails
@@ -184,6 +184,7 @@ generate_mail()
 From: $committer
 To: $mailinglist
 Subject: $subject
+Content-Type: text/plain; charset=utf-8
 EOF
 [[ $replyto ]]  echo Reply-To: $replyto
 echo
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master add configure check for dbus-binding-tool

2009-10-29 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 9884628d26976afe1c676a0d25c107aa48e5c5d3 (commit)
   from faeda9c473b612d0ad879e15f304673b595dc4fc (commit)

commit 9884628d26976afe1c676a0d25c107aa48e5c5d3
Author: Brian J. Tarricone br...@tarricone.org
Date:   Wed Oct 28 22:52:56 2009 -0700

add configure check for dbus-binding-tool

 Makefile.am |4 ++--
 configure.ac.in |7 +++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e835800..7310806 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -156,10 +156,10 @@ DISTCLEANFILES = \
 xfce4-notifyd/notify-dbus.h: $(srcdir)/xfce4-notifyd/notify-dbus.xml Makefile
 if USE_OLD_GET_SERVER_INFORMATION_SIGNATURE
sed -e 's,arg direction=out name=spec_version type=s/,,' $  
$(F).tmp
-   dbus-binding-tool --mode=glib-server --prefix=notify $(F).tmp  $@
+   $(DBUS_BINDING_TOOL) --mode=glib-server --prefix=notify $(F).tmp  $@
rm -f $(F).tmp
 else
-   dbus-binding-tool --mode=glib-server --prefix=notify $  $@
+   $(DBUS_BINDING_TOOL) --mode=glib-server --prefix=notify $  $@
 endif
 
 if MAINTAINER_MODE
diff --git a/configure.ac.in b/configure.ac.in
index 255ea2a..6058490 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -60,6 +60,13 @@ XDT_CHECK_OPTIONAL_PACKAGE([LIBSEXY], [libsexy], [0.1.6], 
[libsexy],
[libsexy support (for clickable URLs) 
(default=yes)],
[yes])
 
+AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool])
+AS_IF([test -z $DBUS_BINDING_TOOL],
+[
+  echo '*** The program dbus-binding-tool is required to build.'
+  exit 1
+])
+
 AS_IF([test x$USE_MAINTAINER_MODE = xyes],
 [
   AC_PATH_PROG([EXO_CSOURCE], [exo-csource])
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master add spec_version OUT arg to GetServerInformation (bug 5602)

2009-10-29 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to faeda9c473b612d0ad879e15f304673b595dc4fc (commit)
   from 10ee27ea551da22de71321155c6a897d44692a07 (commit)

commit faeda9c473b612d0ad879e15f304673b595dc4fc
Author: Brian J. Tarricone br...@tarricone.org
Date:   Wed Oct 28 22:46:33 2009 -0700

add spec_version OUT arg to GetServerInformation (bug 5602)

also add configure switch to bring back the old behavior

 Makefile.am|   22 --
 configure.ac.in|   22 --
 xfce4-notifyd/notify-dbus.xml  |1 +
 xfce4-notifyd/xfce-notify-daemon.c |9 +
 4 files changed, 46 insertions(+), 8 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 590be4d..e835800 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -101,10 +101,15 @@ dist_smoketheme_DATA = themes/Smoke/gtkrc
 zomgponiesthemedir = $(theme_dir)/ZOMG-PONIES!/xfce-notify-4.0
 dist_zomgponiestheme_DATA = themes/ZOMG-PONIES!/gtkrc
 
+built_xfce4_notifyd = \
+   xfce4-notifyd/notify-dbus.h
+
+clean_xfce4_notifyd = \
+   $(built_xfce4_notifyd)
+
 if MAINTAINER_MODE
 
-built_xfce4_notifyd = \
-   xfce4-notifyd/notify-dbus.h \
+built_xfce4_notifyd += \
xfce4-notifyd/xfce-notify-marshal.c \
xfce4-notifyd/xfce-notify-marshal.h \
xfce4-notifyd/xfce-notify-enum-types.c \
@@ -113,8 +118,7 @@ built_xfce4_notifyd = \
 built_xfce4_notifyd_config = \
xfce4-notifyd-config/xfce4-notifyd-config.glade.h
 
-clean_xfce4_notifyd = \
-   $(built_xfce4_notifyd) \
+clean_xfce4_notifyd += \
xfce4-notifyd/stamp-xfce-notify-enum-types.h \
xfce4-notifyd/stamp-xfce-notify-marshal.h
 
@@ -149,10 +153,16 @@ DISTCLEANFILES = \
$(distclean_intltool) \
$(distclean_service)
 
-if MAINTAINER_MODE
-
 xfce4-notifyd/notify-dbus.h: $(srcdir)/xfce4-notifyd/notify-dbus.xml Makefile
+if USE_OLD_GET_SERVER_INFORMATION_SIGNATURE
+   sed -e 's,arg direction=out name=spec_version type=s/,,' $  
$(F).tmp
+   dbus-binding-tool --mode=glib-server --prefix=notify $(F).tmp  $@
+   rm -f $(F).tmp
+else
dbus-binding-tool --mode=glib-server --prefix=notify $  $@
+endif
+
+if MAINTAINER_MODE
 
 xfce4-notifyd/xfce-notify-marshal.h: xfce4-notifyd/stamp-xfce-notify-marshal.h
@true
diff --git a/configure.ac.in b/configure.ac.in
index f490f14..255ea2a 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -13,6 +13,8 @@ m4_define([xfce4_notifyd_version_build], [...@revision@])
 m4_define([xfce4_notifyd_version_tag], [git])
 m4_define([xfce4_notifyd_version], 
[xfce4_notifyd_version_major().xfce4_notifyd_version_minor().xfce4_notifyd_version_micro()ifelse(xfce4_notifyd_version_tag(),
 [git], [xfce4_notifyd_version_tag()-xfce4_notifyd_version_build()], 
[xfce4_notifyd_version_tag()])])
 
+m4_define([notifications_spec_version], [0.9])
+
 dnl init autoconf
 AC_INIT([xfce4-notifyd], [xfce4_notifyd_version],
 [http://bugzilla.xfce.org/enter_bug.cgi?product=Xfce4-notifyd],
@@ -69,14 +71,30 @@ AS_IF([test x$USE_MAINTAINER_MODE = xyes],
   ])
 ])
 
+dnl legacy support
 AC_ARG_ENABLE([old-notification-closed-signature],
   [AS_HELP_STRING([--enable-old-notification-closed-signature],
   [Use the old NotificationClosed signal signature 
that leaves out the 'reason' parameter.  You want to enable this if your system 
has libnotify 0.4.4 or earlier.])],
-  [use_old_sig=$enableval], [use_old_sig=no])
-AS_IF([test x$use_old_sig = xyes],
+  [use_old_nc_sig=$enableval], [use_old_nc_sig=no])
+AS_IF([test x$use_old_nc_sig = xyes],
   [AC_DEFINE([USE_OLD_NOTIFICATION_CHANGED_SIGNATURE], [1],
  [Set if we should use the old NotificationClosed signal 
signature])])
 
+dnl legacy support
+AC_ARG_ENABLE([old-get-server-information-signature],
+  [AS_HELP_STRING([--enable-old-get-server-information-signature],
+  [Use the old GetServerInformation method 
signature that leaves out the 'spec_version' parameter. (default=no)])],
+  [use_old_gsi_sig=$enableval], [use_old_gsi_sig=no])
+AS_IF([test x$use_old_gsi_sig = xyes],
+  [AC_DEFINE([USE_OLD_GET_SERVER_INFORMATION_SIGNATURE], [1],
+ [Set if we should use the old GetServerInformation method 
signature])])
+AM_CONDITIONAL([USE_OLD_GET_SERVER_INFORMATION_SIGNATURE],
+   [test x$use_old_gsi_sig = xyes])
+
+dnl create #define for spec version
+AC_DEFINE_UNQUOTED([NOTIFICATIONS_SPEC_VERSION], 
[notifications_spec_version],
+   [Set to the version of the freedesktop.org notifications 
spec we support])
+
 dnl check for debugging support
 XDT_FEATURE_DEBUG
 
diff --git a/xfce4-notifyd/notify-dbus.xml b/xfce4-notifyd/notify-dbus.xml
index 832d7b9..98a82ef 100644
--- a/xfce4-notifyd/notify-dbus.xml
+++ b/xfce4-notifyd/notify-dbus.xml
@@ -27,6 +27,7 @@
 arg direction=out name=name type=s

[Xfce4-commits] xfce-git-hooks:master add post-update hook to pull www changes on server

2009-10-24 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 5c3130cf469e2cd78677682622bbf5c89c457261 (commit)
   from 0d4f7a7942438b1b2519b7f4d0688d391628c1ff (commit)

commit 5c3130cf469e2cd78677682622bbf5c89c457261
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 24 12:48:00 2009 -0700

add post-update hook to pull www changes on server

 hooks/post-update-03-www-pull |   11 +++
 post-update   |1 +
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/hooks/post-update-03-www-pull b/hooks/post-update-03-www-pull
new file mode 100755
index 000..caf93c9
--- /dev/null
+++ b/hooks/post-update-03-www-pull
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+case $REPO in
+  wiki.xfce.org)
+GIT_DIR=/var/www/wiki.xfce.org/.git git pull
+;;
+
+  www.xfce.org)
+GIT_DIR=/var/www/xfce.org/.git git pull
+;;
+esac
diff --git a/post-update b/post-update
index 92a20ed..eede74c 100755
--- a/post-update
+++ b/post-update
@@ -14,3 +14,4 @@ unset parent path
 
 $XFCE_GIT_HOOK_DIR/hooks/post-update-01-server-info
 $XFCE_GIT_HOOK_DIR/hooks/post-update-02-buildbot
+$XFCE_GIT_HOOK_DIR/hooks/post-update-03-www-pull
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfcegui4:xfce-4.6 session-client: fix SEGV inside disconnect() helper

2009-10-24 Thread Brian J . Tarricone
Updating branch refs/heads/xfce-4.6
 to f2053a1e2db56c3f1f92e230140de4fe6ba04f48 (commit)
   from caffa2a1e66f44d63ea201f186d5fd0c5337f4bf (commit)

commit f2053a1e2db56c3f1f92e230140de4fe6ba04f48
Author: Eygene Ryabinkin rea-x...@codelabs.ru
Date:   Sat Oct 24 23:23:42 2009 +0400

session-client: fix SEGV inside disconnect() helper

Don't call SmcCloseConnection if no connection is present: we will
dereference NULL-pointer in this case and this will provoke SEGV

I had seen this problem when I tried to start xfce4 settings-helper
without running session manager: it whined that
-
(xfce4-settings-helper:86452): xfce4-settings-helper-WARNING **:
Failed to connect to session manager
-
and dumped core afterwards.  With this patch I can run the utility
without session manager.  May be the other clients of libxfcegui4
were affected -- don't currently know.

Signed-off-by: Eygene Ryabinkin rea-x...@codelabs.ru

 libxfcegui4/session-client.c |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/libxfcegui4/session-client.c b/libxfcegui4/session-client.c
index 3c63904..c9c1137 100644
--- a/libxfcegui4/session-client.c
+++ b/libxfcegui4/session-client.c
@@ -335,9 +335,11 @@ logout_session (SessionClient * session_client)
 static void
 disconnect (SessionClient * session_client)
 {
-SmcCloseConnection ((SmcConn) session_client-session_connection, 0,
-NULL);
-session_client-session_connection = NULL;
+if (session_client-session_connection != NULL) {
+SmcCloseConnection ((SmcConn) session_client-session_connection,
+0, NULL);
+session_client-session_connection = NULL;
+}
 session_client-current_state = SESSION_CLIENT_DISCONNECTED;
 gdk_set_sm_client_id (NULL);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfcegui4:xfce-4.6 update NEWS

2009-10-24 Thread Brian J . Tarricone
Updating branch refs/heads/xfce-4.6
 to 930a6256ad97be8fa00b4d159ea7f98a64b66491 (commit)
   from f2053a1e2db56c3f1f92e230140de4fe6ba04f48 (commit)

commit 930a6256ad97be8fa00b4d159ea7f98a64b66491
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 24 13:12:42 2009 -0700

update NEWS

 NEWS |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 7ddda54..386e36b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 4.6.2
 ==
 - Fix icon sizing for XfceAppMenuItem (bug #5660).
-- Various improvements and bug fixes for SessionClient (bug #5337).
+- Various improvements and bug fixes for SessionClient (bug #5337, #5310).
 
 4.6.1
 ==
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4util:master remove INSTALL

2009-10-24 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 01fd5c83a072f9e0d90133942e7db4ed22dd55b6 (commit)
   from 517d9409493d007461c8008e7ef031573567704f (commit)

commit 01fd5c83a072f9e0d90133942e7db4ed22dd55b6
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Oct 24 14:08:01 2009 -0700

remove INSTALL

 INSTALL |  302 ---
 1 files changed, 0 insertions(+), 302 deletions(-)

diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 2550dab..000
--- a/INSTALL
+++ /dev/null
@@ -1,302 +0,0 @@
-Installation Instructions
-*
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==
-
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' might take a while.  While running, it prints
- some messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
-  4. Type `make install' to install the programs and any data files and
- documentation.
-
-  5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'.  To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'.  There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers.  If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-  6. Often, you can also type `make uninstall' to remove the installed
- files again.
-
-Compilers and Options
-=
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-
-
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean

[Xfce4-commits] xfce4-notifyd:master check for exo-csource when --enable-maintainer-mode is passed (bug 5783)

2009-10-23 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 10ee27ea551da22de71321155c6a897d44692a07 (commit)
   from b0a1cd8d831986448acb8687c9c5533dd843fdcc (commit)

commit 10ee27ea551da22de71321155c6a897d44692a07
Author: Brian J. Tarricone br...@tarricone.org
Date:   Fri Oct 23 21:47:49 2009 -0700

check for exo-csource when --enable-maintainer-mode is passed (bug 5783)

 Makefile.am |2 +-
 configure.ac.in |   11 +++
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 23525d3..590be4d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -192,7 +192,7 @@ xfce4-notifyd/xfce-notify-enum-types.c: 
xfce4-notifyd/xfce-notify-window.h Makef
 rm -f xfce4-notifyd/xgen-xnetc
 
 xfce4-notifyd-config/xfce4-notifyd-config.glade.h: 
$(srcdir)/xfce4-notifyd-config/xfce4-notifyd-config.glade
-   exo-csource --static --name=xfce4_notifyd_config_glade $ $@
+   $(EXO_CSOURCE) --static --name=xfce4_notifyd_config_glade $ $@
 
 endif
 
diff --git a/configure.ac.in b/configure.ac.in
index 7553bea..f490f14 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -58,6 +58,17 @@ XDT_CHECK_OPTIONAL_PACKAGE([LIBSEXY], [libsexy], [0.1.6], 
[libsexy],
[libsexy support (for clickable URLs) 
(default=yes)],
[yes])
 
+AS_IF([test x$USE_MAINTAINER_MODE = xyes],
+[
+  AC_PATH_PROG([EXO_CSOURCE], [exo-csource])
+  AS_IF([test -z $EXO_CSOURCE],
+  [
+echo '*** The program exo-csource is required to build when 
--enable-maintainer-mode'
+echo '*** is specified.'
+exit 1
+  ])
+])
+
 AC_ARG_ENABLE([old-notification-closed-signature],
   [AS_HELP_STRING([--enable-old-notification-closed-signature],
   [Use the old NotificationClosed signal signature 
that leaves out the 'reason' parameter.  You want to enable this if your system 
has libnotify 0.4.4 or earlier.])],
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.6 don't misuse the g_return_(val_)?if_fail() macros as much (bug 5791)

2009-10-19 Thread Brian J . Tarricone
Updating branch refs/heads/xfce-4.6
 to 666d693b4044c2ac20b54ebc292d5b0610636c99 (commit)
   from 04a0e9411408d3992269d8327ebf8d2dcb254746 (commit)

commit 666d693b4044c2ac20b54ebc292d5b0610636c99
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Oct 18 23:42:32 2009 -0700

don't misuse the g_return_(val_)?if_fail() macros as much (bug 5791)

 src/xfdesktop-file-icon-manager.c  |   51 +--
 src/xfdesktop-file-icon.c  |3 +-
 src/xfdesktop-file-properties-dialog.c |3 +-
 src/xfdesktop-file-utils.c |   17 +-
 src/xfdesktop-icon-view.c  |   12 +--
 src/xfdesktop-regular-file-icon.c  |   17 +++---
 src/xfdesktop-special-file-icon.c  |   14 +---
 src/xfdesktop-volume-icon.c|   14 +---
 src/xfdesktop-window-icon-manager.c|3 +-
 9 files changed, 88 insertions(+), 46 deletions(-)

diff --git a/src/xfdesktop-file-icon-manager.c 
b/src/xfdesktop-file-icon-manager.c
index 8873399..a838b55 100644
--- a/src/xfdesktop-file-icon-manager.c
+++ b/src/xfdesktop-file-icon-manager.c
@@ -845,7 +845,8 @@ 
xfdesktop_file_icon_manager_delete_selected(XfdesktopFileIconManager *fmanager,
 GList *selected, *l;
 
 selected = 
xfdesktop_icon_view_get_selected_items(fmanager-priv-icon_view);
-g_return_if_fail(selected);
+if(!selected)
+return;
 
 /* remove anybody that's not deletable */
 for(l = selected; l; ) {
@@ -893,7 +894,7 @@ xfdesktop_file_icon_menu_mime_app_executed(GtkWidget 
*widget,
 XfdesktopFileIcon *icon;
 ThunarVfsMimeApplication *mime_app;
 const ThunarVfsInfo *info;
-GList *path_list, *selected;
+GList *path_list = NULL, *selected;
 GtkWidget *toplevel;
 GError *error = NULL;
 
@@ -904,10 +905,13 @@ xfdesktop_file_icon_menu_mime_app_executed(GtkWidget 
*widget,
 toplevel = gtk_widget_get_toplevel(GTK_WIDGET(fmanager-priv-icon_view));
 
 info = xfdesktop_file_icon_peek_info(icon);
-path_list = g_list_append(NULL, info-path);
+path_list = g_list_append(path_list, info-path);
 
 mime_app = g_object_get_qdata(G_OBJECT(widget), xfdesktop_mime_app_quark);
-g_return_if_fail(mime_app);
+if(!mime_app) {
+g_list_free(path_list);
+return;
+}
 
 if(!thunar_vfs_mime_handler_exec(THUNAR_VFS_MIME_HANDLER(mime_app),
  gtk_widget_get_screen(widget),
@@ -942,7 +946,8 @@ xfdesktop_file_icon_menu_open_folder(GtkWidget *widget,
 g_list_free(selected);
 
 info = xfdesktop_file_icon_peek_info(icon);
-g_return_if_fail(info);
+if(!info)
+return;
 
 toplevel = gtk_widget_get_toplevel(GTK_WIDGET(fmanager-priv-icon_view));
 
@@ -960,7 +965,8 @@ xfdesktop_file_icon_menu_open_desktop(GtkWidget *widget,
 GtkWidget *toplevel;
 
 info = xfdesktop_file_icon_peek_info(icon);
-g_return_if_fail(info);
+if(!info)
+return;
 
 toplevel = gtk_widget_get_toplevel(GTK_WIDGET(fmanager-priv-icon_view));
 
@@ -1009,7 +1015,8 @@ xfdesktop_file_icon_menu_other_app(GtkWidget *widget,
 g_list_free(selected);
 
 info = xfdesktop_file_icon_peek_info(icon);
-g_return_if_fail(info);
+if(!info)
+return;
 
 fileman_proxy = xfdesktop_file_utils_peek_filemanager_proxy();
 if(fileman_proxy) {
@@ -1041,7 +1048,8 @@ xfdesktop_file_icon_menu_cut(GtkWidget *widget,
 GList *files;
 
 files = xfdesktop_icon_view_get_selected_items(fmanager-priv-icon_view);
-g_return_if_fail(files);
+if(!files)
+return;
 
 xfdesktop_clipboard_manager_cut_files(clipboard_manager, files);
 
@@ -1056,7 +1064,8 @@ xfdesktop_file_icon_menu_copy(GtkWidget *widget,
 GList *files;
 
 files = xfdesktop_icon_view_get_selected_items(fmanager-priv-icon_view);
-g_return_if_fail(files);
+if(!files)
+return;
 
 xfdesktop_clipboard_manager_copy_files(clipboard_manager, files);
 
@@ -2804,7 +2813,8 @@ 
xfdesktop_file_icon_manager_load_removable_media(XfdesktopFileIconManager *fmana
 ThunarVfsVolume *volume;
 
 /* ensure we don't re-enter if we're already set up */
-g_return_if_fail(!fmanager-priv-removable_icons);
+if(fmanager-priv-removable_icons)
+return;
 
 if(!thunar_volume_manager) {
 thunar_volume_manager = thunar_vfs_volume_manager_get_default();
@@ -2850,7 +2860,8 @@ 
xfdesktop_file_icon_manager_remove_removable_media(XfdesktopFileIconManager *fma
 {
 GList *volumes, *l;
 
-g_return_if_fail(fmanager-priv-removable_icons);
+if(!fmanager-priv-removable_icons)
+return;
 
 volumes = thunar_vfs_volume_manager_get_volumes(thunar_volume_manager);
 for(l = volumes; l; l = l-next) {
@@ -2889,9 +2900,12 @@ 
xfdesktop_file_icon_manager_real_init(XfdesktopIconViewManager *manager,
 #ifdef HAVE_THUNARX

[Xfce4-commits] xfdesktop:master don't misuse the g_return_(val_)?if_fail() macros as much (bug 5791)

2009-10-19 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 9727fa646f0a5c7f476e863bf63c6542b5f603b6 (commit)
   from f180721dc5313b68f55296ce06c76b7e4ea22817 (commit)

commit 9727fa646f0a5c7f476e863bf63c6542b5f603b6
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Oct 18 23:42:32 2009 -0700

don't misuse the g_return_(val_)?if_fail() macros as much (bug 5791)

 src/xfdesktop-file-icon-manager.c  |   51 +--
 src/xfdesktop-file-icon.c  |3 +-
 src/xfdesktop-file-properties-dialog.c |3 +-
 src/xfdesktop-file-utils.c |   17 +-
 src/xfdesktop-icon-view.c  |   12 +--
 src/xfdesktop-regular-file-icon.c  |   17 +++---
 src/xfdesktop-special-file-icon.c  |   14 +---
 src/xfdesktop-volume-icon.c|   14 +---
 src/xfdesktop-window-icon-manager.c|3 +-
 9 files changed, 88 insertions(+), 46 deletions(-)

diff --git a/src/xfdesktop-file-icon-manager.c 
b/src/xfdesktop-file-icon-manager.c
index 7e66215..be4a810 100644
--- a/src/xfdesktop-file-icon-manager.c
+++ b/src/xfdesktop-file-icon-manager.c
@@ -846,7 +846,8 @@ 
xfdesktop_file_icon_manager_delete_selected(XfdesktopFileIconManager *fmanager,
 GList *selected, *l;
 
 selected = 
xfdesktop_icon_view_get_selected_items(fmanager-priv-icon_view);
-g_return_if_fail(selected);
+if(!selected)
+return;
 
 /* remove anybody that's not deletable */
 for(l = selected; l; ) {
@@ -894,7 +895,7 @@ xfdesktop_file_icon_menu_mime_app_executed(GtkWidget 
*widget,
 XfdesktopFileIcon *icon;
 ThunarVfsMimeApplication *mime_app;
 const ThunarVfsInfo *info;
-GList *path_list, *selected;
+GList *path_list = NULL, *selected;
 GtkWidget *toplevel;
 GError *error = NULL;
 
@@ -905,10 +906,13 @@ xfdesktop_file_icon_menu_mime_app_executed(GtkWidget 
*widget,
 toplevel = gtk_widget_get_toplevel(GTK_WIDGET(fmanager-priv-icon_view));
 
 info = xfdesktop_file_icon_peek_info(icon);
-path_list = g_list_append(NULL, info-path);
+path_list = g_list_append(path_list, info-path);
 
 mime_app = g_object_get_qdata(G_OBJECT(widget), xfdesktop_mime_app_quark);
-g_return_if_fail(mime_app);
+if(!mime_app) {
+g_list_free(path_list);
+return;
+}
 
 if(!thunar_vfs_mime_handler_exec(THUNAR_VFS_MIME_HANDLER(mime_app),
  gtk_widget_get_screen(widget),
@@ -943,7 +947,8 @@ xfdesktop_file_icon_menu_open_folder(GtkWidget *widget,
 g_list_free(selected);
 
 info = xfdesktop_file_icon_peek_info(icon);
-g_return_if_fail(info);
+if(!info)
+return;
 
 toplevel = gtk_widget_get_toplevel(GTK_WIDGET(fmanager-priv-icon_view));
 
@@ -961,7 +966,8 @@ xfdesktop_file_icon_menu_open_desktop(GtkWidget *widget,
 GtkWidget *toplevel;
 
 info = xfdesktop_file_icon_peek_info(icon);
-g_return_if_fail(info);
+if(!info)
+return;
 
 toplevel = gtk_widget_get_toplevel(GTK_WIDGET(fmanager-priv-icon_view));
 
@@ -1010,7 +1016,8 @@ xfdesktop_file_icon_menu_other_app(GtkWidget *widget,
 g_list_free(selected);
 
 info = xfdesktop_file_icon_peek_info(icon);
-g_return_if_fail(info);
+if(!info)
+return;
 
 fileman_proxy = xfdesktop_file_utils_peek_filemanager_proxy();
 if(fileman_proxy) {
@@ -1042,7 +1049,8 @@ xfdesktop_file_icon_menu_cut(GtkWidget *widget,
 GList *files;
 
 files = xfdesktop_icon_view_get_selected_items(fmanager-priv-icon_view);
-g_return_if_fail(files);
+if(!files)
+return;
 
 xfdesktop_clipboard_manager_cut_files(clipboard_manager, files);
 
@@ -1057,7 +1065,8 @@ xfdesktop_file_icon_menu_copy(GtkWidget *widget,
 GList *files;
 
 files = xfdesktop_icon_view_get_selected_items(fmanager-priv-icon_view);
-g_return_if_fail(files);
+if(!files)
+return;
 
 xfdesktop_clipboard_manager_copy_files(clipboard_manager, files);
 
@@ -2848,7 +2857,8 @@ 
xfdesktop_file_icon_manager_load_removable_media(XfdesktopFileIconManager *fmana
 ThunarVfsVolume *volume;
 
 /* ensure we don't re-enter if we're already set up */
-g_return_if_fail(!fmanager-priv-removable_icons);
+if(fmanager-priv-removable_icons)
+return;
 
 if(!thunar_volume_manager) {
 thunar_volume_manager = thunar_vfs_volume_manager_get_default();
@@ -2894,7 +2904,8 @@ 
xfdesktop_file_icon_manager_remove_removable_media(XfdesktopFileIconManager *fma
 {
 GList *volumes, *l;
 
-g_return_if_fail(fmanager-priv-removable_icons);
+if(!fmanager-priv-removable_icons)
+return;
 
 volumes = thunar_vfs_volume_manager_get_volumes(thunar_volume_manager);
 for(l = volumes; l; l = l-next) {
@@ -2933,9 +2944,12 @@ 
xfdesktop_file_icon_manager_real_init(XfdesktopIconViewManager *manager,
 #ifdef HAVE_THUNARX
 ThunarxProviderFactory

[Xfce4-commits] xfdesktop:xfce-4.6 only register menu with panel if popup succeeded (bug 5792)

2009-10-19 Thread Brian J . Tarricone
Updating branch refs/heads/xfce-4.6
 to d5ee494b57a4117c3012e8dd6735ed11c74ce6f5 (commit)
   from 666d693b4044c2ac20b54ebc292d5b0610636c99 (commit)

commit d5ee494b57a4117c3012e8dd6735ed11c74ce6f5
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Oct 19 00:23:15 2009 -0700

only register menu with panel if popup succeeded (bug 5792)

 panel-plugin/desktop-menu-plugin.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/desktop-menu-plugin.c 
b/panel-plugin/desktop-menu-plugin.c
index a993310..36fe36a 100644
--- a/panel-plugin/desktop-menu-plugin.c
+++ b/panel-plugin/desktop-menu-plugin.c
@@ -366,10 +366,11 @@ menu_activate(DMPlugin *dmp, gboolean at_pointer)
  G_CALLBACK(menu_deactivated), dmp);
 if (!at_pointer)
   gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
-xfce_panel_plugin_register_menu (dmp-plugin, GTK_MENU(menu));
 gtk_menu_popup(GTK_MENU(menu), NULL, NULL,
(GtkMenuPositionFunc)(at_pointer ? NULL : 
dmp_position_menu),
dmp, 1, gtk_get_current_event_time());
+if(gtk_grab_get_current() == menu)
+xfce_panel_plugin_register_menu(dmp-plugin, GTK_MENU(menu));
 } else
 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), FALSE);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:master only register menu with panel if popup succeeded (bug 5792)

2009-10-19 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to b3de137420a36ff40e9bfdba93eb60cd28ae9c3d (commit)
   from 9727fa646f0a5c7f476e863bf63c6542b5f603b6 (commit)

commit b3de137420a36ff40e9bfdba93eb60cd28ae9c3d
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Oct 19 00:23:15 2009 -0700

only register menu with panel if popup succeeded (bug 5792)

 panel-plugin/desktop-menu-plugin.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/desktop-menu-plugin.c 
b/panel-plugin/desktop-menu-plugin.c
index d2ece3e..d5670d2 100644
--- a/panel-plugin/desktop-menu-plugin.c
+++ b/panel-plugin/desktop-menu-plugin.c
@@ -376,10 +376,11 @@ menu_activate(DMPlugin *dmp, gboolean at_pointer)
  G_CALLBACK(menu_deactivated), dmp);
 if (!at_pointer)
   gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
-xfce_panel_plugin_register_menu (dmp-plugin, GTK_MENU(menu));
 gtk_menu_popup(GTK_MENU(menu), NULL, NULL,
(GtkMenuPositionFunc)(at_pointer ? NULL : 
dmp_position_menu),
dmp, 1, gtk_get_current_event_time());
+if(gtk_grab_get_current() == menu)
+xfce_panel_plugin_register_menu(dmp-plugin, GTK_MENU(menu));
 } else
 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), FALSE);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master add missing marshal list file

2009-10-18 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to b3464174387a16ef24bd201c678d156132dd5a63 (commit)
   from 2ac1630bb0ccae5801fd1273d6fade734a439564 (commit)

commit b3464174387a16ef24bd201c678d156132dd5a63
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Oct 18 03:06:20 2009 -0700

add missing marshal list file

 libxfce4ui/libxfce4ui-marshal.list |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libxfce4ui/libxfce4ui-marshal.list 
b/libxfce4ui/libxfce4ui-marshal.list
new file mode 100644
index 000..b45b38a
--- /dev/null
+++ b/libxfce4ui/libxfce4ui-marshal.list
@@ -0,0 +1,2 @@
+VOID:ENUM,ENUM
+BOOL:VOID
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:master load icon file directly if not in theme

2009-10-18 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to f180721dc5313b68f55296ce06c76b7e4ea22817 (commit)
   from 3c5e914df587d5ceabae37806a6c64c3377bb8d4 (commit)

commit f180721dc5313b68f55296ce06c76b7e4ea22817
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Oct 6 14:58:22 2009 -0700

load icon file directly if not in theme

 panel-plugin/desktop-menu-plugin.c |   16 +---
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/panel-plugin/desktop-menu-plugin.c 
b/panel-plugin/desktop-menu-plugin.c
index d9f99d2..d2ece3e 100644
--- a/panel-plugin/desktop-menu-plugin.c
+++ b/panel-plugin/desktop-menu-plugin.c
@@ -123,17 +123,18 @@ dmp_get_icon(const gchar *icon_name, gint size, 
GtkOrientation orientation)
 const gchar *filename;
 gint w, h;
 
-iinfo = gtk_icon_theme_lookup_icon(itheme, icon_name, size, 0);
-if(!iinfo)
-return NULL;
-
 w = orientation == GTK_ORIENTATION_HORIZONTAL ? -1 : size;
 h = orientation == GTK_ORIENTATION_VERTICAL ? -1 : size;
 
-filename = gtk_icon_info_get_filename(iinfo);
+iinfo = gtk_icon_theme_lookup_icon(itheme, icon_name, size, 0);
+if(iinfo)
+filename = gtk_icon_info_get_filename(iinfo);
+else
+filename = icon_name;
+
 if(filename)
 pix = gdk_pixbuf_new_from_file_at_scale(filename, w, h, TRUE, NULL);
-else {
+else if(iinfo) {
 GdkPixbuf *tmp = gtk_icon_info_get_builtin_pixbuf(iinfo);
 
 if(tmp) {
@@ -153,7 +154,8 @@ dmp_get_icon(const gchar *icon_name, gint size, 
GtkOrientation orientation)
 }
 }
 
-gtk_icon_info_free(iinfo);
+if(iinfo)
+gtk_icon_info_free(iinfo);
 
 return pix;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-session:master fix crash when properties are freed in failure handler (bug 5797)

2009-10-18 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 76b1fea1a36401d8f9de1617e2f7e41348a63292 (commit)
   from 9f4ad445477a523fdc2ff31043bb78199d7e347c (commit)

commit 76b1fea1a36401d8f9de1617e2f7e41348a63292
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Oct 18 17:24:44 2009 -0700

fix crash when properties are freed in failure handler (bug 5797)

 xfce4-session/xfsm-startup.c |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c
index caa34f2..ddf6ad4 100644
--- a/xfce4-session/xfsm-startup.c
+++ b/xfce4-session/xfsm-startup.c
@@ -690,6 +690,9 @@ xfsm_startup_child_watch (GPid pid,
   xfsm_verbose (Client Id = %s, PID %d exited with status %d\n,
 cwdata-properties-client_id, (gint)pid, status);
 
+  cwdata-properties-child_watch_id = 0;
+  cwdata-properties-pid = -1;
+
   starting_properties = xfsm_manager_get_queue (cwdata-manager, 
XFSM_MANAGER_QUEUE_STARTING_PROPS);
   if (g_queue_find (starting_properties, cwdata-properties) != NULL)
 {
@@ -698,8 +701,9 @@ xfsm_startup_child_watch (GPid pid,
   xfsm_startup_handle_failed_startup (cwdata-properties, cwdata-manager);
 }
 
-  cwdata-properties-child_watch_id = 0;
-  cwdata-properties-pid = -1;
+  /* NOTE: cwdata-properties could have been freed by
+   * xfsm_startup_handle_failed_startup() above, so don't try to access
+   * any of its members here. */
 
   g_spawn_close_pid (pid);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfcegui4:xfce-4.6 various SessionClient improvements and bug fixes

2009-10-16 Thread Brian J . Tarricone
Updating branch refs/heads/xfce-4.6
 to caffa2a1e66f44d63ea201f186d5fd0c5337f4bf (commit)
   from 428b8807f6cdd5ab5d39b02f76aff9902871e2c1 (commit)

commit caffa2a1e66f44d63ea201f186d5fd0c5337f4bf
Author: Dimitar Zhekov hams...@mbox.contact.bg
Date:   Fri Oct 16 00:43:42 2009 -0700

various SessionClient improvements and bug fixes

* fix crash in client_session_free()
* strip previous client id from passsed argv before adding the new one
* fix crash when client_session_free() is called when not connected to
  the session manager
* some refactoring to avoid code duplication

 NEWS |1 +
 libxfcegui4/session-client.c |  363 +++--
 2 files changed, 134 insertions(+), 230 deletions(-)

diff --git a/NEWS b/NEWS
index 2a13891..7ddda54 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 4.6.2
 ==
 - Fix icon sizing for XfceAppMenuItem (bug #5660).
+- Various improvements and bug fixes for SessionClient (bug #5337).
 
 4.6.1
 ==
diff --git a/libxfcegui4/session-client.c b/libxfcegui4/session-client.c
index 4f036ec..3c63904 100644
--- a/libxfcegui4/session-client.c
+++ b/libxfcegui4/session-client.c
@@ -408,6 +408,7 @@ save_yourself_possibly_done (SessionClient * session_client)
 || (session_client-current_state ==
 SESSION_CLIENT_DONE_WITH_INTERACT))
 {
+set_clone_restart_commands (session_client);
 SmcSaveYourselfDone ((SmcConn) session_client-session_connection,
  True);
 
@@ -468,7 +469,6 @@ save_yourself (SmcConn smc_conn, SmPointer client_data, int 
save_style,
 }
 }
 
-set_clone_restart_commands (session_client);
 TRACE (save_yourself - SESSION_CLIENT_SAVING_PHASE_1);
 session_client-current_state = SESSION_CLIENT_SAVING_PHASE_1;
 switch (interact_style)
@@ -563,168 +563,126 @@ interact (SmcConn smc_conn, SmPointer client_data)
 save_yourself_possibly_done (session_client);
 }
 
+#define APPEND 1
+#define REMOVE 2
+
 static void
-set_clone_restart_commands (SessionClient * session_client)
+set_property_from_command (SessionClient * session_client, char *command,
+   gchar **ptr, gint alter_sm_id)
 {
 SmProp prop, *props[1];
-gchar **ptr, **args;
-gint i = 0;
+gchar **args;
+gint i;
 gint argc;
 
 SmPropValue *vals;
 
-if ((ptr = session_client-restart_command))
-{
-gboolean have_sm_id = FALSE;
+if (!ptr)
+return;
 
-/* Restart */
-ptr = session_client-restart_command;
-args = ptr;
-i = 0;
-for (argc = 0; *ptr; ptr++)
+args = ptr;
+for (argc = 0; *args; args++)
+{
+if (alter_sm_id == APPEND 
+!g_ascii_strncasecmp (*args, SM_ID_ARG, strlen (SM_ID_ARG)))
 {
-if (!g_ascii_strncasecmp (*ptr, SM_ID_ARG, strlen (SM_ID_ARG)))
-{
-have_sm_id = TRUE;
-}
-argc++;
+alter_sm_id = FALSE;
 }
-if (!have_sm_id)
+argc++;
+}
+if (alter_sm_id == APPEND)
+{
+argc += 2;
+}
+vals = g_new (SmPropValue, argc);
+
+i = 0;
+while (*ptr)
+{
+if (alter_sm_id == REMOVE 
+!g_ascii_strncasecmp (*ptr, SM_ID_ARG, strlen (SM_ID_ARG)))
 {
-argc += 2;
+/* skip the argument after SM_ID_ARG */
+if (ptr[1] != NULL)
+ptr++;
 }
-vals = g_new (SmPropValue, argc);
-ptr = args;
-while (*ptr)
+else
 {
 vals[i].length = strlen (*ptr);
-vals[i++].value = *ptr++;
+vals[i++].value = *ptr;
 }
-if (!have_sm_id)
-{
-vals[i].length = strlen (SM_ID_ARG);
-vals[i++].value = SM_ID_ARG;
-vals[i].length = strlen (session_client-given_client_id);
-vals[i++].value = session_client-given_client_id;
-}
-prop.name = SmRestartCommand;
-prop.type = SmLISTofARRAY8;
-prop.vals = vals;
-prop.num_vals = argc;
-
-props[0] = prop;
-SmcSetProperties ((SmcConn) session_client-session_connection, 1,
-  props);
-g_free (vals);
+ptr++;
 }
 
-/* Clone */
-if ((ptr =
- session_client-clone_command ? session_client-
- clone_command : session_client-restart_command))
+if (alter_sm_id == APPEND)
 {
-args = ptr;
-for (argc = 0; *ptr; ptr++)
-argc++;
-vals = g_new (SmPropValue, argc);
-ptr = args;
-i = 0;
-while (*ptr)
-{
-vals[i].length = strlen (*ptr);
-vals[i++].value = *ptr++;
-}
+vals[i].length = strlen (SM_ID_ARG);
+vals[i++].value = SM_ID_ARG;
+vals[i].length = strlen 

[Xfce4-commits] xfce-utils:master $dbuslaunch var isn't used anymore (bug 5863)

2009-10-13 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 1684b8faf5fb28b57fb0e7f4f06dfdca75c70bd7 (commit)
   from 87c3aa4b9d820d1d73c3cc80f43f992358c55920 (commit)

commit 1684b8faf5fb28b57fb0e7f4f06dfdca75c70bd7
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Oct 11 13:19:20 2009 -0700

$dbuslaunch var isn't used anymore (bug 5863)

 scripts/xinitrc.in.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/xinitrc.in.in b/scripts/xinitrc.in.in
index fb3f6a3..fdca950 100755
--- a/scripts/xinitrc.in.in
+++ b/scripts/xinitrc.in.in
@@ -103,7 +103,7 @@ test -r $HOME/.Xmodmap  xmodmap $HOME/.Xmodmap
 # Use dbus-launch if installed.
 if test x$DBUS_SESSION_BUS_ADDRESS = x; then
 if type dbus-launch /dev/null 21; then
-   eval `$dbuslaunch --sh-syntax --exit-with-session`
+   eval `dbus-launch --sh-syntax --exit-with-session`
 # some older versions of dbus don't export the var properly
 export DBUS_SESSION_BUS_ADDRESS
 else
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce-git-hooks:master don't check author name/email on tag creation

2009-10-09 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to d68f786a8e478382ff910376aa4b7ab2a3daf344 (commit)
   from 24ec140c21d6734ad80298f7253fa6781d8e5e31 (commit)

commit d68f786a8e478382ff910376aa4b7ab2a3daf344
Author: Brian J. Tarricone br...@tarricone.org
Date:   Fri Oct 9 18:06:40 2009 -0700

don't check author name/email on tag creation

 hooks/update-01-history-integrity |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hooks/update-01-history-integrity 
b/hooks/update-01-history-integrity
index 7456816..8549c35 100755
--- a/hooks/update-01-history-integrity
+++ b/hooks/update-01-history-integrity
@@ -134,6 +134,8 @@ case $refname in
 ;;
 esac
 
-committer_info_ok_range $oldrev $newrev || exit 1
+if [ ${refname:0:10} != refs/tags/ ]; then
+committer_info_ok_range $oldrev $newrev || exit 1
+fi
 
 exit 0
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce-git-hooks:master add checking of the author name and email fields

2009-10-07 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 24ec140c21d6734ad80298f7253fa6781d8e5e31 (commit)
   from 1bdc9bc50c2eaf7e46eff20e315a3fbf95a45358 (commit)

commit 24ec140c21d6734ad80298f7253fa6781d8e5e31
Author: Brian J. Tarricone br...@tarricone.org
Date:   Wed Oct 7 04:11:42 2009 -0700

add checking of the author name and email fields

 hooks/update-01-history-integrity |   54 +
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/hooks/update-01-history-integrity 
b/hooks/update-01-history-integrity
index d41e567..7456816 100755
--- a/hooks/update-01-history-integrity
+++ b/hooks/update-01-history-integrity
@@ -36,6 +36,58 @@ is_fast_forward()
   return 1
 }
 
+committer_info_ok() {
+rev=$1
+
+[ $rev =  ]  return 0
+
+if git rev-parse $rev^ /dev/null; then
+name=`git log --pretty=format:%an $rev^..$rev`
+email=`git log --pretty=format:%ae $rev^..$rev`
+else
+name=`git log --pretty=format:%an $rev`
+email=`git log --pretty=format:%ae $rev`
+fi
+
+# right now i require a space in the name.  we might want to allow
+# people more... anonymity.  but maybe not.
+if [ -z $name ] || ! echo $name | grep -q ' '; then
+echo Please set user.name in your git config to something sane. 2
+return 1
+fi
+
+if ! echo $email | grep -E -q '[...@]+@[...@]+\.[^@]{2,}'; then
+echo Email invalid; please set user.email in your git config. 2
+return 1
+fi
+
+if echo $email | grep -E -q '\(none\)|localhost|localdomain|\.local$'; then
+echo Email invalid; please set user.email in your git config. 2
+return 1
+fi
+
+return 0
+}
+
+committer_info_ok_range() {
+first=$1
+last=$2
+
+[ $last =  ]  return 0
+
+if [ $first =  ]; then
+revlist=`git rev-list $last`
+else
+revlist=`git rev-list $first..$last`
+fi
+
+for rev in $revlist; do
+committer_info_ok $rev || return 1
+done
+
+return 0
+}
+
 case $refname in
   refs/tags/*)
 # don't allow modification of existing tags
@@ -82,4 +134,6 @@ case $refname in
 ;;
 esac
 
+committer_info_ok_range $oldrev $newrev || exit 1
+
 exit 0
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client use guint8 instead of guchar for priority to make the API less weird

2009-10-06 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to 84cd0e06784a873e7bd3545e36658f11812bdd00 (commit)
   from cefce6747008210fdc97b84e96f2f0624a3767a7 (commit)

commit 84cd0e06784a873e7bd3545e36658f11812bdd00
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Oct 5 23:37:37 2009 -0700

use guint8 instead of guchar for priority to make the API less weird

 libxfce4ui/xfce-sm-client.c |6 +++---
 libxfce4ui/xfce-sm-client.h |4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index 8177d01..ace857f 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -141,7 +141,7 @@ struct _XfceSMClient
 XfceSMClientState state;
 XfceSMClientRestartStyle restart_style;
 
-guchar priority;
+guint8 priority;
 
 gchar *client_id;
 
@@ -1961,7 +1961,7 @@ xfce_sm_client_set_restart_style(XfceSMClient *sm_client,
  **/
 void
 xfce_sm_client_set_priority(XfceSMClient *sm_client,
-guchar priority)
+guint8 priority)
 {
 g_return_if_fail(XFCE_IS_SM_CLIENT(sm_client));
 
@@ -2101,7 +2101,7 @@ xfce_sm_client_get_restart_style(XfceSMClient *sm_client)
  *
  * Returns: a value from #G_MININT8 to #G_MAXINT8
  **/
-guchar
+guint8
 xfce_sm_client_get_priority(XfceSMClient *sm_client)
 {
 g_return_val_if_fail(XFCE_IS_SM_CLIENT(sm_client),
diff --git a/libxfce4ui/xfce-sm-client.h b/libxfce4ui/xfce-sm-client.h
index e0acac0..82878e9 100644
--- a/libxfce4ui/xfce-sm-client.h
+++ b/libxfce4ui/xfce-sm-client.h
@@ -102,8 +102,8 @@ void xfce_sm_client_set_restart_style(XfceSMClient 
*sm_client,
 XfceSMClientRestartStyle xfce_sm_client_get_restart_style(XfceSMClient 
*sm_client);
 
 void xfce_sm_client_set_priority(XfceSMClient *sm_client,
- guchar priority);
-guchar xfce_sm_client_get_priority(XfceSMClient *sm_client);
+ guint8 priority);
+guint8 xfce_sm_client_get_priority(XfceSMClient *sm_client);
 
 void xfce_sm_client_set_current_directory(XfceSMClient *sm_client,
   const gchar *current_directory);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client actually assign sm_client_singleton to something

2009-10-06 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to 38c353733f277c299c008224f136eb3128694df3 (commit)
   from 84cd0e06784a873e7bd3545e36658f11812bdd00 (commit)

commit 38c353733f277c299c008224f136eb3128694df3
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Oct 6 10:43:38 2009 -0700

actually assign sm_client_singleton to something

 libxfce4ui/xfce-sm-client.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index ace857f..c12afd6 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -545,6 +545,8 @@ xfce_sm_client_constructor(GType type,

n_construct_params,

construct_params);
 
+sm_client_singleton = XFCE_SM_CLIENT(obj);
+
 desktop_autostart_id = g_getenv(DESKTOP_AUTOSTART_ID);
 if(desktop_autostart_id) {
 XfceSMClient *sm_client = XFCE_SM_CLIENT(obj);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:libxfce4ui load icon file directly if not in theme

2009-10-06 Thread Brian J . Tarricone
Updating branch refs/heads/libxfce4ui
 to 5e1aafe77ed45feb49feb8f92aa9deb3e5d76ba8 (commit)
   from 185ddcfe8dd494a2caaeaa639eb7514c068826b3 (commit)

commit 5e1aafe77ed45feb49feb8f92aa9deb3e5d76ba8
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Oct 6 14:58:22 2009 -0700

load icon file directly if not in theme

 panel-plugin/desktop-menu-plugin.c |   16 +---
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/panel-plugin/desktop-menu-plugin.c 
b/panel-plugin/desktop-menu-plugin.c
index 83cbc92..5f80fc9 100644
--- a/panel-plugin/desktop-menu-plugin.c
+++ b/panel-plugin/desktop-menu-plugin.c
@@ -120,17 +120,18 @@ dmp_get_icon(const gchar *icon_name, gint size, 
GtkOrientation orientation)
 const gchar *filename;
 gint w, h;
 
-iinfo = gtk_icon_theme_lookup_icon(itheme, icon_name, size, 0);
-if(!iinfo)
-return NULL;
-
 w = orientation == GTK_ORIENTATION_HORIZONTAL ? -1 : size;
 h = orientation == GTK_ORIENTATION_VERTICAL ? -1 : size;
 
-filename = gtk_icon_info_get_filename(iinfo);
+iinfo = gtk_icon_theme_lookup_icon(itheme, icon_name, size, 0);
+if(iinfo)
+filename = gtk_icon_info_get_filename(iinfo);
+else
+filename = icon_name;
+
 if(filename)
 pix = gdk_pixbuf_new_from_file_at_scale(filename, w, h, TRUE, NULL);
-else {
+else if(iinfo) {
 GdkPixbuf *tmp = gtk_icon_info_get_builtin_pixbuf(iinfo);
 
 if(tmp) {
@@ -150,7 +151,8 @@ dmp_get_icon(const gchar *icon_name, gint size, 
GtkOrientation orientation)
 }
 }
 
-gtk_icon_info_free(iinfo);
+if(iinfo)
+gtk_icon_info_free(iinfo);
 
 return pix;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client don't set the default window icon if it's already set

2009-10-05 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to a6767cb98b36c5544623effdd29ecfb080148566 (commit)
   from b2598aef0fb1dbe516a6746ec2da4b919543589b (commit)

commit a6767cb98b36c5544623effdd29ecfb080148566
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Oct 5 13:07:37 2009 -0700

don't set the default window icon if it's already set

 libxfce4ui/xfce-sm-client.c |   27 +--
 1 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index bca246d..dc85962 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -1777,6 +1777,8 @@ xfce_sm_client_set_desktop_file(XfceSMClient *sm_client,
 {
 XfceRc *rcfile = NULL;
 gchar *real_desktop_file = NULL;
+gboolean has_default_icon = FALSE;
+GList *icon_list;
 const gchar *name, *icon, *exec;
 
 g_return_if_fail(XFCE_IS_SM_CLIENT(sm_client));
@@ -1821,12 +1823,25 @@ xfce_sm_client_set_desktop_file(XfceSMClient *sm_client,
 g_set_application_name(name);
 }
 
-icon = xfce_rc_read_entry(rcfile, Icon, NULL);
-if(icon) {
-if(g_path_is_absolute(icon))
-gtk_window_set_default_icon_from_file(icon, NULL);
-else
-gtk_window_set_default_icon_name(icon);
+#if GTK_CHECK_VERSION(2, 16, 0)
+if(gtk_window_get_default_icon_name())
+has_default_icon = TRUE;
+#endif
+
+icon_list = gtk_window_get_default_icon_list();
+if(icon_list) {
+has_default_icon = TRUE;
+g_list_free(icon_list);
+}
+
+if(!has_default_icon) {
+icon = xfce_rc_read_entry(rcfile, Icon, NULL);
+if(icon) {
+if(g_path_is_absolute(icon))
+gtk_window_set_default_icon_from_file(icon, NULL);
+else
+gtk_window_set_default_icon_name(icon);
+}
 }
 
 exec = xfce_rc_read_entry(rcfile, Exec, NULL);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client use g_strcmp0() instead of custom xfce_safe_strcmp()

2009-10-05 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to 00f1a6a61f95ffa749e9a5346e154cb76ab7593d (commit)
   from a6767cb98b36c5544623effdd29ecfb080148566 (commit)

commit 00f1a6a61f95ffa749e9a5346e154cb76ab7593d
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Oct 5 13:37:04 2009 -0700

use g_strcmp0() instead of custom xfce_safe_strcmp()

 libxfce4ui/xfce-sm-client.c |   11 +++
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index dc85962..c0dd427 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -73,11 +73,6 @@
 #define SM_ARG_APPEND 1
 #define SM_ARG_REMOVE 2
 
-#define xfce_safe_strcmp(s1, s2)  ( (!s1  !s2) \
-? 0 : (!s1 \
-   ? -1 : (!s2 \
-   ? 1 : strcmp(s1, s2))) )
-
 typedef enum
 {
 XFCE_SM_CLIENT_STATE_DISCONNECTED = 0,
@@ -636,7 +631,7 @@ static void
 xfce_sm_client_set_client_id(XfceSMClient *sm_client,
  const gchar *client_id)
 {
-if(!xfce_safe_strcmp(sm_client-client_id, client_id))
+if(!g_strcmp0(sm_client-client_id, client_id))
 return;
 
 g_free(sm_client-client_id);
@@ -1784,7 +1779,7 @@ xfce_sm_client_set_desktop_file(XfceSMClient *sm_client,
 g_return_if_fail(XFCE_IS_SM_CLIENT(sm_client));
 g_return_if_fail(desktop_file);
 
-if(!xfce_safe_strcmp(sm_client-desktop_file, desktop_file))
+if(!g_strcmp0(sm_client-desktop_file, desktop_file))
 return;
 
 if(!g_path_is_absolute(desktop_file)) {
@@ -2011,7 +2006,7 @@ xfce_sm_client_set_current_directory(XfceSMClient 
*sm_client,
 g_return_if_fail(XFCE_IS_SM_CLIENT(sm_client));
 g_return_if_fail(current_directory  current_directory[0]);
 
-if(!xfce_safe_strcmp(sm_client-current_directory, current_directory))
+if(!g_strcmp0(sm_client-current_directory, current_directory))
 return;
 
 g_free(sm_client-current_directory);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client don't try to call g_set_application_name() if it's already set

2009-10-05 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to b2598aef0fb1dbe516a6746ec2da4b919543589b (commit)
   from 5699458f827e758aa087e4796db5764778bac5aa (commit)

commit b2598aef0fb1dbe516a6746ec2da4b919543589b
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Oct 5 13:03:17 2009 -0700

don't try to call g_set_application_name() if it's already set

 libxfce4ui/xfce-sm-client.c |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index 888a711..bca246d 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -1815,9 +1815,11 @@ xfce_sm_client_set_desktop_file(XfceSMClient *sm_client,
 
 xfce_rc_set_group(rcfile, Desktop Entry);
 
-name = xfce_rc_read_entry(rcfile, Name, NULL);
-if(name)
-g_set_application_name(name);
+if(!g_get_application_name()) {
+name = xfce_rc_read_entry(rcfile, Name, NULL);
+if(name)
+g_set_application_name(name);
+}
 
 icon = xfce_rc_read_entry(rcfile, Icon, NULL);
 if(icon) {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client constify the xfce_sm_client_get_restart_command() return value

2009-10-05 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to cefce6747008210fdc97b84e96f2f0624a3767a7 (commit)
   from 00f1a6a61f95ffa749e9a5346e154cb76ab7593d (commit)

commit cefce6747008210fdc97b84e96f2f0624a3767a7
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Oct 5 22:06:53 2009 -0700

constify the xfce_sm_client_get_restart_command() return value

 libxfce4ui/xfce-sm-client.c |4 ++--
 libxfce4ui/xfce-sm-client.h |3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index c0dd427..8177d01 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -2234,9 +2234,9 @@ xfce_sm_client_get_current_directory(XfceSMClient 
*sm_client)
  *
  * Returns: an object-owned string vector
  **/
-gchar **
+G_CONST_RETURN gchar * G_CONST_RETURN *
 xfce_sm_client_get_restart_command(XfceSMClient *sm_client)
 {
 g_return_val_if_fail(XFCE_IS_SM_CLIENT(sm_client), NULL);
-return sm_client-restart_command;
+return (const gchar * const *)sm_client-restart_command;
 }
diff --git a/libxfce4ui/xfce-sm-client.h b/libxfce4ui/xfce-sm-client.h
index 6b84858..e0acac0 100644
--- a/libxfce4ui/xfce-sm-client.h
+++ b/libxfce4ui/xfce-sm-client.h
@@ -111,7 +111,8 @@ G_CONST_RETURN gchar 
*xfce_sm_client_get_current_directory(XfceSMClient *sm_clie
 
 void xfce_sm_client_set_restart_command(XfceSMClient *sm_client,
 gchar **restart_command);
-gchar **xfce_sm_client_get_restart_command(XfceSMClient *sm_client);
+G_CONST_RETURN gchar * G_CONST_RETURN *
+xfce_sm_client_get_restart_command(XfceSMClient *sm_client);
 
 G_END_DECLS
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client allow setting desktop file with xfce_sm_client_get_full()

2009-10-04 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to 46c43b790fa7d40e17f3c335e569cee2041f3a7a (commit)
   from 75899a1815ea2d87d83ede49f0625cdc4949d6de (commit)

commit 46c43b790fa7d40e17f3c335e569cee2041f3a7a
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Oct 4 16:25:19 2009 -0700

allow setting desktop file with xfce_sm_client_get_full()

 docs/tmpl/xfce-sm-client.sgml |1 +
 libxfce4ui/xfce-sm-client.c   |5 -
 libxfce4ui/xfce-sm-client.h   |3 ++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/docs/tmpl/xfce-sm-client.sgml b/docs/tmpl/xfce-sm-client.sgml
index 78e8efb..22fa5d7 100644
--- a/docs/tmpl/xfce-sm-client.sgml
+++ b/docs/tmpl/xfce-sm-client.sgml
@@ -175,6 +175,7 @@
 @resumed_client_id: 
 @current_directory: 
 @restart_command: 
+...@desktop_file: 
 @Returns: 
 
 
diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index 8cd1750..d124ada 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -1481,6 +1481,7 @@ xfce_sm_client_get_with_argv(guint argc,
  * @current_directory: The application's working directory
  * @restart_command: A command that can resume the application's
  *   saved state
+ * @desktop_file: The application's .desktop file
  *
  * Creates a new SM client instance, allowing the application
  * fine-grained control over the initial properties set.
@@ -1500,7 +1501,8 @@ xfce_sm_client_get_full(XfceSMClientRestartStyle 
restart_style,
 guchar priority,
 const gchar *resumed_client_id,
 const gchar *current_directory,
-const gchar **restart_command)
+const gchar **restart_command,
+const gchar *desktop_file)
 {
 return g_object_new(XFCE_TYPE_SM_CLIENT,
 restart-style, restart_style,
@@ -1508,6 +1510,7 @@ xfce_sm_client_get_full(XfceSMClientRestartStyle 
restart_style,
 client-id, resumed_client_id,
 current-directory, current_directory,
 restart-command, restart_command,
+desktop-file, desktop_file,
 NULL);
 }
 
diff --git a/libxfce4ui/xfce-sm-client.h b/libxfce4ui/xfce-sm-client.h
index 5625075..8142c66 100644
--- a/libxfce4ui/xfce-sm-client.h
+++ b/libxfce4ui/xfce-sm-client.h
@@ -77,7 +77,8 @@ XfceSMClient 
*xfce_sm_client_get_full(XfceSMClientRestartStyle restart_style,
   guchar priority,
   const gchar *resumed_client_id,
   const gchar *current_directory,
-  const gchar **restart_command);
+  const gchar **restart_command,
+  const gchar *desktop_file);
 
 gboolean xfce_sm_client_connect(XfceSMClient *sm_client,
 GError **error);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client make priority enum agree with docs since prio really is unsigned

2009-10-04 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to 2521a02b113ab8c1b1816b039f047c14e286c0ee (commit)
   from 46c43b790fa7d40e17f3c335e569cee2041f3a7a (commit)

commit 2521a02b113ab8c1b1816b039f047c14e286c0ee
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Oct 4 16:30:46 2009 -0700

make priority enum agree with docs since prio really is unsigned

 docs/tmpl/xfce-sm-client.sgml |2 +-
 libxfce4ui/xfce-sm-client.h   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/tmpl/xfce-sm-client.sgml b/docs/tmpl/xfce-sm-client.sgml
index 22fa5d7..58f4427 100644
--- a/docs/tmpl/xfce-sm-client.sgml
+++ b/docs/tmpl/xfce-sm-client.sgml
@@ -110,7 +110,7 @@
 
 /para
 
-...@xfce_sm_client_priority_high: 
+...@xfce_sm_client_priority_highest: 
 @XFCE_SM_CLIENT_PRIORITY_WM: 
 @XFCE_SM_CLIENT_PRIORITY_CORE: 
 @XFCE_SM_CLIENT_PRIORITY_DESKTOP: 
diff --git a/libxfce4ui/xfce-sm-client.h b/libxfce4ui/xfce-sm-client.h
index 8142c66..e60a148 100644
--- a/libxfce4ui/xfce-sm-client.h
+++ b/libxfce4ui/xfce-sm-client.h
@@ -43,7 +43,7 @@ typedef enum
 
 typedef enum
 {
-XFCE_SM_CLIENT_PRIORITY_HIGH = 0,
+XFCE_SM_CLIENT_PRIORITY_HIGHEST = 0,
 XFCE_SM_CLIENT_PRIORITY_WM = 15,
 XFCE_SM_CLIENT_PRIORITY_CORE = 25,
 XFCE_SM_CLIENT_PRIORITY_DESKTOP = 35,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client add xfce_sm_client_is_connected()

2009-10-04 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to 5699458f827e758aa087e4796db5764778bac5aa (commit)
   from bd5d5b663013df440a6bd0645d12f330b307d267 (commit)

commit 5699458f827e758aa087e4796db5764778bac5aa
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Oct 4 17:24:47 2009 -0700

add xfce_sm_client_is_connected()

 docs/libxfce4ui-sections.txt  |1 +
 docs/tmpl/xfce-sm-client.sgml |9 +
 libxfce4ui/libxfce4ui.symbols |1 +
 libxfce4ui/xfce-sm-client.c   |   20 
 libxfce4ui/xfce-sm-client.h   |1 +
 5 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/docs/libxfce4ui-sections.txt b/docs/libxfce4ui-sections.txt
index 439563a..699a10a 100644
--- a/docs/libxfce4ui-sections.txt
+++ b/docs/libxfce4ui-sections.txt
@@ -83,6 +83,7 @@ xfce_sm_client_get_with_argv
 xfce_sm_client_get_full
 xfce_sm_client_connect
 xfce_sm_client_disconnect
+xfce_sm_client_is_connected
 xfce_sm_client_is_resumed
 xfce_sm_client_set_desktop_file
 xfce_sm_client_request_shutdown
diff --git a/docs/tmpl/xfce-sm-client.sgml b/docs/tmpl/xfce-sm-client.sgml
index 58f4427..f08643a 100644
--- a/docs/tmpl/xfce-sm-client.sgml
+++ b/docs/tmpl/xfce-sm-client.sgml
@@ -197,6 +197,15 @@
 @sm_client: 
 
 
+!-- # FUNCTION xfce_sm_client_is_connected # --
+para
+
+/para
+
+...@sm_client: 
+...@returns: 
+
+
 !-- # FUNCTION xfce_sm_client_is_resumed # --
 para
 
diff --git a/libxfce4ui/libxfce4ui.symbols b/libxfce4ui/libxfce4ui.symbols
index e072770..0d5cbe9 100644
--- a/libxfce4ui/libxfce4ui.symbols
+++ b/libxfce4ui/libxfce4ui.symbols
@@ -102,6 +102,7 @@ xfce_sm_client_get_with_argv
 xfce_sm_client_get_full
 xfce_sm_client_connect
 xfce_sm_client_disconnect
+xfce_sm_client_is_connected
 xfce_sm_client_is_resumed
 xfce_sm_client_set_desktop_file
 xfce_sm_client_request_shutdown
diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index d124ada..888a711 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -1717,6 +1717,26 @@ xfce_sm_client_disconnect(XfceSMClient *sm_client)
 }
 
 /**
+ * xfce_sm_client_is_connected:
+ * @sm_client: An #XfceSMClient
+ *
+ * Determines whether or not the application has connected to the
+ * session manager.
+ *
+ * Returns: %TRUE if connected to the session manager, %FALSE otherwise
+ **/
+gboolean
+xfce_sm_client_is_connected(XfceSMClient *sm_client)
+{
+g_return_val_if_fail(XFCE_IS_SM_CLIENT(sm_client), FALSE);
+#ifdef HAVE_LIBSM
+return !!sm_client-session_connection;
+#else
+return FALSE;
+#endif
+}
+
+/**
  * xfce_sm_client_is_resumed:
  * @sm_client: An #XfceSMClient
  *
diff --git a/libxfce4ui/xfce-sm-client.h b/libxfce4ui/xfce-sm-client.h
index eafa5ce..6b84858 100644
--- a/libxfce4ui/xfce-sm-client.h
+++ b/libxfce4ui/xfce-sm-client.h
@@ -87,6 +87,7 @@ void xfce_sm_client_disconnect(XfceSMClient *sm_client);
 void xfce_sm_client_request_shutdown(XfceSMClient *sm_client,
  XfceSMClientShutdownHint shutdown_hint);
 
+gboolean xfce_sm_client_is_connected(XfceSMClient *sm_client);
 gboolean xfce_sm_client_is_resumed(XfceSMClient *sm_client);
 
 void xfce_sm_client_set_desktop_file(XfceSMClient *sm_client,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:libxfce4ui fix typo

2009-10-04 Thread Brian J . Tarricone
Updating branch refs/heads/libxfce4ui
 to 55576e1b60b3009d772ae7dcb8e4567b4c5d80e8 (commit)
   from d00b112f8acadda0e362d580a4af66d6fd7dcbea (commit)

commit 55576e1b60b3009d772ae7dcb8e4567b4c5d80e8
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Oct 4 19:38:34 2009 -0700

fix typo

 configure.ac.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 7d66074..9a9c85f 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -13,7 +13,7 @@ m4_define([xfdesktop_version_tag],[git])
 m4_define([xfdesktop_version], 
[xfdesktop_version_major().xfdesktop_version_minor().xfdesktop_version_micro()ifelse(xfdesktop_version_nano(),
 [], [], [.xfdesktop_version_nano()])ifelse(xfdesktop_version_tag(), [git], 
[xfdesktop_version_tag()-xfdesktop_version_build()], 
[xfdesktop_version_tag()])])
 
 dnl minimum required versions
-m4_define([glib_required_version], [2.18.0])
+m4_define([glib_minimum_version], [2.18.0])
 m4_define([gtk_minimum_version], [2.14.0])
 m4_define([libxfce4util_minimum_version], [4.6.0])
 m4_define([libxfce4ui_minimum_version], [4.7.0])
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-session:xfce-4.6 if it looks like the helper got killed, just return success (bug 4849)

2009-09-24 Thread Brian J . Tarricone
Updating branch refs/heads/xfce-4.6
 to 647076bc2b7c53368c816049d6c6b597a1cb0ab1 (commit)
   from a4cf11e779feba9a93ae526648416f3d7cc8b3c6 (commit)

commit 647076bc2b7c53368c816049d6c6b597a1cb0ab1
Author: Brian J. Tarricone br...@tarricone.org
Date:   Thu Sep 24 14:09:05 2009 -0700

if it looks like the helper got killed, just return success (bug 4849)

 xfce4-session/xfsm-shutdown-helper.c |   16 ++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/xfce4-session/xfsm-shutdown-helper.c 
b/xfce4-session/xfsm-shutdown-helper.c
index cd9aa59..4e3d988 100644
--- a/xfce4-session/xfsm-shutdown-helper.c
+++ b/xfce4-session/xfsm-shutdown-helper.c
@@ -554,7 +554,13 @@ xfsm_shutdown_helper_send_command (XfsmShutdownHelper 
*helper,
 
   if (ferror (helper-outfile))
 {
-  if (error  errno != EINTR)
+  if (errno == EINTR)
+{
+  /* probably succeeded but the helper got killed */
+  return TRUE;
+}
+
+  if (error)
 {
   g_set_error (error, G_FILE_ERROR, g_file_error_from_errno 
(errno),
_(Error sending command to shutdown helper: %s),
@@ -565,7 +571,13 @@ xfsm_shutdown_helper_send_command (XfsmShutdownHelper 
*helper,
 
   if (fgets (response, 256, helper-infile) == NULL)
 {
-  if (error  errno != EINTR)
+  if (errno == EINTR)
+{
+  /* probably succeeded but the helper got killed */
+  return TRUE;
+}
+
+  if (error)
 {
   g_set_error (error, G_FILE_ERROR, g_file_error_from_errno 
(errno),
_(Error receiving response from shutdown helper: 
%s),
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-session:master if it looks like the helper got killed, just return success (bug 4849)

2009-09-24 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to f1b1f61c9929594652a3cbd48afda9312d5fb5a3 (commit)
   from ade1bd188feb5a2d50b3a63138aa8fc03af5362b (commit)

commit f1b1f61c9929594652a3cbd48afda9312d5fb5a3
Author: Brian J. Tarricone br...@tarricone.org
Date:   Thu Sep 24 14:09:05 2009 -0700

if it looks like the helper got killed, just return success (bug 4849)

 xfce4-session/xfsm-shutdown-helper.c |   16 ++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/xfce4-session/xfsm-shutdown-helper.c 
b/xfce4-session/xfsm-shutdown-helper.c
index ce319e2..134a437 100644
--- a/xfce4-session/xfsm-shutdown-helper.c
+++ b/xfce4-session/xfsm-shutdown-helper.c
@@ -813,7 +813,13 @@ xfsm_shutdown_helper_send_command (XfsmShutdownHelper 
*helper,
 
   if (ferror (helper-outfile))
 {
-  if (error  errno != EINTR)
+  if (errno == EINTR)
+{
+  /* probably succeeded but the helper got killed */
+  return TRUE;
+}
+
+  if (error)
 {
   g_set_error (error, G_FILE_ERROR, g_file_error_from_errno 
(errno),
_(Error sending command to shutdown helper: %s),
@@ -824,7 +830,13 @@ xfsm_shutdown_helper_send_command (XfsmShutdownHelper 
*helper,
 
   if (fgets (response, 256, helper-infile) == NULL)
 {
-  if (error  errno != EINTR)
+  if (errno == EINTR)
+{
+  /* probably succeeded but the helper got killed */
+  return TRUE;
+}
+
+  if (error)
 {
   g_set_error (error, G_FILE_ERROR, g_file_error_from_errno 
(errno),
_(Error receiving response from shutdown helper: 
%s),
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce-utils:master fix gpg/ssh-agent startup for users with pam_ssh installed

2009-09-23 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to c67549e4b0648a95af9b1e5197cacdc452fea68b (commit)
   from 1631634f2427fe1797cbff67b771f5d5badd275b (commit)

commit c67549e4b0648a95af9b1e5197cacdc452fea68b
Author: Brian J. Tarricone br...@tarricone.org
Date:   Wed Sep 23 15:23:30 2009 -0700

fix gpg/ssh-agent startup for users with pam_ssh installed

this also fixes the case where ssh-agent just happens to be already
running.  it's now a lot smarter about figuring out what to run, and to
make sure it cleans up after itself properly.

 NEWS  |1 +
 scripts/xinitrc.in.in |   55 
 2 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/NEWS b/NEWS
index 2606a2d..14b28f4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 4.7.0
 =
 
+- Add support for starting gpg-agent.
 - Add ability to enable/disable or change the type of screensaver and
   ssh-agent using xfconf.
 
diff --git a/scripts/xinitrc.in.in b/scripts/xinitrc.in.in
index e1a2167..fb3f6a3 100755
--- a/scripts/xinitrc.in.in
+++ b/scripts/xinitrc.in.in
@@ -140,29 +140,55 @@ fi
 
 # launch gpg-agent or ssh-agent if enabled.
 ssh_agent_enabled=`xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled`
-if test -z $SSH_AGENT_PID -a $ssh_agent_enabled != false; then
+if test $ssh_agent_enabled != false; then
+# if the user has pam_ssh installed, it will start ssh-agent for us, but
+# of course won't start gpg-agent.  so, if ssh-agent is already running,
+# but we want gpg-agent (and that's not running yet) start gpg-agent
+# without ssh support
+
 ssh_agent_type=`xfconf-query -c xfce4-session -p /startup/ssh-agent/type`
+if test -z $ssh_agent_type; then
+if type gpg-agent /dev/null 21; then
+ssh_agent_type=gpg-agent
+else
+ssh_agent_type=ssh-agent
+fi
+fi
+
+# ignore stale ssh-agents
+if test $SSH_AGENT_PID; then
+if ! kill -0 $SSH_AGENT_PID; then
+unset SSH_AGENT_PID
+unset SSH_AUTH_SOCK
+fi
+fi
 
 case $ssh_agent_type in
 gpg-agent)
-eval `gpg-agent --daemon --enable-ssh-support`
-ssh_agent_kill_cmd=kill -INT $SSH_AGENT_PID
+if test -z $SSH_AGENT_PID; then
+eval `gpg-agent --daemon --enable-ssh-support --write-env-file 
$XDG_CACHE_HOME/gpg-agent-info`
+ssh_agent_kill_cmd=kill -INT $SSH_AGENT_PID; rm -f 
$XDG_CACHE_HOME/gpg-agent-info
+elif test -z $GPG_AGENT_INFO; then
+echo ssh-agent is already running; starting gpg-agent without 
ssh support
+eval `gpg-agent --daemon --write-env-file 
$XDG_CACHE_HOME/gpg-agent-info`
+ssh_agent_kill_cmd=pkill -INT ^gpg-agent\$; rm -f 
$XDG_CACHE_HOME/gpg-agent-info
+else
+echo gpg-agent is already running
+fi
 ;;
 
 ssh-agent)
-eval `ssh-agent -s`
-ssh_agent_kill_cmd=ssh-agent -k
-;;
-
-*)
-if type gpg-agent /dev/null 21; then
-eval `gpg-agent --daemon --enable-ssh-support`
-ssh_agent_kill_cmd=kill -INT $SSH_AGENT_PID
-elif type ssh-agent /dev/null 21; then
+if test -z $SSH_AGENT_PID; then
 eval `ssh-agent -s`
 ssh_agent_kill_cmd=ssh-agent -k
+else
+echo ssh-agent is already running
 fi
 ;;
+
+*)
+echo Unrecognized agent type '$ssh_agent_type' 2
+;;
 esac
 fi
 
@@ -172,7 +198,8 @@ if type xfce4-session /dev/null 21; then
 xfce4-session
 
 if test $ssh_agent_kill_cmd; then
-$ssh_agent_kill_cmd
+echo running '$ssh_agent_kill_cmd'
+eval $ssh_agent_kill_cmd
 fi
 
 exit 0
@@ -261,7 +288,7 @@ EOF
 esac
 
 if test $ssh_agent_kill_cmd; then
-   $ssh_agent_kill_cmd
+   eval $ssh_agent_kill_cmd
 fi
 
 xsetroot -bg white -fg red  -solid black -cursor_name watch
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce-git-migration:master gitosis repos are gone; don't look for them anymore

2009-09-22 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 809473aa3fc781eb7ebd3589176d6f27323a4e7a (commit)
   from 46537f71a27061ad5a9ab472be12dfd37964ca95 (commit)

commit 809473aa3fc781eb7ebd3589176d6f27323a4e7a
Author: Brian J. Tarricone br...@tarricone.org
Date:   Tue Sep 22 23:07:20 2009 +

gitosis repos are gone; don't look for them anymore

 gen-cgit-repos.rb |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gen-cgit-repos.rb b/gen-cgit-repos.rb
index d9293b7..b20a3bf 100755
--- a/gen-cgit-repos.rb
+++ b/gen-cgit-repos.rb
@@ -5,7 +5,7 @@ require 'rubygems'
 require 'rexml/document'
 
 MAIN_REPOS_ROOT = '/var/git'
-USER_REPOS_ROOT = '/var/spool/gitosis/repositories'
+USER_REPOS_ROOT = nil
 CGIT_REPOS_FILE = '/etc/cgit/repos'
 
 BLACKLIST = [ 'gitosis-admin', 'svn.old', 'xfce-server-files' ]
@@ -109,6 +109,8 @@ end
 def process_dir(dir, prefix='', use_group=true)
   repos_str = ''
 
+  return '' if dir.nil?
+
   Dir.open(dir) do |d|
 d.each do |de|
   if de == 'hooks'
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client xfce_unsetenv() is just a wrapper around g_unsetenv() anyway

2009-09-21 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to 75899a1815ea2d87d83ede49f0625cdc4949d6de (commit)
   from 95ff81a8fed053ca83742a865562d85e81211527 (commit)

commit 75899a1815ea2d87d83ede49f0625cdc4949d6de
Author: Brian J. Tarricone br...@tarricone.org
Date:   Mon Sep 21 19:42:44 2009 -0700

xfce_unsetenv() is just a wrapper around g_unsetenv() anyway

 libxfce4ui/xfce-sm-client.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index 5c33fdc..8cd1750 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -564,7 +564,7 @@ xfce_sm_client_constructor(GType type,
 }
 
 xfce_sm_client_set_client_id(sm_client, desktop_autostart_id);
-xfce_unsetenv(DESKTOP_AUTOSTART_ID);
+g_unsetenv(DESKTOP_AUTOSTART_ID);
 }
 
 return obj;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-dev-tools:master == 4.7.2 released! ==

2009-09-20 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 399b5f31fba3b76767041bdd0d7ad57c53ee1866 (commit)
   from 3a8ce30b0a3d84613d27bc5fdd503ace832b6a9d (commit)

commit 399b5f31fba3b76767041bdd0d7ad57c53ee1866
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Sep 19 17:38:13 2009 -0700

== 4.7.2 released! ==

 ChangeLog   |7 +++
 configure.in.in |4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 97102a7..6f3c727 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-09-19  Brian J. Tarricone br...@tarricone.org
 
+  * ChangeLog, configure.in.in: == 4.7.2 released! ==
+
+  * NEWS, configure.in.in, m4macros/xdt-features.m4: fix typo that breaks
+  XDT_FEATURE_LINKER_OPTS
+
+  * ChangeLog, configure.in.in: == 4.7.1 released! ==
+
   * m4macros/xdt-features.m4: put --disable-debug back and fix defaults for
   visibility and linker opts  also make the non-defaults explicit and therefore
   less confusing (it worked before due to default autoconf shell-ification of
diff --git a/configure.in.in b/configure.in.in
index 5e8b405..8e3b48a 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -11,10 +11,10 @@ dnl *** Version information ***
 dnl ***
 m4_define([xdt_version_major], [4])
 m4_define([xdt_version_minor], [7])
-m4_define([xdt_version_micro], [1])
+m4_define([xdt_version_micro], [2])
 m4_define([xdt_version_nano], [])
 m4_define([xdt_version_build], [...@revision@])
-m4_define([xdt_version_tag], [git])
+m4_define([xdt_version_tag], [])
 m4_define([xdt_version], 
[xdt_version_major().xdt_version_minor().xdt_version_micro()ifelse(xdt_version_nano(),
 [], [], [.xdt_version_nano()])ifelse(xdt_version_tag(), [git], 
[xdt_version_tag()-xdt_version_build()], [])])
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-dev-tools:master fix typo that breaks XDT_FEATURE_LINKER_OPTS

2009-09-20 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to 3a8ce30b0a3d84613d27bc5fdd503ace832b6a9d (commit)
   from 45448c2c68c5a405bb83efb8a33e8c5dd48db90e (commit)

commit 3a8ce30b0a3d84613d27bc5fdd503ace832b6a9d
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Sep 19 17:35:10 2009 -0700

fix typo that breaks XDT_FEATURE_LINKER_OPTS

 NEWS |4 
 configure.in.in  |2 +-
 m4macros/xdt-features.m4 |2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 393f7c9..bd2e4e3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+4.7.2
+=
+- Brown bag: fix typo that breaks XDT_FEATURE_LINKER_OPTS
+
 4.7.1
 =
 - Also support the newer AC_CONFIG_HEADERS macro.
diff --git a/configure.in.in b/configure.in.in
index 074b5f9..5e8b405 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -14,7 +14,7 @@ m4_define([xdt_version_minor], [7])
 m4_define([xdt_version_micro], [1])
 m4_define([xdt_version_nano], [])
 m4_define([xdt_version_build], [...@revision@])
-m4_define([xdt_version_tag], [])
+m4_define([xdt_version_tag], [git])
 m4_define([xdt_version], 
[xdt_version_major().xdt_version_minor().xdt_version_micro()ifelse(xdt_version_nano(),
 [], [], [.xdt_version_nano()])ifelse(xdt_version_tag(), [git], 
[xdt_version_tag()-xdt_version_build()], [])])
 
 
diff --git a/m4macros/xdt-features.m4 b/m4macros/xdt-features.m4
index 8d76c27..ea0c685 100644
--- a/m4macros/xdt-features.m4
+++ b/m4macros/xdt-features.m4
@@ -179,7 +179,7 @@ AC_DEFUN([XDT_FEATURE_LINKER_OPTS],
 [
   AC_ARG_ENABLE([linker-opts],
 AC_HELP_STRING([--disable-linker-opts],
-   [Disable linker optimizations])
+   [Disable linker optimizations]),
 [enable_linker_opts=$enableval], [enable_linker_opts=yes])
 
   if test x$enable_linker_opts != xno; then
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-dev-tools|xfce4-dev-tools-4.7.2 Creating annotated tag xfce4-dev-tools-4.7.2

2009-09-20 Thread Brian J . Tarricone
Updating annotated tag refs/tags/xfce4-dev-tools-4.7.2
 as new annotated tag
 to 00db0bf45eab29e0a0a429b3e0158e4a250179a9 (tag)
   succeeds xfce4-dev-tools-4.7.1
  tagged by Brian J. Tarricone br...@tarricone.org
 on 2009-09-20 19:42 +

Brian J. Tarricone (2):
  fix typo that breaks XDT_FEATURE_LINKER_OPTS
  == 4.7.2 released! ==

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:master require xdt-autogen 4.7.2

2009-09-20 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to d7354073a2abf1c44606386eec28f0eae79049ca (commit)
   from ba4157eb192c32273cca26ad679ea04e2af8a922 (commit)

commit d7354073a2abf1c44606386eec28f0eae79049ca
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sun Sep 20 13:24:23 2009 -0700

require xdt-autogen 4.7.2

 autogen.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 9cdd7aa..126c86b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,6 +18,6 @@ EOF
   exit 1
 }
 
-XDT_AUTOGEN_REQUIRED_VERSION=4.7.1 xdt-autogen $@
+XDT_AUTOGEN_REQUIRED_VERSION=4.7.2 xdt-autogen $@
 
 # vi:set ts=2 sw=2 et ai:
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master add summary-bold style property (bug 5773)

2009-09-19 Thread Brian J . Tarricone
Updating branch refs/heads/master
 to dba1153a5ff5cf859ef8d4be7b92da0303204690 (commit)
   from caad017fc9891b64668feec5bc94412045b79801 (commit)

commit dba1153a5ff5cf859ef8d4be7b92da0303204690
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Sep 19 02:03:54 2009 -0700

add summary-bold style property (bug 5773)

 NEWS   |2 ++
 xfce4-notifyd/xfce-notify-window.c |   30 ++
 2 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 5807de5..1241651 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ Version 0.1.0git:
   xfce4-notifyd).  In this case, you should compile xfce4-notifyd
   passing the --enable-old-notification-closed-signature switch
   to configure.
+* Add summary-bold style property to allow themes to set the
+  summary field of the notification bold (bug 5773).
 
   Bugfixes:
 * Fix ugliness with rounded corners on windows sometimes, both with
diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index c09b2fe..3c43dfb 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -110,6 +110,8 @@ static gboolean xfce_notify_window_motion_notify(GtkWidget 
*widget,
  GdkEventMotion *evt);
 static gboolean xfce_notify_window_configure_event(GtkWidget *widget,
GdkEventConfigure *evt);
+static void xfce_notify_window_style_set(GtkWidget *widget,
+ GtkStyle *previous_style);
 
 static gboolean xfce_notify_window_expire_timeout(gpointer data);
 static gboolean xfce_notify_window_fade_timeout(gpointer data);
@@ -146,6 +148,7 @@ xfce_notify_window_class_init(XfceNotifyWindowClass *klass)
 widget_class-button_release_event = xfce_notify_window_button_release;
 widget_class-motion_notify_event = xfce_notify_window_motion_notify;
 widget_class-configure_event = xfce_notify_window_configure_event;
+widget_class-style_set = xfce_notify_window_style_set;
 
 signals[SIG_CLOSED] = g_signal_new(closed,
XFCE_TYPE_NOTIFY_WINDOW,
@@ -188,6 +191,12 @@ xfce_notify_window_class_init(XfceNotifyWindowClass *klass)
 0.0, 8.0,
 
DEFAULT_BORDER_WIDTH,
 
G_PARAM_READABLE));
+gtk_widget_class_install_style_property(widget_class,
+
g_param_spec_boolean(summary-bold,
+ summary 
bold,
+ whether or 
not to display the notification summary field in bold text,
+ FALSE,
+ 
G_PARAM_READABLE));
 }
 
 static void
@@ -690,6 +699,27 @@ xfce_notify_window_configure_event(GtkWidget *widget,
 return ret;
 }
 
+static void
+xfce_notify_window_style_set(GtkWidget *widget,
+ GtkStyle *previous_style)
+{
+XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(widget);
+gboolean summary_bold = FALSE;
+GtkStyle *style;
+PangoFontDescription *pfd;
+
+gtk_widget_style_get(widget,
+ summary-bold, summary_bold,
+ NULL);
+if(summary_bold) {
+style = gtk_widget_get_style(window-summary);
+pfd = pango_font_description_copy(style-font_desc);
+pango_font_description_set_weight(pfd, PANGO_WEIGHT_BOLD);
+gtk_widget_modify_font(window-summary, pfd);
+pango_font_description_free(pfd);
+}
+}
+
 
 
 static gboolean
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client make use of gnome-style DESKTOP_AUTOSTART_ID env var for client id

2009-09-19 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to b6bf9168dc2e0dbcb535106f60fc7465265db361 (commit)
   from 1bef907e54369a3b08bedc15bb8d347983d2399b (commit)

commit b6bf9168dc2e0dbcb535106f60fc7465265db361
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Sep 19 02:47:13 2009 -0700

make use of gnome-style DESKTOP_AUTOSTART_ID env var for client id

 libxfce4ui/xfce-sm-client.c |   28 +---
 1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index 0efd0df..d948659 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -538,12 +538,34 @@ xfce_sm_client_constructor(GType type,
guint n_construct_params,
GObjectConstructParam *construct_params)
 {
+GObject *obj;
+const gchar *desktop_autostart_id;
+
 if(sm_client_singleton)
 return G_OBJECT(sm_client_singleton);
 
-return G_OBJECT_CLASS(xfce_sm_client_parent_class)-constructor(type,
-
n_construct_params,
-
construct_params);
+obj = G_OBJECT_CLASS(xfce_sm_client_parent_class)-constructor(type,
+   
n_construct_params,
+   
construct_params);
+
+desktop_autostart_id = g_getenv(DESKTOP_AUTOSTART_ID);
+if(desktop_autostart_id) {
+XfceSMClient *sm_client = XFCE_SM_CLIENT(obj);
+
+if(sm_client-client_id
+strcmp(sm_client-client_id, desktop_autostart_id))
+{
+g_warning(SM client ID specified on command line (%s) is  \
+  different from ID specified by $DESKTOP_AUTOSTART_ID  \
+  (%s); using env var, sm_client-client_id,
+  desktop_autostart_id);
+}
+
+xfce_sm_client_set_client_id(sm_client, desktop_autostart_id);
+xfce_unsetenv(DESKTOP_AUTOSTART_ID);
+}
+
+return obj;
 }
 
 static void
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:new-sm-client actually call gdk_set_sm_client_id() in the appropriate place

2009-09-19 Thread Brian J . Tarricone
Updating branch refs/heads/kelnos/new-sm-client
 to 0b24f362fe3ed0176bca7a1b41256072ca1e14a9 (commit)
   from b6bf9168dc2e0dbcb535106f60fc7465265db361 (commit)

commit 0b24f362fe3ed0176bca7a1b41256072ca1e14a9
Author: Brian J. Tarricone br...@tarricone.org
Date:   Sat Sep 19 02:50:29 2009 -0700

actually call gdk_set_sm_client_id() in the appropriate place

 libxfce4ui/xfce-sm-client.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libxfce4ui/xfce-sm-client.c b/libxfce4ui/xfce-sm-client.c
index d948659..d5f266c 100644
--- a/libxfce4ui/xfce-sm-client.c
+++ b/libxfce4ui/xfce-sm-client.c
@@ -640,6 +640,8 @@ xfce_sm_client_set_client_id(XfceSMClient *sm_client,
 g_free(sm_client-client_id);
 sm_client-client_id = g_strdup(client_id);
 
+gdk_set_sm_client_id(sm_client-client_id);
+
 g_object_notify(G_OBJECT(sm_client), client-id);
 }
 
@@ -1597,8 +1599,6 @@ xfce_sm_client_connect(XfceSMClient *sm_client,
 
 free(given_client_id);
 
-gdk_set_sm_client_id(sm_client-client_id);
-
 hint = xsmp_restart_style_from_enum(sm_client-restart_style);
 
 prop1.name = SmProgram;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


  1   2   3   >