114 lines
3.4 KiB
Diff
114 lines
3.4 KiB
Diff
From 87ae4c79779f6e543ae5b75a595e2db04bfc7de2 Mon Sep 17 00:00:00 2001
|
|
From: Daiki Ueno <ueno@unixuser.org>
|
|
Date: Fri, 28 Sep 2012 11:44:47 +0900
|
|
Subject: [PATCH] Add a .desktop file for ibus-setup-m17n.
|
|
|
|
BUG=https://bugzilla.gnome.org/show_bug.cgi?id=684935
|
|
|
|
Review URL: https://codereview.appspot.com/6572062
|
|
---
|
|
configure.ac | 1 +
|
|
po/POTFILES.in | 2 ++
|
|
po/POTFILES.skip | 1 +
|
|
src/Makefile.am | 16 ++++++++++++++++
|
|
src/ibus-setup-m17n.desktop.in.in | 7 +++++++
|
|
src/setup.c | 5 +++++
|
|
6 files changed, 32 insertions(+)
|
|
create mode 100644 po/POTFILES.skip
|
|
create mode 100644 src/ibus-setup-m17n.desktop.in.in
|
|
|
|
Index: ibus-m17n-1.3.4/configure.ac
|
|
===================================================================
|
|
--- ibus-m17n-1.3.4.orig/configure.ac
|
|
+++ ibus-m17n-1.3.4/configure.ac
|
|
@@ -48,6 +48,7 @@ AM_PROG_CC_C_O
|
|
AC_PROG_CXX
|
|
AC_ISC_POSIX
|
|
AC_HEADER_STDC
|
|
+IT_PROG_INTLTOOL([0.35.0])
|
|
AM_PROG_LIBTOOL
|
|
|
|
# check ibus
|
|
Index: ibus-m17n-1.3.4/po/POTFILES.in
|
|
===================================================================
|
|
--- ibus-m17n-1.3.4.orig/po/POTFILES.in
|
|
+++ ibus-m17n-1.3.4/po/POTFILES.in
|
|
@@ -1,3 +1,5 @@
|
|
src/engine.c
|
|
src/m17nutil.c
|
|
src/main.c
|
|
+[type: gettext/glade]src/ibus-m17n-preferences.ui
|
|
+src/ibus-setup-m17n.desktop.in.in
|
|
Index: ibus-m17n-1.3.4/po/POTFILES.skip
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ ibus-m17n-1.3.4/po/POTFILES.skip
|
|
@@ -0,0 +1 @@
|
|
+src/ibus-setup-m17n.desktop.in
|
|
Index: ibus-m17n-1.3.4/src/Makefile.am
|
|
===================================================================
|
|
--- ibus-m17n-1.3.4.orig/src/Makefile.am
|
|
+++ ibus-m17n-1.3.4/src/Makefile.am
|
|
@@ -110,6 +110,7 @@ componentdir = @datadir@/ibus/component
|
|
EXTRA_DIST = \
|
|
m17n.xml.in.in \
|
|
default.xml.in \
|
|
+ $(desktop_in_in_files) \
|
|
$(NULL)
|
|
|
|
DISTCLEANFILES = \
|
|
@@ -120,6 +121,8 @@ DISTCLEANFILES = \
|
|
CLEANFILES = \
|
|
m17n.xml \
|
|
default.xml \
|
|
+ $(desktop_DATA) \
|
|
+ $(desktop_in_files) \
|
|
$(NULL)
|
|
|
|
m17n.xml: m17n.xml.in
|
|
@@ -138,3 +141,16 @@ SUFFIXES = .xml.in .xml
|
|
|
|
test: ibus-engine-m17n
|
|
$(builddir)/ibus-engine-m17n
|
|
+
|
|
+desktop_in_in_files = ibus-setup-m17n.desktop.in.in
|
|
+desktop_in_files = $(desktop_in_in_files:.in.in=.in)
|
|
+
|
|
+$(desktop_in_files): %.desktop.in: %.desktop.in.in Makefile
|
|
+ $(AM_V_GEN) sed \
|
|
+ -e "s|\@libexecdir\@|$(libexecdir)|" \
|
|
+ $< > $@.tmp && mv $@.tmp $@
|
|
+
|
|
+desktopdir=$(datadir)/applications
|
|
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
|
+
|
|
+@INTLTOOL_DESKTOP_RULE@
|
|
Index: ibus-m17n-1.3.4/src/ibus-setup-m17n.desktop.in.in
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ ibus-m17n-1.3.4/src/ibus-setup-m17n.desktop.in.in
|
|
@@ -0,0 +1,7 @@
|
|
+[Desktop Entry]
|
|
+_Name=IBus M17N Setup
|
|
+_Comment=Set up IBus M17N engine
|
|
+Exec=@libexecdir@/ibus-setup-m17n
|
|
+NoDisplay=true
|
|
+Type=Application
|
|
+StartupNotify=true
|
|
Index: ibus-m17n-1.3.4/src/setup.c
|
|
===================================================================
|
|
--- ibus-m17n-1.3.4.orig/src/setup.c
|
|
+++ ibus-m17n-1.3.4/src/setup.c
|
|
@@ -611,6 +611,11 @@ main (gint argc, gchar **argv)
|
|
g_option_context_free (context);
|
|
|
|
gtk_init (&argc, &argv);
|
|
+
|
|
+ if (!opt_name) {
|
|
+ opt_name = (gchar *) g_getenv ("IBUS_ENGINE_NAME");
|
|
+ }
|
|
+
|
|
if (!opt_name) {
|
|
fprintf (stderr, "can't determine IBus engine name; use --name\n");
|
|
exit (1);
|