summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2011-05-03 10:07:25 -0400
committerPeng Huang <shawn.p.huang@gmail.com>2011-05-03 10:07:25 -0400
commit6a6469f3c85d3a60ee68e074ac3c6b854b837753 (patch)
treea427dcbef908d712390e6d28c7f4f800f7f4cfa9
parenta16d70e01a441193c6bb8a38d7cf093a7ebed19c (diff)
downloadibus-pinyin-6a6469f3c85d3a60ee68e074ac3c6b854b837753.tar.gz
Fixed build errors in Ubuntu 11.04 and get distribution codename from /etc/lsb-release.
BUG=None TEST=Linux desktop Review URL: http://codereview.appspot.com/4428083
-rw-r--r--Makefile.am3
-rw-r--r--src/PYConfig.cc4
-rw-r--r--src/PYDatabase.cc2
3 files changed, 5 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 3a0383c..7e41773 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -80,11 +80,12 @@ srpm: dist @PACKAGE_NAME@.spec
debian/changelog:
$(AM_V_GEN) \
( \
+ . /etc/lsb-release; \
date=`date -R`; \
version=@VERSION@; \
serie=$(serie); \
if test -z "$$serie"; then \
- serie=maverick; \
+ serie=$$DISTRIB_CODENAME; \
fi; \
if test -z "$$release"; then \
release=1; \
diff --git a/src/PYConfig.cc b/src/PYConfig.cc
index b932931..7b1653a 100644
--- a/src/PYConfig.cc
+++ b/src/PYConfig.cc
@@ -312,7 +312,7 @@ PinyinConfig::PinyinConfig (Bus & bus)
void
PinyinConfig::init (Bus & bus)
{
- if (m_instance == NULL) {
+ if (m_instance.get () == NULL) {
m_instance.reset (new PinyinConfig (bus));
m_instance->readDefaultValues ();
}
@@ -435,7 +435,7 @@ BopomofoConfig::BopomofoConfig (Bus & bus)
void
BopomofoConfig::init (Bus & bus)
{
- if (m_instance == NULL) {
+ if (m_instance.get () == NULL) {
m_instance.reset (new BopomofoConfig (bus));
m_instance->readDefaultValues ();
}
diff --git a/src/PYDatabase.cc b/src/PYDatabase.cc
index d6810ce..b92b4df 100644
--- a/src/PYDatabase.cc
+++ b/src/PYDatabase.cc
@@ -718,7 +718,7 @@ Database::remove (const Phrase & phrase)
void
Database::init (void)
{
- if (m_instance == NULL) {
+ if (m_instance.get () == NULL) {
m_instance.reset (new Database ());
}
}