Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Display performance window from control panel

  • Loading branch information...
commit 970ea124c359c7e1db7dbbbdddc0c18b2411891b 1 parent 5213f6a
Sébastien Bourdeauducq authored June 08, 2011
13  src/cp.c
@@ -116,7 +116,6 @@ enum {
116 116
 	CP_ITEM_SAVE,
117 117
 	CP_ITEM_FIRSTPATCH,
118 118
 	CP_ITEM_START,
119  
-	CP_ITEM_STARTSIMPLE,
120 119
 
121 120
 	CP_ITEM_FILEMANAGER,
122 121
 	CP_ITEM_PDFREADER,
@@ -180,10 +179,7 @@ static void cp_callback(mtk_event *e, void *arg)
180 179
 			open_firstpatch_window();
181 180
 			break;
182 181
 		case CP_ITEM_START:
183  
-			start_performance(0, 0, 0);
184  
-			break;
185  
-		case CP_ITEM_STARTSIMPLE:
186  
-			start_performance(1, 1, 0);
  182
+			open_performance_window();
187 183
 			break;
188 184
 
189 185
 		case CP_ITEM_FILEMANAGER:
@@ -286,18 +282,14 @@ void init_cp()
286 282
 		"b_load = new Button(-text \"Load\")",
287 283
 		"b_save = new Button(-text \"Save\")",
288 284
 		"b_firstpatch = new Button(-text \"First patch\")",
289  
-		"g_start = new Grid()",
290 285
 		"b_start = new Button(-text \"Start!\")",
291  
-		"b_startsimple = new Button(-text \"Simple mode\")",
292  
-		"g_start.place(b_start, -column 1 -row 1)",
293  
-		"g_start.place(b_startsimple, -column 2 -row 1)",
294 286
 		"g_performance.place(b_new, -column 1 -row 1)",
295 287
 		"g_performance.place(b_load, -column 2 -row 1)",
296 288
 		"g_performance.place(b_save, -column 3 -row 1)",
297 289
 		"g.place(g_performance0, -column 1 -row 8)",
298 290
 		"g.place(g_performance, -column 1 -row 9)",
299 291
 		"g.place(b_firstpatch, -column 1 -row 10)",
300  
-		"g.place(g_start, -column 1 -row 11)",
  292
+		"g.place(b_start, -column 1 -row 11)",
301 293
 
302 294
 		"g_tools0 = new Grid()",
303 295
 		"l_tools = new Label(-text \"Tools\" -font \"title\")",
@@ -356,7 +348,6 @@ void init_cp()
356 348
 	mtk_bind(appid, "b_save", "commit", cp_callback, (void *)CP_ITEM_SAVE);
357 349
 	mtk_bind(appid, "b_firstpatch", "commit", cp_callback, (void *)CP_ITEM_FIRSTPATCH);
358 350
 	mtk_bind(appid, "b_start", "commit", cp_callback, (void *)CP_ITEM_START);
359  
-	mtk_bind(appid, "b_startsimple", "commit", cp_callback, (void *)CP_ITEM_STARTSIMPLE);
360 351
 	mtk_bind(appid, "b_filemanager", "commit", cp_callback, (void *)CP_ITEM_FILEMANAGER);
361 352
 #ifdef WITH_PDF
362 353
 	mtk_bind(appid, "b_pdfreader", "commit", cp_callback, (void *)CP_ITEM_PDFREADER);
8  src/performance.c
@@ -386,6 +386,11 @@ static void refresh_callback(mtk_event *e, int count)
386 386
 	}
387 387
 }
388 388
 
  389
+void open_performance_window()
  390
+{
  391
+	mtk_cmd(appid, "w.open()");
  392
+}
  393
+
389 394
 static rtems_id comp_task_id;
390 395
 
391 396
 void start_performance(int simple, int dt, int as)
@@ -395,10 +400,11 @@ void start_performance(int simple, int dt, int as)
395 400
 	if(started) return;
396 401
 	started = 1;
397 402
 
398  
-	/* build patch list */
399 403
 	simple_mode = simple;
400 404
 	dt_mode = dt;
401 405
 	as_mode = as;
  406
+
  407
+	/* build patch list */
402 408
 	npatches = 0;
403 409
 	current_patch = 0;
404 410
 	if(simple) {
1  src/performance.h
@@ -21,6 +21,7 @@
21 21
 #define SIMPLE_PATCHES_FOLDER "/ssd/patchpool/"
22 22
 
23 23
 void init_performance();
  24
+void open_performance_window();
24 25
 void start_performance(int simple, int dt, int as);
25 26
 
26 27
 #endif /* __PERFORMANCE_H */

0 notes on commit 970ea12

Please sign in to comment.
Something went wrong with that request. Please try again.