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

Fixed issue #856 #1103

Merged
merged 9 commits into from Mar 12, 2013
8 changes: 6 additions & 2 deletions ninja_ide/core/settings.py
Expand Up @@ -26,6 +26,9 @@
# OS DETECTOR
###############################################################################

# Use this flags instead of sys.platform spreaded in the source code
IS_WINDOWS = False

OS_KEY = "Ctrl"

FONT_FAMILY = 'Monospace'
Expand All @@ -40,6 +43,7 @@
elif sys.platform == "win32":
FONT_FAMILY = 'Courier'
FONT_SIZE = 10
IS_WINDOWS = True

###############################################################################
# IDE
Expand Down Expand Up @@ -424,8 +428,8 @@ def load_settings():
'preferences/editor/showTabsAndSpaces', 'true') == 'true'
USE_TABS = qsettings.value('preferences/editor/useTabs', 'false') == 'true'
if USE_TABS:
pep8mod.options.ignore.append("W191")
pep8mod.refresh_checks()
pep8mod_add_ignore("W191")
pep8mod_refresh_checks()
ALLOW_WORD_WRAP = qsettings.value(
'preferences/editor/allowWordWrap', 'false') == 'true'
COMPLETE_DECLARATIONS = qsettings.value(
Expand Down
9 changes: 7 additions & 2 deletions ninja_ide/gui/explorer/tree_projects_widget.py
Expand Up @@ -109,8 +109,13 @@ def __init__(self, state_index=list()):
self.connect(self, SIGNAL(
"customContextMenuRequested(const QPoint &)"),
self._menu_context_tree)
self.connect(self, SIGNAL("itemClicked(QTreeWidgetItem *, int)"),
self._open_file)

signal_name = "itemClicked(QTreeWidgetItem *, int)"
# For windows double click instead of single click
if settings.IS_WINDOWS:
signal_name = "itemDoubleClicked(QTreeWidgetItem *, int)"

self.connect(self, SIGNAL(signal_name), self._open_file)
self.connect(self._fileWatcher, SIGNAL("fileChanged(int, QString)"),
self._refresh_project_by_path)
self.itemExpanded.connect(self._item_expanded)
Expand Down