Skip to content

Commit f74c4d9

Browse files
committed
InputSources.py: Add link to mintsources-im.
1 parent 53795a7 commit f74c4d9

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

files/usr/share/cinnamon/cinnamon-settings/bin/InputSources.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ def __init__(self):
4848

4949
self.engine_config_button = builder.get_object("engine_config_button")
5050
self.engine_config_button.connect("clicked", self.on_engine_config_clicked)
51+
52+
self.im_launch_button = builder.get_object("im_launch_button")
53+
self.im_launch_button.connect("clicked", lambda widget: subprocess.Popen(["mintlocale-im"]))
54+
if not GLib.find_program_in_path("mintlocale-im"):
55+
self.im_launch_button.set_visible(False)
56+
5157
# Configure is ibus-engine-specific; fcitx engines are configured in fcitx.
5258
if using_fcitx():
5359
self.engine_config_button.set_no_show_all(True)

files/usr/share/cinnamon/cinnamon-settings/bin/input-sources-list.ui

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,11 @@
351351
<property name="can-focus">False</property>
352352
<property name="icon-name">xsi-go-down-symbolic</property>
353353
</object>
354+
<object class="GtkImage" id="image3">
355+
<property name="visible">True</property>
356+
<property name="can-focus">False</property>
357+
<property name="icon-name">mintlocale-im</property>
358+
</object>
354359
<object class="GtkBox" id="input_sources_list_box">
355360
<property name="visible">True</property>
356361
<property name="can-focus">False</property>
@@ -481,6 +486,23 @@
481486
<object class="GtkBox">
482487
<property name="visible">True</property>
483488
<property name="can-focus">False</property>
489+
<child>
490+
<object class="GtkButton" id="im_launch_button">
491+
<property name="visible">True</property>
492+
<property name="can-focus">True</property>
493+
<property name="receives-default">True</property>
494+
<property name="no-show-all">True</property>
495+
<property name="tooltip-text" translatable="yes">Change framework or install language support.</property>
496+
<property name="image">image3</property>
497+
<property name="always-show-image">True</property>
498+
</object>
499+
<packing>
500+
<property name="expand">False</property>
501+
<property name="fill">True</property>
502+
<property name="pack-type">end</property>
503+
<property name="position">0</property>
504+
</packing>
505+
</child>
484506
<child>
485507
<object class="GtkButton" id="test_layout">
486508
<property name="label" translatable="yes">View layout</property>
@@ -492,7 +514,7 @@
492514
<property name="expand">False</property>
493515
<property name="fill">True</property>
494516
<property name="pack-type">end</property>
495-
<property name="position">0</property>
517+
<property name="position">1</property>
496518
</packing>
497519
</child>
498520
<child>
@@ -505,7 +527,8 @@
505527
<packing>
506528
<property name="expand">False</property>
507529
<property name="fill">True</property>
508-
<property name="position">1</property>
530+
<property name="pack-type">end</property>
531+
<property name="position">2</property>
509532
</packing>
510533
</child>
511534
<style>

0 commit comments

Comments
 (0)