Index: palm/trunk/SCRIPTS/palmrungui.py
===================================================================
--- palm/trunk/SCRIPTS/palmrungui.py	(revision 2476)
+++ palm/trunk/SCRIPTS/palmrungui.py	(revision 2477)
@@ -25,4 +25,8 @@
 # -----------------
 # $Id$
+# Renamed restart run appendix from "f" to "r". Bugfix for displaying restart runs.>
+# Revised list of recently submitted jobs
+# 
+# 2413 2017-09-06 12:48:29Z maronga
 # Renamed to palmrungui and adapted for use with palmrun instead of mrun.
 # 
@@ -88,5 +92,5 @@
         
         self.setupUi(self)
-        self.recent_jobs(10)
+        self.recent_jobs(50)
         commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
         commandline.setText("")
@@ -176,5 +180,5 @@
         
         # Reload recent jobs
-        self.recent_jobs(10)
+        self.recent_jobs(50)
         
         
@@ -200,13 +204,13 @@
         i=len(history)-1
         count = 0
-        while i>=0 and count<10:
+        while i>=0 and count<number:
             timestamp = history[i][:16]
             listitem = history[i][17:len(history[i])-1]
-            listitem = filter(None,listitem.split(" -d"))[1]
-            listitem = filter(None,listitem.split(" -"))[0]
-            listitem = listitem.replace(" ","");
             matchitems = list_jobname.findItems(listitem, QtCore.Qt.MatchExactly)
 
             if ( len(matchitems) == 0 ):
+                listitem = filter(None,listitem.split(" -d"))[1]
+                listitem = filter(None,listitem.split(" -"))[0]
+                listitem = listitem.replace(" ",""); 
                 list_jobname.addItem(listitem);
                 s = "%s (%s)" % (listitem,timestamp)
@@ -262,5 +266,5 @@
     
         
-    # select a job via doubleclick from list
+    # select a job via click from list
     #################################
     def choosejob_list(self):
@@ -272,5 +276,5 @@
         # Reload list
         self.setupUi(self)
-        self.recent_jobs(10)
+        self.recent_jobs(50)
     
         # Set selected item to jobname
@@ -300,4 +304,6 @@
                 self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline);
                 self.setup_gui(palmrunline);
+                self.list_jobname.item(itemint).setSelected(True);    
+                
                 return
             i = i-1
@@ -375,6 +381,6 @@
             else:
                 # Check if user code is available
-                usercode = "%s/USER_CODE/%s" % (version_path,param[0])
-                
+                usercode = "%s/JOBS/%s/USER_CODE" % (version_path,param[0])
+                                
                 if (os.path.exists(usercode) is True): 
                     self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("<font color='green'>User code found.</font>")
@@ -390,5 +396,5 @@
 
                     jobname = self.group_job.findChild(QtGui.QLineEdit, "line_jobname").text()
-                    restartfile = "%s/JOBS/%s/INPUT/%s_p3df" % (version_path,jobname,jobname)
+                    restartfile = "%s/JOBS/%s/INPUT/%s_p3dr" % (version_path,jobname,jobname)
 
                     if (os.path.exists(restartfile) == True):                  
@@ -397,13 +403,13 @@
 
                         if ( drop_job == "Restart run (coupled atmosphere ocean)" ):
-		            restartfileo = "%s/JOBS/%s/INPUT/%s_p3dof" % (version_path,jobname,jobname)
+		            restartfileo = "%s/JOBS/%s/INPUT/%s_p3dor" % (version_path,jobname,jobname)
                             if (os.path.exists(restartfileo) == True):                  
                                 self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("hooo")
                   
                             else:       
-                                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dof file found!</font>")   
+                                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dor file found!</font>")   
                
                     else:       
-                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3df file found!</font>")
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dr file found!</font>")
          
                
@@ -435,5 +441,5 @@
             
             elif (drop_job == "Restart run"):            
-                rc_flag = "f"
+                rc_flag = "r"
             
             elif (drop_job == "Precursor run (atmosphere)"):            
@@ -447,5 +453,5 @@
             
             elif (drop_job == "Restart run (coupled atmosphere ocean)"):            
-                rc_flag = "f"
+                rc_flag = "r"
             
             param[0] = "\"d3%s" % (rc_flag)
