Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid warnings due to change of apis in talon #1349

Merged
merged 2 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugin/command_history/command_history.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Optional

from talon import Module, actions, imgui, speech_system
from talon import Module, actions, imgui, settings, speech_system

# We keep command_history_size lines of history, but by default display only
# command_history_display of them.
Expand All @@ -23,7 +23,7 @@ def on_phrase(j):

if text is not None:
history.append(text)
history = history[-setting_command_history_size.get() :]
history = history[-settings.get("user.command_history_size") :]


# todo: dynamic rect?
Expand Down
4 changes: 2 additions & 2 deletions plugin/paste_to_insert.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from talon import Context, Module, actions
from talon import Context, Module, actions, settings

mod = Module()
ctx = Context()
Expand All @@ -18,7 +18,7 @@
@ctx.action_class("main")
class MainActions:
def insert(text):
threshold = paste_to_insert_threshold_setting.get()
threshold = settings.get("user.paste_to_insert_threshold")
if 0 <= threshold < len(text):
actions.user.paste(text)
return
Expand Down
2 changes: 1 addition & 1 deletion tags/file_manager/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def clear_lists():


def update_gui():
if gui_folders.showing or setting_auto_show_pickers.get() >= 1:
if gui_folders.showing or settings.get("user.file_manager_auto_show_pickers") >= 1:
gui_folders.show()
gui_files.show()

Expand Down