Skip to content

Commit

Permalink
binary build script (linux), fixed bugs: gtk errors open dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
pjaskulski committed Feb 7, 2020
1 parent 2492cb5 commit 92d1aea
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,4 @@ dmypy.json
*.db

# Wing IDE project
*.wpr

# build utils
utils/
*.wpr
6 changes: 6 additions & 0 deletions compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
../.local/bin/pyinstaller -w skeleton.py --exclude-module matplotlib --exclude-m
mkdir dist/skeleton/tinycss2
cp utils/tinycss2/VERSION dist/skeleton/tinycss2/VERSION
mkdir dist/skeleton/svg
cp svg/* dist/skeleton/svg/
cp LICENSE dist/skeleton/LICENSE
15 changes: 10 additions & 5 deletions skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ def __init__(self, parent):
search_sizer.Add(search_label, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT, 5)
search_sizer.AddSpacer(5)

self.categories = wx.ComboBox(
self, value="Skeleton", choices=categories, style=wx.CB_READONLY)
if platform.system().lower() == 'linux':
self.categories = wx.ComboBox(
self, value="Skeleton", choices=categories, style=wx.CB_READONLY, size=(150, -1))
else:
self.categories = wx.ComboBox(
self, value="Skeleton", choices=categories, style=wx.CB_READONLY)

search_sizer.Add(self.categories, 0, wx.ALL, 5)

search_sizer.AddSpacer(5)
Expand Down Expand Up @@ -104,11 +109,11 @@ def controls_state(self, state):
self.delete_record_btn.Enable(state)
self.report_btn.Enable(state)
self.show_all_btn.Enable(state)
# self.search_ctrl.Enable(state)
self.search_ctrl.Enable(state)

def on_open_file(self, event):
wildcard = "DATABASE files (*.db)|*.db"
with wx.FileDialog(None, "Choose a file", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST) as dialog:
with wx.FileDialog(self, "Choose a file", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST) as dialog:
if dialog.ShowModal() == wx.ID_OK:
self.db_name = dialog.GetPath()
# zapis w ostatnio używanych plikach
Expand All @@ -127,7 +132,7 @@ def on_open_file(self, event):

def on_create_file(self, event):
wildcard = "DATABASE files (*.db)|*.db"
with wx.FileDialog(None, "Create a file", wildcard=wildcard, style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT) as dialog:
with wx.FileDialog(self, "Create a file", wildcard=wildcard, style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT) as dialog:
if dialog.ShowModal() == wx.ID_OK:
self.db_name = dialog.GetPath()
# zapis w ostatnio używanych plikach
Expand Down
Empty file added utils/tinycss2/VERSION
Empty file.

0 comments on commit 92d1aea

Please sign in to comment.