Skip to content
This repository

Warning in code. qtconsole ssh -X #1056

Closed
wants to merge 1 commit into from

3 participants

Matthias Bussonnier Fernando Perez Min RK
Matthias Bussonnier
Collaborator
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...

Matthias Bussonnier 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
Min RK minrk commented on the diff November 27, 2011
IPython/frontend/qt/console/mainwindow.py
@@ -622,8 +622,10 @@ class MainWindow(QtGui.QMainWindow):
622 622
         self.magic_menu = self.menuBar().addMenu("&Magic")
623 623
         self.all_magic_menu = self.magic_menu.addMenu("&All Magics")
624 624
 
625  
-        # this action should not appear as it will be cleard when menu
626  
-        # will be updated at first kernel response.
  625
+        # This action should usually not appear as it will be cleard when menu
  626
+        # will be updated at first kernel response. Thought, it is necessary
1
Min RK Owner
minrk added a note November 27, 2011

Thought -> Though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Fernando Perez
Owner

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

Fernando Perez fperez closed this November 27, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Nov 27, 2011
Matthias Bussonnier 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
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  IPython/frontend/qt/console/mainwindow.py
6  IPython/frontend/qt/console/mainwindow.py
@@ -622,8 +622,10 @@ def init_magic_menu(self):
622 622
         self.magic_menu = self.menuBar().addMenu("&Magic")
623 623
         self.all_magic_menu = self.magic_menu.addMenu("&All Magics")
624 624
 
625  
-        # this action should not appear as it will be cleard when menu
626  
-        # will be updated at first kernel response.
  625
+        # This action should usually not appear as it will be cleard when menu
  626
+        # will be updated at first kernel response. Thought, it is necessary
  627
+        # when connecting through X-forwarding, as in this case, the menu is
  628
+        # not auto updated, SO DO NOT DELETE
627 629
         self.pop = QtGui.QAction("&Update All Magic Menu ",
628 630
             self, triggered=self.update_all_magic_menu)
629 631
         self.add_menu_action(self.all_magic_menu, self.pop)
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.