Skip to content

Commit

Permalink
unique name for axtools title bar (#107)
Browse files Browse the repository at this point in the history
* unique name for axtools title bar

* reduce line length

* use self.action_name instead of action_name
  • Loading branch information
fmessmer authored and mikaelarguedas committed Aug 5, 2018
1 parent 058f12b commit f1f6f9b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
9 changes: 7 additions & 2 deletions tools/axclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@
class AXClientApp(wx.App):
def __init__(self, action_type, action_name):
self.action_type = action_type
self.action_name = action_name
wx.App.__init__(self)

self.client = actionlib.SimpleActionClient(action_name, self.action_type.action)
self.client = actionlib.SimpleActionClient(
self.action_name, self.action_type.action)
self.condition = threading.Condition()
self.goal_msg = None
self.execute_type = None
Expand Down Expand Up @@ -156,7 +158,10 @@ def OnQuit(self):

def OnInit(self):

self.frame = wx.Frame(None, -1, self.action_type.name + ' GUI Client')
self.frame = wx.Frame(
None, -1,
self.action_name + ' - ' + self.action_type.name + ' - GUI Client'
)

self.sz = wx.BoxSizer(wx.VERTICAL)

Expand Down
12 changes: 10 additions & 2 deletions tools/axserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@
class AXServerApp(wx.App):
def __init__(self, action_type, action_name):
self.action_type = action_type
self.action_name = action_name
wx.App.__init__(self)

self.server = actionlib.SimpleActionServer(action_name, self.action_type.action, self.execute)
self.server = actionlib.SimpleActionServer(
self.action_name,
self.action_type.action,
self.execute
)
self.condition = threading.Condition()
self.feedback_msg = None
self.result_msg = None
Expand Down Expand Up @@ -179,7 +184,10 @@ def on_preempt(self, event):

def OnInit(self):

self.frame = wx.Frame(None, -1, self.action_type.name + ' Standin')
self.frame = wx.Frame(
None, -1,
self.action_name + ' - ' + self.action_type.name + ' - Standin'
)

self.sz = wx.BoxSizer(wx.VERTICAL)

Expand Down

0 comments on commit f1f6f9b

Please sign in to comment.