diff libgui/src/m-editor/file-editor.cc @ 15367:501a9cc2c68f

maint: whitespace cleanup in GUI code
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 12 Sep 2012 16:34:39 -0400
parents b4c32f245da7
children 36ececf69385
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc	Wed Sep 12 16:23:13 2012 -0400
+++ b/libgui/src/m-editor/file-editor.cc	Wed Sep 12 16:34:39 2012 -0400
@@ -50,15 +50,15 @@
   QSettings *settings = resource_manager::get_settings ();
   QStringList sessionFileNames;
   if (settings->value ("editor/restoreSession",true).toBool ())
-  {
-    for (int n=0;n<_tab_widget->count();++n)
-      {
-        file_editor_tab* tab = dynamic_cast<file_editor_tab*> (_tab_widget->widget (n));
-        if (!tab)
-          continue;
-        sessionFileNames.append (tab->get_file_name ());
-      }
-  }
+    {
+      for (int n=0;n<_tab_widget->count();++n)
+        {
+          file_editor_tab* tab = dynamic_cast<file_editor_tab*> (_tab_widget->widget (n));
+          if (!tab)
+            continue;
+          sessionFileNames.append (tab->get_file_name ());
+        }
+    }
   settings->setValue ("editor/savedSessionTabs", sessionFileNames);
   settings->sync ();
 }
@@ -378,10 +378,10 @@
   for(int i = 0; i < _tab_widget->count (); i++)
     {
       file_editor_tab *fileEditorTab
-          = dynamic_cast <file_editor_tab*> (_tab_widget->widget (i));
+        = dynamic_cast <file_editor_tab*> (_tab_widget->widget (i));
       if (fileEditorTab)
         fileEditorTab->notice_settings ();
-    } 
+    }
 }
 
 void
@@ -396,23 +396,23 @@
   _tab_widget->setTabsClosable (true);
 
   QAction *new_action = new QAction (QIcon(":/actions/icons/filenew.png"),
-        tr("&New File"), _tool_bar);
+                                     tr("&New File"), _tool_bar);
 
   QAction *open_action = new QAction (QIcon(":/actions/icons/fileopen.png"),
-        tr("&Open File"), _tool_bar);
+                                      tr("&Open File"), _tool_bar);
 
   QAction *save_action = new QAction (QIcon(":/actions/icons/filesave.png"),
-        tr("&Save File"), _tool_bar);
+                                      tr("&Save File"), _tool_bar);
 
   QAction *save_as_action
     = new QAction (QIcon(":/actions/icons/filesaveas.png"),
                    tr("Save File &As"), _tool_bar);
 
   QAction *undo_action = new QAction (QIcon(":/actions/icons/undo.png"),
-        tr("&Undo"), _tool_bar);
+                                      tr("&Undo"), _tool_bar);
 
   QAction *redo_action = new QAction (QIcon(":/actions/icons/redo.png"),
-        tr("&Redo"), _tool_bar);
+                                      tr("&Redo"), _tool_bar);
 
   _copy_action = new QAction (QIcon(":/actions/icons/editcopy.png"),
                               tr ("&Copy"), _tool_bar);
@@ -421,25 +421,25 @@
                               tr ("Cu&t"), _tool_bar);
 
   QAction *paste_action
-      = new QAction (QIcon (":/actions/icons/editpaste.png"),
-                     tr("Paste"), _tool_bar);
+    = new QAction (QIcon (":/actions/icons/editpaste.png"),
+                   tr("Paste"), _tool_bar);
   QAction *next_bookmark_action       = new QAction (tr ("&Next Bookmark"),_tool_bar);
   QAction *previous_bookmark_action   = new QAction (tr ("Pre&vious Bookmark"),_tool_bar);
   QAction *toggle_bookmark_action     = new QAction (tr ("Toggle &Bookmark"),_tool_bar);
   QAction *remove_bookmark_action     = new QAction (tr ("&Remove All Bookmarks"),_tool_bar);
 
   QAction *next_breakpoint_action
-      = new QAction (QIcon (":/actions/icons/bp_next.png"),
-                     tr ("&Next breakpoint"), _tool_bar);
+    = new QAction (QIcon (":/actions/icons/bp_next.png"),
+                   tr ("&Next breakpoint"), _tool_bar);
   QAction *previous_breakpoint_action
-      = new QAction (QIcon (":/actions/icons/bp_prev.png"),
-                     tr ("Pre&vious breakpoint"), _tool_bar);
+    = new QAction (QIcon (":/actions/icons/bp_prev.png"),
+                   tr ("Pre&vious breakpoint"), _tool_bar);
   QAction *toggle_breakpoint_action
-      = new QAction (QIcon (":/actions/icons/bp_toggle.png"),
-                     tr ("Toggle &breakpoint"), _tool_bar);
+    = new QAction (QIcon (":/actions/icons/bp_toggle.png"),
+                   tr ("Toggle &breakpoint"), _tool_bar);
   QAction *remove_all_breakpoints_action
-      = new QAction (QIcon (":/actions/icons/bp_rm_all.png"),
-                     tr ("&Remove All breakpoints"), _tool_bar);
+    = new QAction (QIcon (":/actions/icons/bp_rm_all.png"),
+                   tr ("&Remove All breakpoints"), _tool_bar);
 
   QAction *comment_selection_action   = new QAction (tr ("&Comment Selected Text"),_tool_bar);
   QAction *uncomment_selection_action = new QAction (tr ("&Uncomment Selected Text"),_tool_bar);
@@ -448,7 +448,7 @@
                                       tr ("&Find and Replace"), _tool_bar);
 
   _run_action = new QAction (QIcon(":/actions/icons/artsbuilderexecute.png"),
-        tr("Save File And Run"), _tool_bar);
+                             tr("Save File And Run"), _tool_bar);
 
   // some actions are disabled from the beginning
   _copy_action->setEnabled(false);
@@ -539,7 +539,7 @@
 
   connect (new_action,
            SIGNAL (triggered ()), this, SLOT (request_new_file ()));
-  connect (open_action,              
+  connect (open_action,
            SIGNAL (triggered ()), this, SLOT (request_open_file ()));
   connect (undo_action,
            SIGNAL (triggered ()), this, SLOT (request_undo ()));
@@ -592,12 +592,12 @@
   //restore previous session
   QSettings *settings = resource_manager::get_settings ();
   if (settings->value ("editor/restoreSession",true).toBool ())
-  {
-    QStringList sessionFileNames = settings->value("editor/savedSessionTabs", QStringList()).toStringList ();
+    {
+      QStringList sessionFileNames = settings->value("editor/savedSessionTabs", QStringList()).toStringList ();
 
-    for (int n=0;n<sessionFileNames.count();++n)
-      request_open_file(sessionFileNames.at(n), true);
-  }
+      for (int n=0;n<sessionFileNames.count();++n)
+        request_open_file(sessionFileNames.at(n), true);
+    }
 }
 
 void