Skip to content

Commit b0a12f4

Browse files
committed
do not refresh filter data when a new database is constructed
also, introduce a license
1 parent 696af06 commit b0a12f4

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

LICENSE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2018 Przemys�aw Dolata (@Noiredd)
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Razem z Twoimi ocenami, fw-local pobiera także podstawowe informacje o obejrzan
1313
### Jak uruchomić fw-local?
1414
Na ten moment program nie ma instalatora, więc pierwsze uruchomienie może być mało wygodne.
1515

16-
0. Pobierz [pliki programu](https://github.com/Noiredd/fw-local/archive/1.0-alpha.3.zip) i wypakuj, gdzie Ci wygodnie.
16+
0. Pobierz [pliki programu](https://github.com/Noiredd/fw-local/archive/1.0-alpha.4.zip) i wypakuj, gdzie Ci wygodnie.
1717

1818
1. Pierwszym krokiem będzie prawdopodobnie instalacja Python3 ([link do oficjalnego wydania](https://www.python.org/downloads/)) -
1919
na chwilę obecną najnowszym wydaniem jest Python 3.6.5.

fw-local/gui.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def __init__(self, root):
5454
self.session = None
5555
self.root = root
5656
self.window.resizable(0,0)
57+
self.window.attributes("-topmost", True)
58+
self.window.title('Zaloguj się')
5759
self.isDone = tk.BooleanVar()
5860
self.isDone.set(False)
5961
self.stateGood = True
@@ -73,7 +75,6 @@ def requestLogin(self, message=''):
7375
#CONSTRUCTION
7476
def constructLoginWindow(self):
7577
self.window = cw = tk.Toplevel()
76-
cw.title('Zaloguj się')
7778
self.messageLabel = tk.Label(master=cw, text=self.default_message)
7879
self.messageLabel.grid(row=0, column=0, columnspan=2)
7980
tk.Label(master=cw, text='Nazwa użytkownika:').grid(row=1, column=0, sticky=tk.E)
@@ -485,9 +486,11 @@ def _reloadData(self, newDatabase=False):
485486
if newDatabase:
486487
self.database = db.Database(self.session.username)
487488
self.database.hardUpdate(self.session)
488-
#refresh data used in the GUI and refill the view
489-
self._fillFilterData()
490-
self._filtersUpdate()
489+
if not newDatabase:
490+
#refresh data used in the GUI and refill the view - only if we're not
491+
#building a new database though (in this case Main::__init__ will do this)
492+
self._fillFilterData()
493+
self._filtersUpdate()
491494
def _quit(self):
492495
#saves data and exits
493496
self.root.quit()

0 commit comments

Comments
 (0)