Skip to content

Commit

Permalink
Fixed small bug, and added im-config as a requirement for all IM
Browse files Browse the repository at this point in the history
  • Loading branch information
clefebvre committed Oct 23, 2014
1 parent 151ece3 commit 0256122
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions usr/lib/linuxmint/mintLocale/im.info
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# IBus
ibus required im-config
ibus required ibus
ibus required gir1.2-ibus-1.0
ibus required ibus-clutter
Expand Down Expand Up @@ -59,6 +60,7 @@ ibus optional ibus-unikey
ibus optional ibus-xkb

# Fcitx
fcitx required im-config
fcitx required fcitx
fcitx required fcitx-config-gtk
fcitx required fcitx-frontend-all
Expand Down Expand Up @@ -146,6 +148,7 @@ fcitx optional fcitx-table-ziranma
fcitx optional fcitx-unikey

# SCIM
scim required im-config
scim required scim
scim required scim-bridge-agent
scim required scim-bridge-client-qt4
Expand All @@ -171,6 +174,7 @@ scim optional scim-thai
scim optional scim-unikey

# UIM
uim required im-config
uim required uim
uim required uim-common
uim required uim-dict-gtk
Expand Down
22 changes: 11 additions & 11 deletions usr/lib/linuxmint/mintLocale/mintLocale.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,16 +524,16 @@ def check_input_methods(self):
gtkbutton.hide()
if IM in cache:
pkg = cache[IM]
missing = []
optional = []
for req in self.im_info[IM].required:
if req in cache and not cache[req].is_installed:
missing.append(req)
for req in self.im_info[IM].optional:
if req in cache and not cache[req].is_installed:
optional.append(req)
if pkg.is_installed:
status = "<span foreground='#4ba048'>%s</span>" % _("Installed")
missing = []
optional = []
for req in self.im_info[IM].required:
if req in cache and not cache[req].is_installed:
missing.append(req)
for req in self.im_info[IM].optional:
if req in cache and not cache[req].is_installed:
optional.append(req)
status = "<span foreground='#4ba048'>%s</span>" % _("Installed")
if len(missing) > 0:
status = "<span foreground='#a04848'>%s</span>" % (_("%d missing components!") % len(missing))
gtkbutton.set_label(_("Install the missing components"))
Expand All @@ -549,9 +549,9 @@ def check_input_methods(self):
else:
status = "<span foreground='#3C3C3C'>%s</span>" % _("Not installed")
gtkbutton.set_label(_("Add support for %s") % name)
gtkbutton.set_tooltip_text('\n'.join(self.im_info[IM].required))
gtkbutton.set_tooltip_text('\n'.join(missing))
gtkbutton.show()
self.to_install[IM] = self.im_info[IM].required
self.to_install[IM] = missing

gtklabel.set_markup("<a href='%s'>%s</a>\n<small><i><span foreground='#3C3C3C'>%s</span></i></small>" % (links[IM], name, status))
else:
Expand Down

0 comments on commit 0256122

Please sign in to comment.