# it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # Onboard is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from __future__ import division, print_function, unicode_literals from Onboard.Version import require_gi_versions require_gi_versions() from gi.repository import Gtk from Onboard.WindowUtils import show_error_dialog ### Config Singleton ### from Onboard.Config import Config config = Config() ######################## ### Logging ### import logging _logger = logging.getLogger("SnippetView") ############### DEFAULT_SNIPPET_LABEL = _("<Enter label>")
import os import sys import time import tempfile import re import subprocess import threading import unittest from contextlib import contextmanager, ExitStack import dbus from dbus.mainloop.glib import DBusGMainLoop from Onboard.Version import require_gi_versions require_gi_versions() from gi.repository import GLib, Gtk from Onboard.utils import Rect from Onboard.LanguageSupport import LanguageDB from Onboard.definitions import Handle DBUS_NAME = "org.onboard.Onboard" DBUS_PATH = "/org/onboard/Onboard/Keyboard" DBUS_IFACE = "org.onboard.Onboard.Keyboard" class _TestGUIBase(unittest.TestCase): class OnboardRemoteInstance: def __init__(self, p, bus): self.process = p