Skip to content

Loading…

Warning in code. qtconsole ssh -X #1056

Closed
wants to merge 1 commit into from

3 participants

@Carreau
Put warning in code not to remove an action needed when ssh -X.

"All magics..." menu  should be autopopulated at startup, but is not
when X forwarding, Warn in code that inserting  'update all magic menu'
action in this same menu is not as useless as it may seem

I can also open an issue "All Magic Menu not populated when X forwarding", but as the workaroud has already been written "juste in case ...", I just thought adding a warnig in the code for future reader might be a good idea, now that we at least have found one edge case...

@Carreau Carreau Warning in code. qtconsole ssh -X
	Put warning in code not to remove an action needed when ssh -X.

	"All magics..." menu  should be autopopulated at startup, but is not
	when X forwarding, Warn in code that inserting  'update all magic menu'
	action in this same menu is not as useless as it may seem
52fd5d8
@minrk minrk commented on the diff
IPython/frontend/qt/console/mainwindow.py
@@ -622,8 +622,10 @@ class MainWindow(QtGui.QMainWindow):
self.magic_menu = self.menuBar().addMenu("&Magic")
self.all_magic_menu = self.magic_menu.addMenu("&All Magics")
- # this action should not appear as it will be cleard when menu
- # will be updated at first kernel response.
+ # This action should usually not appear as it will be cleard when menu
+ # will be updated at first kernel response. Thought, it is necessary
@minrk IPython member
minrk added a note

Thought -> Though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@fperez
IPython member

Thanks! I fixed the typo @minrk pointed out and rebased to avoid a recursive merge on just one commit; pushed as 0433ea7.

@fperez fperez closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 27, 2011
  1. @Carreau

    Warning in code. qtconsole ssh -X

    Carreau committed
    	Put warning in code not to remove an action needed when ssh -X.
    
    	"All magics..." menu  should be autopopulated at startup, but is not
    	when X forwarding, Warn in code that inserting  'update all magic menu'
    	action in this same menu is not as useless as it may seem
Showing with 4 additions and 2 deletions.
  1. +4 −2 IPython/frontend/qt/console/mainwindow.py
View
6 IPython/frontend/qt/console/mainwindow.py
@@ -622,8 +622,10 @@ def init_magic_menu(self):
self.magic_menu = self.menuBar().addMenu("&Magic")
self.all_magic_menu = self.magic_menu.addMenu("&All Magics")
- # this action should not appear as it will be cleard when menu
- # will be updated at first kernel response.
+ # This action should usually not appear as it will be cleard when menu
+ # will be updated at first kernel response. Thought, it is necessary
@minrk IPython member
minrk added a note

Thought -> Though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ # when connecting through X-forwarding, as in this case, the menu is
+ # not auto updated, SO DO NOT DELETE
self.pop = QtGui.QAction("&Update All Magic Menu ",
self, triggered=self.update_all_magic_menu)
self.add_menu_action(self.all_magic_menu, self.pop)
Something went wrong with that request. Please try again.