@@ -525,8 +531,8 @@
                 param[0]="%s restart" % (param[0])
     
-                # Check if _p3df file is available, otherwise notice user
+                # Check if _p3dr file is available, otherwise notice user
                 if (status_restarts == 2):
                     jobname = str(self.group_job.findChild(QtGui.QLineEdit, "line_jobname").text())[len(version_path)+len("/JOBS/"):]
-                    restartfile = "%s/JOBS/%s/INPUT/%s_p3df" % (version_path,jobname,jobname)
+                    restartfile = "%s/JOBS/%s/INPUT/%s_p3dr" % (version_path,jobname,jobname)
                     
                     if (os.path.exists(restartfile) == True):                   
@@ -534,5 +540,5 @@
                    
                     else:                   
-                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3df file found!</font>")
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dr file found!</font>")
 
             else:  
@@ -767,5 +773,5 @@
         self.setupUi(self)
         self.tabWidget.setCurrentIndex(0)
-        self.recent_jobs(10)
+        self.recent_jobs(50)
         
     # Safes current commandline and user Parameters to .sav file
@@ -974,4 +980,5 @@
                     options_all = optionssplit[j] 
                     options_2 = optionssplit[j][:2] 
+                                      
                     if (options_2 == "ts"):
                         self.group_runcontrol.findChild(QtGui.QCheckBox,"check_ts").setChecked(True) 
@@ -1004,12 +1011,11 @@
                         self.group_runcontrol.findChild(QtGui.QCheckBox,"check_pts").setChecked(True) 
                     
-                    if (options_2 == "d3"):       
-                        if (options_all[:3][:-1] == "#"):
+                    if (options_2 == "d3"):      
+                        if (options_all[:3][-1] == "#"):
                             self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(0) 
-                        
-                        elif (options_all[:3][:-1] == "f"):
+                        elif (options_all[:3][-1] == "r"):
                             self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(1) 
                         
-                        elif (options_all[:3][:-1] == "o"):
+                        elif (options_all[:3][-1] == "o"):
                             ocean_run = True 
                         
@@ -1019,10 +1025,10 @@
                         jobname = str(self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text())[len(version_path)+len("/JOBS/"):] 
                         
-                        restartfile = "%sJOBS/%s/INPUT/%s_p3df" % (version_path,jobname,jobname)
+                        restartfile = "%sJOBS/%s/INPUT/%s_p3dr" % (version_path,jobname,jobname)
                         if (os.path.exists(restartfile) == True):   
                             self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("") 
                        
                         else:
-                            self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3df file \found!</font>") 
+                            self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dr file \found!</font>") 
                     j = j+1
 
Index: palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui
===================================================================
--- palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 2476)
+++ palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 2477)
@@ -14,5 +14,5 @@
     <y>0</y>
     <width>600</width>
-    <height>680</height>
+    <height>655</height>
    </rect>
   </property>
@@ -26,5 +26,5 @@
    <size>
     <width>600</width>
-    <height>680</height>
+    <height>655</height>
    </size>
   </property>
@@ -32,5 +32,5 @@
    <size>
     <width>600</width>
-    <height>680</height>
+    <height>655</height>
    </size>
   </property>
@@ -67,5 +67,5 @@
      <rect>
       <x>0</x>
-      <y>570</y>
+      <y>550</y>
       <width>601</width>
       <height>81</height>
@@ -76,5 +76,5 @@
     </property>
     <property name="title">
-     <string>palmrun</string>
+     <string/>
     </property>
     <property name="flat">
@@ -84,5 +84,5 @@
      <property name="geometry">
       <rect>
-       <x>130</x>
+       <x>120</x>
        <y>20</y>
        <width>90</width>
@@ -102,10 +102,19 @@
        <x>10</x>
        <y>20</y>
-       <width>120</width>
+       <width>91</width>
        <height>21</height>
       </rect>
      </property>
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
      <property name="text">
-      <string>Start palmrun</string>
+      <string>palmrun</string>
+     </property>
+     <property name="checkable">
+      <bool>false</bool>
      </property>
     </widget>
@@ -113,5 +122,5 @@
      <property name="geometry">
       <rect>
-       <x>220</x>
+       <x>210</x>
        <y>20</y>
        <width>90</width>
@@ -179,5 +188,5 @@
     </property>
     <property name="currentIndex">
