示例#1
0
 def __init__(self, parent=None):
     flags = Gtk.DialogFlags.DESTROY_WITH_PARENT
     dialogue.ListenerDialog.__init__(self, None, parent, flags, ())
     title = "diff: %s" % utils.cwd_rel_home()
     self.set_title(title)
     dtw = WdDiffTextWidget()
     hbox = Gtk.HBox()
     hbox.pack_start(Gtk.Label(_("Mode:")),
                     expand=False,
                     fill=True,
                     padding=0)
     for key in dtw.DIFF_MODES:
         hbox.pack_start(dtw.mode_button[key],
                         expand=False,
                         fill=True,
                         padding=0)
     self.vbox.pack_start(hbox, expand=False, fill=True, padding=0)
     self.vbox.pack_start(dtw, expand=True, fill=True, padding=0)
     tws_display = dtw.tws_display
     self.action_area.pack_end(tws_display,
                               expand=False,
                               fill=False,
                               padding=0)
     for button in dtw.diff_buttons.list:
         self.action_area.pack_start(button,
                                     expand=True,
                                     fill=True,
                                     padding=0)
     self.add_buttons(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
     self.connect("response", self._close_cb)
     self.show_all()
示例#2
0
 def __init__(self, **kwargs):
     if "title" not in kwargs:
         kwargs["title"] = "fetch: {}".format(utils.cwd_rel_home())
     dialogue.CancelOKDialog.__init__(self, **kwargs)
     self.fetch_widget = FetchWidget()
     self.get_content_area().add(self.fetch_widget)
     self.connect("response", self._response_cb)
     self.show_all()
示例#3
0
文件: commit.py 项目: pwil3058/aipoed
 def __init__(self, parent=None):
     flags = Gtk.DialogFlags.DESTROY_WITH_PARENT
     dialogue.ListenerDialog.__init__(self, None, parent, flags)
     self.set_title(_('Commit Staged Changes: %s') % utils.cwd_rel_home())
     self.commit_widget = self.COMMIT_WIDGET()
     self.vbox.pack_start(self.commit_widget, expand=True, fill=True, padding=0)
     self.set_focus_child(self.commit_widget.msg_widget)
     self.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
                                    Gtk.STOCK_OK, Gtk.ResponseType.OK)
     self.connect('response', self._handle_response_cb)
示例#4
0
文件: commit.py 项目: pwil3058/aipoed
 def __init__(self, parent, commit_hash):
     flags = Gtk.DialogFlags.DESTROY_WITH_PARENT
     dialogue.ListenerDialog.__init__(self, None, parent, flags, buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE))
     self.set_title(_('Show Commit: {}: {}').format(commit_hash, utils.cwd_rel_home()))
     self.vbox.pack_start(ShowCommitWidget(commit_hash), expand=True, fill=True, padding=0)
     self.connect('response', self._handle_response_cb)
示例#5
0
文件: commit.py 项目: pwil3058/aipoed
 def __init__(self, parent=None):
     CommitDialog.__init__(self, parent)
     self.set_title(_('Amend Last Commit: %s') % utils.cwd_rel_home())
示例#6
0
 def window_title(self):
     return _("Stash \"{0}\" diff: {1}").format(self._stash,
                                                utils.cwd_rel_home())