| Server IP : 39.108.156.168 / Your IP : 216.73.216.104 Web Server : nginx/1.24.0 System : Linux e2.ksyuki.com 6.11.0-25-generic #25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /bin/ |
Upload File : |
#! /usr/bin/python3
import gettext
from LanguageSelector.gtk.GtkLanguageSelector import GtkLanguageSelector
from gettext import gettext as _
from optparse import OptionParser
from gi.repository import Gtk, Gio
import sys
is_running = False
def on_activate (app, options):
global is_running
if is_running:
for window in app.get_windows():
if not window.is_active():
window.present()
return
is_running = True
instance = GtkLanguageSelector(datadir=options.datadir,
options=options)
app.add_window(instance.window_main)
if __name__ == "__main__":
gettext.bindtextdomain("language-selector", "/usr/share/locale")
gettext.textdomain("language-selector")
parser = OptionParser()
parser.add_option("-n", "--no-verify-installed-lang-support",
action="store_false", dest="verify_installed",
default=True,
help=_("don't verify installed language support"))
parser.add_option("-d", "--datadir",
default="/usr/share/language-selector/",
help=_("alternative datadir"))
(options, args) = parser.parse_args()
app = Gtk.Application(application_id="com.ubuntu.GnomeLanguageSelector",
flags=Gio.ApplicationFlags.FLAGS_NONE)
app.connect("activate", on_activate, options)
app.run(None)