-     <number>1</number>
+     <number>0</number>
     </property>
     <widget class="QWidget" name="tab">
@@ -240,10 +249,10 @@
          <x>10</x>
          <y>65</y>
-         <width>101</width>
+         <width>151</width>
          <height>16</height>
         </rect>
        </property>
        <property name="text">
-        <string>Recent 10 jobs:</string>
+        <string>Recently submitted jobs:</string>
        </property>
       </widget>
@@ -266,5 +275,5 @@
          <x>10</x>
          <y>270</y>
-         <width>291</width>
+         <width>301</width>
          <height>25</height>
         </rect>
@@ -307,7 +316,7 @@
        <property name="geometry">
         <rect>
-         <x>310</x>
+         <x>320</x>
          <y>267</y>
-         <width>271</width>
+         <width>261</width>
          <height>31</height>
         </rect>
@@ -494,7 +503,7 @@
        <property name="geometry">
         <rect>
-         <x>330</x>
+         <x>290</x>
          <y>30</y>
-         <width>111</width>
+         <width>81</width>
          <height>21</height>
         </rect>
@@ -510,5 +519,5 @@
        <property name="geometry">
         <rect>
-         <x>270</x>
+         <x>230</x>
          <y>25</y>
          <width>51</width>
@@ -528,5 +537,5 @@
          <x>80</x>
          <y>55</y>
-         <width>141</width>
+         <width>101</width>
          <height>20</height>
         </rect>
@@ -555,7 +564,7 @@
        <property name="geometry">
         <rect>
-         <x>330</x>
-         <y>80</y>
-         <width>111</width>
+         <x>290</x>
+         <y>55</y>
+         <width>61</width>
          <height>21</height>
         </rect>
@@ -568,6 +577,6 @@
        <property name="geometry">
         <rect>
-         <x>230</x>
-         <y>75</y>
+         <x>190</x>
+         <y>50</y>
          <width>91</width>
          <height>21</height>
@@ -584,7 +593,7 @@
        <property name="geometry">
         <rect>
-         <x>330</x>
-         <y>55</y>
-         <width>111</width>
+         <x>290</x>
+         <y>80</y>
+         <width>81</width>
          <height>20</height>
         </rect>
@@ -597,6 +606,6 @@
        <property name="geometry">
         <rect>
-         <x>260</x>
-         <y>55</y>
+         <x>220</x>
+         <y>80</y>
          <width>61</width>
          <height>16</height>
@@ -631,5 +640,5 @@
          <x>80</x>
          <y>80</y>
-         <width>141</width>
+         <width>101</width>
          <height>20</height>
         </rect>
@@ -663,5 +672,5 @@
          <x>80</x>
          <y>30</y>
-         <width>141</width>
+         <width>101</width>
          <height>20</height>
         </rect>
@@ -676,5 +685,5 @@
          <x>10</x>
          <y>105</y>
-         <width>571</width>
+         <width>561</width>
          <height>20</height>
         </rect>
@@ -729,7 +738,7 @@
        <property name="geometry">
         <rect>
-         <x>120</x>
+         <x>150</x>
          <y>120</y>
-         <width>451</width>
+         <width>421</width>
          <height>20</height>
         </rect>
@@ -759,4 +768,8 @@
       </widget>
      </widget>
+     <zorder>group_job</zorder>
+     <zorder>group_runcontrol</zorder>
+     <zorder>group_execution</zorder>
+     <zorder>groupBox</zorder>
     </widget>
     <widget class="QWidget" name="tab_2">
@@ -961,19 +974,4 @@
        </property>
       </widget>
-      <zorder>check_x</zorder>
-      <zorder>check_O</zorder>
-      <zorder>check_k</zorder>
-      <zorder>check_I</zorder>
-      <zorder>check_F</zorder>
-      <zorder>check_b</zorder>
-      <zorder>check_Z</zorder>
-      <zorder>line_2</zorder>
-      <zorder>line_user</zorder>
-      <zorder>line_w</zorder>
-      <zorder>line_s</zorder>
-      <zorder>line_D</zorder>
-      <zorder>line_M</zorder>
-      <zorder>line_m</zorder>
-      <zorder>line_user</zorder>
      </widget>
      <widget class="QLabel" name="label_20">
