Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7f39db9c8e9c
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f24f7380f521
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on May 25, 2016

  1. Copy the full SHA
    f5da3f6 View commit details
  2. Copy the full SHA
    f24f738 View commit details
Showing with 6 additions and 6 deletions.
  1. +2 −2 artiq/browser/files.py
  2. +4 −4 artiq/gui/applets.py
4 changes: 2 additions & 2 deletions artiq/browser/files.py
Original file line number Diff line number Diff line change
@@ -100,8 +100,8 @@ def data(self, idx, role):
try:
expid = pyon.decode(h5["expid"].value)
start_time = datetime.fromtimestamp(h5["start_time"].value)
v = ("artiq: {}\nrepo: {}\nfile: {}\nclass_name: {}\n"
"rid: {}\nstart: {}").format(
v = ("artiq_version: {}\nrepo_rev: {}\nfile: {}\n"
"class_name: {}\nrid: {}\nstart_time: {}").format(
h5["artiq_version"].value, expid["repo_rev"],
expid["file"], expid["class_name"],
h5["rid"].value, start_time)
8 changes: 4 additions & 4 deletions artiq/gui/applets.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
import string
import shlex
from functools import partial
from itertools import count

from PyQt5 import QtCore, QtGui, QtWidgets

@@ -296,7 +297,7 @@ def __init__(self, main_window, datasets_sub):

self.table.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
new_action = QtWidgets.QAction("New applet", self.table)
new_action.triggered.connect(self.new)
new_action.triggered.connect(lambda: self.new())
self.table.addAction(new_action)
templates_menu = QtWidgets.QMenu()
for name, template in _templates:
@@ -370,9 +371,8 @@ def on_dock_closed(self, dock):

def new(self, uid=None):
if uid is None:
uid = next(iter(set(range(len(self.applet_uids) + 1))
- self.applet_uids))
assert uid not in self.applet_uids
uid = next(i for i in count() if i not in self.applet_uids)
assert uid not in self.applet_uids, uid
self.applet_uids.add(uid)

row = self.table.rowCount()