by
Changes to 5 files · Browse files at 6ea918de4837 Showing diff from parent 346877b11747 2e1cc6d04863 Diff from another changeset...
@@ -19,13 +19,16 @@ try:
# Mercurail 0.9.4
from mercurial.cmdutil import parse
+ from mercurial.cmdutil import parseconfig as _parseconfig
except:
try:
# Mercurail <= 0.9.3
from mercurial.commands import parse
+ from mercurial.commands import parseconfig as _parseconfig
except:
# Mercurail 0.9.5
from mercurial.dispatch import _parse as parse
+ from mercurial.dispatch import _parseconfig
finally:
demandimport.enable()
|
@@ -409,8 +409,10 @@ oldtags = self.repo.tagslist()
dialog = TagAddDialog(self.repo.root, rev=str(rev))
- dialog.run()
- dialog.hide()
+ dialog.set_transient_for(self)
+ dialog.show_all()
+ dialog.present()
+ dialog.set_transient_for(None)
# refresh if new tags added
self.repo.invalidate()
@@ -457,6 +459,7 @@ dialog.show_all()
dialog.set_notify_func(self.checkout_completed, parents)
dialog.present()
+ dialog.set_transient_for(None)
def checkout_completed(self, oldparents):
newparents = [x.node() for x in self.repo.workingctx().parents()]
@@ -472,6 +475,7 @@ dialog.show_all()
dialog.set_notify_func(self.merge_completed, parents)
dialog.present()
+ dialog.set_transient_for(None)
def merge_completed(self, oldparents):
newparents = [x.node() for x in self.repo.workingctx().parents()]
|
@@ -46,35 +46,35 @@ self.tips = gtk.Tooltips()
tbuttons = [
self._toolbutton(gtk.STOCK_GO_DOWN,
- 'incoming',
+ 'Incoming',
self._incoming_clicked,
tip='Display changes that can be pulled'
' from selected repository'),
self._toolbutton(gtk.STOCK_GOTO_BOTTOM,
- 'pull',
+ ' Pull ',
self._pull_clicked,
self._pull_menu(),
tip='Pull changes from selected'
' repository'),
gtk.SeparatorToolItem(),
self._toolbutton(gtk.STOCK_GO_UP,
- 'outgoing',
+ 'Outgoing',
self._outgoing_clicked,
tip='Display local changes that will be pushed'
' to selected repository'),
self._toolbutton(gtk.STOCK_GOTO_TOP,
- 'push',
+ 'Push',
self._push_clicked,
tip='Push local changes to selected'
' repository'),
self._toolbutton(gtk.STOCK_GOTO_LAST,
- 'email',
+ 'Email',
self._email_clicked,
tip='Email local outgoing changes to'
' one or more recipients'),
gtk.SeparatorToolItem(),
self._toolbutton(gtk.STOCK_PREFERENCES,
- 'configure',
+ 'Configure',
self._conf_clicked,
tip='Configure peer repository paths'),
gtk.SeparatorToolItem(),
@@ -121,8 +121,16 @@ elif defpushrow is not None:
self._pathbox.set_active(defpushrow)
+ # create checkbox to disable proxy
+ self._use_proxy = gtk.CheckButton("use proxy server")
+ if ui.ui().config('http_proxy', 'host', ''):
+ self._use_proxy.set_active(True)
+ else:
+ self._use_proxy.set_sensitive(False)
+
revbox.pack_start(lbl, False, False)
revbox.pack_start(self._pathbox, True, True)
+ revbox.pack_end(self._use_proxy, False, False)
vbox.pack_start(revbox, False, False, 2)
expander = gtk.Expander('Advanced Options')
@@ -305,14 +313,16 @@ self._exec_cmd(cmd)
def _exec_cmd(self, cmd):
+ proxy_host = ui.ui().config('http_proxy', 'host', '')
+ use_proxy = self._use_proxy.get_active()
text_entry = self._pathbox.get_child()
remote_path = str(text_entry.get_text())
cmdline = cmd[:]
- cmdline.append('--verbose')
- cmdline.append('--repository')
- cmdline.append(self.root)
- cmdline.append(remote_path)
+ cmdline += ['--verbose', '--repository', self.root]
+ if proxy_host and not use_proxy:
+ cmdline += ["--config", "http_proxy.host="]
+ cmdline += [remote_path]
# show command to be executed
self.write("", False)
|
|
@@ -18,12 +18,11 @@ from mercurial.i18n import _
from mercurial.node import *
-class TagAddDialog(gtk.Dialog):
+class TagAddDialog(gtk.Window):
""" Dialog to add tag to Mercurial repo """
def __init__(self, root='', tag='', rev=''):
""" Initialize the Dialog """
- super(TagAddDialog, self).__init__(flags=gtk.DIALOG_MODAL,
- buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))
+ gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
# set dialog title
title = "hg tag "
@@ -48,23 +47,33 @@ self.tbar = gtk.Toolbar()
self.tips = gtk.Tooltips()
+ sep = gtk.SeparatorToolItem()
+ sep.set_expand(True)
+ sep.set_draw(False)
+ self._btn_close = self._toolbutton(gtk.STOCK_CLOSE, 'Close',
+ self._close_clicked, tip='Close Application')
+
self._btn_addtag = self._toolbutton(
gtk.STOCK_ADD,
- 'add',
+ 'Add',
self._btn_addtag_clicked,
tip='Add tag to selected version')
self._btn_rmtag = self._toolbutton(
gtk.STOCK_DELETE,
- 'remove',
+ 'Remove',
self._btn_rmtag_clicked,
tip='Remove tag from repository')
tbuttons = [
self._btn_addtag,
self._btn_rmtag,
+ sep,
+ self._btn_close,
]
for btn in tbuttons:
self.tbar.insert(btn, -1)
- self.vbox.pack_start(self.tbar, False, False, 2)
+ vbox = gtk.VBox()
+ self.add(vbox)
+ vbox.pack_start(self.tbar, False, False, 2)
# tag name input
tagbox = gtk.HBox()
@@ -77,7 +86,7 @@ self._tag_input.set_text(tag)
tagbox.pack_start(lbl, False, False)
tagbox.pack_start(self._taglistbox, True, True)
- self.vbox.pack_start(tagbox, True, True, 2)
+ vbox.pack_start(tagbox, True, True, 2)
# revision input
revbox = gtk.HBox()
@@ -88,7 +97,7 @@ self._rev_input.set_text(rev)
revbox.pack_start(lbl, False, False)
revbox.pack_start(self._rev_input, False, False)
- self.vbox.pack_start(revbox, False, False, 2)
+ vbox.pack_start(revbox, False, False, 2)
# tag options
option_box = gtk.VBox()
@@ -98,18 +107,18 @@ option_box.pack_start(self._local_tag, False, False)
option_box.pack_start(self._replace_tag, False, False)
option_box.pack_start(self._use_msg, False, False)
- self.vbox.pack_start(option_box, False, False, 15)
+ vbox.pack_start(option_box, False, False, 15)
# commit message
lbl = gtk.Label("Commit message:")
lbl.set_alignment(0, 0.5)
self._commit_message = gtk.Entry()
- self.vbox.pack_end(self._commit_message, False, False, 1)
- self.vbox.pack_end(lbl, False, False, 1)
+ vbox.pack_end(self._commit_message, False, False, 1)
+ vbox.pack_end(lbl, False, False, 1)
# show them all
self._refresh()
- self.vbox.show_all()
+ vbox.show_all()
def _toolbutton(self, stock, label, handler,
menu=None, userdata=None, tip=None):
@@ -139,6 +148,9 @@ continue
self._tagslist.append([tagname])
+ def _close_clicked(self, toolbutton, data=None):
+ self.destroy()
+
def _btn_tag_clicked(self, button):
""" select tag from tags dialog """
import tags
@@ -244,7 +256,7 @@
# the dialog maybe called by another window/dialog, so we only
# enable the close dialog handler if dialog is run as mainapp
- dialog.connect('response', gtk.main_quit)
+ dialog.connect('destroy', gtk.main_quit)
dialog.show_all()
gtk.gdk.threads_init()
|
@@ -52,7 +52,7 @@
self._btn_update = self._toolbutton(
gtk.STOCK_REVERT_TO_SAVED,
- 'update',
+ 'Update',
self._btn_update_clicked,
tip='Update working directory to selected revision')
sep = gtk.SeparatorToolItem()
|
Loading...