Changeset d59692733904…
Parent 80328fcaac52…
by
Changes to 3 files · Browse files at d59692733904 Showing diff from parent 80328fcaac52 Diff from another changeset...
|
@@ -1,31 +0,0 @@ - # configure TortoiseHg shell extension settings
-
-import os
-import sys
-import gtk
-
-from tortoisehg.util.i18n import agettext as _
-from tortoisehg.util import paths
-from tortoisehg.hgtk import taskbarui
-# import hgtk for signal setup side-effects
-from tortoisehg.hgtk import hgtk
-
-if hasattr(sys, "frozen"):
- # Insert PATH to binary installer gtk directory
- gtkpath = os.path.join(paths.bin_path, 'gtk')
- os.environ['PATH'] = os.pathsep.join([gtkpath, os.environ['PATH']])
- # Give stdout/stderr closed attributes to prevent ui.py errors
- sys.stdout.closed = True
- sys.stderr.closed = True
-
-def main():
- dlg = taskbarui.TaskBarUI()
- dlg.show_all()
- dlg.connect('destroy', gtk.main_quit)
- gtk.gdk.threads_init()
- gtk.gdk.threads_enter()
- gtk.main()
- gtk.gdk.threads_leave()
-
-if __name__=='__main__':
- main()
|
@@ -30,8 +30,8 @@ except ImportError:
config_nofork = None
-nonrepo_commands = '''userconfig clone debugcomplete init about help
-version thgstatus serve'''
+nonrepo_commands = '''userconfig shellconfig clone debugcomplete init
+about help version thgstatus serve'''
# Add TortoiseHg signals, hooked to key accelerators in gtklib
for sig in ('copy-clipboard', 'thg-diff', 'thg-parent', 'thg-rename',
@@ -329,6 +329,11 @@ from tortoisehg.hgtk.thgconfig import run
gtkrun(run, ui, *pats, **opts)
+def shellconfig(ui, *pats, **opts):
+ """Explorer extension configuration editor"""
+ from tortoisehg.hgtk.shellconf import run
+ gtkrun(run, ui, *pats, **opts)
+
def rename(ui, *pats, **opts):
"""rename a single file or directory"""
if not pats or len(pats) > 2:
@@ -708,3 +713,7 @@ ('hgtk archive')),
"^strip": (strip, [], ('hgtk strip [REV]')),
}
+
+if os.name == 'nt':
+ # TODO: extra detection to determine if shell extension is installed
+ table['shellconfig'] = (shellconfig, [], _('hgtk shellconfig'))
|
Change 1 of 3
Show Entire File
tortoisehg/hgtk/shellconf.py
Stacked
renamed from tortoisehg/hgtk/taskbarui.py
|
||
---|---|---|
@@ -1,4 +1,4 @@ - # taskbarui.py - User interface for the TortoiseHg shell extension settings
+# shellconf.py - User interface for the TortoiseHg shell extension settings
#
# Copyright 2009 Steve Borho <steve@borho.org>
#
@@ -10,14 +10,10 @@import gobject
from tortoisehg.util.i18n import _
-from tortoisehg.util import hglib, settings, menuthg
+from tortoisehg.util import menuthg
from tortoisehg.hgtk import gtklib
-shellcmds = '''about add clone commit datamine init log recovery
-shelve synch status thgstatus userconf repoconf remove rename
-revert serve update vdiff'''.split()
-
-class TaskBarUI(gtk.Window):
+class ShellConfigWindow(gtk.Window):
'User interface for the TortoiseHg taskbar application'
def __init__(self):
'Initialize the Dialog'
@@ -302,3 +298,6 @@ def ovenable_toggled(self, check):
self.lclonly.set_sensitive(check.get_active())
self.apply.set_sensitive(True)
+
+def run(ui, *pats, **opts):
+ return ShellConfigWindow()
|
Loading...