[Xfce4-commits] pyxfce:master add missing 'sys' import.

2011-01-10 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to b7e8118f4ae4c17221dd254898c951fdf83198d0 (commit)
   from 23d6995044ae2be74683eb0e1a4838c55d7b1078 (commit)

commit b7e8118f4ae4c17221dd254898c951fdf83198d0
Author: Danny Milosavljevic dan...@xfce.org
Date:   Mon Jan 10 22:34:16 2011 +0100

add missing 'sys' import.

 examples/panel/testplugin1/testplugin.py |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/examples/panel/testplugin1/testplugin.py 
b/examples/panel/testplugin1/testplugin.py
index 282a2b6..071e43b 100755
--- a/examples/panel/testplugin1/testplugin.py
+++ b/examples/panel/testplugin1/testplugin.py
@@ -1,8 +1,9 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 import pygtk
 pygtk.require(2.0)
 import gtk
+import sys
 
 import xfce4.panel
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master add 'spawn' of libxfce4ui. Fix required version of libxfce4menu to work with the version from GIT.

2011-01-14 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 68012ea3a2764d40b69de38665f6da657cba273a (commit)
   from b7e8118f4ae4c17221dd254898c951fdf83198d0 (commit)

commit 68012ea3a2764d40b69de38665f6da657cba273a
Author: Danny Milosavljevic dan...@xfce.org
Date:   Fri Jan 14 18:50:01 2011 +0100

add 'spawn' of libxfce4ui. Fix required version of libxfce4menu to work 
with the version from GIT.

 ui/{gtk_extensions.override = spawn.override} |0
 1 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/ui/gtk_extensions.override b/ui/spawn.override
similarity index 100%
copy from ui/gtk_extensions.override
copy to ui/spawn.override
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master add 'spawn' of libxfce4ui. Fix required version of libxfce4menu to work with the version from GIT.

2011-01-14 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 3fb5079dcc88ead31f5b9291a09170bab856b026 (commit)
   from 68012ea3a2764d40b69de38665f6da657cba273a (commit)

commit 3fb5079dcc88ead31f5b9291a09170bab856b026
Author: Danny Milosavljevic dan...@xfce.org
Date:   Fri Jan 14 18:50:17 2011 +0100

