~ubuntu-branches/ubuntu/wily/spyder/wily-proposed

« back to all changes in this revision

Viewing changes to spyderlib/plugins/editor.py

  • Committer: Package Import Robot
  • Author(s): Ghislain Antony Vaillant, Ghislain Antony Vaillant, Picca Frédéric-Emmanuel
  • Date: 2014-10-19 11:42:57 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20141019114257-st1rz4fmmscgphhm
Tags: 2.3.1+dfsg-1
* Team upload

[Ghislain Antony Vaillant]
* New upstream release. (Closes: #765963)
* Bump Standards-Version to 3.9.6 (no changes required).
* d/control: fix pedantic lintian warning regarding capitalization in
  packages' description.

[Picca Frédéric-Emmanuel]
* Update the homepage now that upstream moved to bitbucket.
* debian/copyright
  - updated for 2.3.1 version
* debian/control
  + Recommends: python-pandas and python3-pandas

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        saveall_box = newcb(_("Save all files before running script"),
154
154
                            'save_all_before_run')
155
155
        
 
156
        run_selection_group = QGroupBox(_("Run selection"))
 
157
        focus_box = newcb(_("Maintain focus in the Editor after running cells or selections"),
 
158
                            'focus_to_editor')
 
159
        
156
160
        introspection_group = QGroupBox(_("Introspection"))
157
161
        rope_is_installed = programs.is_module_installed('rope')
158
162
        if rope_is_installed:
255
259
        run_layout.addWidget(saveall_box)
256
260
        run_group.setLayout(run_layout)
257
261
        
 
262
        run_selection_layout = QVBoxLayout()
 
263
        run_selection_layout.addWidget(focus_box)
 
264
        run_selection_group.setLayout(run_selection_layout)
 
265
        
258
266
        introspection_layout = QVBoxLayout()
259
267
        if rope_is_installed:
260
268
            introspection_layout.addWidget(calltips_box)
289
297
        eol_group = QGroupBox(_("End-of-line characters"))
290
298
        eol_label = QLabel(_("When opening a text file containing "
291
299
                             "mixed end-of-line characters (this may "
292
 
                             "raise syntax errors in Python interpreter "
 
300
                             "raise syntax errors in the consoles "
293
301
                             "on Windows platforms), Spyder may fix the "
294
302
                             "file automatically."))
295
303
        eol_label.setWordWrap(True)
307
315
                    _("Display"))
308
316
        tabs.addTab(self.create_tab(introspection_group, analysis_group),
309
317
                    _("Code Introspection/Analysis"))
310
 
        tabs.addTab(self.create_tab(template_btn, run_group, sourcecode_group,
311
 
                                    eol_group),
 
318
        tabs.addTab(self.create_tab(template_btn, run_group, run_selection_group,
 
319
                                    sourcecode_group, eol_group),
312
320
                    _("Advanced settings"))
313
321
        
314
322
        vlayout = QVBoxLayout()
736
744
        add_shortcut_to_tooltip(re_run_action, context="Editor",
737
745
                                name="Re-run last script")
738
746
 
739
 
        run_selected_action = create_action(self, _("Run &selection"),
 
747
        run_selected_action = create_action(self, _("Run &selection or "
 
748
                                                    "current line"),
740
749
                                            icon='run_selection.png',
741
 
                                            tip=_("Run selection"),
 
750
                                            tip=_("Run selection or "
 
751
                                                  "current line"),
742
752
                                            triggered=self.run_selection)
743
753
        self.register_shortcut(run_selected_action, context="Editor",
744
754
                               name="Run selection")
1061
1071
            ('set_codecompletion_enter_enabled',    'codecompletion/enter_key'),
1062
1072
            ('set_calltips_enabled',                'calltips'),
1063
1073
            ('set_go_to_definition_enabled',        'go_to_definition'),
 
1074
            ('set_focus_to_editor',                 'focus_to_editor'),
1064
1075
            ('set_close_parentheses_enabled',       'close_parentheses'),
1065
1076
            ('set_close_quotes_enabled',            'close_quotes'),
1066
1077
            ('set_add_colons_enabled',              'add_colons'),
2120
2131
            occurence_o = self.get_option(occurence_n)
2121
2132
            occurence_timeout_n = 'occurence_highlighting/timeout'
2122
2133
            occurence_timeout_o = self.get_option(occurence_timeout_n)
 
2134
            focus_to_editor_n = 'focus_to_editor'
 
2135
            focus_to_editor_o = self.get_option(focus_to_editor_n)
 
2136
            
2123
2137
            for editorstack in self.editorstacks:
2124
2138
                if font_n in options:
2125
2139
                    scs = color_scheme_o if color_scheme_n in options else None
2142
2156
                if occurence_timeout_n in options:
2143
2157
                    editorstack.set_occurence_highlighting_timeout(
2144
2158
                                                        occurence_timeout_o)
 
2159
                if focus_to_editor_n in options:
 
2160
                    editorstack.set_focus_to_editor(focus_to_editor_o)
2145
2161
 
2146
2162
            # --- everything else
2147
2163
            fpsorting_n = 'fullpath_sorting'