Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisteach committed Dec 26, 2016
1 parent ff01d19 commit fa2bc04
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .codeclimate.yml
Expand Up @@ -3,6 +3,11 @@ engines:
enabled: true
pep8:
enabled: true
checks:
E501:
enabled: false
E265:
enabled: false
duplication:
enabled: true
config:
Expand Down
12 changes: 6 additions & 6 deletions appJar/examples/showcase.py
@@ -1,12 +1,12 @@
from appJar import gui

# global variable to remember what's being dragged
dragged="dd"
dragged = "dd"
# globals to remember the meter's values
meter1 = 0
meter2 = 100
# some useful colours
colours=["red", "orange", "green", "pink", "purple"]
colours = ["red", "orange", "green", "pink", "purple"]

# calculator function
calcVal = 0
Expand All @@ -33,7 +33,7 @@ def logoutFunction():
return app.yesNoBox("Confirm Exit", "Are you sure you want to exit?")

# disable the tabs
def logout(btn=None):
def logout(btn = None):
app.setTabbedFrameDisableAllTabs("Tabs")
app.setTabbedFrameDisabledTab("Tabs", "Login", False)
app.setTabbedFrameSelectedTab("Tabs", "Login")
Expand Down Expand Up @@ -114,8 +114,8 @@ def move(direction):
app.clearListBox("Animals")

def add(entry):
if entry=="animalsEntry": app.addListItem("Animals", app.getEntry("animalsEntry"))
elif entry=="sportsEntry": app.addListItem("Sports", app.getEntry("sportsEntry"))
if entry == "animalsEntry": app.addListItem("Animals", app.getEntry("animalsEntry"))
elif entry == "sportsEntry": app.addListItem("Sports", app.getEntry("sportsEntry"))

# funciton to change the selected tab - called from menu
def changeTab(tabName):
Expand All @@ -127,7 +127,7 @@ def changeTab(tabName):
## GUI Code starts here ##
###########################

app=gui("ShowCase")
app = gui("ShowCase")

# add a simple toolbar
app.addToolbar(["EXIT", "LOGOUT", "FILL", "PIE-CHART", "CALENDAR", "ADDRESS-BOOK", "FULL-SCREEN"], toolbar, findIcon=True)
Expand Down

0 comments on commit fa2bc04

Please sign in to comment.