add 'spawn' of libxfce4ui. Fix required version of libxfce4menu to work 
with the version from GIT.

 configure.ac  |2 +-
 ui/Makefile.am|9 ++---
 ui/spawn.override |4 +---
 ui/ui.py  |3 +++
 ui/uimodule.c |4 
 5 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index f8e3a10..0044183 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,7 @@ export_dynamic=`(./libtool --config; echo eval echo 
\\$export_dynamic_flag_spec)
 BM_DEPEND([XFCE4_UTIL], [libxfce4util-1.0], [4.1.0])
 BM_DEPEND([XFCE4_XFCONF], [libxfconf-0], [4.6.2])
 BM_DEPEND([XFCE4_UI], [libxfce4ui-1], [4.7.5])
-BM_DEPEND([XFCE4_MENU], [libxfce4menu-0.1], [4.6.2])
+BM_DEPEND([XFCE4_MENU], [libxfce4menu-0.1], [4.6.1])
 
 dnl new panel
 
diff --git a/ui/Makefile.am b/ui/Makefile.am
index 6e64b3d..b0aba81 100644
--- a/ui/Makefile.am
+++ b/ui/Makefile.am
@@ -25,7 +25,8 @@ _ui_la_SOURCES = \
gtk_extensions.c \
sm_client.c \
titled_dialog.c \
-   uimodule.c
+   uimodule.c \
+   spawn.c
 
 defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
 defs_DATA = \
@@ -33,14 +34,16 @@ defs_DATA = \
gdk_extensions.defs \
gtk_extensions.defs \
sm_client.defs \
-   titled_dialog.defs
+   titled_dialog.defs \
+   spawn.defs
 
 ui_overrides = \
dialogs.override \
gdk_extensions.override \
gtk_extensions.override \
sm_client.override \
-   titled_dialog.override
+   titled_dialog.override \
+   spawn.override
 
 EXTRA_DIST = $(defs_DATA) $(ui_overrides) gen
 
diff --git a/ui/spawn.override b/ui/spawn.override
index 0b33e80..a7ffb6b 100644
--- a/ui/spawn.override
+++ b/ui/spawn.override
@@ -10,11 +10,9 @@ headers
 %%
 include
 %%
-modulename gtkextensions
+modulename spawn
 %%
 import gobject.GObject as PyGObject_Type
-import gtk.Window as PyGtkWindow_Type
-import gtk.Widget as PyGtkWidget_Type
 import gtk.gdk.Screen as PyGdkScreen_Type
 %%
 ignore
diff --git a/ui/ui.py b/ui/ui.py
index c2facbe..dc52da3 100644
--- a/ui/ui.py
+++ b/ui/ui.py
@@ -2,3 +2,6 @@
 
 from _ui import *
 
+def spawn_command_line(*args, **kwargs):
+   import gtk
+   return(spawn_command_line_on_screen(gtk.gdk.screen_get_default(), 
*args, **kwargs))
diff --git a/ui/uimodule.c b/ui/uimodule.c
index dd031a4..b51d5b1 100644
--- a/ui/uimodule.c
+++ b/ui/uimodule.c
@@ -18,12 +18,14 @@ extern PyMethodDef pygdk_extensions_functions[];
 extern PyMethodDef pygtk_extensions_functions[];
 extern PyMethodDef pysm_client_functions[];
 extern PyMethodDef pytitled_dialog_functions[];
+extern PyMethodDef pyspawn_functions[];
 
 void pydialogs_register_classes(PyObject *d);
 void pygdk_extensions_register_classes(PyObject *d);
 void pygtk_extensions_register_classes(PyObject *d);
 void pysm_client_register_classes(PyObject *d);
 void pytitled_dialog_register_classes(PyObject *d);
+void pyspawn_register_classes(PyObject *d);
 
 void pysm_client_add_constants(PyObject *module, const gchar *strip_prefix);
 
@@ -36,6 +38,7 @@ static PyMethodDef* each_functions[] = {
pygtk_extensions_functions,
pysm_client_functions,
pytitled_dialog_functions,
+   pyspawn_functions,
 };
 
 static void
@@ -71,6 +74,7 @@ my_register1()
pygtk_extensions_register_classes (d);
pysm_client_register_classes (d);
pytitled_dialog_register_classes (d);
+   pyspawn_register_classes (d);
 }
 
 DL_EXPORT(void)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master add wrapper for spawn_on_screen .

2011-01-14 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 13a5eb594a7b02efe624495b3c3e84fb9bb0157e (commit)
   from 3fb5079dcc88ead31f5b9291a09170bab856b026 (commit)

commit 13a5eb594a7b02efe624495b3c3e84fb9bb0157e
Author: Danny Milosavljevic dan...@xfce.org
Date:   Fri Jan 14 20:12:09 2011 +0100

add wrapper for spawn_on_screen .

 ui/spawn.override |   48 
 ui/ui.py  |   27 +++
 2 files changed, 75 insertions(+), 0 deletions(-)

diff --git a/ui/spawn.override b/ui/spawn.override
index a7ffb6b..2d6826a 100644
--- a/ui/spawn.override
+++ b/ui/spawn.override
@@ -4,9 +4,21 @@
 %%
 headers
 #include pygobject.h
+#include stdlib.h
 #include gtk/gtk.h
 #include libxfce4ui/libxfce4ui.h
 
+static char** PyStringList_AsStrv(PyObject* argv) { /* does NOT copy */
+   int c_argc;
+   char** c_argv;
+   int i;
+   c_argc = PySequence_Length(argv);
+   c_argv = (char**) g_malloc0_n(c_argc + 1, sizeof(char*));
+   for(i = 0; i  c_argc; ++i)
+   c_argv[i] = strdup(PyString_AsString(PyList_GetItem(argv, i)));
+   return(c_argv);
+}
+
 %%
 include
 %%
@@ -22,3 +34,39 @@ ignore-glob
 %%
 ignore-win32
 %%
+override xfce_spawn_on_screen kwargs
+static PyObject *
+_wrap_xfce_spawn_on_screen(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+static char *kwlist[] = { screen, working_directory, argv, envp, 
flags, startup_notify, startup_timestamp, startup_icon_name, NULL };
+PyGObject *screen;
+char *working_directory, *startup_icon_name;
+char** c_argv;
+char** c_envp;
+PyObject* argv;
+PyObject* envp;
+int flags, startup_notify, ret;
+unsigned long startup_timestamp;
+GError *error = NULL;
+
+if (!PyArg_ParseTupleAndKeywords(args, kwargs,O!sOOiiks:spawn_on_screen, 
kwlist, PyGdkScreen_Type, screen, working_directory, argv, envp, flags, 
startup_notify, startup_timestamp, startup_icon_name))
+return NULL;
+
+if(!PySequence_Check(argv)) {
+PyErr_SetObject(PyExc_TypeError, argv);
+return NULL;
+}
+if(!PySequence_Check(envp)) {
+PyErr_SetObject(PyExc_TypeError, envp);
+return NULL;
+}
+c_envp = PyStringList_AsStrv(envp);
+c_argv = PyStringList_AsStrv(argv);
+ret = xfce_spawn_on_screen(GDK_SCREEN(screen-obj), working_directory, 
c_argv, c_envp, flags, startup_notify, startup_timestamp, startup_icon_name, 
error);
+g_strfreev(c_envp);
+g_strfreev(c_argv);
+
+if (pyg_error_check(error))
+return NULL;
+return PyBool_FromLong(ret);
+}
diff --git a/ui/ui.py b/ui/ui.py
index dc52da3..1f89115 100644
--- a/ui/ui.py
+++ b/ui/ui.py
@@ -5,3 +5,30 @@ from _ui import *
 def spawn_command_line(*args, **kwargs):
import gtk
return(spawn_command_line_on_screen(gtk.gdk.screen_get_default(), 
*args, **kwargs))
+
+SPAWN_LEAVE_DESCRIPTORS_OPEN = 1  0
+SPAWN_DO_NOT_REAP_CHILD  = 1  1
+SPAWN_SEARCH_PATH= 1  2
+SPAWN_STDOUT_TO_DEV_NULL = 1  3
+SPAWN_STDERR_TO_DEV_NULL = 1  4
+SPAWN_CHILD_INHERITS_STDIN   = 1  5
+SPAWN_FILE_AND_ARGV_ZERO = 1  6
+
+def spawn_on_screen(screen, working_directory, argv, envp, flags, 
startup_notify, startup_timestamp, startup_icon_name):
+   def to_c_envp(source):
+   if hasattr(source, items):
+   return [%s=%s % (key, value) for key, value in 
source.items()]
+   else:
+   return source
+   def to_c_flags(source):
+   if isinstance(source, int):
+   return(source)
+   else:
+   result = 0
+   bits = [leave_descriptors_open, do_not_reap_child, 
search_path, stdout_to_dev_null, stderr_to_dev_null, 
child_inherits_stdin, file_and_argv_zero]
+   for i, name in enumerate(bits):
+   if name in source:
+   result |= 1  i
+   return result
+   import _ui
+   return(_ui.spawn_on_screen(screen, working_directory, argv, 
to_c_envp(envp), to_c_flags(flags), startup_notify, startup_timestamp, 
startup_icon_name))
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master add 'testspawn' example.

2011-01-14 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to df6a5c2da0203f6704379da333bfadafc837949f (commit)
   from 13a5eb594a7b02efe624495b3c3e84fb9bb0157e (commit)

commit df6a5c2da0203f6704379da333bfadafc837949f
Author: Danny Milosavljevic dan...@xfce.org
Date:   Fri Jan 14 20:14:58 2011 +0100

add 'testspawn' example.

 examples/Makefile.am|2 +-
 examples/configure.ac   |1 +
 examples/spawn/testspawn.py |   12 
 3 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/examples/Makefile.am b/examples/Makefile.am
index 37fe47a..1dc2a8c 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -4,4 +4,4 @@ ACLOCAL_AMFLAGS = -I m4
 
 AUTOMAKE_OPTIONS = 1.7
 
-SUBDIRS = panel systemtray
+SUBDIRS = panel systemtray spawn
diff --git a/examples/configure.ac b/examples/configure.ac
index 66a0542..d29a21e 100644
--- a/examples/configure.ac
+++ b/examples/configure.ac
@@ -65,5 +65,6 @@ AC_CONFIG_FILES(
   panel/Makefile
   panel/testplugin1/Makefile
   systemtray/Makefile
+  spawn/Makefile
 )
 AC_OUTPUT
diff --git a/examples/spawn/testspawn.py b/examples/spawn/testspawn.py
new file mode 100644
index 000..17bfd31
--- /dev/null
+++ b/examples/spawn/testspawn.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python2
+
+import sys
+import os
+import pygtk
+pygtk.require(2.0)
+import gtk
+import xfce4.ui
+import xfce4.util
+import shlex
+
+xfce4.ui.spawn_on_screen(gtk.gdk.screen_get_default(), /, [xterm], 
os.environ, set([search_path]), False, gtk.get_current_event_time(), xterm)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master add wrapper for xfce_spawn_on_screen_with_child_watch .

2011-01-14 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to ce3fa5e8c556e14a8127d67192484fe2f59b5595 (commit)
   from df6a5c2da0203f6704379da333bfadafc837949f (commit)

commit ce3fa5e8c556e14a8127d67192484fe2f59b5595
Author: Danny Milosavljevic dan...@xfce.org
Date:   Fri Jan 14 20:54:35 2011 +0100

add wrapper for xfce_spawn_on_screen_with_child_watch .

 examples/spawn/testspawn.py |7 +-
 ui/spawn.override   |   46 +++
 ui/ui.py|   36 +++--
 3 files changed, 73 insertions(+), 16 deletions(-)

diff --git a/examples/spawn/testspawn.py b/examples/spawn/testspawn.py
index 17bfd31..78abfc6 100644
--- a/examples/spawn/testspawn.py
+++ b/examples/spawn/testspawn.py
@@ -9,4 +9,9 @@ import xfce4.ui
 import xfce4.util
 import shlex
 
-xfce4.ui.spawn_on_screen(gtk.gdk.screen_get_default(), /, [xterm], 
os.environ, set([search_path]), False, gtk.get_current_event_time(), xterm)
+def watch(inst, status):
+   print(status)
+
+#xfce4.ui.spawn_on_screen(gtk.gdk.screen_get_default(), /, [xterm], 
os.environ, set([search_path]), False, gtk.get_current_event_time(), xterm)
+xfce4.ui.spawn_on_screen_with_child_watch(gtk.gdk.screen_get_default(), /, 
[xterm], os.environ, set([search_path]), False, 
gtk.get_current_event_time(), xterm, watch)
+gtk.main()
diff --git a/ui/spawn.override b/ui/spawn.override
index 2d6826a..01b0684 100644
--- a/ui/spawn.override
+++ b/ui/spawn.override
@@ -70,3 +70,49 @@ _wrap_xfce_spawn_on_screen(PyObject *self, PyObject *args, 
PyObject *kwargs)
 return NULL;
 return PyBool_FromLong(ret);
 }
+%%
+override xfce_spawn_on_screen_with_child_watch kwargs
+static PyObject *
+_wrap_xfce_spawn_on_screen_with_child_watch(PyObject *self, PyObject *args, 
PyObject *kwargs)
+{
+static char *kwlist[] = { screen, working_directory, argv, envp, 
flags, startup_notify, startup_timestamp, startup_icon_name, 
callback, NULL };
+PyGObject *screen;
+char *working_directory, *startup_icon_name;
+char** c_argv;
+char** c_envp;
+PyObject* argv;
+PyObject* envp;
+int flags, startup_notify, ret;
+unsigned long startup_timestamp;
+GError *error = NULL;
+PyObject* py_callback;
+GClosure *closure;
+
+if (!PyArg_ParseTupleAndKeywords(args, 
kwargs,O!sOOiiksO:spawn_on_screen, kwlist, PyGdkScreen_Type, screen, 
working_directory, argv, envp, flags, startup_notify, startup_timestamp, 
startup_icon_name, py_callback))
+return NULL;
+
+if (!PyCallable_Check(py_callback)) {
+PyErr_SetString(PyExc_TypeError, callback argument not callable);
+return NULL;
+}
+if(!PySequence_Check(argv)) {
+PyErr_SetObject(PyExc_TypeError, argv);
+return NULL;
+}
+if(!PySequence_Check(envp)) {
+PyErr_SetObject(PyExc_TypeError, envp);
+return NULL;
+}
+c_envp = PyStringList_AsStrv(envp);
+c_argv = PyStringList_AsStrv(argv);
+closure = pyg_closure_new(py_callback, NULL, NULL);
+ret = xfce_spawn_on_screen_with_child_watch(GDK_SCREEN(screen-obj), 
working_directory, c_argv, c_envp, flags, startup_notify, startup_timestamp, 
startup_icon_name, closure, error);
+/* FIXME does this leak? pygobject_watch_closure((PyObject *)self, 
closure); */
+/*g_closure_set_marshal (spawn_data-closure, 
g_cclosure_marshal_VOID__INT);*/
+g_strfreev(c_envp);
+g_strfreev(c_argv);
+
+if (pyg_error_check(error))
+return NULL;
+return PyBool_FromLong(ret);
+}
diff --git a/ui/ui.py b/ui/ui.py
index 1f89115..177d267 100644
--- a/ui/ui.py
+++ b/ui/ui.py
@@ -14,21 +14,27 @@ SPAWN_STDERR_TO_DEV_NULL = 1  4
 SPAWN_CHILD_INHERITS_STDIN   = 1  5
 SPAWN_FILE_AND_ARGV_ZERO = 1  6
 
+def to_c_envp(source):
+   if hasattr(source, items):
+   return [%s=%s % (key, value) for key, value in source.items()]
+   else:
+   return source
+
+def to_c_flags(source):
+   if isinstance(source, int):
+   return(source)
+   else:
+   result = 0
+   bits = [leave_descriptors_open, do_not_reap_child, 
search_path, stdout_to_dev_null, stderr_to_dev_null, 
child_inherits_stdin, file_and_argv_zero]
+   for i, name in enumerate(bits):
+   if name in source:
+   result |= 1  i
+   return result
+
 def spawn_on_screen(screen, working_directory, argv, envp, flags, 
startup_notify, startup_timestamp, startup_icon_name):
-   def to_c_envp(source):
-   if hasattr(source, items):
-   return [%s=%s % (key, value) for key, value in 
source.items()]
-   else:
-   return source
-   def to_c_flags(source):
-   if isinstance(source, int):
-   return(source)
-   else:
-   result = 0
-   bits = [leave_descriptors_open

[Xfce4-commits] libxfce4ui:master xfce_spawn_startup_watch: do not mess with the marshaller the user set up.

2011-01-14 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 788ac47081c892a46cc753b2e97fb3966318a9bd (commit)
   from 406dcf32d4fdecdb76d31539aef655c11239038b (commit)

commit 788ac47081c892a46cc753b2e97fb3966318a9bd
Author: Danny Milosavljevic dan...@xfce.org
Date:   Fri Jan 14 20:53:13 2011 +0100

xfce_spawn_startup_watch: do not mess with the marshaller the user set up.

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

diff --git a/libxfce4ui/xfce-spawn.c b/libxfce4ui/xfce-spawn.c
index 731ffb2..3b4e108 100644
--- a/libxfce4ui/xfce-spawn.c
+++ b/libxfce4ui/xfce-spawn.c
@@ -154,7 +154,7 @@ xfce_spawn_startup_watch (GPid pid,
   g_value_init (instance_and_params[1], G_TYPE_INT);
   g_value_set_int (instance_and_params[1], status);
 
-  g_closure_set_marshal (spawn_data-closure, 
g_cclosure_marshal_VOID__INT);
+  /*the caller, not us, needs to do: g_closure_set_marshal 
(spawn_data-closure, g_cclosure_marshal_VOID__INT);*/
 
   g_closure_invoke (spawn_data-closure, NULL,
 2, instance_and_params, NULL);
@@ -245,7 +245,7 @@ xfce_spawn_get_active_workspace_number (GdkScreen *screen)
 
 
 /**
- * xfce_spawn_on_screen_with_closure:
+ * xfce_spawn_on_screen_with_child_watch:
  * @screen  : a #GdkScreen or %NULL to use the active screen,
  *see xfce_gdk_screen_get_active().
  * @working_directory   : child's current working directory or %NULL to
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Merge branch 'master' of ssh://git.xfce.org/git/xfce/libxfce4ui

2011-01-14 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 69fcad9d68973ed8e7c3d76ee12f43300a1e8291 (commit)
   from 788ac47081c892a46cc753b2e97fb3966318a9bd (commit)

commit 69fcad9d68973ed8e7c3d76ee12f43300a1e8291
Merge: 788ac47 4fc47be
Author: Danny Milosavljevic dan...@xfce.org
Date:   Fri Jan 14 20:55:00 2011 +0100

Merge branch 'master' of ssh://git.xfce.org/git/xfce/libxfce4ui

commit 4fc47be3e47055b391a464f409df469f44bb436d
Author: Mișu Moldovan du...@xfce.org
Date:   Tue Jan 11 12:59:02 2011 +0100

l10n: Updated Romanian (ro) translation to 100%

New status: 31 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

commit 57a986002e4af628733b6e48718eae98fc2b9b62
Author: Mișu Moldovan du...@xfce.org
Date:   Thu Jan 6 13:45:35 2011 +0100

l10n: Updated Romanian (ro) translation to 100%

New status: 31 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

commit 30f7bafb370cf1b281c87fbc662e853820194c2a
Author: Nick Schermer n...@xfce.org
Date:   Tue Jan 4 23:01:46 2011 +0100

Small fix in previous commit.

I always fail to see why this function does not accept NULL...

commit 4bded49a31e58b85305d176490d8e08f7a5408da
Author: Nick Schermer n...@xfce.org
Date:   Tue Jan 4 21:25:38 2011 +0100

Fix memory corruption in register function (bug #5892).

Also cleanup the function a bit.

 libxfce4kbd-private/xfce-shortcuts-provider.c |   35 +
 po/ro.po  |  102 ++---
 2 files changed, 76 insertions(+), 61 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts-provider.c 
b/libxfce4kbd-private/xfce-shortcuts-provider.c
index b2522ef..528503d 100644
--- a/libxfce4kbd-private/xfce-shortcuts-provider.c
+++ b/libxfce4kbd-private/xfce-shortcuts-provider.c
@@ -235,33 +235,36 @@ static void
 xfce_shortcuts_provider_register (XfceShortcutsProvider *provider)
 {
   gchar   **provider_names;
-  const gchar **names;
+  gchar   **names;
   gboolean  already_registered = FALSE;
-  gint  length;
   gint  i;
+  const gchar  *name;
 
   g_return_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider));
 
-  provider_names = xfconf_channel_get_string_list (provider-priv-channel, 
/providers);
-
-  for (i = 0; provider_names != NULL  provider_names[i] != NULL; ++i)
-if (G_UNLIKELY (g_str_equal (provider_names[i], 
xfce_shortcuts_provider_get_name (provider
-  {
-already_registered = TRUE;
-break;
-  }
+  name = xfce_shortcuts_provider_get_name (provider);
+  if (G_UNLIKELY (name == NULL))
+return;
 
-  length = i;
+  provider_names = xfconf_channel_get_string_list (provider-priv-channel, 
/providers);
+  if (provider_names != NULL)
+for (i = 0; !already_registered  provider_names[i] != NULL; i++)
+  already_registered = g_str_equal (provider_names[i], name);
 
   if (G_UNLIKELY (!already_registered))
 {
-  names = g_new0 (const gchar *, length + 1);
-  for (i = 0; provider_names != NULL  provider_names[i] != NULL; ++i)
-names[i] = provider_names[i];
-  names[i++] = xfce_shortcuts_provider_get_name (provider);
+  names = g_new0 (gchar *, (provider_names != NULL ? g_strv_length 
(provider_names) : 0) + 2);
+  i = 0;
+
+  if (provider_names != NULL)
+for (; provider_names[i] != NULL; i++)
+  names[i] = provider_names[i];
+
+  names[i++] = (gchar *) name;
   names[i] = NULL;
 
-  xfconf_channel_set_string_list (provider-priv-channel, /providers, 
names);
+  xfconf_channel_set_string_list (provider-priv-channel, /providers,
+  (const gchar * const *) names);
 
   g_free (names);
 }
diff --git a/po/ro.po b/po/ro.po
index f09c3ad..55d223f 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,78 +1,86 @@
 # Romanian translations for libxfce4ui
 # Traducerea în limba română pentru pachetul libxfce4util.
-# Copyright (C) 2007-2009 THE xfce4ui's COPYRIGHT HOLDER
-# This file is distributed under the same license as the libxfce4util package.
-# Mișu Moldovan du...@xfce.org, 2009.
+# Copyright (C) 2007-2011 THE libxfce4ui's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libxfce4ui package.
+# Mișu Moldovan du...@xfce.org, 2009-2011.
 #
 msgid 
 msgstr 
-Project-Id-Version: libxfce4ui 4.6\n
+Project-Id-Version: libxfce4ui 4.8\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2009-12-18 15:10+0100\n
-PO-Revision-Date: 2009-02-02 21:52+0200\n
+POT-Creation-Date: 2011-01-06 11:08+\n
+PO-Revision-Date: 2011-01-11 13:58+0200\n
 Last-Translator: Mișu Moldovan du...@xfce.org\n
-Language-Team: Romanian\n
+Language-Team: Romanian debian-l10n-roman...@lists.debian.org\n
+Language: ro\n
 MIME-Version: 1.0\n
 Content-Type: text/plain; charset=UTF-8\n
 Content-Transfer-Encoding: 8bit\n
-Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n

[Xfce4-commits] pyxfce:master update automake config.

2010-12-16 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to e41f8efd7133baa1ee85dbe3874c5e381d8d177b (commit)
   from 09cea4d95731956d9a23ed96ae90d4c85e3f64ae (commit)

commit e41f8efd7133baa1ee85dbe3874c5e381d8d177b
Author: Danny Milosavljevic dan...@xfce.org
Date:   Thu Dec 16 18:43:02 2010 +0100

update automake config.

 Makefile.am   |4 ++--
 configure.ac  |4 +---
 examples/configure.ac |2 --
 pyxfce-1.0.pc.in  |1 +
 4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 93d76c1..a642c1d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,8 +13,8 @@ if HAVE_MIGHTY_MOUSE
 SUBDIR_MIGHTY_MOUSE = panel
 endif
 
-SUBDIRS = gui mcs netk util $(SUBDIR_MIGHTY_MOUSE)
-DIST_SUBDIRS = gui mcs netk util $(SUBDIR_MIGHTY_MOUSE)
+SUBDIRS = gui netk util $(SUBDIR_MIGHTY_MOUSE)
+DIST_SUBDIRS = gui netk util $(SUBDIR_MIGHTY_MOUSE)
 
 PLATFORM_VERSION = 4.2
 PLATFORM_WIN32 =
diff --git a/configure.ac b/configure.ac
index d0e505e..fee8f0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
 -*- mode: m4 -*-
 AC_PREREQ(2.52)
+AC_CONFIG_MACRO_DIR([m4])
 
 ACLOCAL_AMFLAGS = -I m4
 
@@ -57,8 +58,6 @@ dnl XFCE_MIGHTY_MOUSE_PANEL_PLUGIN([PANEL], [4.3])
 dnl PANEL_EXTERNALPLUGINDIR
 dnl PANEL_DESKTOPDATADIR
 
-BM_DEPEND([XFCE4_MCS_CLIENT], [libxfce4mcs-client-1.0], [4.1.0])
-BM_DEPEND([XFCE4_MCS_MANAGER], [libxfce4mcs-manager-1.0], [4.1.0])
 BM_DEPEND([GTK], [gtk+-2.0], [2.4])
 BM_DEPEND([PYGTK], [pygtk-2.0], [2.6.0])
 
@@ -86,7 +85,6 @@ AC_CONFIG_FILES(
   Makefile
   pyxfce-1.0.pc
   gui/Makefile
-  mcs/Makefile
   netk/Makefile
   panel/Makefile
   util/Makefile
diff --git a/examples/configure.ac b/examples/configure.ac
index 52ea38c..66a0542 100644
--- a/examples/configure.ac
+++ b/examples/configure.ac
@@ -37,8 +37,6 @@ XFCE_MIGHTY_MOUSE_PANEL_PLUGIN([PANEL], [4.3])
 dnl PANEL_EXTERNALPLUGINDIR
 dnl PANEL_DESKTOPDATADIR
 
-BM_DEPEND([XFCE4_MCS_CLIENT], [libxfce4mcs-client-1.0], [4.1.0])
-BM_DEPEND([XFCE4_MCS_MANAGER], [libxfce4mcs-manager-1.0], [4.1.0])
 dnl BM_DEPEND([GTK], [gtk+-2.0], [2.4])
 dnl BM_DEPEND([PYGTK], [pygtk-2.0], [2.6.0])
 
diff --git a/pyxfce-1.0.pc.in b/pyxfce-1.0.pc.in
index 11a37d9..2509e1b 100644
--- a/pyxfce-1.0.pc.in
+++ b/pyxfce-1.0.pc.in
@@ -1,4 +1,5 @@
 pref...@prefix@
+datarootd...@datarootdir@
 exec_pref...@exec_prefix@
 included...@includedir@
 datad...@datadir@
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master changed to use only 'libxfce4panel-enum-types.h'.

2010-12-21 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to c090ae95fcf375a6c176a992c5d461d27c81bbf0 (commit)
   from e41f8efd7133baa1ee85dbe3874c5e381d8d177b (commit)

commit c090ae95fcf375a6c176a992c5d461d27c81bbf0
Author: Danny Milosavljevic dan...@xfce.org
Date:   Wed Dec 22 07:55:08 2010 +0100

changed to use only 'libxfce4panel-enum-types.h'.

 panel/arrow_button.defs|2 +-
 panel/enums.defs   |2 +-
 panel/enums.override   |1 -
 panel/external_plugin.defs |6 ++--
 panel/gen  |2 +-
 panel/itembar.defs |   40 -
 panel/plugin_iface.defs|   53 ++-
 panel/window.defs  |2 +-
 8 files changed, 82 insertions(+), 26 deletions(-)

diff --git a/panel/arrow_button.defs b/panel/arrow_button.defs
index d627a78..a0782de 100644
--- a/panel/arrow_button.defs
+++ b/panel/arrow_button.defs
@@ -10,7 +10,7 @@
 ;; Enumerations and flags ...
 
 
-;; From /usr/local/include/xfce4/libxfce4panel/xfce-arrow-button.h
+;; From xfce-arrow-button.h
 
 (define-function xfce_arrow_button_get_type
   (c-name xfce_arrow_button_get_type)
diff --git a/panel/enums.defs b/panel/enums.defs
index 38aa51a..7e6834a 100644
--- a/panel/enums.defs
+++ b/panel/enums.defs
@@ -26,6 +26,6 @@
 )
 
 
-;; From /usr/local/include/xfce4/libxfce4panel/xfce-panel-enums.h
+;; From xfce-panel-enums.h
 
 
diff --git a/panel/enums.override b/panel/enums.override
index b16e01c..162b70a 100644
--- a/panel/enums.override
+++ b/panel/enums.override
@@ -5,7 +5,6 @@
 headers
 #include pygobject.h
 #include gtk/gtk.h
-#include libxfce4panel/xfce-panel-enums.h
 #include libxfce4panel/libxfce4panel-enum-types.h
 
 extern PyTypeObject PyGtkWidget_Type;
diff --git a/panel/external_plugin.defs b/panel/external_plugin.defs
index d0a1190..16a75f9 100644
--- a/panel/external_plugin.defs
+++ b/panel/external_plugin.defs
@@ -12,7 +12,7 @@
 ;; Enumerations and flags ...
 
 
-;; From /usr/local/include/xfce4/libxfce4panel/xfce-panel-external-plugin.h
+;; From xfce-panel-external-plugin.h
 
 (define-function xfce_external_panel_plugin_get_type
   (c-name xfce_external_panel_plugin_get_type)
@@ -24,8 +24,8 @@
   (is-constructor-of XfceExternalPanelPlugin)
   (return-type GtkWidget*)
   (parameters
-'(int argc)
-'(char** argv)
+'(gint argc)
+'(gchar** argv)
 '(XfcePanelPluginFunc construct)
   )
 )
diff --git a/panel/gen b/panel/gen
index 9f8bb66..fffe123 100755
--- a/panel/gen
+++ b/panel/gen
@@ -19,7 +19,7 @@ do
[ ${defs} = internal_plugin.defs ]  continue
[ ${defs} = plugin.defs ]  continue

-   python /usr/share/pygtk/2.0/codegen/h2def.py $s ${defs}
+   python2 
/usr/lib/python2.6/site-packages/gtk-2.0/codegen/h2def.py $s ${defs}
fi
 done
 
diff --git a/panel/itembar.defs b/panel/itembar.defs
index b29336b..9376478 100644
--- a/panel/itembar.defs
+++ b/panel/itembar.defs
@@ -10,7 +10,7 @@
 ;; Enumerations and flags ...
 
 
-;; From /usr/local/include/xfce4/libxfce4panel/xfce-itembar.h
+;; From xfce-itembar.h
 
 (define-function xfce_itembar_get_type
   (c-name xfce_itembar_get_type)
@@ -26,6 +26,24 @@
   )
 )
 
+(define-method set_maximum_size
+  (of-object XfceItembar)
+  (c-name xfce_itembar_set_maximum_size)
+  (return-type none)
+  (parameters
+'(gint size)
+  )
+)
+
+(define-method set_allow_expand
+  (of-object XfceItembar)
+  (c-name xfce_itembar_set_allow_expand)
+  (return-type none)
+  (parameters
+'(gboolean allow)
+  )
+)
+
 (define-method set_orientation
   (of-object XfceItembar)
   (c-name xfce_itembar_set_orientation)
@@ -47,7 +65,7 @@
   (return-type none)
   (parameters
 '(GtkWidget* item)
-'(int position)
+'(gint position)
   )
 )
 
@@ -75,7 +93,7 @@
   (return-type none)
   (parameters
 '(GtkWidget* item)
-'(int position)
+'(gint position)
   )
 )
 
@@ -101,13 +119,13 @@
 (define-method get_n_items
   (of-object XfceItembar)
   (c-name xfce_itembar_get_n_items)
-  (return-type int)
+  (return-type gint)
 )
 
 (define-method get_item_index
   (of-object XfceItembar)
   (c-name xfce_itembar_get_item_index)
-  (return-type int)
+  (return-type gint)
   (parameters
 '(GtkWidget* item)
   )
@@ -118,7 +136,7 @@
   (c-name xfce_itembar_get_nth_item)
   (return-type GtkWidget*)
   (parameters
-'(int n)
+'(gint n)
   )
 )
 
@@ -145,18 +163,18 @@
   (c-name xfce_itembar_get_item_at_point)
   (return-type GtkWidget*)
   (parameters
-'(int x)
-'(int y)
+'(gint x)
+'(gint y)
   )
 )
 
 (define-method get_drop_index
   (of-object XfceItembar)
   (c-name xfce_itembar_get_drop_index)
-  (return-type int)
+  (return-type gint)
   (parameters
-'(int x)
-'(int y)
+'(gint x)
+'(gint y)
   )
 )
 
diff --git a/panel/plugin_iface.defs b/panel/plugin_iface.defs
index 34f5485..f812f97 100644
--- a/panel/plugin_iface.defs
+++ b/panel/plugin_iface.defs
@@ -9,7 +9,7

[Xfce4-commits] pyxfce:master remove 'xfce-panel-enums.h'.

2010-12-26 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to f85ff6131fd35e2d759e221aa01572db37d62c9d (commit)
   from c090ae95fcf375a6c176a992c5d461d27c81bbf0 (commit)

commit f85ff6131fd35e2d759e221aa01572db37d62c9d
Author: Danny Milosavljevic dan...@xfce.org
Date:   Sun Dec 26 19:59:49 2010 +0100

remove 'xfce-panel-enums.h'.

 panel/arrow_button.c|  112 +++---
 panel/enums.c   |7 +-
 panel/external_plugin.c |   90 +--
 panel/itembar.c |  236 +++
 panel/plugin_iface.c|   15 +++-
 5 files changed, 274 insertions(+), 186 deletions(-)

diff --git a/panel/arrow_button.c b/panel/arrow_button.c
index 9ba7e65..e6ee685 100644
--- a/panel/arrow_button.c
+++ b/panel/arrow_button.c
@@ -24,7 +24,7 @@ static PyTypeObject *_PyGtkToggleButton_Type;
 
 
 /* -- forward type declarations -- */
-PyTypeObject PyXfceArrowButton_Type;
+PyTypeObject G_GNUC_INTERNAL PyXfceArrowButton_Type;
 
 #line 30 arrow_button.c
 
@@ -39,9 +39,9 @@ _wrap_xfce_arrow_button_new(PyGObject *self, PyObject *args, 
PyObject *kwargs)
 PyObject *py_type = NULL;
 GtkArrowType type;
 
-if (!PyArg_ParseTupleAndKeywords(args, kwargs, 
O:XfceArrowButton.__init__, kwlist, py_type))
+if (!PyArg_ParseTupleAndKeywords(args, 
kwargs,O:XfceArrowButton.__init__, kwlist, py_type))
 return -1;
-if (pyg_enum_get_value(GTK_TYPE_ARROW_TYPE, py_type, (gint *)type))
+if (pyg_enum_get_value(GTK_TYPE_ARROW_TYPE, py_type, (gpointer)type))
 return -1;
 self-obj = (GObject *)xfce_arrow_button_new(type);
 
@@ -60,11 +60,13 @@ _wrap_xfce_arrow_button_set_arrow_type(PyGObject *self, 
PyObject *args, PyObject
 PyObject *py_type = NULL;
 GtkArrowType type;
 
-if (!PyArg_ParseTupleAndKeywords(args, kwargs, 
O:XfceArrowButton.set_arrow_type, kwlist, py_type))
+if (!PyArg_ParseTupleAndKeywords(args, 
kwargs,O:XfceArrowButton.set_arrow_type, kwlist, py_type))
 return NULL;
-if (pyg_enum_get_value(GTK_TYPE_ARROW_TYPE, py_type, (gint *)type))
+if (pyg_enum_get_value(GTK_TYPE_ARROW_TYPE, py_type, (gpointer)type))
 return NULL;
+
 xfce_arrow_button_set_arrow_type(XFCE_ARROW_BUTTON(self-obj), type);
+
 Py_INCREF(Py_None);
 return Py_None;
 }
@@ -74,55 +76,59 @@ _wrap_xfce_arrow_button_get_arrow_type(PyGObject *self)
 {
 gint ret;
 
+
 ret = xfce_arrow_button_get_arrow_type(XFCE_ARROW_BUTTON(self-obj));
+
 return pyg_enum_from_gtype(GTK_TYPE_ARROW_TYPE, ret);
 }
 
-static PyMethodDef _PyXfceArrowButton_methods[] = {
-{ set_arrow_type, (PyCFunction)_wrap_xfce_arrow_button_set_arrow_type, 
METH_VARARGS|METH_KEYWORDS },
-{ get_arrow_type, (PyCFunction)_wrap_xfce_arrow_button_get_arrow_type, 
METH_NOARGS },
-{ NULL, NULL, 0 }
+static const PyMethodDef _PyXfceArrowButton_methods[] = {
+{ set_arrow_type, (PyCFunction)_wrap_xfce_arrow_button_set_arrow_type, 
METH_VARARGS|METH_KEYWORDS,
+  NULL },
+{ get_arrow_type, (PyCFunction)_wrap_xfce_arrow_button_get_arrow_type, 
METH_NOARGS,
+  NULL },
+{ NULL, NULL, 0, NULL }
 };
 
-PyTypeObject PyXfceArrowButton_Type = {
+PyTypeObject G_GNUC_INTERNAL PyXfceArrowButton_Type = {
 PyObject_HEAD_INIT(NULL)
-0, /* ob_size */
-arrowbutton.ArrowButton, /* tp_name */
-sizeof(PyGObject), /* tp_basicsize */
-0, /* tp_itemsize */
+0, /* ob_size */
+arrowbutton.ArrowButton,   /* tp_name */
+sizeof(PyGObject),  /* tp_basicsize */
+0, /* tp_itemsize */
 /* methods */
-(destructor)0, /* tp_dealloc */
-(printfunc)0,  /* tp_print */
-(getattrfunc)0,/* tp_getattr */
-(setattrfunc)0,/* tp_setattr */
-(cmpfunc)0,/* tp_compare */
-(reprfunc)0,   /* tp_repr */
+(destructor)0,/* tp_dealloc */
+(printfunc)0,  /* tp_print */
+(getattrfunc)0,   /* tp_getattr */
+(setattrfunc)0,   /* tp_setattr */
+(cmpfunc)0,   /* tp_compare */
+(reprfunc)0, /* tp_repr */
 (PyNumberMethods*)0, /* tp_as_number */
 (PySequenceMethods*)0, /* tp_as_sequence */
 (PyMappingMethods*)0,   /* tp_as_mapping */
-(hashfunc)0,   /* tp_hash */
-(ternaryfunc)0,/* tp_call */
-(reprfunc)0,   /* tp_str */
-(getattrofunc)0,   /* tp_getattro */
-(setattrofunc)0,   /* tp_setattro */
-(PyBufferProcs*)0, /* tp_as_buffer */
+(hashfunc)0, /* tp_hash */
+(ternaryfunc)0,  /* tp_call */
+(reprfunc)0,  /* tp_str */
+(getattrofunc)0, /* tp_getattro */
+(setattrofunc)0, /* tp_setattro */
+(PyBufferProcs*)0,  /* tp_as_buffer

[Xfce4-commits] pyxfce:master remove 'xfce-panel-enums.h' usage, part 2.

2010-12-26 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to e8ae0bda3e33f0bde4ae46fc45848f575c3679aa (commit)
   from f85ff6131fd35e2d759e221aa01572db37d62c9d (commit)

commit e8ae0bda3e33f0bde4ae46fc45848f575c3679aa
Author: Danny Milosavljevic dan...@xfce.org
Date:   Sun Dec 26 20:01:29 2010 +0100

remove 'xfce-panel-enums.h' usage, part 2.

 panel/enum_types.c|   16 +++-
 panel/enum_types.override |2 +-
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/panel/enum_types.c b/panel/enum_types.c
index 8dc519f..79feb24 100644
--- a/panel/enum_types.c
+++ b/panel/enum_types.c
@@ -7,7 +7,7 @@
 #line 6 enum_types.override
 #include pygobject.h
 #include gtk/gtk.h
-#include libxfce4panel/xfce-panel-enums.h
+#include libxfce4panel/libxfce4panel-enum-types.h
 
 extern PyTypeObject PyGtkWidget_Type;
 
@@ -27,8 +27,8 @@ static PyTypeObject *_PyGObject_Type;
 
 /* --- functions --- */
 
-PyMethodDef pyenum_types_functions[] = {
-{ NULL, NULL, 0 }
+const PyMethodDef pyenum_types_functions[] = {
+{ NULL, NULL, 0, NULL }
 };
 
 /* initialise stuff extension classes */
@@ -38,20 +38,18 @@ pyenum_types_register_classes(PyObject *d)
 PyObject *module;
 
 if ((module = PyImport_ImportModule(gobject)) != NULL) {
-PyObject *moddict = PyModule_GetDict(module);
-
-_PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, 
GObject);
+_PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, 
GObject);
 if (_PyGObject_Type == NULL) {
 PyErr_SetString(PyExc_ImportError,
 cannot import name GObject from gobject);
-return;
+return ;
 }
 } else {
 PyErr_SetString(PyExc_ImportError,
 could not import gobject);
-return;
+return ;
 }
 
 
-#line 57 enum_types.c
+#line 55 enum_types.c
 }
diff --git a/panel/enum_types.override b/panel/enum_types.override
index 79dca0a..096d70e 100644
--- a/panel/enum_types.override
+++ b/panel/enum_types.override
@@ -5,7 +5,7 @@
 headers
 #include pygobject.h
 #include gtk/gtk.h
-#include libxfce4panel/xfce-panel-enums.h
+#include libxfce4panel/libxfce4panel-enum-types.h
 
 extern PyTypeObject PyGtkWidget_Type;
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master remove unused files from 'pyxfce/panel'.

2010-12-26 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 77c0630a736158bbac5a82b38e64d63b22def281 (commit)
   from e8ae0bda3e33f0bde4ae46fc45848f575c3679aa (commit)

commit 77c0630a736158bbac5a82b38e64d63b22def281
Author: Danny Milosavljevic dan...@xfce.org
Date:   Sun Dec 26 20:06:23 2010 +0100

remove unused files from 'pyxfce/panel'.

 panel/Makefile.am |2 -
 panel/enum_types.c|   55 -
 panel/enum_types.defs |   18 --
 panel/enum_types.override |   25 
 4 files changed, 0 insertions(+), 100 deletions(-)

diff --git a/panel/Makefile.am b/panel/Makefile.am
index 892262b..c2ec5c9 100644
--- a/panel/Makefile.am
+++ b/panel/Makefile.am
@@ -20,7 +20,6 @@ _panel_la_LIBADD = $(MIGHTY_MOUSE_LIBS) $(PYTHON_LIBS)
 _panel_la_SOURCES = \
arrow_button.c \
enums.c \
-   enum_types.c \
external_plugin.c \
itembar.c \
plugin_iface.c \
@@ -31,7 +30,6 @@ defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
 defs_DATA = \
arrow_button.defs \
enums.defs \
-   enum_types.defs \
external_plugin.defs \
itembar.defs \
plugin_iface.defs \
diff --git a/panel/enum_types.c b/panel/enum_types.c
deleted file mode 100644
index 79feb24..000
--- a/panel/enum_types.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -- THIS FILE IS GENERATED - DO NOT EDIT *//* -*- Mode: C; c-basic-offset: 4 
-*- */
-
-#include Python.h
-
-
-
-#line 6 enum_types.override
-#include pygobject.h
-#include gtk/gtk.h
-#include libxfce4panel/libxfce4panel-enum-types.h
-
-extern PyTypeObject PyGtkWidget_Type;
-
-#line 15 enum_types.c
-
-
-/* -- types from other modules -- */
-static PyTypeObject *_PyGObject_Type;
-#define PyGObject_Type (*_PyGObject_Type)
-
-
-/* -- forward type declarations -- */
-
-#line 25 enum_types.c
-
-
-
-/* --- functions --- */
-
-const PyMethodDef pyenum_types_functions[] = {
-{ NULL, NULL, 0, NULL }
-};
-
-/* initialise stuff extension classes */
-void
-pyenum_types_register_classes(PyObject *d)
-{
-PyObject *module;
-
-if ((module = PyImport_ImportModule(gobject)) != NULL) {
-_PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, 
GObject);
-if (_PyGObject_Type == NULL) {
-PyErr_SetString(PyExc_ImportError,
-cannot import name GObject from gobject);
-return ;
-}
-} else {
-PyErr_SetString(PyExc_ImportError,
-could not import gobject);
-return ;
-}
-
-
-#line 55 enum_types.c
-}
diff --git a/panel/enum_types.defs b/panel/enum_types.defs
deleted file mode 100644
index 68184d8..000
--- a/panel/enum_types.defs
+++ /dev/null
@@ -1,18 +0,0 @@
-;; -*- scheme -*-
-; object definitions ...
-;; Enumerations and flags ...
-
-
-;; From /usr/local/include/xfce4/libxfce4panel/xfce-panel-enum-types.h
-
-(define-function xfce_handle_style_get_type
-  (c-name xfce_handle_style_get_type)
-  (return-type GType)
-)
-
-(define-function xfce_screen_position_get_type
-  (c-name xfce_screen_position_get_type)
-  (return-type GType)
-)
-
-
diff --git a/panel/enum_types.override b/panel/enum_types.override
deleted file mode 100644
index 096d70e..000
--- a/panel/enum_types.override
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- *
- */
-%%
-headers
-#include pygobject.h
-#include gtk/gtk.h
-#include libxfce4panel/libxfce4panel-enum-types.h
-
-extern PyTypeObject PyGtkWidget_Type;
-
-%%
-include
-%%
-modulename enumtypes
-%%
-import gobject.GObject as PyGObject_Type
-%%
-ignore
-%%
-ignore-glob
-  *_get_type
-%%
-ignore-win32
-%%
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master fix netk test.

2010-12-28 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to cff81899796df74e8ac7ee478e829588b117e8de (commit)
   from 77c0630a736158bbac5a82b38e64d63b22def281 (commit)

commit cff81899796df74e8ac7ee478e829588b117e8de
Author: Danny Milosavljevic dan...@xfce.org
Date:   Tue Dec 28 22:57:47 2010 +0100

fix netk test.

 netk/tests/iwindowlist.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/netk/tests/iwindowlist.py b/netk/tests/iwindowlist.py
index 3b1e108..ae5989e 100644
--- a/netk/tests/iwindowlist.py
+++ b/netk/tests/iwindowlist.py
@@ -3,7 +3,7 @@
 import pygtk
 pygtk.require(2.0)
 import gtk
-import xfce4
+import xfce4.netk
 
 screen = xfce4.netk.screen_get_default()
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master add xfconf support.

2010-12-28 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 815985420f03d4b020a24037861829a0a86ddb62 (commit)
   from cff81899796df74e8ac7ee478e829588b117e8de (commit)

commit 815985420f03d4b020a24037861829a0a86ddb62
Author: Danny Milosavljevic dan...@xfce.org
Date:   Tue Dec 28 23:34:54 2010 +0100

add xfconf support.

 Makefile.am   |4 +-
 configure.ac  |3 +-
 netk/gen  |2 +-
 xfconf/Makefile.am|   55 ++
 netk/template.override = xfconf/binding.override |6 +-
 netk/template.override = xfconf/channel.override |6 +-
 netk/template.override = xfconf/errors.override  |6 +-
 xfconf/gen|   55 ++
 netk/template.override = xfconf/types.override   |6 +-
 netk/netk.py = xfconf/xfconf.py  |3 +-
 netk/netkmodule.c = xfconf/xfconfmodule.c|   83 ++---
 11 files changed, 152 insertions(+), 77 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index a642c1d..810c84d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,8 +13,8 @@ if HAVE_MIGHTY_MOUSE
 SUBDIR_MIGHTY_MOUSE = panel
 endif
 
-SUBDIRS = gui netk util $(SUBDIR_MIGHTY_MOUSE)
-DIST_SUBDIRS = gui netk util $(SUBDIR_MIGHTY_MOUSE)
+SUBDIRS = gui netk util xfconf $(SUBDIR_MIGHTY_MOUSE)
+DIST_SUBDIRS = gui netk util xfconf $(SUBDIR_MIGHTY_MOUSE)
 
 PLATFORM_VERSION = 4.2
 PLATFORM_WIN32 =
diff --git a/configure.ac b/configure.ac
index fee8f0a..fe10f1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,7 @@ dnl get rid of the -export-dynamic stuff from the configure 
flags ...
 export_dynamic=`(./libtool --config; echo eval echo 
\\$export_dynamic_flag_spec) | sh`
 
 BM_DEPEND([XFCE4_UTIL], [libxfce4util-1.0], [4.1.0])
-
+BM_DEPEND([XFCE4_XFCONF], [libxfconf-0], [4.6.2])
 BM_DEPEND([XFCE4_GUI], [libxfcegui4-1.0], [4.3.90])
 
 # new panel
@@ -88,5 +88,6 @@ AC_CONFIG_FILES(
   netk/Makefile
   panel/Makefile
   util/Makefile
+  xfconf/Makefile
 )
 AC_OUTPUT
diff --git a/netk/gen b/netk/gen
index fb9c452..f1af90b 100755
--- a/netk/gen
+++ b/netk/gen
@@ -17,7 +17,7 @@ do

#echo ${defs}

-   python /usr/share/pygtk/2.0/codegen/h2def.py $s ${defs}
+   python 
/usr/lib/python2.6/site-packages/gtk-2.0/codegen/h2def.py $s ${defs}
fi
 done
 rm -f util.defs
diff --git a/xfconf/Makefile.am b/xfconf/Makefile.am
new file mode 100644
index 000..09d0e00
--- /dev/null
+++ b/xfconf/Makefile.am
@@ -0,0 +1,55 @@
+...@set_make@
+
+PLATFORM_VERSION = 4.2
+
+common_ldflags = -module -avoid-version -export-symbols-regex init_xfconf
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+INCLUDES = $(PYTHON_INCLUDES)
+
+CODEGEN_PATH = @CODEGEN_PATH@
+
+pyxfceexecdir = $(pyexecdir)/xfce4
+pyxfceexec_LTLIBRARIES = _xfconf.la
+pyxfceexec_PYTHON = xfconf.py
+_xfconf_la_CFLAGS = $(XFCE4_XFCONF_CFLAGS) $(PYTHON_CFLAGS) $(PYGTK_CFLAGS)
+_xfconf_la_LDFLAGS = $(common_ldflags)
+_xfconf_la_LIBADD = $(XFCE4_XFCONF_LIBS) $(PYTHON_LIBS)
+_xfconf_la_SOURCES = \
+   binding.c \
+   channel.c \
+   errors.c \
+   types.c \
+   xfconfmodule.c
+
+defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+defs_DATA = \
+   binding.defs \
+   channel.defs \
+   errors.defs \
+   types.defs
+
+xfconf_overrides = binding.override channel.override errors.override 
types.override
+
+EXTRA_DIST = $(defs_DATA) $(xfconf_overrides) gen
+nodist__xfconf_la_SOURCES =
+
+PYGTK_DEFS=`pkg-config --variable=defsdir pygtk-2.0`
+
+.defs.c:
+   (cd $(srcdir) \
+ $(PYTHON) $(CODEGEN_PATH)/codegen.py \
+  $(PYGTK_CODEGEN_DEFINES) \
+--override $*.override \
+--register $(PYGTK_DEFS)/gtk-types.defs \
+--register $(PYGTK_DEFS)/gdk-types.defs \
+--register binding.defs \
+--register channel.defs \
+--register errors.defs \
+--register types.defs \
+--prefix py$* $*.defs)  gen-$*.c \
+ cp gen-$*.c $*.c \
+ rm -f gen-$*.c
+
diff --git a/netk/template.override b/xfconf/binding.override
similarity index 73%
copy from netk/template.override
copy to xfconf/binding.override
index 0a4011a..fa9bf76 100644
--- a/netk/template.override
+++ b/xfconf/binding.override
@@ -4,13 +4,13 @@
 %%
 headers
 #include pygobject.h
-#include gtk/gtk.h
-#include libxfcegui4/libxfcegui4.h
+#include glib.h
+#include xfconf/xfconf.h
 
 %%
 include
 %%
-modulename *
+modulename classgroup
 %%
 import gobject.GObject as PyGObject_Type
 %%
diff --git a/netk/template.override b/xfconf/channel.override
similarity index 73%
copy from netk/template.override
copy to xfconf/channel.override
index 0a4011a..fa9bf76 100644
--- a/netk/template.override
+++ b/xfconf/channel.override
@@ -4,13 +4,13 @@
 %%
 headers
 #include pygobject.h
-#include gtk/gtk.h

[Xfce4-commits] pyxfce:master init xfconf, add list_channels.

2010-12-28 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to ed71ded18db1b056936cb44537aea2a84e640a76 (commit)
   from 815985420f03d4b020a24037861829a0a86ddb62 (commit)

commit ed71ded18db1b056936cb44537aea2a84e640a76
Author: Danny Milosavljevic dan...@xfce.org
Date:   Tue Dec 28 23:48:50 2010 +0100

init xfconf, add list_channels.

 xfconf/channel.override |   23 +++
 xfconf/gen  |8 
 xfconf/xfconfmodule.c   |6 ++
 3 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/xfconf/channel.override b/xfconf/channel.override
index fa9bf76..c17574f 100644
--- a/xfconf/channel.override
+++ b/xfconf/channel.override
@@ -21,3 +21,26 @@ ignore-glob
 %%
 ignore-win32
 %%
+override xfconf_list_channels kwargs
+static PyObject *
+_wrap_xfconf_list_channels(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+static char *kwlist[] = { NULL };
+gchar **ret;
+int i;
+int count;
+
+if (!PyArg_ParseTupleAndKeywords(args, kwargs, :list_channels, kwlist))
+return NULL;
+ret = xfconf_list_channels();
+if (ret) {
+count = g_strv_length(ret);
+PyObject *py_ret = PyList_New(count);
+for(i = 0; i  count; ++i)
+PyList_SetItem(py_ret, i, PyString_FromString(ret[i]));
+g_strfreev(ret);
+return py_ret;
+}
+Py_INCREF(Py_None);
+return Py_None;
+}
diff --git a/xfconf/gen b/xfconf/gen
index bfe32eb..ad3f8fc 100755
--- a/xfconf/gen
+++ b/xfconf/gen
@@ -41,6 +41,14 @@ cat P   EOF
   (c-name XfconfChannel)
   (gtype-id XFCONF_TYPE_CHANNEL)
 )
+
+(define-function list_channels
+  (c-name xfconf_list_channels)
+  (return-type gchar**)
+  (parameters
+  )
+)
+
 EOF
 cat P channel.defs  channel.defs.new  mv channel.defs.new channel.defs
 
diff --git a/xfconf/xfconfmodule.c b/xfconf/xfconfmodule.c
index 597538b..5cf0de0 100644
--- a/xfconf/xfconfmodule.c
+++ b/xfconf/xfconfmodule.c
@@ -64,10 +64,16 @@ my_register1()
 DL_EXPORT(void)
 init_xfconf(void)
 {
+   GError* error = NULL;
+
/* set the default python encoding to utf-8 */
PyUnicode_SetDefaultEncoding(utf-8);
 
init_pygobject ();
+   if(!xfconf_init(error)) {
+   fprintf (stderr, Unable to initialize xfconf: %s\n, 
error-message);
+   g_error_free(error);
+   }
 
my_register1 ();
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master fix XfconfChannel.get_properties()

2010-12-28 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to c397903391346d2078219ba03488f2ffa27cac6c (commit)
   from ed71ded18db1b056936cb44537aea2a84e640a76 (commit)

commit c397903391346d2078219ba03488f2ffa27cac6c
Author: Danny Milosavljevic dan...@xfce.org
Date:   Wed Dec 29 00:34:21 2010 +0100

fix XfconfChannel.get_properties()

 xfconf/channel.override|   27 +++
 xfconf/tests/testwmconf.py |9 +
 xfconf/xfconfmodule.c  |7 +--
 3 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/xfconf/channel.override b/xfconf/channel.override
index c17574f..6c89fd9 100644
--- a/xfconf/channel.override
+++ b/xfconf/channel.override
@@ -44,3 +44,30 @@ _wrap_xfconf_list_channels(PyObject *self, PyObject *args, 
PyObject *kwargs)
 Py_INCREF(Py_None);
 return Py_None;
 }
+%%
+override xfconf_channel_get_properties kwargs
+static PyObject *
+_wrap_xfconf_channel_get_properties(PyGObject *self, PyObject *args, PyObject 
*kwargs)
+{
+static char *kwlist[] = { property_base, NULL };
+GHashTable *ret;
+char* path;
+
+if (!PyArg_ParseTupleAndKeywords(args, kwargs, 
s:XfconfChannel.get_properties, kwlist, path))
+return NULL;
+ret = xfconf_channel_get_properties(XFCONF_CHANNEL(self-obj), path);
+if (ret) {
+GHashTableIter iter;
+gpointer key, value;
+PyObject* py_ret;
+py_ret = PyDict_New();
+g_hash_table_iter_init(iter, ret);
+while(g_hash_table_iter_next(iter, key, value)) {
+PyDict_SetItem(py_ret, PyString_FromString((const char*) key), 
pyg_value_as_pyobject((GValue*) value, TRUE));
+}
+g_hash_table_destroy(ret);
+return py_ret;
+}
+Py_INCREF(Py_None);
+return Py_None;
+}
diff --git a/xfconf/tests/testwmconf.py b/xfconf/tests/testwmconf.py
new file mode 100644
index 000..2b26a37
--- /dev/null
+++ b/xfconf/tests/testwmconf.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+
+import xfce4.xfconf
+print(xfce4.xfconf.list_channels())
+wm = xfce4.xfconf.channel_get(xfwm4)
+print(wm.get_properties(/))
+wm = xfce4.xfconf.channel_get(xfwm4)
+print(wm.get_properties(/))
+
diff --git a/xfconf/xfconfmodule.c b/xfconf/xfconfmodule.c
index 5cf0de0..3594597 100644
--- a/xfconf/xfconfmodule.c
+++ b/xfconf/xfconfmodule.c
@@ -11,6 +11,8 @@
 #include pygobject.h
 #include pyerrors.h
 
+#include xfconf/xfconf.h
+
 extern const PyMethodDef pybinding_functions[];
 extern const PyMethodDef pychannel_functions[];
 extern const PyMethodDef pyerrors_functions[];
@@ -71,8 +73,9 @@ init_xfconf(void)
 
init_pygobject ();
if(!xfconf_init(error)) {
-   fprintf (stderr, Unable to initialize xfconf: %s\n, 
error-message);
-   g_error_free(error);
+   fprintf(stderr, Unable to initialize xfconf: %s\n, 
error-message);
+   if(pyg_error_check(error))
+   return;
}
 
my_register1 ();
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master add xfconf files.

2010-12-29 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 5d30bc1232fc6a6c50cff22f5c2f8ca3197cc957 (commit)
   from c397903391346d2078219ba03488f2ffa27cac6c (commit)

commit 5d30bc1232fc6a6c50cff22f5c2f8ca3197cc957
Author: Danny Milosavljevic dan...@xfce.org
Date:   Wed Dec 29 23:42:39 2010 +0100

add xfconf files.

 xfconf/binding.c |   70 +
 xfconf/binding.defs  |   58 
 xfconf/channel.c |  501 ++
 xfconf/channel.defs  |  408 +++
 gui/filechooser.c = xfconf/errors.c |   36 ++--
 xfconf/errors.defs   |   40 +++
 util/rc.c = xfconf/types.c  |   26 +-
 xfconf/types.defs|   56 
 8 files changed, 1162 insertions(+), 33 deletions(-)

diff --git a/xfconf/binding.c b/xfconf/binding.c
new file mode 100644
index 000..144c89c
--- /dev/null
+++ b/xfconf/binding.c
@@ -0,0 +1,70 @@
+/* -- THIS FILE IS GENERATED - DO NOT EDIT *//* -*- Mode: C; c-basic-offset: 4 
-*- */
+
+#include Python.h
+
+
+
+#line 6 binding.override
+#include pygobject.h
+#include glib.h
+#include xfconf/xfconf.h
+
+#line 13 binding.c
+
+
+/* -- types from other modules -- */
+static PyTypeObject *_PyGObject_Type;
+#define PyGObject_Type (*_PyGObject_Type)
+
+
+/* -- forward type declarations -- */
+
+#line 23 binding.c
+
+
+
+/* --- functions --- */
+
+static PyObject *
+_wrap_xfconf_g_property_unbind(PyObject *self, PyObject *args, PyObject 
*kwargs)
+{
+static char *kwlist[] = { id, NULL };
+unsigned long id;
+
+if (!PyArg_ParseTupleAndKeywords(args, kwargs,k:g_property_unbind, 
kwlist, id))
+return NULL;
+
+xfconf_g_property_unbind(id);
+
+Py_INCREF(Py_None);
+return Py_None;
+}
+
+const PyMethodDef pybinding_functions[] = {
+{ g_property_unbind, (PyCFunction)_wrap_xfconf_g_property_unbind, 
METH_VARARGS|METH_KEYWORDS,
+  NULL },
+{ NULL, NULL, 0, NULL }
+};
+
+/* initialise stuff extension classes */
+void
+pybinding_register_classes(PyObject *d)
+{
+PyObject *module;
+
+if ((module = PyImport_ImportModule(gobject)) != NULL) {
+_PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, 
GObject);
+if (_PyGObject_Type == NULL) {
+PyErr_SetString(PyExc_ImportError,
+cannot import name GObject from gobject);
+return ;
+}
+} else {
+PyErr_SetString(PyExc_ImportError,
+could not import gobject);
+return ;
+}
+
+
+#line 70 binding.c
+}
diff --git a/xfconf/binding.defs b/xfconf/binding.defs
new file mode 100644
index 000..fa0880f
--- /dev/null
+++ b/xfconf/binding.defs
@@ -0,0 +1,58 @@
+;; -*- scheme -*-
+; object definitions ...
+;; Enumerations and flags ...
+
+
+;; From xfconf-binding.h
+
+(define-function g_property_bind
+  (c-name xfconf_g_property_bind)
+  (return-type gulong)
+  (parameters
+'(XfconfChannel* channel)
+'(const-gchar* xfconf_property)
+'(GType xfconf_property_type)
+'(gpointer object)
+'(const-gchar* object_property)
+  )
+)
+
+(define-function g_property_bind_gdkcolor
+  (c-name xfconf_g_property_bind_gdkcolor)
+  (return-type gulong)
+  (parameters
+'(XfconfChannel* channel)
+'(const-gchar* xfconf_property)
+'(gpointer object)
+'(const-gchar* object_property)
+  )
+)
+
+(define-function g_property_unbind
+  (c-name xfconf_g_property_unbind)
+  (return-type none)
+  (parameters
+'(gulong id)
+  )
+)
+
+(define-function g_property_unbind_by_property
+  (c-name xfconf_g_property_unbind_by_property)
+  (return-type none)
+  (parameters
+'(XfconfChannel* channel)
+'(const-gchar* xfconf_property)
+'(gpointer object)
+'(const-gchar* object_property)
+  )
+)
+
+(define-function g_property_unbind_all
+  (c-name xfconf_g_property_unbind_all)
+  (return-type none)
+  (parameters
+'(gpointer channel_or_object)
+  )
+)
+
+
diff --git a/xfconf/channel.c b/xfconf/channel.c
new file mode 100644
index 000..2e4004a
--- /dev/null
+++ b/xfconf/channel.c
@@ -0,0 +1,501 @@
+/* -- THIS FILE IS GENERATED - DO NOT EDIT *//* -*- Mode: C; c-basic-offset: 4 
-*- */
+
+#include Python.h
+
+
+
+#line 6 channel.override
+#include pygobject.h
+#include glib.h
+#include xfconf/xfconf.h
+
+#line 13 channel.c
+
+
+/* -- types from other modules -- */
+static PyTypeObject *_PyGObject_Type;
+#define PyGObject_Type (*_PyGObject_Type)
+
+
+/* -- forward type declarations -- */
+PyTypeObject G_GNUC_INTERNAL PyXfconfChannel_Type;
+
+#line 24 channel.c
+
+
+
+/* --- XfconfChannel --- */
+
+static int
+_wrap_xfconf_channel_new(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+static char *kwlist[] = { channel_name, NULL };
+char *channel_name;
+
+if (!PyArg_ParseTupleAndKeywords(args, kwargs,s:XfconfChannel.__init__, 
kwlist, channel_name

[Xfce4-commits] pyxfce:master add xfconf to '__init__.py'.

2010-12-29 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 13fdab2b3ef05a53bc28be66dc1cf23e73985cc3 (commit)
   from 5d30bc1232fc6a6c50cff22f5c2f8ca3197cc957 (commit)

commit 13fdab2b3ef05a53bc28be66dc1cf23e73985cc3
Author: Danny Milosavljevic dan...@xfce.org
Date:   Wed Dec 29 23:50:40 2010 +0100

add xfconf to '__init__.py'.

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

diff --git a/__init__.py b/__init__.py
index ab8916f..01e6977 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,5 +1,5 @@
 
-__all__ = [ gui, menu, netk, panel, util ]
+__all__ = [ gui, menu, netk, panel, util, xfconf ]
 
 #import util
 #import gui
diff --git a/configure.ac b/configure.ac
index fe10f1e..3587f9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,6 +12,7 @@ m4_define(pyxfce_version, 
pyxfce_major_version.pyxfce_minor_version.pyxfce_micro
 m4_define(xfce_required_version, 4.4.0)
 
 AC_INIT(pyxfce, pyxfce_version, [])
+AC_CONFIG_MACRO_DIR([m4])
 
 AC_DEFINE(PYXFCE_MAJOR_VERSION, pyxfce_major_version, [pyxfce major version])
 AC_DEFINE(PYXFCE_MINOR_VERSION, pyxfce_minor_version, [pyxfce minor version])
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4menu:master fix missing format string in tests.

2011-01-02 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 85c7226797540218db058652c91ab85eac5b0d81 (commit)
   from 50cfa94cb3a3ce86ee318d6cca6b47da397324e3 (commit)

commit 85c7226797540218db058652c91ab85eac5b0d81
Author: Danny Milosavljevic dan...@xfce.org
Date:   Sun Jan 2 20:55:05 2011 +0100

fix missing format string in tests.

 tests/test-display-menu.c |2 +-
 tests/test-menu-spec.c|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test-display-menu.c b/tests/test-display-menu.c
index f361d37..16d2f3a 100644
--- a/tests/test-display-menu.c
+++ b/tests/test-display-menu.c
@@ -408,7 +408,7 @@ main (intargc,
 }
   else
 {
-  g_error (error-message);
+  g_error (%s, error-message);
   exit_code = EXIT_FAILURE;
 }
 
diff --git a/tests/test-menu-spec.c b/tests/test-menu-spec.c
index f5514bd..b979d11 100644
--- a/tests/test-menu-spec.c
+++ b/tests/test-menu-spec.c
@@ -107,7 +107,7 @@ main (intargc,
 }
   else
 {
-  g_error (error-message);
+  g_error (%s, error-message);
   g_error_free (error);
 #ifdef HAVE_STDLIB_H
   exit_code = EXIT_FAILURE;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4menu:master add enum-types (enum value symbols).

2011-01-02 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 60310e06364f913c0a2bd21b2935689047f175b1 (commit)
   from 85c7226797540218db058652c91ab85eac5b0d81 (commit)

commit 60310e06364f913c0a2bd21b2935689047f175b1
Author: Danny Milosavljevic dan...@xfce.org
Date:   Sun Jan 2 21:08:08 2011 +0100

add enum-types (enum value symbols).

 libxfce4menu/Makefile.am|   45 ++-
 libxfce4menu/libxfce4menu.h |1 +
 2 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/libxfce4menu/Makefile.am b/libxfce4menu/Makefile.am
index 2bf778c..61c04f5 100644
--- a/libxfce4menu/Makefile.am
+++ b/libxfce4menu/Makefile.am
@@ -12,7 +12,12 @@ INCLUDES =   
\
 lib_LTLIBRARIES =  \
libxfce4menu-0.1.la
 
+libxfce4menu_enum_headers = \
+   xfce-menu-layout.h \
+   xfce-menu-monitor.h
+
 libxfce4menu_headers = \
+   libxfce4menu-enum-types.h \
xfce-menu.h \
xfce-menu-element.h \
xfce-menu-separator.h   \
@@ -48,6 +53,10 @@ libxfce4menu_sources =   
\
xfce-menu-monitor.c \
xfce-menu-item.c
 
+libxfce4menu_built_sources = \
+   libxfce4menu-enum-types.c \
+   libxfce4menu-enum-types.h
+   
 libxfce4menuincludedir = $(includedir)/xfce4/libxfce4menu-0.1/libxfce4menu
 
 libxfce4menuinclude_HEADERS =  \
@@ -57,7 +66,8 @@ libxfce4menuinclude_HEADERS = 
\
 
 libxfce4menu_0_1_la_SOURCES =  \
$(libxfce4menu_sources) \
-   $(libxfce4menu_headers)
+   $(libxfce4menu_headers) \
+   $(libxfce4menu_built_sources)
 
 libxfce4menu_0_1_la_CFLAGS =   \
$(GLIB_CFLAGS)  \
@@ -90,3 +100,36 @@ pkgconfig_DATA = libxfce4menu-0.1.pc
 
 # required for gtk-doc
 dist-hook: all
+
+if MAINTAINER_MODE
+CLEANFILES = 
+DISTCLEANFILES = \
+   $(libxfce4menu_built_sources)  
+   
+BUILT_SOURCES = \
+   $(libxfce4menu_built_sources)
+
+libxfce4menu-enum-types.h: stamp-libxfce4menu-enum-types.h
+   @true
+stamp-libxfce4menu-enum-types.h: $(libxfce4menu_enum_headers) Makefile
+   $(AM_V_GEN) ( cd $(srcdir)  glib-mkenums \
+   --fhead #ifndef __LIBXFCE4UI_ENUM_TYPES_H__\n#define 
__LIBXFCE4UI_ENUM_TYPES_H__\n\nG_BEGIN_DECLS\n\n \
+   --fprod /* enumerations from \@filen...@\ */\n\n \
+   --vhead GType @enum_n...@_get_type(void) 
G_GNUC_CONST;\n#define xfce_ty...@enumshort@ (@enum_n...@_get_type())\n\n \
+   --ftail G_END_DECLS\n\n#endif /* !__LIBXFCE4UI_ENUM_TYPES_H__ 
*/ \
+   $(libxfce4menu_enum_headers) ) xgen-leth
+   cmp -s xgen-leth libxfce4menu-enum-types.h || cp xgen-leth 
libxfce4menu-enum-types.h
+   rm -f xgen-leth
+   echo timestamp  $(@F)
+libxfce4menu-enum-types.c: $(libxfce4menu_enum_headers) Makefile
+   $(AM_V_GEN) ( cd $(srcdir)  glib-mkenums \
+   --fhead #include libxfce4menu/libxfce4menu.h\n\n \
+   --fprod /* enumerations from \@filen...@\ */\n\n \
+   --vhead gtyp...@enum_name@_get_type(void)\n{\nstatic GType 
type = 0;\n\nif(!type) {\nstatic const g...@type@Value values[] = 
{\
+   --vprod { @VALUENAME@, \@valuen...@\, 
\@valuen...@\ }, \
+   --vtail { 0, NULL, NULL }\n\t};\n\ttype = 
g...@type@_register_static(\@enumn...@\, values);\n}\n\nreturn 
type;\n}\n\n \
+   --ftail \n#define __LIBXFCE4UI_ENUM_TYPES_C__\n\n \
+   $(libxfce4menu_enum_headers) )  xgen-letc
+   cp xgen-letc libxfce4menu-enum-types.c
+   rm -f xgen-letc
+endif
diff --git a/libxfce4menu/libxfce4menu.h b/libxfce4menu/libxfce4menu.h
index 15c18b3..05758e0 100644
--- a/libxfce4menu/libxfce4menu.h
+++ b/libxfce4menu/libxfce4menu.h
@@ -40,6 +40,7 @@
 #include libxfce4menu/xfce-menu-separator.h
 #include libxfce4menu/xfce-menu.h
 #include libxfce4menu/xfce-menu-monitor.h
+#include libxfce4menu/libxfce4menu-enum-types.h
 
 #define LIBXFCE4MENU_INSIDE_LIBXFCE4MENU_H
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] pyxfce:master add new defs.

2011-01-02 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to b8dcfd800d67de1871b8e568df9081e983c8eac4 (commit)
   from f003847dcad1c2034083bb53386d4c46eae0e1e7 (commit)

commit b8dcfd800d67de1871b8e568df9081e983c8eac4
Author: Danny Milosavljevic dan...@xfce.org
Date:   Sun Jan 2 20:34:54 2011 +0100

add new defs.

 panel/convenience.defs |   23 +++
 panel/hvbox.defs   |   46 +
 panel/image.defs   |   81 +
 panel/libxfce4panel.defs   |8 +
 panel/libxfce4panel_config.defs|   18 ++
 panel/libxfce4panel_enum_types.defs|   13 ++
 panel/{enums.defs = libxfce4panel_enums.defs} |2 +-
 panel/macros.defs  |8 +
 panel/macros_46.defs   |8 +
 panel/plugin.defs  |  224 
 panel/plugin_provider.defs |  164 +
 ui/dialogs.defs|   97 ++
 ui/gdk_extensions.defs |   16 ++
 ui/gtk_extensions.defs |   44 +
 ui/libxfce4ui.defs |8 +
 ui/libxfce4ui_config.defs  |   18 ++
 ui/libxfce4ui_enum_types.defs  |   18 ++
 ui/sm_client.defs  |  191 
 ui/spawn.defs  |   53 ++
 ui/titled_dialog.defs  |   53 ++
 20 files changed, 1092 insertions(+), 1 deletions(-)

diff --git a/panel/convenience.defs b/panel/convenience.defs
new file mode 100644
index 000..2f819e7
--- /dev/null
+++ b/panel/convenience.defs
@@ -0,0 +1,23 @@
+;; -*- scheme -*-
+; object definitions ...
+;; Enumerations and flags ...
+
+
+;; From xfce-panel-convenience.h
+
+(define-function xfce_panel_create_button
+  (c-name xfce_panel_create_button)
+  (return-type GtkWidget*)
+)
+
+(define-function xfce_panel_create_toggle_button
+  (c-name xfce_panel_create_toggle_button)
+  (return-type GtkWidget*)
+)
+
+(define-function xfce_panel_get_channel_name
+  (c-name xfce_panel_get_channel_name)
+  (return-type const-gchar*)
+)
+
+
diff --git a/panel/hvbox.defs b/panel/hvbox.defs
new file mode 100644
index 000..1e3e6e6
--- /dev/null
+++ b/panel/hvbox.defs
@@ -0,0 +1,46 @@
+;; -*- scheme -*-
+; object definitions ...
+(define-object HVBox
+  (in-module Xfce)
+  (parent GtkBox)
+  (c-name XfceHVBox)
+  (gtype-id XFCE_TYPE_HV_BOX)
+)
+
+;; Enumerations and flags ...
+
+
+;; From xfce-hvbox.h
+
+(define-function xfce_hvbox_get_type
+  (c-name xfce_hvbox_get_type)
+  (return-type GType)
+)
+
+(define-function xfce_hvbox_new
+  (c-name xfce_hvbox_new)
+  (is-constructor-of XfceHvbox)
+  (return-type GtkWidget*)
+  (parameters
+'(GtkOrientation orientation)
+'(gboolean homogeneous)
+'(gint spacing)
+  )
+)
+
+(define-method set_orientation
+  (of-object XfceHVBox)
+  (c-name xfce_hvbox_set_orientation)
+  (return-type none)
+  (parameters
+'(GtkOrientation orientation)
+  )
+)
+
+(define-method get_orientation
+  (of-object XfceHVBox)
+  (c-name xfce_hvbox_get_orientation)
+  (return-type GtkOrientation)
+)
+
+
diff --git a/panel/image.defs b/panel/image.defs
new file mode 100644
index 000..47ce250
--- /dev/null
+++ b/panel/image.defs
@@ -0,0 +1,81 @@
+;; -*- scheme -*-
+; object definitions ...
+(define-object PanelImage
+  (in-module Xfce)
+  (parent GtkWidget)
+  (c-name XfcePanelImage)
+  (gtype-id XFCE_TYPE_PANEL_IMAGE)
+)
+
+;; Enumerations and flags ...
+
+
+;; From xfce-panel-image.h
+
+(define-function xfce_panel_image_get_type
+  (c-name xfce_panel_image_get_type)
+  (return-type GType)
+)
+
+(define-function xfce_panel_image_new
+  (c-name xfce_panel_image_new)
+  (is-constructor-of XfcePanelImage)
+  (return-type GtkWidget*)
+)
+
+(define-function xfce_panel_image_new_from_pixbuf
+  (c-name xfce_panel_image_new_from_pixbuf)
+  (return-type GtkWidget*)
+  (parameters
+'(GdkPixbuf* pixbuf)
+  )
+)
+
+(define-function xfce_panel_image_new_from_source
+  (c-name xfce_panel_image_new_from_source)
+  (return-type GtkWidget*)
+  (parameters
+'(const-gchar* source)
+  )
+)
+
+(define-method set_from_pixbuf
+  (of-object XfcePanelImage)
+  (c-name xfce_panel_image_set_from_pixbuf)
+  (return-type none)
+  (parameters
+'(GdkPixbuf* pixbuf)
+  )
+)
+
+(define-method set_from_source
+  (of-object XfcePanelImage)
+  (c-name xfce_panel_image_set_from_source)
+  (return-type none)
+  (parameters
+'(const-gchar* source)
+  )
+)
+
+(define-method set_size
+  (of-object XfcePanelImage)
+  (c-name xfce_panel_image_set_size)
+  (return-type none)
+  (parameters
+'(gint size)
+  )
+)
+
+(define-method get_size
+  (of-object XfcePanelImage)
+  (c-name xfce_panel_image_get_size)
+  (return-type gint)
+)
+
+(define-method clear
+  (of-object XfcePanelImage)
+  (c-name xfce_panel_image_clear)
+  (return

[Xfce4-commits] pyxfce:master add 'menu' module.

2011-01-02 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 8e609a1ac637654e4ec4377f8efb824a5fe0c095 (commit)
   from b8dcfd800d67de1871b8e568df9081e983c8eac4 (commit)

commit 8e609a1ac637654e4ec4377f8efb824a5fe0c095
Author: Danny Milosavljevic dan...@xfce.org
Date:   Sun Jan 2 21:13:53 2011 +0100

add 'menu' module.

 Makefile.am|4 +-
 configure.ac   |2 +
 menu/Makefile.am   |  101 ++
 menu/gen   |   36 ++
 .../binding.override = menu/libxfce4menu.override |4 +-
 .../libxfce4menu_config.override   |4 +-
 xfconf/binding.override = menu/menu.override  |4 +-
 ui/ui.py = menu/menu.py   |2 +-
 .../menu_and_rules.override|4 +-
 .../menu_directory.override|4 +-
 .../binding.override = menu/menu_element.override |4 +-
 .../menu_environment.override  |4 +-
 xfconf/binding.override = menu/menu_item.override |4 +-
 .../menu_item_cache.override   |4 +-
 .../menu_item_pool.override|4 +-
 .../errors.override = menu/menu_layout.override   |6 +-
 .../binding.override = menu/menu_monitor.override |4 +-
 xfconf/binding.override = menu/menu_move.override |4 +-
 .../menu_not_rules.override|4 +-
 .../menu_or_rules.override |4 +-
 .../binding.override = menu/menu_rules.override   |4 +-
 .../menu_separator.override|4 +-
 .../menu_standard_rules.override   |4 +-
 menu/menumodule.c  |  141 
 panel/panelmodule.c|2 +-
 25 files changed, 298 insertions(+), 64 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7b3fd10..29d7729 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,8 +13,8 @@ if HAVE_MIGHTY_MOUSE
 SUBDIR_MIGHTY_MOUSE = panel
 endif
 
-SUBDIRS = ui util xfconf $(SUBDIR_MIGHTY_MOUSE)
-DIST_SUBDIRS = ui util xfconf $(SUBDIR_MIGHTY_MOUSE)
+SUBDIRS = ui util xfconf $(SUBDIR_MIGHTY_MOUSE) menu
+DIST_SUBDIRS = ui util xfconf $(SUBDIR_MIGHTY_MOUSE) menu
 
 PLATFORM_VERSION = 4.2
 PLATFORM_WIN32 =
diff --git a/configure.ac b/configure.ac
index 2f93b3c..f8e3a10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ export_dynamic=`(./libtool --config; echo eval echo 
\\$export_dynamic_flag_spec)
 BM_DEPEND([XFCE4_UTIL], [libxfce4util-1.0], [4.1.0])
 BM_DEPEND([XFCE4_XFCONF], [libxfconf-0], [4.6.2])
 BM_DEPEND([XFCE4_UI], [libxfce4ui-1], [4.7.5])
