Skip to content

Commit

Permalink
Merge pull request #112 from mpsonntag/improvements1.3
Browse files Browse the repository at this point in the history
Final fixes and improvements for release 1.3.0
  • Loading branch information
jgrewe authored Jan 22, 2018
2 parents 47b18ec + d22f190 commit aa5e335
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 38 deletions.
28 changes: 21 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,34 @@ matrix:
- CONDA=Y
- CONDAPY=3.5

- os: osx
language: generic
env:
- OSXENV=2.7
- CONDA=Y
- CONDAPY=2.7

- os: osx
language: generic
env:
- OSXENV=3.5
- CONDA=Y
- CONDAPY=3.5

# Keep only one osx branch active for now
# since currently osx builds on travis
# are frequently stalled or indefinitely delayed.
# - os: osx
# language: generic
# env:
# - OSXENV=2.7
# - CONDA=Y
# - CONDAPY=2.7
# - os: osx
# language: generic
# env:
# - OSXENV=2.7
# - CONDA=N
# - os: osx
# language: generic
# env:
# - OSXENV=3.5
# - CONDA=N


before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash resources/install_osx_virtualenv.sh; fi
- if [[ "$CONDA" == "N" ]]; then bash resources/install_dependencies.sh; fi
Expand Down
11 changes: 10 additions & 1 deletion odmlui/Editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ def __init__(self, parent=None):
self.set_title("odML Editor")
self.set_default_size(800, 600)

# Check available screen size and adjust default app size to 1024x768 if possible.
screen = self.get_screen()
currmon = screen.get_monitor_at_window(screen.get_active_window())
mondims = screen.get_monitor_geometry(currmon)
if mondims.width >= 1024 and mondims.height >= 768:
self.set_default_size(1024, 768)

icons = load_icon_pixbufs("odml-logo")
self.set_icon_list(icons)

Expand Down Expand Up @@ -297,7 +304,9 @@ def __init__(self, parent=None):

vpaned = gtk.VPaned()
vpaned.show()
vpaned.set_position(350)
# Adjust Attribute view position to default window size
vpaned.set_position(self.get_default_size().height - 315)

vpaned.pack1(hpaned, resize=True, shrink=False)
vpaned.pack2(frame, resize=False, shrink=True)

Expand Down
20 changes: 3 additions & 17 deletions odmlui/Wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import odml
import odml.terminology as terminology


class Table(object):
def __init__(self, cols):
self.table = gtk.Table(rows=1, columns=cols)
Expand Down Expand Up @@ -63,17 +62,6 @@ def finalize(self):
pass


class IntroPage(Page):
type = gtk.ASSISTANT_PAGE_INTRO
complete = True

def init(self):
label = gtk.Label("Welcome! This assistant will guide you trough the first " +
"steps of creating a new odML-Document")
label.set_line_wrap(True)
self.pack_start(label, True, True, 0)


def get_username():
import getpass
username = getpass.getuser()
Expand Down Expand Up @@ -203,21 +191,19 @@ def __init__(self):
assistant = gtk.Assistant()

assistant.set_title("New odML-Document wizard")
assistant.set_default_size(-1, 500)
assistant.set_default_size(800, 500)
assistant.set_position(gtk.WIN_POS_CENTER_ALWAYS)
assistant.connect("apply", self.apply)
assistant.connect("close", self.cancel)
assistant.connect("cancel", self.cancel)

IntroPage().deploy(assistant, "New Document Wizard")

data_page = DataPage()
data_page.deploy(assistant, "General document information")
data_page.deploy(assistant, "Document information")
self.data_page = data_page

section_page = SectionPage()
section_page.data = data_page
section_page.deploy(assistant, "Select which sections to import from the repository")
section_page.deploy(assistant, "Repository section import")
self.section_page = section_page

SummaryPage().deploy(assistant, "Complete")
Expand Down
19 changes: 10 additions & 9 deletions odmlui/treemodel/PropertyModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
debug = lambda x: 0


ColMapper = ColumnMapper({"Name" : (0, "name"),
"Value" : (1, "value"),
"Definition" : (2, "definition"),
"Type" : (3, "dtype"),
"Unit" : (4, "unit"),
"Comment" : (5, "comment"),
"Endcoder" : (6, "encoder"),
"Filename" : (7, "filename"),
"Reference" : (8, "reference")})
ColMapper = ColumnMapper({"Name": (0, "name"),
"Value": (1, "value"),
"Unit": (2, "unit"),
"Uncertainty": (3, "uncertainty"),
"Type": (4, "dtype"),
"Definition": (5, "definition"),
"Comment": (6, "comment"),
"Endcoder": (7, "encoder"),
"Filename": (8, "filename"),
"Reference": (9, "reference")})

class PropertyModel(TreeModel):
def __init__(self, section):
Expand Down
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ class PackageNotFoundError(Exception):
with open(readme) as f:
description_text = f.read()

with open("LICENSE") as f:
license_text = f.read()

packages = [
'odmlui',
'odmlui.dnd',
Expand Down Expand Up @@ -72,6 +69,6 @@ class PackageNotFoundError(Exception):
data_files=data_files,
long_description=description_text,
classifiers=CLASSIFIERS,
license=license_text,
license="BSD",
test_suite='test'
)

0 comments on commit aa5e335

Please sign in to comment.