Skip to content

Commit 8f0dc6e

Browse files
author
MohamedElgammal
committed
fix an issue with old GTK versions
1 parent 1cbb19a commit 8f0dc6e

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

vpr/src/draw/draw_debug.cpp

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ void draw_debug_window() {
4848
gtk_widget_set_margin_bottom(mainGrid, 30);
4949
# if GTK_CHECK_VERSION(3, 12, 0)
5050
gtk_widget_set_margin_start(mainGrid, 30);
51-
# elif
51+
# else
5252
gtk_widget_set_margin_left(mainGrid, 30);
5353
# endif
5454
# if GTK_CHECK_VERSION(3, 12, 0)
5555
gtk_widget_set_margin_end(mainGrid, 20);
56-
# elif
56+
# else
5757
gtk_widget_set_margin_right(mainGrid, 20);
5858
# endif
5959

@@ -73,35 +73,35 @@ void draw_debug_window() {
7373
gtk_widget_set_halign(movesLabel, GTK_ALIGN_END);
7474
# if GTK_CHECK_VERSION(3, 12, 0)
7575
gtk_widget_set_margin_end(movesLabel, 8);
76-
# elif
76+
# else
7777
gtk_widget_set_margin_right(movesLabel, 8);
7878
# endif
7979
GtkWidget* tempsLabel = gtk_label_new("Temperatures to proceed:");
8080
gtk_widget_set_halign(tempsLabel, GTK_ALIGN_END);
8181
# if GTK_CHECK_VERSION(3, 12, 0)
8282
gtk_widget_set_margin_end(tempsLabel, 8);
83-
# elif
83+
# else
8484
gtk_widget_set_margin_right(tempsLabel, 8);
8585
# endif
8686
GtkWidget* blockLabel = gtk_label_new("Stop at from_block");
8787
gtk_widget_set_halign(blockLabel, GTK_ALIGN_END);
8888
# if GTK_CHECK_VERSION(3, 12, 0)
8989
gtk_widget_set_margin_end(blockLabel, 8);
90-
# elif
90+
# else
9191
gtk_widget_set_margin_right(blockLabel, 8);
9292
# endif
9393
GtkWidget* iterLabel = gtk_label_new("Stop at router iteration");
9494
gtk_widget_set_halign(iterLabel, GTK_ALIGN_END);
9595
# if GTK_CHECK_VERSION(3, 12, 0)
9696
gtk_widget_set_margin_end(iterLabel, 8);
97-
# elif
97+
# else
9898
gtk_widget_set_margin_right(iterLabel, 8);
9999
# endif
100100
GtkWidget* netLabel = gtk_label_new("Stop at route_net_id");
101101
gtk_widget_set_halign(netLabel, GTK_ALIGN_END);
102102
# if GTK_CHECK_VERSION(3, 12, 0)
103103
gtk_widget_set_margin_end(netLabel, 8);
104-
# elif
104+
# else
105105
gtk_widget_set_margin_right(netLabel, 8);
106106
# endif
107107
GtkWidget* star = gtk_label_new("*for handling multiple breakpoints at once using an expression can be more accurate");
@@ -113,47 +113,47 @@ void draw_debug_window() {
113113
gtk_widget_set_margin_bottom(setM, 10);
114114
# if GTK_CHECK_VERSION(3, 12, 0)
115115
gtk_widget_set_margin_start(setM, 10);
116-
# elif
116+
# else
117117
gtk_widget_set_margin_left(setM, 10);
118118
# endif
119119
GtkWidget* setT = gtk_button_new_with_label("Set");
120120
gtk_widget_set_halign(setT, GTK_ALIGN_START);
121121
gtk_widget_set_margin_bottom(setT, 10);
122122
# if GTK_CHECK_VERSION(3, 12, 0)
123123
gtk_widget_set_margin_start(setT, 10);
124-
# elif
124+
# else
125125
gtk_widget_set_margin_left(setT, 10);
126126
# endif
127127
GtkWidget* setB = gtk_button_new_with_label("Set");
128128
gtk_widget_set_halign(setB, GTK_ALIGN_START);
129129
# if GTK_CHECK_VERSION(3, 12, 0)
130130
gtk_widget_set_margin_start(setB, 10);
131-
# elif
131+
# else
132132
gtk_widget_set_margin_left(setB, 10);
133133
# endif
134134
GtkWidget* setI = gtk_button_new_with_label("Set");
135135
gtk_widget_set_halign(setI, GTK_ALIGN_START);
136136
# if GTK_CHECK_VERSION(3, 12, 0)
137137
gtk_widget_set_margin_start(setI, 10);
138-
# elif
138+
# else
139139
gtk_widget_set_margin_left(setI, 10);
140140
# endif
141141
GtkWidget* setN = gtk_button_new_with_label("Set");
142142
gtk_widget_set_halign(setN, GTK_ALIGN_START);
143143
# if GTK_CHECK_VERSION(3, 12, 0)
144144
gtk_widget_set_margin_start(setN, 10);
145-
# elif
145+
# else
146146
gtk_widget_set_margin_left(setN, 10);
147147
# endif
148148
GtkWidget* advanced = gtk_button_new_with_label("Advanced");
149149
# if GTK_CHECK_VERSION(3, 12, 0)
150150
gtk_widget_set_margin_start(advanced, 60);
151-
# elif
151+
# else
152152
gtk_widget_set_margin_left(advanced, 60);
153153
# endif
154154
# if GTK_CHECK_VERSION(3, 12, 0)
155155
gtk_widget_set_margin_end(advanced, 10);
156-
# elif
156+
# else
157157
gtk_widget_set_margin_right(advanced, 10);
158158
# endif
159159
gtk_widget_set_margin_top(advanced, 20);
@@ -275,35 +275,35 @@ void advanced_button_callback() {
275275
//set margins
276276
# if GTK_CHECK_VERSION(3, 12, 0)
277277
gtk_widget_set_margin_start(instructions, 30);
278-
# elif
278+
# else
279279
gtk_widget_set_margin_left(instructions, 30);
280280
# endif
281281
# if GTK_CHECK_VERSION(3, 12, 0)
282282
gtk_widget_set_margin_end(instructions, 30);
283-
# elif
283+
# else
284284
gtk_widget_set_margin_right(instructions, 30);
285285
# endif
286286
gtk_widget_set_margin_top(instructions, 30);
287287
gtk_widget_set_margin_bottom(instructions, 30);
288288
gtk_widget_set_margin_bottom(expression_here, 5);
289289
# if GTK_CHECK_VERSION(3, 12, 0)
290290
gtk_widget_set_margin_start(entry, 30);
291-
# elif
291+
# else
292292
gtk_widget_set_margin_left(entry, 30);
293293
# endif
294294
# if GTK_CHECK_VERSION(3, 12, 0)
295295
gtk_widget_set_margin_end(set, 30);
296-
# elif
296+
# else
297297
gtk_widget_set_margin_right(set, 30);
298298
# endif
299299
# if GTK_CHECK_VERSION(3, 12, 0)
300300
gtk_widget_set_margin_start(set, 40);
301-
# elif
301+
# else
302302
gtk_widget_set_margin_left(set, 40);
303303
# endif
304304
# if GTK_CHECK_VERSION(3, 12, 0)
305305
gtk_widget_set_margin_start(expander, 10);
306-
# elif
306+
# else
307307
gtk_widget_set_margin_left(expander, 10);
308308
# endif
309309
gtk_widget_set_margin_top(expander, 20);
@@ -352,7 +352,7 @@ void refresh_bpList() {
352352
gtk_grid_attach((GtkGrid*)draw_debug_glob_vars.bpGrid, checkbox, 1, i, 1, 1);
353353
# if GTK_CHECK_VERSION(3, 12, 0)
354354
gtk_widget_set_margin_start(checkbox, 290 - draw_debug_glob_vars.bp_labels[i].size());
355-
# elif
355+
# else
356356
gtk_widget_set_margin_left(checkbox, 290 - draw_debug_glob_vars.bp_labels[i].size());
357357
# endif
358358
gtk_widget_set_halign(checkbox, GTK_ALIGN_END);
@@ -370,7 +370,7 @@ void refresh_bpList() {
370370
gtk_widget_set_valign(deleteButton, GTK_ALIGN_CENTER);
371371
# if GTK_CHECK_VERSION(3, 12, 0)
372372
gtk_widget_set_margin_start(deleteButton, 10);
373-
# elif
373+
# else
374374
gtk_widget_set_margin_left(deleteButton, 10);
375375
# endif
376376

@@ -395,7 +395,7 @@ void add_to_bpList(std::string bpDescription) {
395395
gtk_grid_attach((GtkGrid*)draw_debug_glob_vars.bpGrid, checkbox, 1, draw_debug_glob_vars.bpList_row, 1, 1);
396396
# if GTK_CHECK_VERSION(3, 12, 0)
397397
gtk_widget_set_margin_start(checkbox, 290 - bpDescription.size());
398-
# elif
398+
# else
399399
gtk_widget_set_margin_left(checkbox, 290 - bpDescription.size());
400400
# endif
401401
gtk_widget_set_halign(checkbox, GTK_ALIGN_END);
@@ -413,7 +413,7 @@ void add_to_bpList(std::string bpDescription) {
413413
gtk_widget_set_valign(deleteButton, GTK_ALIGN_CENTER);
414414
# if GTK_CHECK_VERSION(3, 12, 0)
415415
gtk_widget_set_margin_start(deleteButton, 10);
416-
# elif
416+
# else
417417
gtk_widget_set_margin_left(deleteButton, 10);
418418
# endif
419419

@@ -541,12 +541,12 @@ void invalid_breakpoint_entry_window(std::string error) {
541541
GtkWidget* label = gtk_label_new(error.c_str());
542542
# if GTK_CHECK_VERSION(3, 12, 0)
543543
gtk_widget_set_margin_start(label, 30);
544-
# elif
544+
# else
545545
gtk_widget_set_margin_left(label, 30);
546546
# endif
547547
# if GTK_CHECK_VERSION(3, 12, 0)
548548
gtk_widget_set_margin_end(label, 30);
549-
# elif
549+
# else
550550
gtk_widget_set_margin_right(label, 30);
551551
# endif
552552
gtk_widget_set_margin_top(label, 30);
@@ -558,12 +558,12 @@ void invalid_breakpoint_entry_window(std::string error) {
558558
gtk_widget_set_margin_bottom(button, 30);
559559
# if GTK_CHECK_VERSION(3, 12, 0)
560560
gtk_widget_set_margin_end(button, 30);
561-
# elif
561+
# else
562562
gtk_widget_set_margin_right(button, 30);
563563
# endif
564564
# if GTK_CHECK_VERSION(3, 12, 0)
565565
gtk_widget_set_margin_start(button, 30);
566-
# elif
566+
# else
567567
gtk_widget_set_margin_left(button, 30);
568568
# endif
569569
gtk_grid_attach((GtkGrid*)grid, button, 0, 1, 1, 1);
@@ -588,12 +588,12 @@ void breakpoint_info_window(std::string bpDescription, BreakpointState draw_brea
588588
GtkWidget* label = gtk_label_new(bpDescription.c_str());
589589
# if GTK_CHECK_VERSION(3, 12, 0)
590590
gtk_widget_set_margin_start(label, 30);
591-
# elif
591+
# else
592592
gtk_widget_set_margin_left(label, 30);
593593
# endif
594594
# if GTK_CHECK_VERSION(3, 12, 0)
595595
gtk_widget_set_margin_end(label, 30);
596-
# elif
596+
# else
597597
gtk_widget_set_margin_right(label, 30);
598598
# endif
599599
gtk_widget_set_margin_top(label, 30);
@@ -604,12 +604,12 @@ void breakpoint_info_window(std::string bpDescription, BreakpointState draw_brea
604604
gtk_label_set_markup((GtkLabel*)curr_info, "<b>Current Information</b>");
605605
# if GTK_CHECK_VERSION(3, 12, 0)
606606
gtk_widget_set_margin_start(curr_info, 30);
607-
# elif
607+
# else
608608
gtk_widget_set_margin_left(curr_info, 30);
609609
# endif
610610
# if GTK_CHECK_VERSION(3, 12, 0)
611611
gtk_widget_set_margin_end(curr_info, 30);
612-
# elif
612+
# else
613613
gtk_widget_set_margin_right(curr_info, 30);
614614
# endif
615615
gtk_widget_set_margin_bottom(curr_info, 15);
@@ -619,12 +619,12 @@ void breakpoint_info_window(std::string bpDescription, BreakpointState draw_brea
619619
GtkWidget* info_grid = gtk_grid_new();
620620
# if GTK_CHECK_VERSION(3, 12, 0)
621621
gtk_widget_set_margin_start(info_grid, 30);
622-
# elif
622+
# else
623623
gtk_widget_set_margin_left(info_grid, 30);
624624
# endif
625625
# if GTK_CHECK_VERSION(3, 12, 0)
626626
gtk_widget_set_margin_end(info_grid, 30);
627-
# elif
627+
# else
628628
gtk_widget_set_margin_right(info_grid, 30);
629629
# endif
630630
gtk_widget_set_margin_bottom(info_grid, 20);
@@ -636,19 +636,19 @@ void breakpoint_info_window(std::string bpDescription, BreakpointState draw_brea
636636
GtkWidget* n = gtk_image_new_from_file("src/draw/n.png");
637637
# if GTK_CHECK_VERSION(3, 12, 0)
638638
gtk_widget_set_margin_start(n, 18);
639-
# elif
639+
# else
640640
gtk_widget_set_margin_left(n, 18);
641641
# endif
642642
GtkWidget* i = gtk_image_new_from_file("src/draw/i.png");
643643
# if GTK_CHECK_VERSION(3, 12, 0)
644644
gtk_widget_set_margin_start(i, 16);
645-
# elif
645+
# else
646646
gtk_widget_set_margin_left(i, 16);
647647
# endif
648648
GtkWidget* b = gtk_image_new_from_file("src/draw/b.png");
649649
# if GTK_CHECK_VERSION(3, 12, 0)
650650
gtk_widget_set_margin_start(b, 18);
651-
# elif
651+
# else
652652
gtk_widget_set_margin_left(b, 18);
653653
# endif
654654

@@ -657,15 +657,15 @@ void breakpoint_info_window(std::string bpDescription, BreakpointState draw_brea
657657
GtkWidget* move_info = gtk_label_new(move_num.c_str());
658658
# if GTK_CHECK_VERSION(3, 12, 0)
659659
gtk_widget_set_margin_start(move_info, 5);
660-
# elif
660+
# else
661661
gtk_widget_set_margin_left(move_info, 5);
662662
# endif
663663
gtk_widget_set_halign(move_info, GTK_ALIGN_START);
664664
std::string temp_count = "temp_count: " + std::to_string(draw_breakpoint_state.temp_count);
665665
GtkWidget* temp_info = gtk_label_new(temp_count.c_str());
666666
# if GTK_CHECK_VERSION(3, 12, 0)
667667
gtk_widget_set_margin_start(temp_info, 5);
668-
# elif
668+
# else
669669
gtk_widget_set_margin_left(temp_info, 5);
670670
# endif
671671
gtk_widget_set_halign(temp_info, GTK_ALIGN_START);
@@ -676,23 +676,23 @@ void breakpoint_info_window(std::string bpDescription, BreakpointState draw_brea
676676
GtkWidget* block_info = gtk_label_new(block_id.c_str());
677677
# if GTK_CHECK_VERSION(3, 12, 0)
678678
gtk_widget_set_margin_start(block_info, 5);
679-
# elif
679+
# else
680680
gtk_widget_set_margin_left(block_info, 5);
681681
# endif
682682
gtk_widget_set_halign(block_info, GTK_ALIGN_START);
683683
std::string router_iter = "router_iter: " + std::to_string(draw_breakpoint_state.router_iter);
684684
GtkWidget* ri_info = gtk_label_new(router_iter.c_str());
685685
# if GTK_CHECK_VERSION(3, 12, 0)
686686
gtk_widget_set_margin_start(ri_info, 5);
687-
# elif
687+
# else
688688
gtk_widget_set_margin_left(ri_info, 5);
689689
# endif
690690
gtk_widget_set_halign(ri_info, GTK_ALIGN_START);
691691
std::string net_id = "rouet_net_id: " + std::to_string(draw_breakpoint_state.route_net_id);
692692
GtkWidget* net_info = gtk_label_new(net_id.c_str());
693693
# if GTK_CHECK_VERSION(3, 12, 0)
694694
gtk_widget_set_margin_start(net_info, 5);
695-
# elif
695+
# else
696696
gtk_widget_set_margin_left(net_info, 5);
697697
# endif
698698
gtk_widget_set_halign(net_info, GTK_ALIGN_START);

0 commit comments

Comments
 (0)