+BM_DEPEND([XFCE4_MENU], [libxfce4menu-0.1], [4.6.2])
 
 dnl new panel
 
@@ -89,5 +90,6 @@ AC_CONFIG_FILES(
   panel/Makefile
   util/Makefile
   xfconf/Makefile
+  menu/Makefile
 )
 AC_OUTPUT
diff --git a/menu/Makefile.am b/menu/Makefile.am
new file mode 100644
index 000..0701ebb
--- /dev/null
+++ b/menu/Makefile.am
@@ -0,0 +1,101 @@
+...@set_make@
+
+PLATFORM_VERSION = 4.2
+
+CODEGEN_PATH = @CODEGEN_PATH@
+
+common_ldflags = -module -avoid-version -export-symbols-regex init_menu
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+INCLUDES = $(PYTHON_INCLUDES)
+
+pyxfceexecdir = $(pyexecdir)/xfce4
+pyxfceexec_LTLIBRARIES = _menu.la
+pyxfceexec_PYTHON = menu.py
+
+_menu_la_CFLAGS = $(XFCE4_MENU_CFLAGS) $(PYTHON_CFLAGS) $(PYGTK_CFLAGS)
+_menu_la_LDFLAGS = $(common_ldflags)
+_menu_la_LIBADD = $(XFCE4_MENU_LIBS)
+#-export-symbols-regex
+_menu_la_SOURCES = \
+   libxfce4menu_config.c \
+   libxfce4menu.c \
+   menu_and_rules.c \
+   menu_directory.c \
+   menu_element.c \
+   menu_environment.c \
+   menu_item_cache.c \
+   menu_item.c \
+   menu_item_pool.c \
+   menu_layout.c \
+   menu_monitor.c \
+   menu_move.c \
+   menu_not_rules.c \
+   menu_or_rules.c \
+   menu.c \
+   menu_rules.c \
+   menu_separator.c \
+   menu_standard_rules.c \
+   menumodule.c
+
+defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+defs_DATA = \
+   libxfce4menu_config.defs \
+   libxfce4menu.defs \
+   menu_and_rules.defs \
+   menu_directory.defs \
+   menu_element.defs \
+   menu_environment.defs \
+   menu_item_cache.defs \
+   menu_item.defs \
+   menu_item_pool.defs \
+   menu_layout.defs \
+   menu_monitor.defs \
+   menu_move.defs \
+   menu_not_rules.defs \
+   menu_or_rules.defs \
+   menu.defs \
+   menu_rules.defs \
+   menu_separator.defs \
+   menu_standard_rules.defs
+
+menu_overrides = \
+   libxfce4menu_config.override \
+   libxfce4menu.override \
+   menu_and_rules.override \
+   menu_directory.override \
+   menu_element.override \
+   menu_environment.override \
+   menu_item_cache.override \
+   menu_item.override

