Skip to content

Commit

Permalink
fixed conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Rasmussen committed Nov 18, 2011
2 parents e4b84ae + 0b16507 commit ed06a8c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
1 change: 0 additions & 1 deletion bin/keepnote
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ def main(argv):
if options.cont:
while True:
time.sleep(1000)


#=============================================================================
# start main function
Expand Down
2 changes: 1 addition & 1 deletion keepnote/extensions/notebook_http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def start_http(self, app, args):
# start server in another thread
host = "localhost"
url = "http://%s:%d/" % (host, port)
server = NoteBookHttpServer(conn, port=port, host="localhost")
server = NoteBookHttpServer(conn, host="localhost", port=port)

if port in self._ports:
raise Exception("Server already on port %d" % port)
Expand Down
19 changes: 3 additions & 16 deletions keepnote/gui/three_pane_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,15 +629,6 @@ def _view_new_node(self, node):
self.treeview.edit_node(node)
else:
self.listview.edit_node(node)

#widget = self.get_focused_widget()
#
#if widget == self.treeview:
# self.treeview.expand_node(node.get_parent())
# self.treeview.edit_node(node)
#else:
# self.listview.expand_node(node.get_parent())
# self.listview.edit_node(node)



Expand All @@ -648,12 +639,8 @@ def _on_rename_node(self):
if len(nodes) == 0:
return

widget = self.get_focused_widget()

if widget == self.treeview:
self.treeview.edit_node(nodes[0])
else:
self.listview.edit_node(nodes[0])
widget = self.get_focused_widget(self.listview)
widget.edit_node(nodes[0])


def goto_node(self, node, direct=False):
Expand Down Expand Up @@ -724,7 +711,7 @@ def goto_next_node(self):
def goto_prev_node(self):
"""Move focus to the 'previous' node"""

widget = self.get_focused_widget()
widget = self.get_focused_widget(self.treeview)
path, col = widget.get_cursor()

if path and path[-1] > 0:
Expand Down
2 changes: 1 addition & 1 deletion keepnote/notebook/connection/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def do_HEAD(self):

class NoteBookHttpServer (BaseHTTPServer.HTTPServer):

def __init__(self, conn, prefix="/", port=8000, host=""):
def __init__(self, conn, prefix="/", host="", port=8000):
self.conn = conn
self.prefixes = [prefix]
self.server_address = (host, port)
Expand Down

0 comments on commit ed06a8c

Please sign in to comment.