[Patches] naughty: fix version and announce GetServerInfo over DBUS

2008-12-19 Thread Leon Winter
Hi,

well Julien, you modified my last patch so it did not work ;D
Since you replaced @AWESOME_VERSION@ with just AWESOME_VERSION it
became nil, because it is not defined, see 003: i just added in the
header. The other way would be the @AWESOME_VERSION@ thing, however it
dont think you like it (anyway this is 005).

The last patch 006 is for naughty to announce GetServerInfo and
GetServerInformation over DBUS, so we can simply test it in d-feet e.g.

Since the correct version is announced gajim claims it cannot convert
v3. ... into an int. Well this is not really our problem, but why is a
v in the version string anyway?

Regards,
Leon Winter
From f024841b5fc5b96a6f3e341cb0772fcd86059fe9 Mon Sep 17 00:00:00 2001
From: Leon Winter leon.win...@informatik.uni-oldenburg.de
Date: Fri, 19 Dec 2008 09:34:55 +0100
Subject: [PATCH] naughty: fix returning correct awesome version

---
 lib/naughty.lua.in |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in
index 5ee3f93..785cf75 100644
--- a/lib/naughty.lua.in
+++ b/lib/naughty.lua.in
@@ -20,6 +20,7 @@ local bt = require(beautiful)
 local screen = screen
 local awful = awful
 local dbus = dbus
+local AWESOME_VERSION = AWESOME_VERSION
 
 --- Notification library
 module(naughty)
@@ -439,7 +440,7 @@ elseif data.member == CloseNotification then
 end
 elseif data.member == GetServerInfo or data.member == GetServerInformation then
 -- name of notification app, name of project, version of notification app, project version
-return s, naughty, s, awesome, s, AWESOME_VERSION, s, 1337
+return s, naughty, s, awesome, s, 1337, s, AWESOME_VERSION
 end
 end)
 
-- 
1.5.6.5

From 0f103bbd5d69afb02fd241ed46c459a9cb546cf1 Mon Sep 17 00:00:00 2001
From: Leon Winter leon.win...@informatik.uni-oldenburg.de
Date: Fri, 19 Dec 2008 09:37:13 +0100
Subject: [PATCH] naughty: fix returning correct awesome version

---
 lib/naughty.lua.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in
index 5ee3f93..f81abac 100644
--- a/lib/naughty.lua.in
+++ b/lib/naughty.lua.in
@@ -439,7 +439,7 @@ elseif data.member == CloseNotification then
 end
 elseif data.member == GetServerInfo or data.member == GetServerInformation then
 -- name of notification app, name of project, version of notification app, project version
-return s, naughty, s, awesome, s, AWESOME_VERSION, s, 1337
+return s, naughty, s, awesome, s, 1337, s, @AWESOME_VERSION@
 end
 end)
 
-- 
1.5.6.5

From e6e17969d8eb25939c9f8a364ad4ccd3be5f4bd3 Mon Sep 17 00:00:00 2001
From: Leon Winter leon.win...@informatik.uni-oldenburg.de
Date: Fri, 19 Dec 2008 09:39:06 +0100
Subject: [PATCH] naughty: announce GetServerInfo over dbus

---
 lib/naughty.lua.in |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in
index f81abac..ae5e93e 100644
--- a/lib/naughty.lua.in
+++ b/lib/naughty.lua.in
@@ -470,6 +470,18 @@ Introspection 1.0//EN
   arg name=timeout type=i direction=in/
   arg name=return_id type=u direction=out/
 /method
+method name=GetServerInformation
+  arg name=app_name type=s direction=out/
+  arg name=project_name type=s direction=out/
+  arg name=app_version type=s direction=out/
+  arg name=project_version type=s direction=out/
+/method
+method name=GetServerInfo
+  arg name=app_name type=s direction=out/
+  arg name=project_name type=s direction=out/
+  arg name=app_version type=s direction=out/
+  arg name=project_version type=s direction=out/
+/method
   /interface
 /node]=]
 return s, xml
-- 
1.5.6.5



Re: [Patches] naughty: fix version and announce GetServerInfo over DBUS

2008-12-19 Thread Julien Danjou
At 1229676378 time_t, Leon Winter wrote:
 well Julien, you modified my last patch so it did not work ;D
 Since you replaced @AWESOME_VERSION@ with just AWESOME_VERSION it
 became nil, because it is not defined, see 003: i just added in the
 header. The other way would be the @AWESOME_VERSION@ thing, however it
 dont think you like it (anyway this is 005).

My bad.

 The last patch 006 is for naughty to announce GetServerInfo and
 GetServerInformation over DBUS, so we can simply test it in d-feet e.g.

Nice, pushed.

 Since the correct version is announced gajim claims it cannot convert
 v3. ... into an int. Well this is not really our problem, but why is a
 v in the version string anyway?

This is because it's the git tag which is used.

Cheers,
-- 
Julien Danjou
// ᐰ jul...@danjou.info   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD


signature.asc
Description: Digital signature