[Xfce4-commits] pyxfce:master clean up some warnings.

2011-01-02 Thread Danny Milosavljevic
Updating branch refs/heads/master
 to 8b18960868c83d5c948958c7e108b1f2b31ceb9f (commit)
   from 744591da2d5aa1d4f44304f744436aea3e2f521a (commit)

commit 8b18960868c83d5c948958c7e108b1f2b31ceb9f
Author: Danny Milosavljevic dan...@xfce.org
Date:   Sun Jan 2 21:39:44 2011 +0100

clean up some warnings.

 panel/external_plugin.c  |1 -
 panel/xfce-panel-macros-47.h |8 
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/panel/external_plugin.c b/panel/external_plugin.c
index f94bb6d..37d13f2 100644
--- a/panel/external_plugin.c
+++ b/panel/external_plugin.c
@@ -17,7 +17,6 @@ static PyObject *
 register_external_full_constructor(PyGObject *self, PyObject *args, PyObject 
*kwargs)
 {
 static char *kwlist[] = { socket_ID, plugin, NULL };
-GtkOrientation orientation;
 int socket_ID;
 PyGObject *py_plugin = NULL;
 XfcePanelPlugin* plugin = NULL;
diff --git a/panel/xfce-panel-macros-47.h b/panel/xfce-panel-macros-47.h
index 4dbe190..c7db7be 100644
--- a/panel/xfce-panel-macros-47.h
+++ b/panel/xfce-panel-macros-47.h
@@ -375,12 +375,12 @@ G_BEGIN_DECLS
 display-name, argv[PLUGIN_ARGV_DISPLAY_NAME], \
 comment, argv[PLUGIN_ARGV_COMMENT],  \
 arguments, argv + PLUGIN_ARGV_ARGUMENTS, NULL); \
