comparison cagou/core/cagou_main.py @ 285:3f7e227aab00

core: disable multitouch emulation with mouse
author Goffi <goffi@goffi.org>
date Wed, 27 Mar 2019 22:22:51 +0100
parents ca4daced4638
children 4772ba26623f
comparison
equal deleted inserted replaced
284:ca4daced4638 285:3f7e227aab00
16 16
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 20
21 import os.path
22 import glob
23 import sys
21 from sat.core.i18n import _ 24 from sat.core.i18n import _
22 from . import kivy_hack 25 from . import kivy_hack
23 kivy_hack.do_hack() 26 kivy_hack.do_hack()
24 from constants import Const as C 27 from constants import Const as C
25 from sat.core import log as logging 28 from sat.core import log as logging
56 from kivy.uix.dropdown import DropDown 59 from kivy.uix.dropdown import DropDown
57 from kivy.uix.behaviors import ButtonBehavior 60 from kivy.uix.behaviors import ButtonBehavior
58 from kivy.core.window import Window 61 from kivy.core.window import Window
59 from kivy.animation import Animation 62 from kivy.animation import Animation
60 from kivy.metrics import dp 63 from kivy.metrics import dp
64 from kivy import utils as kivy_utils
65 from kivy.config import Config as KivyConfig
61 from cagou_widget import CagouWidget 66 from cagou_widget import CagouWidget
62 from . import widgets_handler 67 from . import widgets_handler
63 from .common import IconButton 68 from .common import IconButton
64 from . import menu 69 from . import menu
65 from . import dialog 70 from . import dialog
66 from importlib import import_module 71 from importlib import import_module
67 import os.path
68 import glob
69 import cagou.plugins 72 import cagou.plugins
70 import cagou.kv 73 import cagou.kv
71 from kivy import utils as kivy_utils
72 import sys
73 try: 74 try:
74 from plyer import notification 75 from plyer import notification
75 except ImportError: 76 except ImportError:
76 notification = None 77 notification = None
77 log.warning(_(u"Can't import plyer, some features disabled")) 78 log.warning(_(u"Can't import plyer, some features disabled"))
92 STATE_STOPPED = "stopped" 93 STATE_STOPPED = "stopped"
93 94
94 95
95 # we want white background by default 96 # we want white background by default
96 Window.clearcolor = (1, 1, 1, 1) 97 Window.clearcolor = (1, 1, 1, 1)
98 # we don't want multi-touch emulation with mouse
99 KivyConfig.set('input', 'mouse', 'mouse,disable_multitouch')
97 100
98 101
99 class NotifsIcon(IconButton): 102 class NotifsIcon(IconButton):
100 notifs = properties.ListProperty() 103 notifs = properties.ListProperty()
101 104