[vinagre] Make some defines static const variables
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Make some defines static const variables
- Date: Sun, 14 Aug 2011 10:40:18 +0000 (UTC)
commit b52746977b7c6c07013a708ebe66d2622bbe44fb
Author: David King <amigadave amigadave com>
Date: Sun Aug 14 12:36:22 2011 +0200
Make some defines static const variables
plugins/spice/vinagre-spice-tunnel.c | 2 +-
plugins/vnc/vinagre-vnc-tunnel.c | 2 +-
vinagre/vinagre-prefs.c | 8 ++++----
vinagre/vinagre-ssh.c | 2 +-
vinagre/vinagre-tubes-manager.c | 8 +++-----
5 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/plugins/spice/vinagre-spice-tunnel.c b/plugins/spice/vinagre-spice-tunnel.c
index 8da71df..c5ee78d 100644
--- a/plugins/spice/vinagre-spice-tunnel.c
+++ b/plugins/spice/vinagre-spice-tunnel.c
@@ -36,7 +36,7 @@
#include "vinagre-spice-tunnel.h"
-#define TUNNEL_PORT_OFFSET 5500
+static const int TUNNEL_PORT_OFFSET = 5500;
static int
find_free_port (void)
diff --git a/plugins/vnc/vinagre-vnc-tunnel.c b/plugins/vnc/vinagre-vnc-tunnel.c
index cb9a6bf..d909511 100644
--- a/plugins/vnc/vinagre-vnc-tunnel.c
+++ b/plugins/vnc/vinagre-vnc-tunnel.c
@@ -29,7 +29,7 @@
#include <vinagre/vinagre-ssh.h>
#include "vinagre-vnc-tunnel.h"
-#define TUNNEL_PORT_OFFSET 5500
+static const int TUNNEL_PORT_OFFSET = 5500;
static int
find_free_port (void)
diff --git a/vinagre/vinagre-prefs.c b/vinagre/vinagre-prefs.c
index 53d38d6..fa6acf0 100644
--- a/vinagre/vinagre-prefs.c
+++ b/vinagre/vinagre-prefs.c
@@ -22,10 +22,10 @@
#include <glib/gi18n.h>
#include "vinagre-prefs.h"
-#define VINAGRE_SCHEMA_NAME "org.gnome.Vinagre"
-#define VM_HISTORY_SIZE "history-size"
-#define VM_ALWAYS_ENABLE_LISTENING "always-enable-listening"
-#define VM_SHARED_FLAG "shared-flag"
+static const char VINAGRE_SCHEMA_NAME[] = "org.gnome.Vinagre";
+static const char VM_HISTORY_SIZE[] = "history-size";
+static const char VM_ALWAYS_ENABLE_LISTENING[] = "always-enable-listening";
+static const char VM_SHARED_FLAG[] = "shared-flag";
struct _VinagrePrefsPrivate
{
diff --git a/vinagre/vinagre-ssh.c b/vinagre/vinagre-ssh.c
index 24711ea..2a6b1b6 100644
--- a/vinagre/vinagre-ssh.c
+++ b/vinagre/vinagre-ssh.c
@@ -40,7 +40,7 @@
#include <glib/gi18n.h>
#include <gnome-keyring.h>
-#define SSH_READ_TIMEOUT 40 /* seconds */
+static const int SSH_READ_TIMEOUT = 40; /* seconds */
#ifdef HAVE_GRANTPT
/* We only use this on systems with unix98 ptys */
diff --git a/vinagre/vinagre-tubes-manager.c b/vinagre/vinagre-tubes-manager.c
index 7c856e5..01025f3 100644
--- a/vinagre/vinagre-tubes-manager.c
+++ b/vinagre/vinagre-tubes-manager.c
@@ -38,11 +38,9 @@
#include "vinagre-tube-handler.h"
#include "vinagre-debug.h"
-#define CLIENT_NAME "Vinagre"
-#define SERVICE "rfb"
+#include "config.h"
-#define BUS_NAME TP_CLIENT_BUS_NAME_BASE CLIENT_NAME
-#define OBJECT_PATH TP_CLIENT_OBJECT_PATH_BASE CLIENT_NAME
+static const char SERVICE[] = "rfb";
G_DEFINE_TYPE (VinagreTubesManager, vinagre_tubes_manager, G_TYPE_OBJECT);
@@ -214,7 +212,7 @@ vinagre_tubes_manager_init (VinagreTubesManager *self)
dbus = tp_dbus_daemon_dup (NULL);
- priv->handler = tp_simple_handler_new (dbus, FALSE, FALSE, "Vinagre", FALSE,
+ priv->handler = tp_simple_handler_new (dbus, FALSE, FALSE, PACKAGE_NAME, FALSE,
vinagre_tubes_manager_handle_channels, self, NULL);
g_object_unref (dbus);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]