-gtk_container_add (GTK_CONTAINER (plug), xpp); \
+gtk_container_add (GTK_CONTAINER (plug), GTK_WIDGET(xpp)); \
 g_signal_connect_after (G_OBJECT (xpp), realize, \
 G_CALLBACK (_xpp_realize), plug); \
 g_signal_connect_after (G_OBJECT (xpp), destroy, \
 G_CALLBACK (_xpp_quit_main_loop), NULL); \
-gtk_widget_show (xpp); \
+gtk_widget_show (GTK_WIDGET(xpp)); \
 \
 if (*argv[PLUGIN_ARGV_BACKGROUND_IMAGE] != '\0') \
   { \
@@ -427,12 +427,12 @@ G_BEGIN_DECLS
   colormap = gdk_screen_get_rgb_colormap (screen); \
 if (colormap != NULL) \
   gtk_widget_set_colormap (plug, colormap); \
-gtk_container_add (GTK_CONTAINER (plug), xpp); \
+gtk_container_add (GTK_CONTAINER (plug), GTK_WIDGET(xpp)); \
 g_signal_connect_after (G_OBJECT (xpp), realize, \
 G_CALLBACK (_xpp_realize), plug); \
 g_signal_connect_after (G_OBJECT (xpp), destroy, \
 G_CALLBACK (_xpp_quit_main_loop), NULL); \
-gtk_widget_show (xpp); \
+gtk_widget_show (GTK_WIDGET(xpp)); \
 \
 if (0) \
   { \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


<    1   2