summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-17 17:01:05 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-17 17:01:05 +0200
commit3c643c4f48179643cdb7d486aa19b3c2bd76176f (patch)
tree4252fe59899ca6dffe39ab04ce5baafac9f55d1c
parentab14024d10c136a50348caf4faacfa655e57a9c1 (diff)
downloadxmimd-3c643c4f48179643cdb7d486aa19b3c2bd76176f.tar.gz
xmimd-3c643c4f48179643cdb7d486aa19b3c2bd76176f.zip
adding new translucent option, release 1.2
-rw-r--r--.gitignore11
-rw-r--r--Makefile1
-rw-r--r--context.c3
-rw-r--r--debian/changelog7
-rw-r--r--main.c12
-rw-r--r--meego/Makefile3
-rw-r--r--meego/meego-im-connector.c10
-rw-r--r--meego/meego-im-defs.h2
-rw-r--r--meego/meego-im-proxy.c2
-rw-r--r--xmim.h2
10 files changed, 42 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..48d3cbf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+*.o
+test
+xmimd
+xmimd.creator.user
+IMdkit/libIMdkit.a
+meego/libmeego-im-common.a
+debian/files
+debian/*.log
+debian/*.substvars
+debian/xmimd/
+
diff --git a/Makefile b/Makefile
index b596bf8..219583c 100644
--- a/Makefile
+++ b/Makefile
@@ -48,4 +48,3 @@ clean:
$(MAKE) -C meego clean
.PHONY: all clean
-
diff --git a/context.c b/context.c
index 6001e0a..a1ad5a4 100644
--- a/context.c
+++ b/context.c
@@ -128,6 +128,9 @@ static Context* context_alloc()
// TODO Move this somewhere else
context_info_set_int(ctx, "contentType", MeegoImFreeTextContentType);
+ if (opt_translucent) {
+ context_info_set_bool(ctx, MeegoImInfoTranslucent, TRUE);
+ }
return ctx;
}
diff --git a/debian/changelog b/debian/changelog
index deb1599..ff00106 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xmimd (1.2) unstable; urgency=low
+
+ * Add new "--translucent" '-t' option.
+ * Fix a crash when running under PR1.2.
+
+ -- Javier <maemo@javispedro.com> Fri, 17 Aug 2012 16:07:36 +0200
+
xmimd (1.1) unstable; urgency=low
* Make it partially compatible with PR1.3's Maliit "dynamic D-Bus
diff --git a/main.c b/main.c
index d6b9f31..9467b42 100644
--- a/main.c
+++ b/main.c
@@ -40,6 +40,7 @@ XIC x_ic;
char * opt_display = NULL;
gint64 opt_xephyr = 0;
gboolean opt_verbose = FALSE;
+gboolean opt_translucent = FALSE;
static GMainLoop *main_loop;
static MeegoImConnector *m_connector;
@@ -49,15 +50,16 @@ static int x_watch;
static GOptionEntry entries[] =
{
- { "display", 'd', 0, G_OPTION_ARG_STRING, &opt_display, "X11 display to use", "DISPLAY" },
- { "xephyr", 'x', 0, G_OPTION_ARG_INT64, &opt_xephyr, "Xephyr mode", "XEPHYR_WINDOW_ID" },
- { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Verbose mode", NULL },
- { NULL }
+ { "display", 'd', 0, G_OPTION_ARG_STRING, &opt_display, "X11 display to use", "DISPLAY" },
+ { "xephyr", 'x', 0, G_OPTION_ARG_INT64, &opt_xephyr, "Xephyr mode", "XEPHYR_WINDOW_ID" },
+ { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Verbose mode", NULL },
+ { "translucent", 't', 0, G_OPTION_ARG_NONE, &opt_translucent, "Translucent keyboard", NULL },
+ { NULL }
};
static void log_func(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
{
- gboolean def_log_domain = strcmp(log_domain, G_LOG_DOMAIN) == 0;
+ gboolean def_log_domain = !log_domain || strcmp(log_domain, G_LOG_DOMAIN) == 0;
if (log_level & G_LOG_LEVEL_DEBUG) {
// A debug message
if (opt_verbose) {
diff --git a/meego/Makefile b/meego/Makefile
index 4992cad..86dcce4 100644
--- a/meego/Makefile
+++ b/meego/Makefile
@@ -6,7 +6,7 @@ MEEGOIMCOMMON_TARGET:=libmeego-im-common.a
MEEGOIMCOMMON_OBJS:=meego-im-connector.o meego-imcontext-dbus.o meego-im-proxy.o \
qt-keysym-map.o qt-translate.o
MEEGOIMCOMMON_PKGCONFIG:=x11 dbus-glib-1 QtCore QtGui
-MEEGOIMCOMMON_CFLAGS:=$(shell pkg-config --cflags $(MEEGOIMCOMMON_PKGCONFIG)) -DQT_NO_KEYWORDS -std=c99
+MEEGOIMCOMMON_CFLAGS:=$(shell pkg-config --cflags $(MEEGOIMCOMMON_PKGCONFIG)) -DQT_NO_KEYWORDS -std=c99 -DG_LOG_DOMAIN=\"meego-im-common\"
MEEGOIMCOMMON_CXXFLAGS:=$(shell pkg-config --cflags $(MEEGOIMCOMMON_PKGCONFIG))
all: $(MEEGOIMCOMMON_TARGET)
@@ -24,4 +24,3 @@ clean:
rm -f $(MEEGOIMCOMMON_TARGET) *.o
.PHONY: all clean
-
diff --git a/meego/meego-im-connector.c b/meego/meego-im-connector.c
index c1ca0de..00726a8 100644
--- a/meego/meego-im-connector.c
+++ b/meego/meego-im-connector.c
@@ -80,10 +80,16 @@ get_dbus_address()
G_TYPE_STRING, MALIIT_SERVER_ADDRESS_PROPERTY,
G_TYPE_INVALID,
G_TYPE_VALUE, &value, G_TYPE_INVALID)) {
+ if (error) {
+ g_warning("%s: %s", __PRETTY_FUNCTION__, error->message);
+ g_error_free(error);
+ } else {
+ g_warning("%s: Could not call the Maliit address server",
+ __PRETTY_FUNCTION__);
+ }
- g_warning("%s: %s", __PRETTY_FUNCTION__, error->message);
- g_error_free(error);
// Let's try PR1.2 address if PR1.3/Maliit was not found.
+ g_debug("%s: Could not obtain Maliit server address, trying old address");
return g_strdup(MEEGO_IM_SOCKET_PATH);
}
diff --git a/meego/meego-im-defs.h b/meego/meego-im-defs.h
index 85443bc..6fc621d 100644
--- a/meego/meego-im-defs.h
+++ b/meego/meego-im-defs.h
@@ -88,4 +88,6 @@ typedef struct _MeegoImKeyEvent
char *text;
} MeegoImKeyEvent;
+static const char * const MeegoImInfoTranslucent = "maliit-translucent-input-method";
+
#endif
diff --git a/meego/meego-im-proxy.c b/meego/meego-im-proxy.c
index 5326d3b..b1914fe 100644
--- a/meego/meego-im-proxy.c
+++ b/meego/meego-im-proxy.c
@@ -23,7 +23,7 @@
#include "meego-im-proxy-glue.h"
#include "debug.h"
-G_DEFINE_TYPE(MeegoIMProxy, meego_im_proxy, G_TYPE_OBJECT);
+G_DEFINE_TYPE(MeegoIMProxy, meego_im_proxy, G_TYPE_OBJECT)
#define MEEGO_IM_OBJECT_PATH "/com/meego/inputmethod/uiserver1"
#define MEEGO_IM_SERVICE_INTERFACE "com.meego.inputmethod.uiserver1"
diff --git a/xmim.h b/xmim.h
index 2e0283f..4472eca 100644
--- a/xmim.h
+++ b/xmim.h
@@ -12,4 +12,6 @@ extern XIC x_ic;
extern char * opt_display;
extern gint64 opt_xephyr;
+extern gboolean opt_translucent;
+
#endif