summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 (via Travis CI) <[email protected]>2021-01-21 06:02:11 +0000
committerraveit65 (via Travis CI) <[email protected]>2021-01-21 06:02:11 +0000
commitba4026397863a30eb70934d2a02f38e4b4d897e9 (patch)
treee3ab1513e7a6e64194af628f7b0b6c4d0cbcc39c
downloadmate-indicator-applet-ba4026397863a30eb70934d2a02f38e4b4d897e9.tar.bz2
mate-indicator-applet-ba4026397863a30eb70934d2a02f38e4b4d897e9.tar.xz
Deploy mate-desktop/mate-indicator-applet to github.com/mate-desktop/mate-indicator-applet.git:gh-pages
-rw-r--r--[email protected]_unreachable-code/0.html2280
-rw-r--r--[email protected]_unreachable-code/1.html1208
-rw-r--r--[email protected]_unreachable-code/index.html104
-rw-r--r--[email protected]_unreachable-code/stats.html90
-rw-r--r--[email protected]_unreachable-code/style.css149
-rw-r--r--[email protected]_master/0.html2280
-rw-r--r--[email protected]_master/1.html1208
-rw-r--r--[email protected]_master/index.html104
-rw-r--r--[email protected]_master/stats.html90
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_travis/0.html1208
-rw-r--r--[email protected]_travis/index.html101
-rw-r--r--[email protected]_travis/stats.html89
-rw-r--r--[email protected]_travis/style.css149
-rw-r--r--[email protected]_travis/0.html1208
-rw-r--r--[email protected]_travis/index.html101
-rw-r--r--[email protected]_travis/stats.html89
-rw-r--r--[email protected]_travis/style.css149
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_travis/0.html1208
-rw-r--r--[email protected]_travis/index.html101
-rw-r--r--[email protected]_travis/stats.html89
-rw-r--r--[email protected]_travis/style.css149
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_travis-ci/0.html1208
-rw-r--r--[email protected]_travis-ci/index.html101
-rw-r--r--[email protected]_travis-ci/stats.html89
-rw-r--r--[email protected]_travis-ci/style.css149
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--2020-06-26-094257-[email protected]_master/style.css149
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--2020-08-20-[email protected]_master/style.css137
-rw-r--r--[email protected]_v1.25.0/0.html1224
-rw-r--r--[email protected]_v1.25.0/index.html117
-rw-r--r--[email protected]_v1.25.0/stats.html105
-rw-r--r--[email protected]_v1.25.0/style.css137
-rw-r--r--[email protected]_USE_MATE2_MACROS/0.html1224
-rw-r--r--[email protected]_USE_MATE2_MACROS/index.html117
-rw-r--r--[email protected]_USE_MATE2_MACROS/stats.html105
-rw-r--r--[email protected]_USE_MATE2_MACROS/style.css137
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_stock-icon/0.html1224
-rw-r--r--[email protected]_stock-icon/index.html117
-rw-r--r--[email protected]_stock-icon/stats.html105
-rw-r--r--[email protected]_stock-icon/style.css137
-rw-r--r--[email protected]_debian-ci-fix/0.html1224
-rw-r--r--[email protected]_debian-ci-fix/index.html117
-rw-r--r--[email protected]_debian-ci-fix/stats.html105
-rw-r--r--[email protected]_debian-ci-fix/style.css137
-rw-r--r--CNAME1
-rw-r--r--index.html46
84 files changed, 35843 insertions, 0 deletions
diff --git a/[email protected]_unreachable-code/0.html b/[email protected]_unreachable-code/0.html
new file mode 100644
index 0000000..31ac0e7
--- /dev/null
+++ b/[email protected]_unreachable-code/0.html
@@ -0,0 +1,2280 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/applet-main.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> applet-main.c</p>
+<a href='0.html#line-536'> shadowArgument 536</a><a href='0.html#line-544'> shadowArgument 544</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/*</span>
+<a name="line-2"></a><span class="cm">A small wrapper utility to load indicators and put them as menu items</span>
+<a name="line-3"></a><span class="cm">into the mate-panel using it&#39;s applet interface.</span>
+<a name="line-4"></a>
+<a name="line-5"></a><span class="cm">Copyright 2009-2010 Canonical Ltd.</span>
+<a name="line-6"></a>
+<a name="line-7"></a><span class="cm">Authors:</span>
+<a name="line-8"></a><span class="cm"> Ted Gould &lt;[email protected]&gt;</span>
+<a name="line-9"></a>
+<a name="line-10"></a><span class="cm">This program is free software: you can redistribute it and/or modify it</span>
+<a name="line-11"></a><span class="cm">under the terms of the GNU General Public License version 3, as published</span>
+<a name="line-12"></a><span class="cm">by the Free Software Foundation.</span>
+<a name="line-13"></a>
+<a name="line-14"></a><span class="cm">This program is distributed in the hope that it will be useful, but</span>
+<a name="line-15"></a><span class="cm">WITHOUT ANY WARRANTY; without even the implied warranties of</span>
+<a name="line-16"></a><span class="cm">MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR</span>
+<a name="line-17"></a><span class="cm">PURPOSE. See the GNU General Public License for more details.</span>
+<a name="line-18"></a>
+<a name="line-19"></a><span class="cm">You should have received a copy of the GNU General Public License along</span>
+<a name="line-20"></a><span class="cm">with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
+<a name="line-21"></a><span class="cm">*/</span>
+<a name="line-22"></a>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;stdlib.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a><span class="cp">#include</span> <span class="cpf">&lt;config.h&gt;</span><span class="cp"></span>
+<a name="line-26"></a><span class="cp">#include</span> <span class="cpf">&lt;glib/gi18n.h&gt;</span><span class="cp"></span>
+<a name="line-27"></a><span class="cp">#include</span> <span class="cpf">&lt;mate-panel-applet.h&gt;</span><span class="cp"></span>
+<a name="line-28"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-29"></a><span class="cp">#include</span> <span class="cpf">&lt;gtk/gtk.h&gt;</span><span class="cp"></span>
+<a name="line-30"></a>
+<a name="line-31"></a><span class="cp">#if HAVE_UBUNTU_INDICATOR</span>
+<a name="line-32"></a>
+<a name="line-33"></a><span class="cp">#define INDICATOR_SERVICE_APPMENU &quot;libappmenu.so&quot;</span>
+<a name="line-34"></a><span class="cp">#define INDICATOR_SERVICE_ME &quot;libme.so&quot;</span>
+<a name="line-35"></a><span class="cp">#define INDICATOR_SERVICE_DATETIME &quot;libdatetime.so&quot;</span>
+<a name="line-36"></a>
+<a name="line-37"></a><span class="cp">#define INDICATOR_SERVICE_APPMENU_NG &quot;com.canonical.indicator.appmenu&quot;</span>
+<a name="line-38"></a><span class="cp">#define INDICATOR_SERVICE_ME_NG &quot;com.canonical.indicator.me&quot;</span>
+<a name="line-39"></a><span class="cp">#define INDICATOR_SERVICE_DATETIME_NG &quot;com.canonical.indicator.datetime&quot;</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="cp">#include</span> <span class="cpf">&lt;libindicator/indicator-object.h&gt;</span><span class="cp"></span>
+<a name="line-42"></a><span class="cp">#endif</span>
+<a name="line-43"></a>
+<a name="line-44"></a><span class="cp">#if HAVE_AYATANA_INDICATOR</span>
+<a name="line-45"></a>
+<a name="line-46"></a><span class="cp">#define INDICATOR_SERVICE_APPMENU &quot;libayatana-appmenu.so&quot;</span>
+<a name="line-47"></a><span class="cp">#define INDICATOR_SERVICE_ME &quot;libayatana-me.so&quot;</span>
+<a name="line-48"></a><span class="cp">#define INDICATOR_SERVICE_DATETIME &quot;libayatana-datetime.so&quot;</span>
+<a name="line-49"></a>
+<a name="line-50"></a><span class="cp">#define INDICATOR_SERVICE_APPMENU_NG &quot;org.ayatana.indicator.appmenu&quot;</span>
+<a name="line-51"></a><span class="cp">#define INDICATOR_SERVICE_ME_NG &quot;org.ayatana.indicator.me&quot;</span>
+<a name="line-52"></a><span class="cp">#define INDICATOR_SERVICE_DATETIME_NG &quot;org.ayatana.indicator.datetime&quot;</span>
+<a name="line-53"></a>
+<a name="line-54"></a><span class="cp">#include</span> <span class="cpf">&lt;libayatana-indicator/indicator-object.h&gt;</span><span class="cp"></span>
+<a name="line-55"></a><span class="cp">#endif</span>
+<a name="line-56"></a>
+<a name="line-57"></a><span class="cm">/* For new style indicators */</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="cp">#if HAVE_UBUNTU_INDICATOR &amp;&amp; HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-60"></a>
+<a name="line-61"></a><span class="cp">#include</span> <span class="cpf">&lt;libido/libido.h&gt;</span><span class="cp"></span>
+<a name="line-62"></a><span class="cp">#include</span> <span class="cpf">&lt;libindicator/indicator-ng.h&gt;</span><span class="cp"></span>
+<a name="line-63"></a>
+<a name="line-64"></a><span class="cp">#define INDICATOR_SERVICE_DIR &quot;/usr/share/unity/indicators&quot;</span>
+<a name="line-65"></a>
+<a name="line-66"></a><span class="cp">#endif</span>
+<a name="line-67"></a>
+<a name="line-68"></a><span class="cp">#if HAVE_AYATANA_INDICATOR &amp;&amp; HAVE_AYATANA_INDICATOR_NG</span>
+<a name="line-69"></a>
+<a name="line-70"></a><span class="cp">#include</span> <span class="cpf">&lt;libayatana-ido/libayatana-ido.h&gt;</span><span class="cp"></span>
+<a name="line-71"></a><span class="cp">#include</span> <span class="cpf">&lt;libayatana-indicator/indicator-ng.h&gt;</span><span class="cp"></span>
+<a name="line-72"></a>
+<a name="line-73"></a><span class="cp">#define INDICATOR_SERVICE_DIR &quot;/usr/share/ayatana/indicators&quot;</span>
+<a name="line-74"></a>
+<a name="line-75"></a><span class="cp">#endif</span>
+<a name="line-76"></a>
+<a name="line-77"></a><span class="cp">#include</span> <span class="cpf">&quot;tomboykeybinder.h&quot;</span><span class="cp"></span>
+<a name="line-78"></a>
+<a name="line-79"></a><span class="k">static</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">indicator_order</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-80"></a><span class="cp">#if HAVE_UBUNTU_INDICATOR</span>
+<a name="line-81"></a> <span class="s">&quot;libapplication.so&quot;</span><span class="p">,</span>
+<a name="line-82"></a> <span class="s">&quot;libmessaging.so&quot;</span><span class="p">,</span>
+<a name="line-83"></a> <span class="s">&quot;libsoundmenu.so&quot;</span><span class="p">,</span>
+<a name="line-84"></a> <span class="s">&quot;libdatetime.so&quot;</span><span class="p">,</span>
+<a name="line-85"></a> <span class="s">&quot;libsession.so&quot;</span><span class="p">,</span>
+<a name="line-86"></a><span class="cp">#endif</span>
+<a name="line-87"></a><span class="cp">#if HAVE_AYATANA_INDICATOR</span>
+<a name="line-88"></a> <span class="s">&quot;libayatana-application.so&quot;</span><span class="p">,</span>
+<a name="line-89"></a> <span class="s">&quot;libayatana-messaging.so&quot;</span><span class="p">,</span>
+<a name="line-90"></a> <span class="s">&quot;libayatana-soundmenu.so&quot;</span><span class="p">,</span>
+<a name="line-91"></a> <span class="s">&quot;libayatana-datetime.so&quot;</span><span class="p">,</span>
+<a name="line-92"></a> <span class="s">&quot;libayatana-session.so&quot;</span><span class="p">,</span>
+<a name="line-93"></a><span class="cp">#endif</span>
+<a name="line-94"></a> <span class="nb">NULL</span>
+<a name="line-95"></a><span class="p">};</span>
+<a name="line-96"></a>
+<a name="line-97"></a><span class="k">static</span> <span class="n">GtkPackDirection</span> <span class="n">packdirection</span><span class="p">;</span>
+<a name="line-98"></a><span class="k">static</span> <span class="n">MatePanelAppletOrient</span> <span class="n">orient</span><span class="p">;</span>
+<a name="line-99"></a><span class="k">static</span> <span class="n">guint</span> <span class="n">size</span><span class="p">;</span>
+<a name="line-100"></a>
+<a name="line-101"></a><span class="cp">#define MENU_DATA_INDICATOR_OBJECT &quot;indicator-object&quot;</span>
+<a name="line-102"></a><span class="cp">#define MENU_DATA_INDICATOR_ENTRY &quot;indicator-entry&quot;</span>
+<a name="line-103"></a>
+<a name="line-104"></a><span class="cp">#define IO_DATA_ORDER_NUMBER &quot;indicator-order-number&quot;</span>
+<a name="line-105"></a>
+<a name="line-106"></a><span class="k">static</span> <span class="n">gboolean</span> <span class="nf">applet_fill_cb</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span> <span class="n">applet</span><span class="p">,</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">iid</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">);</span>
+<a name="line-107"></a>
+<a name="line-108"></a><span class="k">static</span> <span class="kt">void</span> <span class="nf">update_accessible_desc</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-109"></a>
+<a name="line-110"></a><span class="cm">/*************</span>
+<a name="line-111"></a><span class="cm"> * main</span>
+<a name="line-112"></a><span class="cm"> * ***********/</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-115"></a><span class="n">MATE_PANEL_APPLET_OUT_PROCESS_FACTORY</span> <span class="p">(</span><span class="s">&quot;IndicatorAppletFactory&quot;</span><span class="p">,</span>
+<a name="line-116"></a> <span class="n">PANEL_TYPE_APPLET</span><span class="p">,</span>
+<a name="line-117"></a> <span class="s">&quot;indicator-applet&quot;</span><span class="p">,</span>
+<a name="line-118"></a> <span class="n">applet_fill_cb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-119"></a><span class="cp">#endif</span>
+<a name="line-120"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-121"></a><span class="n">MATE_PANEL_APPLET_OUT_PROCESS_FACTORY</span> <span class="p">(</span><span class="s">&quot;IndicatorAppletCompleteFactory&quot;</span><span class="p">,</span>
+<a name="line-122"></a> <span class="n">PANEL_TYPE_APPLET</span><span class="p">,</span>
+<a name="line-123"></a> <span class="s">&quot;indicator-applet-complete&quot;</span><span class="p">,</span>
+<a name="line-124"></a> <span class="n">applet_fill_cb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-125"></a><span class="cp">#endif</span>
+<a name="line-126"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-127"></a><span class="n">MATE_PANEL_APPLET_OUT_PROCESS_FACTORY</span> <span class="p">(</span><span class="s">&quot;IndicatorAppletAppmenuFactory&quot;</span><span class="p">,</span>
+<a name="line-128"></a> <span class="n">PANEL_TYPE_APPLET</span><span class="p">,</span>
+<a name="line-129"></a> <span class="s">&quot;indicator-applet-appmenu&quot;</span><span class="p">,</span>
+<a name="line-130"></a> <span class="n">applet_fill_cb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-131"></a><span class="cp">#endif</span>
+<a name="line-132"></a>
+<a name="line-133"></a><span class="cm">/*************</span>
+<a name="line-134"></a><span class="cm"> * log files</span>
+<a name="line-135"></a><span class="cm"> * ***********/</span>
+<a name="line-136"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-137"></a><span class="cp">#define LOG_FILE_NAME &quot;indicator-applet.log&quot;</span>
+<a name="line-138"></a><span class="cp">#endif</span>
+<a name="line-139"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-140"></a><span class="cp">#define LOG_FILE_NAME &quot;indicator-applet-complete.log&quot;</span>
+<a name="line-141"></a><span class="cp">#endif</span>
+<a name="line-142"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-143"></a><span class="cp">#define LOG_FILE_NAME &quot;indicator-applet-appmenu.log&quot;</span>
+<a name="line-144"></a><span class="cp">#endif</span>
+<a name="line-145"></a><span class="n">GOutputStream</span> <span class="o">*</span> <span class="n">log_file</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-146"></a>
+<a name="line-147"></a><span class="cm">/*****************</span>
+<a name="line-148"></a><span class="cm"> * Hotkey support</span>
+<a name="line-149"></a><span class="cm"> * **************/</span>
+<a name="line-150"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-151"></a><span class="n">gchar</span> <span class="o">*</span> <span class="n">hotkey_keycode</span> <span class="o">=</span> <span class="s">&quot;&lt;Super&gt;M&quot;</span><span class="p">;</span>
+<a name="line-152"></a><span class="cp">#endif</span>
+<a name="line-153"></a><span class="cp">#ifdef INDICATOR_APPLET_SESSION</span>
+<a name="line-154"></a><span class="n">gchar</span> <span class="o">*</span> <span class="n">hotkey_keycode</span> <span class="o">=</span> <span class="s">&quot;&lt;Super&gt;S&quot;</span><span class="p">;</span>
+<a name="line-155"></a><span class="cp">#endif</span>
+<a name="line-156"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-157"></a><span class="n">gchar</span> <span class="o">*</span> <span class="n">hotkey_keycode</span> <span class="o">=</span> <span class="s">&quot;&lt;Super&gt;S&quot;</span><span class="p">;</span>
+<a name="line-158"></a><span class="cp">#endif</span>
+<a name="line-159"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-160"></a><span class="n">gchar</span> <span class="o">*</span> <span class="n">hotkey_keycode</span> <span class="o">=</span> <span class="s">&quot;&lt;Super&gt;F1&quot;</span><span class="p">;</span>
+<a name="line-161"></a><span class="cp">#endif</span>
+<a name="line-162"></a>
+<a name="line-163"></a><span class="cm">/********************</span>
+<a name="line-164"></a><span class="cm"> * Environment Names</span>
+<a name="line-165"></a><span class="cm"> * *******************/</span>
+<a name="line-166"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-167"></a><span class="cp">#define INDICATOR_SPECIFIC_ENV &quot;indicator-applet-original&quot;</span>
+<a name="line-168"></a><span class="cp">#endif</span>
+<a name="line-169"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-170"></a><span class="cp">#define INDICATOR_SPECIFIC_ENV &quot;indicator-applet-complete&quot;</span>
+<a name="line-171"></a><span class="cp">#endif</span>
+<a name="line-172"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-173"></a><span class="cp">#define INDICATOR_SPECIFIC_ENV &quot;indicator-applet-appmenu&quot;</span>
+<a name="line-174"></a><span class="cp">#endif</span>
+<a name="line-175"></a>
+<a name="line-176"></a><span class="k">static</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">indicator_env</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-177"></a> <span class="s">&quot;indicator-applet&quot;</span><span class="p">,</span>
+<a name="line-178"></a> <span class="n">INDICATOR_SPECIFIC_ENV</span><span class="p">,</span>
+<a name="line-179"></a> <span class="nb">NULL</span>
+<a name="line-180"></a><span class="p">};</span>
+<a name="line-181"></a>
+<a name="line-182"></a><span class="cm">/*************</span>
+<a name="line-183"></a><span class="cm"> * init function</span>
+<a name="line-184"></a><span class="cm"> * ***********/</span>
+<a name="line-185"></a>
+<a name="line-186"></a><span class="k">static</span> <span class="n">gint</span>
+<a name="line-187"></a><span class="nf">name2order</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">name</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-188"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-189"></a>
+<a name="line-190"></a> <span class="k">for</span> <span class="p">(</span><span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">indicator_order</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-191"></a> <span class="k">if</span> <span class="p">(</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">indicator_order</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-192"></a> <span class="k">return</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-193"></a> <span class="p">}</span>
+<a name="line-194"></a> <span class="p">}</span>
+<a name="line-195"></a>
+<a name="line-196"></a> <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+<a name="line-197"></a><span class="p">}</span>
+<a name="line-198"></a>
+<a name="line-199"></a><span class="k">typedef</span> <span class="k">struct</span> <span class="n">_incoming_position_t</span> <span class="n">incoming_position_t</span><span class="p">;</span>
+<a name="line-200"></a><span class="k">struct</span> <span class="n">_incoming_position_t</span> <span class="p">{</span>
+<a name="line-201"></a> <span class="n">gint</span> <span class="n">objposition</span><span class="p">;</span>
+<a name="line-202"></a> <span class="n">gint</span> <span class="n">entryposition</span><span class="p">;</span>
+<a name="line-203"></a> <span class="n">gint</span> <span class="n">menupos</span><span class="p">;</span>
+<a name="line-204"></a> <span class="n">gboolean</span> <span class="n">found</span><span class="p">;</span>
+<a name="line-205"></a><span class="p">};</span>
+<a name="line-206"></a>
+<a name="line-207"></a><span class="cm">/* This function helps by determining where in the menu list</span>
+<a name="line-208"></a><span class="cm"> this new entry should be placed. It compares the objects</span>
+<a name="line-209"></a><span class="cm"> that they&#39;re on, and then the individual entries. Each</span>
+<a name="line-210"></a><span class="cm"> is progressively more expensive. */</span>
+<a name="line-211"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-212"></a><span class="nf">place_in_menu</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-213"></a><span class="p">{</span>
+<a name="line-214"></a> <span class="n">incoming_position_t</span> <span class="o">*</span> <span class="n">position</span> <span class="o">=</span> <span class="p">(</span><span class="n">incoming_position_t</span> <span class="o">*</span><span class="p">)</span><span class="n">user_data</span><span class="p">;</span>
+<a name="line-215"></a> <span class="k">if</span> <span class="p">(</span><span class="n">position</span><span class="o">-&gt;</span><span class="n">found</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-216"></a> <span class="cm">/* We&#39;ve already been placed, just finish the foreach */</span>
+<a name="line-217"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-218"></a> <span class="p">}</span>
+<a name="line-219"></a>
+<a name="line-220"></a> <span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span> <span class="o">=</span> <span class="n">INDICATOR_OBJECT</span><span class="p">(</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_OBJECT</span><span class="p">));</span>
+<a name="line-221"></a> <span class="n">g_assert</span><span class="p">(</span><span class="n">io</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-222"></a>
+<a name="line-223"></a> <span class="n">gint</span> <span class="n">objposition</span> <span class="o">=</span> <span class="n">GPOINTER_TO_INT</span><span class="p">(</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">IO_DATA_ORDER_NUMBER</span><span class="p">));</span>
+<a name="line-224"></a> <span class="cm">/* We&#39;ve already passed it, well, then this is where</span>
+<a name="line-225"></a><span class="cm"> we should be be. Stop! */</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="n">objposition</span> <span class="o">&gt;</span> <span class="n">position</span><span class="o">-&gt;</span><span class="n">objposition</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-227"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">found</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-228"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-229"></a> <span class="p">}</span>
+<a name="line-230"></a>
+<a name="line-231"></a> <span class="cm">/* The objects don&#39;t match yet, keep looking */</span>
+<a name="line-232"></a> <span class="k">if</span> <span class="p">(</span><span class="n">objposition</span> <span class="o">&lt;</span> <span class="n">position</span><span class="o">-&gt;</span><span class="n">objposition</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-233"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">menupos</span><span class="o">++</span><span class="p">;</span>
+<a name="line-234"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-235"></a> <span class="p">}</span>
+<a name="line-236"></a>
+<a name="line-237"></a> <span class="cm">/* The objects are the same, let&#39;s start looking at entries. */</span>
+<a name="line-238"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-239"></a> <span class="n">gint</span> <span class="n">entryposition</span> <span class="o">=</span> <span class="n">indicator_object_get_location</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-240"></a>
+<a name="line-241"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entryposition</span> <span class="o">&gt;</span> <span class="n">position</span><span class="o">-&gt;</span><span class="n">entryposition</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">found</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-243"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-244"></a> <span class="p">}</span>
+<a name="line-245"></a>
+<a name="line-246"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entryposition</span> <span class="o">&lt;</span> <span class="n">position</span><span class="o">-&gt;</span><span class="n">entryposition</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-247"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">menupos</span><span class="o">++</span><span class="p">;</span>
+<a name="line-248"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-249"></a> <span class="p">}</span>
+<a name="line-250"></a>
+<a name="line-251"></a> <span class="cm">/* We&#39;ve got the same object and the same entry. Well,</span>
+<a name="line-252"></a><span class="cm"> let&#39;s just put it right here then. */</span>
+<a name="line-253"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">found</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-254"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-255"></a><span class="p">}</span>
+<a name="line-256"></a>
+<a name="line-257"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-258"></a><span class="nf">something_shown</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-259"></a><span class="p">{</span>
+<a name="line-260"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-261"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-262"></a><span class="p">}</span>
+<a name="line-263"></a>
+<a name="line-264"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-265"></a><span class="nf">something_hidden</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-266"></a><span class="p">{</span>
+<a name="line-267"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-268"></a> <span class="n">gtk_widget_hide</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-269"></a><span class="p">}</span>
+<a name="line-270"></a>
+<a name="line-271"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-272"></a><span class="nf">sensitive_cb</span> <span class="p">(</span><span class="n">GObject</span> <span class="o">*</span> <span class="n">obj</span><span class="p">,</span> <span class="n">GParamSpec</span> <span class="o">*</span> <span class="n">pspec</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-273"></a><span class="p">{</span>
+<a name="line-274"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="p">(</span><span class="n">obj</span><span class="p">));</span>
+<a name="line-275"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">));</span>
+<a name="line-276"></a>
+<a name="line-277"></a> <span class="n">gtk_widget_set_sensitive</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">),</span> <span class="n">gtk_widget_get_sensitive</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">obj</span><span class="p">)));</span>
+<a name="line-278"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-279"></a><span class="p">}</span>
+<a name="line-280"></a>
+<a name="line-281"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-282"></a><span class="nf">entry_activated</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-283"></a><span class="p">{</span>
+<a name="line-284"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="p">(</span><span class="n">widget</span><span class="p">));</span>
+<a name="line-285"></a> <span class="n">gpointer</span> <span class="n">pio</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="s">&quot;indicator&quot;</span><span class="p">);</span>
+<a name="line-286"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">INDICATOR_IS_OBJECT</span><span class="p">(</span><span class="n">pio</span><span class="p">));</span>
+<a name="line-287"></a> <span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span> <span class="o">=</span> <span class="n">INDICATOR_OBJECT</span><span class="p">(</span><span class="n">pio</span><span class="p">);</span>
+<a name="line-288"></a>
+<a name="line-289"></a> <span class="k">return</span> <span class="n">indicator_object_entry_activate</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">user_data</span><span class="p">,</span> <span class="n">gtk_get_current_event_time</span><span class="p">());</span>
+<a name="line-290"></a><span class="p">}</span>
+<a name="line-291"></a>
+<a name="line-292"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-293"></a><span class="nf">entry_scrolled</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menuitem</span><span class="p">,</span> <span class="n">GdkEventScroll</span> <span class="o">*</span><span class="n">event</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-294"></a><span class="p">{</span>
+<a name="line-295"></a> <span class="n">IndicatorObject</span> <span class="o">*</span><span class="n">io</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_OBJECT</span><span class="p">);</span>
+<a name="line-296"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="n">entry</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-297"></a>
+<a name="line-298"></a> <span class="n">g_return_val_if_fail</span><span class="p">(</span><span class="n">INDICATOR_IS_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-299"></a>
+<a name="line-300"></a> <span class="n">g_signal_emit_by_name</span> <span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="s">&quot;scroll&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">event</span><span class="o">-&gt;</span><span class="n">direction</span><span class="p">);</span>
+<a name="line-301"></a> <span class="n">g_signal_emit_by_name</span> <span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="s">&quot;scroll-entry&quot;</span><span class="p">,</span> <span class="n">entry</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">event</span><span class="o">-&gt;</span><span class="n">direction</span><span class="p">);</span>
+<a name="line-302"></a> <span class="n">g_signal_emit_by_name</span> <span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ENTRY_SCROLLED</span><span class="p">,</span> <span class="n">entry</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">event</span><span class="o">-&gt;</span><span class="n">direction</span><span class="p">);</span>
+<a name="line-303"></a>
+<a name="line-304"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-305"></a><span class="p">}</span>
+<a name="line-306"></a>
+<a name="line-307"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-308"></a><span class="nf">accessible_desc_update_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">userdata</span><span class="p">)</span>
+<a name="line-309"></a><span class="p">{</span>
+<a name="line-310"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-311"></a>
+<a name="line-312"></a> <span class="k">if</span> <span class="p">(</span><span class="n">data</span> <span class="o">!=</span> <span class="n">userdata</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-313"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-314"></a> <span class="p">}</span>
+<a name="line-315"></a>
+<a name="line-316"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">data</span><span class="p">;</span>
+<a name="line-317"></a> <span class="n">update_accessible_desc</span><span class="p">(</span><span class="n">entry</span><span class="p">,</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-318"></a><span class="p">}</span>
+<a name="line-319"></a>
+<a name="line-320"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-321"></a><span class="nf">accessible_desc_update</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">)</span>
+<a name="line-322"></a><span class="p">{</span>
+<a name="line-323"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">accessible_desc_update_cb</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-324"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-325"></a><span class="p">}</span>
+<a name="line-326"></a>
+<a name="line-327"></a><span class="cp">#define PANEL_PADDING 8</span>
+<a name="line-328"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-329"></a><span class="nf">entry_resized</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">guint</span> <span class="n">newsize</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-330"></a><span class="p">{</span>
+<a name="line-331"></a> <span class="n">IndicatorObject</span> <span class="o">*</span><span class="n">io</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span><span class="p">)</span><span class="n">data</span><span class="p">;</span>
+<a name="line-332"></a>
+<a name="line-333"></a> <span class="n">size</span> <span class="o">=</span> <span class="n">newsize</span><span class="p">;</span>
+<a name="line-334"></a>
+<a name="line-335"></a> <span class="cm">/* Work on the entries */</span>
+<a name="line-336"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entries</span> <span class="o">=</span> <span class="n">indicator_object_get_entries</span><span class="p">(</span><span class="n">io</span><span class="p">);</span>
+<a name="line-337"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-338"></a>
+<a name="line-339"></a> <span class="k">for</span> <span class="p">(</span><span class="n">entry</span> <span class="o">=</span> <span class="n">entries</span><span class="p">;</span> <span class="n">entry</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">;</span> <span class="n">entry</span> <span class="o">=</span> <span class="n">g_list_next</span><span class="p">(</span><span class="n">entry</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-340"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entrydata</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">;</span>
+<a name="line-341"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entrydata</span><span class="o">-&gt;</span><span class="n">image</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-342"></a> <span class="cm">/* Resize to fit panel */</span>
+<a name="line-343"></a> <span class="n">gtk_image_set_pixel_size</span> <span class="p">(</span><span class="n">entrydata</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">,</span> <span class="n">size</span> <span class="o">-</span> <span class="n">PANEL_PADDING</span><span class="p">);</span>
+<a name="line-344"></a> <span class="p">}</span>
+<a name="line-345"></a> <span class="p">}</span>
+<a name="line-346"></a>
+<a name="line-347"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-348"></a><span class="p">}</span>
+<a name="line-349"></a>
+<a name="line-350"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-351"></a><span class="nf">entry_added</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">)</span>
+<a name="line-352"></a><span class="p">{</span>
+<a name="line-353"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Signal: Entry Added&quot;</span><span class="p">);</span>
+<a name="line-354"></a> <span class="n">gboolean</span> <span class="n">something_visible</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-355"></a> <span class="n">gboolean</span> <span class="n">something_sensitive</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-356"></a>
+<a name="line-357"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span> <span class="o">=</span> <span class="n">gtk_menu_item_new</span><span class="p">();</span>
+<a name="line-358"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">box</span> <span class="o">=</span> <span class="p">(</span><span class="n">packdirection</span> <span class="o">==</span> <span class="n">GTK_PACK_DIRECTION_LTR</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-359"></a> <span class="n">gtk_box_new</span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span> <span class="o">:</span> <span class="n">gtk_box_new</span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span>
+<a name="line-360"></a>
+<a name="line-361"></a> <span class="cm">/* Allows indicators to receive mouse scroll event */</span>
+<a name="line-362"></a> <span class="n">gtk_widget_add_events</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">GDK_SCROLL_MASK</span><span class="p">);</span>
+<a name="line-363"></a>
+<a name="line-364"></a> <span class="n">g_object_set_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;indicator&quot;</span><span class="p">,</span> <span class="n">io</span><span class="p">);</span>
+<a name="line-365"></a> <span class="n">g_object_set_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;box&quot;</span><span class="p">,</span> <span class="n">box</span><span class="p">);</span>
+<a name="line-366"></a>
+<a name="line-367"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;activate&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_activated</span><span class="p">),</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-368"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;scroll-event&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_scrolled</span><span class="p">),</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-369"></a>
+<a name="line-370"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-371"></a> <span class="cm">/* Resize to fit panel */</span>
+<a name="line-372"></a> <span class="n">gtk_image_set_pixel_size</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">,</span> <span class="n">size</span> <span class="o">-</span> <span class="n">PANEL_PADDING</span><span class="p">);</span>
+<a name="line-373"></a> <span class="n">gtk_box_pack_start</span><span class="p">(</span><span class="n">GTK_BOX</span><span class="p">(</span><span class="n">box</span><span class="p">),</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="n">FALSE</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-374"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-375"></a> <span class="n">something_visible</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-376"></a> <span class="p">}</span>
+<a name="line-377"></a>
+<a name="line-378"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_get_sensitive</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-379"></a> <span class="n">something_sensitive</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-380"></a> <span class="p">}</span>
+<a name="line-381"></a>
+<a name="line-382"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="s">&quot;show&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_shown</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-383"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="s">&quot;hide&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_hidden</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-384"></a>
+<a name="line-385"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="s">&quot;notify::sensitive&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">sensitive_cb</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-386"></a> <span class="p">}</span>
+<a name="line-387"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-388"></a> <span class="k">switch</span><span class="p">(</span><span class="n">packdirection</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-389"></a> <span class="k">case</span> <span class="nl">GTK_PACK_DIRECTION_LTR</span><span class="p">:</span>
+<a name="line-390"></a> <span class="n">gtk_label_set_angle</span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="mf">0.0</span><span class="p">);</span>
+<a name="line-391"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-392"></a> <span class="k">case</span> <span class="nl">GTK_PACK_DIRECTION_TTB</span><span class="p">:</span>
+<a name="line-393"></a> <span class="n">gtk_label_set_angle</span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span>
+<a name="line-394"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_LEFT</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-395"></a> <span class="mf">270.0</span> <span class="o">:</span> <span class="mf">90.0</span><span class="p">);</span>
+<a name="line-396"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-397"></a> <span class="k">default</span><span class="o">:</span>
+<a name="line-398"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-399"></a> <span class="p">}</span>
+<a name="line-400"></a> <span class="n">gtk_box_pack_start</span><span class="p">(</span><span class="n">GTK_BOX</span><span class="p">(</span><span class="n">box</span><span class="p">),</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="n">FALSE</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-401"></a>
+<a name="line-402"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-403"></a> <span class="n">something_visible</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-404"></a> <span class="p">}</span>
+<a name="line-405"></a>
+<a name="line-406"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_get_sensitive</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-407"></a> <span class="n">something_sensitive</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-408"></a> <span class="p">}</span>
+<a name="line-409"></a>
+<a name="line-410"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="s">&quot;show&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_shown</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-411"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="s">&quot;hide&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_hidden</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-412"></a>
+<a name="line-413"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="s">&quot;notify::sensitive&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">sensitive_cb</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-414"></a> <span class="p">}</span>
+<a name="line-415"></a> <span class="n">gtk_container_add</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">box</span><span class="p">);</span>
+<a name="line-416"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">box</span><span class="p">);</span>
+<a name="line-417"></a>
+<a name="line-418"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">menu</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-419"></a> <span class="n">gtk_menu_item_set_submenu</span><span class="p">(</span><span class="n">GTK_MENU_ITEM</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">menu</span><span class="p">));</span>
+<a name="line-420"></a> <span class="p">}</span>
+<a name="line-421"></a>
+<a name="line-422"></a> <span class="n">incoming_position_t</span> <span class="n">position</span><span class="p">;</span>
+<a name="line-423"></a> <span class="n">position</span><span class="p">.</span><span class="n">objposition</span> <span class="o">=</span> <span class="n">GPOINTER_TO_INT</span><span class="p">(</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">IO_DATA_ORDER_NUMBER</span><span class="p">));</span>
+<a name="line-424"></a> <span class="n">position</span><span class="p">.</span><span class="n">entryposition</span> <span class="o">=</span> <span class="n">indicator_object_get_location</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-425"></a> <span class="n">position</span><span class="p">.</span><span class="n">menupos</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-426"></a> <span class="n">position</span><span class="p">.</span><span class="n">found</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-427"></a>
+<a name="line-428"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">place_in_menu</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">position</span><span class="p">);</span>
+<a name="line-429"></a>
+<a name="line-430"></a> <span class="n">gtk_menu_shell_insert</span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">,</span> <span class="n">position</span><span class="p">.</span><span class="n">menupos</span><span class="p">);</span>
+<a name="line-431"></a>
+<a name="line-432"></a> <span class="k">if</span> <span class="p">(</span><span class="n">something_visible</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-433"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">accessible_desc</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-434"></a> <span class="n">update_accessible_desc</span><span class="p">(</span><span class="n">entry</span><span class="p">,</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-435"></a> <span class="p">}</span>
+<a name="line-436"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-437"></a> <span class="p">}</span>
+<a name="line-438"></a> <span class="n">gtk_widget_set_sensitive</span><span class="p">(</span><span class="n">menuitem</span><span class="p">,</span> <span class="n">something_sensitive</span><span class="p">);</span>
+<a name="line-439"></a>
+<a name="line-440"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-441"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_OBJECT</span><span class="p">,</span> <span class="n">io</span><span class="p">);</span>
+<a name="line-442"></a>
+<a name="line-443"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-444"></a><span class="p">}</span>
+<a name="line-445"></a>
+<a name="line-446"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-447"></a><span class="nf">entry_removed_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">userdata</span><span class="p">)</span>
+<a name="line-448"></a><span class="p">{</span>
+<a name="line-449"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-450"></a>
+<a name="line-451"></a> <span class="k">if</span> <span class="p">(</span><span class="n">data</span> <span class="o">!=</span> <span class="n">userdata</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-452"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-453"></a> <span class="p">}</span>
+<a name="line-454"></a>
+<a name="line-455"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">data</span><span class="p">;</span>
+<a name="line-456"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-457"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_shown</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-458"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_hidden</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-459"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">sensitive_cb</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-460"></a> <span class="p">}</span>
+<a name="line-461"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-462"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_shown</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-463"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_hidden</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-464"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">sensitive_cb</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-465"></a> <span class="p">}</span>
+<a name="line-466"></a>
+<a name="line-467"></a> <span class="n">gtk_widget_destroy</span><span class="p">(</span><span class="n">widget</span><span class="p">);</span>
+<a name="line-468"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-469"></a><span class="p">}</span>
+<a name="line-470"></a>
+<a name="line-471"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-472"></a><span class="nf">entry_removed</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span>
+<a name="line-473"></a> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-474"></a><span class="p">{</span>
+<a name="line-475"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Signal: Entry Removed&quot;</span><span class="p">);</span>
+<a name="line-476"></a>
+<a name="line-477"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">user_data</span><span class="p">),</span> <span class="n">entry_removed_cb</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-478"></a>
+<a name="line-479"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-480"></a><span class="p">}</span>
+<a name="line-481"></a>
+<a name="line-482"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-483"></a><span class="nf">entry_moved_find_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">userdata</span><span class="p">)</span>
+<a name="line-484"></a><span class="p">{</span>
+<a name="line-485"></a> <span class="n">gpointer</span> <span class="o">*</span> <span class="n">array</span> <span class="o">=</span> <span class="p">(</span><span class="n">gpointer</span> <span class="o">*</span><span class="p">)</span><span class="n">userdata</span><span class="p">;</span>
+<a name="line-486"></a> <span class="k">if</span> <span class="p">(</span><span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-487"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-488"></a> <span class="p">}</span>
+<a name="line-489"></a>
+<a name="line-490"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-491"></a>
+<a name="line-492"></a> <span class="k">if</span> <span class="p">(</span><span class="n">data</span> <span class="o">!=</span> <span class="n">array</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="p">{</span>
+<a name="line-493"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-494"></a> <span class="p">}</span>
+<a name="line-495"></a>
+<a name="line-496"></a> <span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">widget</span><span class="p">;</span>
+<a name="line-497"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-498"></a><span class="p">}</span>
+<a name="line-499"></a>
+<a name="line-500"></a><span class="cm">/* Gets called when an entry for an object was moved. */</span>
+<a name="line-501"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-502"></a><span class="nf">entry_moved</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span>
+<a name="line-503"></a> <span class="n">gint</span> <span class="n">old</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">gint</span> <span class="n">new</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-504"></a><span class="p">{</span>
+<a name="line-505"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-506"></a>
+<a name="line-507"></a> <span class="n">gpointer</span> <span class="n">array</span><span class="p">[</span><span class="mi">2</span><span class="p">];</span>
+<a name="line-508"></a> <span class="n">array</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">entry</span><span class="p">;</span>
+<a name="line-509"></a> <span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-510"></a>
+<a name="line-511"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">entry_moved_find_cb</span><span class="p">,</span> <span class="n">array</span><span class="p">);</span>
+<a name="line-512"></a> <span class="k">if</span> <span class="p">(</span><span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-513"></a> <span class="n">g_warning</span><span class="p">(</span><span class="s">&quot;Moving an entry that isn&#39;t in our menus.&quot;</span><span class="p">);</span>
+<a name="line-514"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-515"></a> <span class="p">}</span>
+<a name="line-516"></a>
+<a name="line-517"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">mi</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span>
+<a name="line-518"></a> <span class="n">g_object_ref</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">mi</span><span class="p">));</span>
+<a name="line-519"></a> <span class="n">gtk_container_remove</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">mi</span><span class="p">);</span>
+<a name="line-520"></a>
+<a name="line-521"></a> <span class="n">incoming_position_t</span> <span class="n">position</span><span class="p">;</span>
+<a name="line-522"></a> <span class="n">position</span><span class="p">.</span><span class="n">objposition</span> <span class="o">=</span> <span class="n">GPOINTER_TO_INT</span><span class="p">(</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">IO_DATA_ORDER_NUMBER</span><span class="p">));</span>
+<a name="line-523"></a> <span class="n">position</span><span class="p">.</span><span class="n">entryposition</span> <span class="o">=</span> <span class="n">indicator_object_get_location</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-524"></a> <span class="n">position</span><span class="p">.</span><span class="n">menupos</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-525"></a> <span class="n">position</span><span class="p">.</span><span class="n">found</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-526"></a>
+<a name="line-527"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">place_in_menu</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">position</span><span class="p">);</span>
+<a name="line-528"></a>
+<a name="line-529"></a> <span class="n">gtk_menu_shell_insert</span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">mi</span><span class="p">,</span> <span class="n">position</span><span class="p">.</span><span class="n">menupos</span><span class="p">);</span>
+<a name="line-530"></a> <span class="n">g_object_unref</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">mi</span><span class="p">));</span>
+<a name="line-531"></a>
+<a name="line-532"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-533"></a><span class="p">}</span>
+<a name="line-534"></a>
+<a name="line-535"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-536"></a><span class="hll"><span class="nf">menu_show</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span><span class='error2'>&lt;--- Shadowed declaration</span>
+</span><a name="line-537"></a> <span class="n">guint32</span> <span class="n">timestamp</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-538"></a><span class="p">{</span>
+<a name="line-539"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-540"></a>
+<a name="line-541"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-542"></a> <span class="cm">/* Close any open menus instead of opening one */</span>
+<a name="line-543"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entries</span> <span class="o">=</span> <span class="n">indicator_object_get_entries</span><span class="p">(</span><span class="n">io</span><span class="p">);</span>
+<a name="line-544"></a><span class="hll"> <span class="n">GList</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span><span class='error2'>&lt;--- Shadow variable</span>
+</span><a name="line-545"></a> <span class="k">for</span> <span class="p">(</span><span class="n">entry</span> <span class="o">=</span> <span class="n">entries</span><span class="p">;</span> <span class="n">entry</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">;</span> <span class="n">entry</span> <span class="o">=</span> <span class="n">g_list_next</span><span class="p">(</span><span class="n">entry</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-546"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entrydata</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">;</span>
+<a name="line-547"></a> <span class="n">gtk_menu_popdown</span><span class="p">(</span><span class="n">entrydata</span><span class="o">-&gt;</span><span class="n">menu</span><span class="p">);</span>
+<a name="line-548"></a> <span class="p">}</span>
+<a name="line-549"></a> <span class="n">g_list_free</span><span class="p">(</span><span class="n">entries</span><span class="p">);</span>
+<a name="line-550"></a>
+<a name="line-551"></a> <span class="cm">/* And tell the menubar to exit activation mode too */</span>
+<a name="line-552"></a> <span class="n">gtk_menu_shell_cancel</span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="p">(</span><span class="n">menubar</span><span class="p">));</span>
+<a name="line-553"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-554"></a> <span class="p">}</span>
+<a name="line-555"></a>
+<a name="line-556"></a> <span class="c1">// TODO: do something sensible here</span>
+<a name="line-557"></a><span class="p">}</span>
+<a name="line-558"></a>
+<a name="line-559"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-560"></a><span class="nf">update_accessible_desc</span><span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span><span class="p">)</span>
+<a name="line-561"></a><span class="p">{</span>
+<a name="line-562"></a> <span class="cm">/* FIXME: We need to deal with the use case where the contents of the</span>
+<a name="line-563"></a><span class="cm"> label overrides what is found in the atk object&#39;s name, or at least</span>
+<a name="line-564"></a><span class="cm"> orca speaks the label instead of the atk object name.</span>
+<a name="line-565"></a><span class="cm"> */</span>
+<a name="line-566"></a> <span class="n">AtkObject</span> <span class="o">*</span> <span class="n">menuitem_obj</span> <span class="o">=</span> <span class="n">gtk_widget_get_accessible</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-567"></a> <span class="k">if</span> <span class="p">(</span><span class="n">menuitem_obj</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-568"></a> <span class="cm">/* Should there be an error printed here? */</span>
+<a name="line-569"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-570"></a> <span class="p">}</span>
+<a name="line-571"></a>
+<a name="line-572"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">accessible_desc</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-573"></a> <span class="n">atk_object_set_name</span><span class="p">(</span><span class="n">menuitem_obj</span><span class="p">,</span> <span class="n">entry</span><span class="o">-&gt;</span><span class="n">accessible_desc</span><span class="p">);</span>
+<a name="line-574"></a> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+<a name="line-575"></a> <span class="n">atk_object_set_name</span><span class="p">(</span><span class="n">menuitem_obj</span><span class="p">,</span> <span class="s">&quot;&quot;</span><span class="p">);</span>
+<a name="line-576"></a> <span class="p">}</span>
+<a name="line-577"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-578"></a><span class="p">}</span>
+<a name="line-579"></a>
+<a name="line-580"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-581"></a><span class="nf">load_indicator</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">,</span> <span class="n">IndicatorObject</span> <span class="o">*</span><span class="n">io</span><span class="p">,</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">name</span><span class="p">)</span>
+<a name="line-582"></a><span class="p">{</span>
+<a name="line-583"></a> <span class="cm">/* Set the environment it&#39;s in */</span>
+<a name="line-584"></a> <span class="n">indicator_object_set_environment</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="p">(</span><span class="k">const</span> <span class="n">GStrv</span><span class="p">)</span><span class="n">indicator_env</span><span class="p">);</span>
+<a name="line-585"></a>
+<a name="line-586"></a> <span class="cm">/* Attach the &#39;name&#39; to the object */</span>
+<a name="line-587"></a><span class="cp">#if HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-588"></a> <span class="kt">int</span> <span class="n">pos</span> <span class="o">=</span> <span class="mi">5000</span> <span class="o">-</span> <span class="n">indicator_object_get_position</span><span class="p">(</span><span class="n">io</span><span class="p">);</span>
+<a name="line-589"></a> <span class="k">if</span> <span class="p">(</span><span class="n">pos</span> <span class="o">&gt;</span> <span class="mi">5000</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-590"></a> <span class="n">pos</span> <span class="o">=</span> <span class="n">name2order</span><span class="p">(</span><span class="n">name</span><span class="p">);</span>
+<a name="line-591"></a> <span class="p">}</span>
+<a name="line-592"></a><span class="cp">#else</span>
+<a name="line-593"></a> <span class="kt">int</span> <span class="n">pos</span> <span class="o">=</span> <span class="n">name2order</span><span class="p">(</span><span class="n">name</span><span class="p">);</span>
+<a name="line-594"></a><span class="cp">#endif</span>
+<a name="line-595"></a>
+<a name="line-596"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">IO_DATA_ORDER_NUMBER</span><span class="p">,</span> <span class="n">GINT_TO_POINTER</span><span class="p">(</span><span class="n">pos</span><span class="p">));</span>
+<a name="line-597"></a>
+<a name="line-598"></a> <span class="cm">/* Connect to its signals */</span>
+<a name="line-599"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_added</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-600"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_removed</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-601"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_moved</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-602"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_MENU_SHOW</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">menu_show</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-603"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">accessible_desc_update</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-604"></a>
+<a name="line-605"></a> <span class="cm">/* Track panel resize */</span>
+<a name="line-606"></a> <span class="n">g_signal_connect_object</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="s">&quot;change-size&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_resized</span><span class="p">),</span> <span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-607"></a>
+<a name="line-608"></a> <span class="cm">/* Work on the entries */</span>
+<a name="line-609"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entries</span> <span class="o">=</span> <span class="n">indicator_object_get_entries</span><span class="p">(</span><span class="n">io</span><span class="p">);</span>
+<a name="line-610"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-611"></a>
+<a name="line-612"></a> <span class="k">for</span> <span class="p">(</span><span class="n">entry</span> <span class="o">=</span> <span class="n">entries</span><span class="p">;</span> <span class="n">entry</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">;</span> <span class="n">entry</span> <span class="o">=</span> <span class="n">g_list_next</span><span class="p">(</span><span class="n">entry</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-613"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entrydata</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">;</span>
+<a name="line-614"></a> <span class="n">entry_added</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">entrydata</span><span class="p">,</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-615"></a> <span class="p">}</span>
+<a name="line-616"></a>
+<a name="line-617"></a> <span class="n">g_list_free</span><span class="p">(</span><span class="n">entries</span><span class="p">);</span>
+<a name="line-618"></a><span class="p">}</span>
+<a name="line-619"></a>
+<a name="line-620"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-621"></a><span class="nf">load_module</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">name</span><span class="p">,</span> <span class="n">MatePanelApplet</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">)</span>
+<a name="line-622"></a><span class="p">{</span>
+<a name="line-623"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Looking at Module: %s&quot;</span><span class="p">,</span> <span class="n">name</span><span class="p">);</span>
+<a name="line-624"></a> <span class="n">g_return_val_if_fail</span><span class="p">(</span><span class="n">name</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-625"></a>
+<a name="line-626"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_str_has_suffix</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">G_MODULE_SUFFIX</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-627"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-628"></a> <span class="p">}</span>
+<a name="line-629"></a>
+<a name="line-630"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Loading Module: %s&quot;</span><span class="p">,</span> <span class="n">name</span><span class="p">);</span>
+<a name="line-631"></a>
+<a name="line-632"></a> <span class="cm">/* Build the object for the module */</span>
+<a name="line-633"></a> <span class="n">gchar</span> <span class="o">*</span> <span class="n">fullpath</span> <span class="o">=</span> <span class="n">g_build_filename</span><span class="p">(</span><span class="n">INDICATOR_DIR</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-634"></a> <span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span> <span class="o">=</span> <span class="n">indicator_object_new_from_file</span><span class="p">(</span><span class="n">fullpath</span><span class="p">);</span>
+<a name="line-635"></a> <span class="n">g_free</span><span class="p">(</span><span class="n">fullpath</span><span class="p">);</span>
+<a name="line-636"></a>
+<a name="line-637"></a> <span class="n">load_indicator</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">,</span> <span class="n">io</span><span class="p">,</span> <span class="n">name</span><span class="p">);</span>
+<a name="line-638"></a>
+<a name="line-639"></a> <span class="k">return</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-640"></a><span class="p">}</span>
+<a name="line-641"></a>
+<a name="line-642"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-643"></a><span class="nf">load_modules</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menubar</span><span class="p">,</span> <span class="n">gint</span> <span class="o">*</span><span class="n">indicators_loaded</span><span class="p">)</span>
+<a name="line-644"></a><span class="p">{</span>
+<a name="line-645"></a> <span class="k">if</span> <span class="p">(</span><span class="n">g_file_test</span><span class="p">(</span><span class="n">INDICATOR_DIR</span><span class="p">,</span> <span class="p">(</span><span class="n">G_FILE_TEST_EXISTS</span> <span class="o">|</span> <span class="n">G_FILE_TEST_IS_DIR</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-646"></a> <span class="n">GDir</span> <span class="o">*</span> <span class="n">dir</span> <span class="o">=</span> <span class="n">g_dir_open</span><span class="p">(</span><span class="n">INDICATOR_DIR</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-647"></a>
+<a name="line-648"></a> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">name</span><span class="p">;</span>
+<a name="line-649"></a> <span class="n">gint</span> <span class="n">count</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-650"></a> <span class="k">while</span> <span class="p">((</span><span class="n">name</span> <span class="o">=</span> <span class="n">g_dir_read_name</span><span class="p">(</span><span class="n">dir</span><span class="p">))</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-651"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-652"></a> <span class="k">if</span> <span class="p">(</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_APPMENU</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-653"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-654"></a> <span class="p">}</span>
+<a name="line-655"></a><span class="cp">#else</span>
+<a name="line-656"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_APPMENU</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-657"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-658"></a> <span class="p">}</span>
+<a name="line-659"></a><span class="cp">#endif</span>
+<a name="line-660"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-661"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_ME</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-662"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-663"></a> <span class="p">}</span>
+<a name="line-664"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_DATETIME</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-665"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-666"></a> <span class="p">}</span>
+<a name="line-667"></a><span class="cp">#endif</span>
+<a name="line-668"></a> <span class="k">if</span> <span class="p">(</span><span class="n">load_module</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-669"></a> <span class="n">count</span><span class="o">++</span><span class="p">;</span>
+<a name="line-670"></a> <span class="p">}</span>
+<a name="line-671"></a> <span class="p">}</span>
+<a name="line-672"></a>
+<a name="line-673"></a> <span class="o">*</span><span class="n">indicators_loaded</span> <span class="o">+=</span> <span class="n">count</span><span class="p">;</span>
+<a name="line-674"></a>
+<a name="line-675"></a> <span class="n">g_dir_close</span> <span class="p">(</span><span class="n">dir</span><span class="p">);</span>
+<a name="line-676"></a> <span class="p">}</span>
+<a name="line-677"></a><span class="p">}</span>
+<a name="line-678"></a>
+<a name="line-679"></a><span class="cp">#if HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-680"></a>
+<a name="line-681"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-682"></a><span class="nf">load_indicators_from_indicator_files</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menubar</span><span class="p">,</span> <span class="n">gint</span> <span class="o">*</span><span class="n">indicators_loaded</span><span class="p">)</span>
+<a name="line-683"></a><span class="p">{</span>
+<a name="line-684"></a> <span class="n">GDir</span> <span class="o">*</span><span class="n">dir</span><span class="p">;</span>
+<a name="line-685"></a> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">name</span><span class="p">;</span>
+<a name="line-686"></a> <span class="n">GError</span> <span class="o">*</span><span class="n">error</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-687"></a>
+<a name="line-688"></a> <span class="n">dir</span> <span class="o">=</span> <span class="n">g_dir_open</span> <span class="p">(</span><span class="n">INDICATOR_SERVICE_DIR</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">error</span><span class="p">);</span>
+<a name="line-689"></a>
+<a name="line-690"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">dir</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-691"></a> <span class="n">g_warning</span> <span class="p">(</span><span class="s">&quot;unable to open indicator service file directory: %s&quot;</span><span class="p">,</span> <span class="n">error</span><span class="o">-&gt;</span><span class="n">message</span><span class="p">);</span>
+<a name="line-692"></a> <span class="n">g_error_free</span> <span class="p">(</span><span class="n">error</span><span class="p">);</span>
+<a name="line-693"></a>
+<a name="line-694"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-695"></a> <span class="p">}</span>
+<a name="line-696"></a>
+<a name="line-697"></a> <span class="n">gint</span> <span class="n">count</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-698"></a> <span class="k">while</span> <span class="p">((</span><span class="n">name</span> <span class="o">=</span> <span class="n">g_dir_read_name</span> <span class="p">(</span><span class="n">dir</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-699"></a> <span class="n">gchar</span> <span class="o">*</span><span class="n">filename</span><span class="p">;</span>
+<a name="line-700"></a> <span class="n">IndicatorNg</span> <span class="o">*</span><span class="n">indicator</span><span class="p">;</span>
+<a name="line-701"></a>
+<a name="line-702"></a> <span class="n">filename</span> <span class="o">=</span> <span class="n">g_build_filename</span> <span class="p">(</span><span class="n">INDICATOR_SERVICE_DIR</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-703"></a> <span class="n">indicator</span> <span class="o">=</span> <span class="n">indicator_ng_new_for_profile</span> <span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="s">&quot;desktop&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">error</span><span class="p">);</span>
+<a name="line-704"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">filename</span><span class="p">);</span>
+<a name="line-705"></a>
+<a name="line-706"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-707"></a> <span class="k">if</span> <span class="p">(</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_APPMENU_NG</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-708"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-709"></a> <span class="p">}</span>
+<a name="line-710"></a><span class="cp">#else</span>
+<a name="line-711"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_APPMENU_NG</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-712"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-713"></a> <span class="p">}</span>
+<a name="line-714"></a><span class="cp">#endif</span>
+<a name="line-715"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-716"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_ME_NG</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-717"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-718"></a> <span class="p">}</span>
+<a name="line-719"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_DATETIME_NG</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-720"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-721"></a> <span class="p">}</span>
+<a name="line-722"></a><span class="cp">#endif</span>
+<a name="line-723"></a>
+<a name="line-724"></a> <span class="k">if</span> <span class="p">(</span><span class="n">indicator</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-725"></a> <span class="n">load_indicator</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">,</span> <span class="n">INDICATOR_OBJECT</span> <span class="p">(</span><span class="n">indicator</span><span class="p">),</span> <span class="n">name</span><span class="p">);</span>
+<a name="line-726"></a> <span class="n">count</span><span class="o">++</span><span class="p">;</span>
+<a name="line-727"></a> <span class="p">}</span><span class="k">else</span><span class="p">{</span>
+<a name="line-728"></a> <span class="n">g_warning</span> <span class="p">(</span><span class="s">&quot;unable to load &#39;%s&#39;: %s&quot;</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">error</span><span class="o">-&gt;</span><span class="n">message</span><span class="p">);</span>
+<a name="line-729"></a> <span class="n">g_clear_error</span> <span class="p">(</span><span class="o">&amp;</span><span class="n">error</span><span class="p">);</span>
+<a name="line-730"></a> <span class="p">}</span>
+<a name="line-731"></a> <span class="p">}</span>
+<a name="line-732"></a>
+<a name="line-733"></a> <span class="o">*</span><span class="n">indicators_loaded</span> <span class="o">+=</span> <span class="n">count</span><span class="p">;</span>
+<a name="line-734"></a>
+<a name="line-735"></a> <span class="n">g_dir_close</span> <span class="p">(</span><span class="n">dir</span><span class="p">);</span>
+<a name="line-736"></a><span class="p">}</span>
+<a name="line-737"></a><span class="cp">#endif </span><span class="cm">/* HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG */</span><span class="cp"></span>
+<a name="line-738"></a>
+<a name="line-739"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-740"></a><span class="nf">hotkey_filter</span> <span class="p">(</span><span class="kt">char</span> <span class="o">*</span> <span class="n">keystring</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-741"></a><span class="p">{</span>
+<a name="line-742"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">GTK_IS_MENU_SHELL</span><span class="p">(</span><span class="n">data</span><span class="p">));</span>
+<a name="line-743"></a>
+<a name="line-744"></a> <span class="cm">/* Oh, wow, it&#39;s us! */</span>
+<a name="line-745"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">children</span> <span class="o">=</span> <span class="n">gtk_container_get_children</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">data</span><span class="p">));</span>
+<a name="line-746"></a> <span class="k">if</span> <span class="p">(</span><span class="n">children</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-747"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Menubar has no children&quot;</span><span class="p">);</span>
+<a name="line-748"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-749"></a> <span class="p">}</span>
+<a name="line-750"></a>
+<a name="line-751"></a> <span class="n">gtk_menu_shell_select_item</span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="p">(</span><span class="n">data</span><span class="p">),</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">g_list_last</span><span class="p">(</span><span class="n">children</span><span class="p">)</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">));</span>
+<a name="line-752"></a> <span class="n">g_list_free</span><span class="p">(</span><span class="n">children</span><span class="p">);</span>
+<a name="line-753"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-754"></a><span class="p">}</span>
+<a name="line-755"></a>
+<a name="line-756"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-757"></a><span class="nf">menubar_press</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span>
+<a name="line-758"></a> <span class="n">GdkEventButton</span> <span class="o">*</span><span class="n">event</span><span class="p">,</span>
+<a name="line-759"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="n">G_GNUC_UNUSED</span><span class="p">)</span>
+<a name="line-760"></a><span class="p">{</span>
+<a name="line-761"></a> <span class="k">if</span> <span class="p">(</span><span class="n">event</span><span class="o">-&gt;</span><span class="n">button</span> <span class="o">!=</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-762"></a> <span class="n">g_signal_stop_emission_by_name</span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> <span class="s">&quot;button-press-event&quot;</span><span class="p">);</span>
+<a name="line-763"></a> <span class="p">}</span>
+<a name="line-764"></a>
+<a name="line-765"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-766"></a><span class="p">}</span>
+<a name="line-767"></a>
+<a name="line-768"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-769"></a><span class="nf">menubar_on_draw</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span>
+<a name="line-770"></a> <span class="n">cairo_t</span> <span class="o">*</span> <span class="n">cr</span><span class="p">,</span>
+<a name="line-771"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">)</span>
+<a name="line-772"></a><span class="p">{</span>
+<a name="line-773"></a> <span class="cm">/* FIXME: either port to gtk_render_focus or remove this function */</span>
+<a name="line-774"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_has_focus</span><span class="p">(</span><span class="n">menubar</span><span class="p">))</span>
+<a name="line-775"></a> <span class="n">gtk_paint_focus</span><span class="p">(</span><span class="n">gtk_widget_get_style</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span>
+<a name="line-776"></a> <span class="n">cr</span><span class="p">,</span>
+<a name="line-777"></a> <span class="n">gtk_widget_get_state</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span>
+<a name="line-778"></a> <span class="n">widget</span><span class="p">,</span> <span class="s">&quot;menubar-applet&quot;</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">);</span>
+<a name="line-779"></a>
+<a name="line-780"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-781"></a><span class="p">}</span>
+<a name="line-782"></a>
+<a name="line-783"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-784"></a><span class="nf">about_cb</span> <span class="p">(</span><span class="n">GtkAction</span> <span class="o">*</span><span class="n">action</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-785"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="n">G_GNUC_UNUSED</span><span class="p">)</span>
+<a name="line-786"></a><span class="p">{</span>
+<a name="line-787"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">authors</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-788"></a> <span class="s">&quot;Ted Gould &lt;[email protected]&gt;&quot;</span><span class="p">,</span>
+<a name="line-789"></a> <span class="nb">NULL</span>
+<a name="line-790"></a> <span class="p">};</span>
+<a name="line-791"></a>
+<a name="line-792"></a> <span class="k">static</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">license</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-793"></a> <span class="n">N_</span><span class="p">(</span><span class="s">&quot;This program is free software: you can redistribute it and/or modify it &quot;</span>
+<a name="line-794"></a> <span class="s">&quot;under the terms of the GNU General Public License version 3, as published &quot;</span>
+<a name="line-795"></a> <span class="s">&quot;by the Free Software Foundation.&quot;</span><span class="p">),</span>
+<a name="line-796"></a> <span class="n">N_</span><span class="p">(</span><span class="s">&quot;This program is distributed in the hope that it will be useful, but &quot;</span>
+<a name="line-797"></a> <span class="s">&quot;WITHOUT ANY WARRANTY; without even the implied warranties of &quot;</span>
+<a name="line-798"></a> <span class="s">&quot;MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR &quot;</span>
+<a name="line-799"></a> <span class="s">&quot;PURPOSE. See the GNU General Public License for more details.&quot;</span><span class="p">),</span>
+<a name="line-800"></a> <span class="n">N_</span><span class="p">(</span><span class="s">&quot;You should have received a copy of the GNU General Public License along &quot;</span>
+<a name="line-801"></a> <span class="s">&quot;with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.&quot;</span><span class="p">),</span>
+<a name="line-802"></a> <span class="nb">NULL</span>
+<a name="line-803"></a> <span class="p">};</span>
+<a name="line-804"></a> <span class="n">gchar</span> <span class="o">*</span><span class="n">license_i18n</span><span class="p">;</span>
+<a name="line-805"></a>
+<a name="line-806"></a> <span class="n">license_i18n</span> <span class="o">=</span> <span class="n">g_strconcat</span> <span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">license</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span> <span class="s">&quot;</span><span class="se">\n\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="n">license</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="s">&quot;</span><span class="se">\n\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="n">license</span><span class="p">[</span><span class="mi">2</span><span class="p">]),</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-807"></a>
+<a name="line-808"></a> <span class="n">gtk_show_about_dialog</span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span>
+<a name="line-809"></a> <span class="s">&quot;version&quot;</span><span class="p">,</span> <span class="n">VERSION</span><span class="p">,</span>
+<a name="line-810"></a> <span class="s">&quot;copyright&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;Copyright </span><span class="se">\xc2\xa9</span><span class="s"> 2009-2010 Canonical, Ltd.</span><span class="se">\n</span><span class="s">&quot;</span>
+<a name="line-811"></a> <span class="s">&quot;Copyright </span><span class="se">\xc2\xa9</span><span class="s"> 2011-2020 MATE developers&quot;</span><span class="p">),</span>
+<a name="line-812"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-813"></a> <span class="s">&quot;comments&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;An applet to hold your application menus.&quot;</span><span class="p">),</span>
+<a name="line-814"></a><span class="cp">#endif</span>
+<a name="line-815"></a> <span class="s">&quot;comments&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;An applet to hold all of the system indicators.&quot;</span><span class="p">),</span>
+<a name="line-816"></a> <span class="s">&quot;authors&quot;</span><span class="p">,</span> <span class="n">authors</span><span class="p">,</span>
+<a name="line-817"></a> <span class="s">&quot;license&quot;</span><span class="p">,</span> <span class="n">license_i18n</span><span class="p">,</span>
+<a name="line-818"></a> <span class="s">&quot;wrap-license&quot;</span><span class="p">,</span> <span class="n">TRUE</span><span class="p">,</span>
+<a name="line-819"></a> <span class="s">&quot;translator-credits&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;translator-credits&quot;</span><span class="p">),</span>
+<a name="line-820"></a> <span class="s">&quot;logo-icon-name&quot;</span><span class="p">,</span> <span class="s">&quot;mate-indicator-applet&quot;</span><span class="p">,</span>
+<a name="line-821"></a> <span class="s">&quot;icon-name&quot;</span><span class="p">,</span> <span class="s">&quot;mate-indicator-applet&quot;</span><span class="p">,</span>
+<a name="line-822"></a> <span class="s">&quot;website&quot;</span><span class="p">,</span> <span class="s">&quot;https://mate-desktop.org&quot;</span><span class="p">,</span>
+<a name="line-823"></a> <span class="s">&quot;website-label&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;MATE Website&quot;</span><span class="p">),</span>
+<a name="line-824"></a> <span class="nb">NULL</span>
+<a name="line-825"></a> <span class="p">);</span>
+<a name="line-826"></a>
+<a name="line-827"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">license_i18n</span><span class="p">);</span>
+<a name="line-828"></a>
+<a name="line-829"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-830"></a><span class="p">}</span>
+<a name="line-831"></a>
+<a name="line-832"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-833"></a><span class="nf">swap_orient_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">item</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-834"></a><span class="p">{</span>
+<a name="line-835"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">from</span> <span class="o">=</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="p">)</span> <span class="n">data</span><span class="p">;</span>
+<a name="line-836"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">to</span> <span class="o">=</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="p">)</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">from</span><span class="p">),</span> <span class="s">&quot;to&quot;</span><span class="p">);</span>
+<a name="line-837"></a> <span class="n">g_object_ref</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">item</span><span class="p">));</span>
+<a name="line-838"></a> <span class="n">gtk_container_remove</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">from</span><span class="p">),</span> <span class="n">item</span><span class="p">);</span>
+<a name="line-839"></a> <span class="k">if</span> <span class="p">(</span><span class="n">GTK_IS_LABEL</span><span class="p">(</span><span class="n">item</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-840"></a> <span class="k">switch</span><span class="p">(</span><span class="n">packdirection</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-841"></a> <span class="k">case</span> <span class="nl">GTK_PACK_DIRECTION_LTR</span><span class="p">:</span>
+<a name="line-842"></a> <span class="n">gtk_label_set_angle</span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="p">(</span><span class="n">item</span><span class="p">),</span> <span class="mf">0.0</span><span class="p">);</span>
+<a name="line-843"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-844"></a> <span class="k">case</span> <span class="nl">GTK_PACK_DIRECTION_TTB</span><span class="p">:</span>
+<a name="line-845"></a> <span class="n">gtk_label_set_angle</span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="p">(</span><span class="n">item</span><span class="p">),</span>
+<a name="line-846"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_LEFT</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-847"></a> <span class="mf">270.0</span> <span class="o">:</span> <span class="mf">90.0</span><span class="p">);</span>
+<a name="line-848"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-849"></a> <span class="k">default</span><span class="o">:</span>
+<a name="line-850"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-851"></a> <span class="p">}</span>
+<a name="line-852"></a> <span class="p">}</span>
+<a name="line-853"></a> <span class="n">gtk_box_pack_start</span><span class="p">(</span><span class="n">GTK_BOX</span><span class="p">(</span><span class="n">to</span><span class="p">),</span> <span class="n">item</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-854"></a> <span class="k">return</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-855"></a><span class="p">}</span>
+<a name="line-856"></a>
+<a name="line-857"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-858"></a><span class="nf">reorient_box_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menuitem</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-859"></a><span class="p">{</span>
+<a name="line-860"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">from</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;box&quot;</span><span class="p">);</span>
+<a name="line-861"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">to</span> <span class="o">=</span> <span class="p">(</span><span class="n">packdirection</span> <span class="o">==</span> <span class="n">GTK_PACK_DIRECTION_LTR</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-862"></a> <span class="n">gtk_box_new</span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="o">:</span> <span class="n">gtk_box_new</span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-863"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">from</span><span class="p">),</span> <span class="s">&quot;to&quot;</span><span class="p">,</span> <span class="n">to</span><span class="p">);</span>
+<a name="line-864"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">from</span><span class="p">),</span> <span class="p">(</span><span class="n">GtkCallback</span><span class="p">)</span><span class="n">swap_orient_cb</span><span class="p">,</span>
+<a name="line-865"></a> <span class="n">from</span><span class="p">);</span>
+<a name="line-866"></a> <span class="n">gtk_container_remove</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">from</span><span class="p">);</span>
+<a name="line-867"></a> <span class="n">gtk_container_add</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">to</span><span class="p">);</span>
+<a name="line-868"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;box&quot;</span><span class="p">,</span> <span class="n">to</span><span class="p">);</span>
+<a name="line-869"></a> <span class="n">gtk_widget_show_all</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-870"></a> <span class="k">return</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-871"></a><span class="p">}</span>
+<a name="line-872"></a>
+<a name="line-873"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-874"></a><span class="nf">matepanelapplet_reorient_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">MatePanelAppletOrient</span> <span class="n">neworient</span><span class="p">,</span>
+<a name="line-875"></a> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-876"></a><span class="p">{</span>
+<a name="line-877"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menubar</span> <span class="o">=</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="p">)</span><span class="n">data</span><span class="p">;</span>
+<a name="line-878"></a> <span class="k">if</span> <span class="p">((((</span><span class="n">neworient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_UP</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-879"></a> <span class="p">(</span><span class="n">neworient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_DOWN</span><span class="p">))</span> <span class="o">&amp;&amp;</span>
+<a name="line-880"></a> <span class="p">((</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_LEFT</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-881"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_RIGHT</span><span class="p">)))</span> <span class="o">||</span>
+<a name="line-882"></a> <span class="p">(((</span><span class="n">neworient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_LEFT</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-883"></a> <span class="p">(</span><span class="n">neworient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_RIGHT</span><span class="p">))</span> <span class="o">&amp;&amp;</span>
+<a name="line-884"></a> <span class="p">((</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_UP</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-885"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_DOWN</span><span class="p">))))</span> <span class="p">{</span>
+<a name="line-886"></a> <span class="n">packdirection</span> <span class="o">=</span> <span class="p">(</span><span class="n">packdirection</span> <span class="o">==</span> <span class="n">GTK_PACK_DIRECTION_LTR</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-887"></a> <span class="nl">GTK_PACK_DIRECTION_TTB</span> <span class="p">:</span> <span class="n">GTK_PACK_DIRECTION_LTR</span><span class="p">;</span>
+<a name="line-888"></a> <span class="n">gtk_menu_bar_set_pack_direction</span><span class="p">(</span><span class="n">GTK_MENU_BAR</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span>
+<a name="line-889"></a> <span class="n">packdirection</span><span class="p">);</span>
+<a name="line-890"></a> <span class="n">orient</span> <span class="o">=</span> <span class="n">neworient</span><span class="p">;</span>
+<a name="line-891"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span>
+<a name="line-892"></a> <span class="p">(</span><span class="n">GtkCallback</span><span class="p">)</span><span class="n">reorient_box_cb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-893"></a> <span class="p">}</span>
+<a name="line-894"></a> <span class="n">orient</span> <span class="o">=</span> <span class="n">neworient</span><span class="p">;</span>
+<a name="line-895"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-896"></a><span class="p">}</span>
+<a name="line-897"></a>
+<a name="line-898"></a><span class="cp">#ifdef N_</span>
+<a name="line-899"></a><span class="cp">#undef N_</span>
+<a name="line-900"></a><span class="cp">#endif</span>
+<a name="line-901"></a><span class="cp">#define N_(x) x</span>
+<a name="line-902"></a>
+<a name="line-903"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-904"></a><span class="nf">log_to_file_cb</span> <span class="p">(</span><span class="n">GObject</span> <span class="o">*</span> <span class="n">source_obj</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-905"></a> <span class="n">GAsyncResult</span> <span class="o">*</span> <span class="n">result</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-906"></a><span class="p">{</span>
+<a name="line-907"></a> <span class="n">g_free</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-908"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-909"></a><span class="p">}</span>
+<a name="line-910"></a>
+<a name="line-911"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-912"></a><span class="nf">log_to_file</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">domain</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-913"></a> <span class="n">GLogLevelFlags</span> <span class="n">level</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-914"></a> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">message</span><span class="p">,</span>
+<a name="line-915"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="n">G_GNUC_UNUSED</span><span class="p">)</span>
+<a name="line-916"></a><span class="p">{</span>
+<a name="line-917"></a> <span class="k">if</span> <span class="p">(</span><span class="n">log_file</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-918"></a> <span class="n">GError</span> <span class="o">*</span> <span class="n">error</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-919"></a> <span class="n">gchar</span> <span class="o">*</span> <span class="n">filename</span> <span class="o">=</span> <span class="n">g_build_filename</span><span class="p">(</span><span class="n">g_get_user_cache_dir</span><span class="p">(),</span> <span class="n">LOG_FILE_NAME</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-920"></a> <span class="n">GFile</span> <span class="o">*</span> <span class="n">file</span> <span class="o">=</span> <span class="n">g_file_new_for_path</span><span class="p">(</span><span class="n">filename</span><span class="p">);</span>
+<a name="line-921"></a> <span class="n">g_free</span><span class="p">(</span><span class="n">filename</span><span class="p">);</span>
+<a name="line-922"></a>
+<a name="line-923"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_file_test</span><span class="p">(</span><span class="n">g_get_user_cache_dir</span><span class="p">(),</span> <span class="n">G_FILE_TEST_EXISTS</span> <span class="o">|</span> <span class="n">G_FILE_TEST_IS_DIR</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-924"></a> <span class="n">GFile</span> <span class="o">*</span> <span class="n">cachedir</span> <span class="o">=</span> <span class="n">g_file_new_for_path</span><span class="p">(</span><span class="n">g_get_user_cache_dir</span><span class="p">());</span>
+<a name="line-925"></a> <span class="n">g_file_make_directory_with_parents</span><span class="p">(</span><span class="n">cachedir</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">error</span><span class="p">);</span>
+<a name="line-926"></a>
+<a name="line-927"></a> <span class="k">if</span> <span class="p">(</span><span class="n">error</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-928"></a> <span class="n">g_error</span><span class="p">(</span><span class="s">&quot;Unable to make directory &#39;%s&#39; for log file: %s&quot;</span><span class="p">,</span> <span class="n">g_get_user_cache_dir</span><span class="p">(),</span> <span class="n">error</span><span class="o">-&gt;</span><span class="n">message</span><span class="p">);</span>
+<a name="line-929"></a> <span class="p">}</span>
+<a name="line-930"></a> <span class="p">}</span>
+<a name="line-931"></a>
+<a name="line-932"></a> <span class="n">g_file_delete</span><span class="p">(</span><span class="n">file</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-933"></a>
+<a name="line-934"></a> <span class="n">GFileIOStream</span> <span class="o">*</span> <span class="n">io</span> <span class="o">=</span> <span class="n">g_file_create_readwrite</span><span class="p">(</span><span class="n">file</span><span class="p">,</span>
+<a name="line-935"></a> <span class="n">G_FILE_CREATE_REPLACE_DESTINATION</span><span class="p">,</span> <span class="cm">/* flags */</span>
+<a name="line-936"></a> <span class="nb">NULL</span><span class="p">,</span> <span class="cm">/* cancelable */</span>
+<a name="line-937"></a> <span class="o">&amp;</span><span class="n">error</span><span class="p">);</span> <span class="cm">/* error */</span>
+<a name="line-938"></a> <span class="k">if</span> <span class="p">(</span><span class="n">error</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-939"></a> <span class="n">g_error</span><span class="p">(</span><span class="s">&quot;Unable to replace file: %s&quot;</span><span class="p">,</span> <span class="n">error</span><span class="o">-&gt;</span><span class="n">message</span><span class="p">);</span>
+<a name="line-940"></a> <span class="p">}</span>
+<a name="line-941"></a>
+<a name="line-942"></a> <span class="n">log_file</span> <span class="o">=</span> <span class="n">g_io_stream_get_output_stream</span><span class="p">(</span><span class="n">G_IO_STREAM</span><span class="p">(</span><span class="n">io</span><span class="p">));</span>
+<a name="line-943"></a> <span class="p">}</span>
+<a name="line-944"></a>
+<a name="line-945"></a> <span class="n">gchar</span> <span class="o">*</span> <span class="n">outputstring</span> <span class="o">=</span> <span class="n">g_strdup_printf</span><span class="p">(</span><span class="s">&quot;%s</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">message</span><span class="p">);</span>
+<a name="line-946"></a> <span class="n">g_output_stream_write_async</span><span class="p">(</span><span class="n">log_file</span><span class="p">,</span>
+<a name="line-947"></a> <span class="n">outputstring</span><span class="p">,</span> <span class="cm">/* data */</span>
+<a name="line-948"></a> <span class="n">strlen</span><span class="p">(</span><span class="n">outputstring</span><span class="p">),</span> <span class="cm">/* length */</span>
+<a name="line-949"></a> <span class="n">G_PRIORITY_LOW</span><span class="p">,</span> <span class="cm">/* priority */</span>
+<a name="line-950"></a> <span class="nb">NULL</span><span class="p">,</span> <span class="cm">/* cancelable */</span>
+<a name="line-951"></a> <span class="n">log_to_file_cb</span><span class="p">,</span> <span class="cm">/* callback */</span>
+<a name="line-952"></a> <span class="n">outputstring</span><span class="p">);</span> <span class="cm">/* data */</span>
+<a name="line-953"></a>
+<a name="line-954"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-955"></a><span class="p">}</span>
+<a name="line-956"></a>
+<a name="line-957"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-958"></a><span class="nf">applet_fill_cb</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span> <span class="n">applet</span><span class="p">,</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">iid</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-959"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="n">G_GNUC_UNUSED</span><span class="p">)</span>
+<a name="line-960"></a><span class="p">{</span>
+<a name="line-961"></a><span class="cp">#if HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-962"></a> <span class="n">ido_init</span><span class="p">();</span>
+<a name="line-963"></a><span class="cp">#endif</span>
+<a name="line-964"></a>
+<a name="line-965"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">GtkActionEntry</span> <span class="n">menu_actions</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-966"></a> <span class="p">{</span><span class="s">&quot;About&quot;</span><span class="p">,</span> <span class="n">GTK_STOCK_ABOUT</span><span class="p">,</span> <span class="n">N_</span><span class="p">(</span><span class="s">&quot;_About&quot;</span><span class="p">),</span> <span class="nb">NULL</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">about_cb</span><span class="p">)}</span>
+<a name="line-967"></a> <span class="p">};</span>
+<a name="line-968"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">menu_xml</span> <span class="o">=</span> <span class="s">&quot;&lt;menuitem name=</span><span class="se">\&quot;</span><span class="s">About</span><span class="se">\&quot;</span><span class="s"> action=</span><span class="se">\&quot;</span><span class="s">About</span><span class="se">\&quot;</span><span class="s">/&gt;&quot;</span><span class="p">;</span>
+<a name="line-969"></a>
+<a name="line-970"></a> <span class="k">static</span> <span class="n">gboolean</span> <span class="n">first_time</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-971"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menubar</span><span class="p">;</span>
+<a name="line-972"></a> <span class="n">gint</span> <span class="n">indicators_loaded</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-973"></a> <span class="n">GtkActionGroup</span> <span class="o">*</span><span class="n">action_group</span><span class="p">;</span>
+<a name="line-974"></a>
+<a name="line-975"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">first_time</span><span class="p">)</span>
+<a name="line-976"></a> <span class="p">{</span>
+<a name="line-977"></a> <span class="n">first_time</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-978"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-979"></a> <span class="n">g_set_application_name</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&quot;Indicator Applet&quot;</span><span class="p">));</span>
+<a name="line-980"></a><span class="cp">#endif</span>
+<a name="line-981"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-982"></a> <span class="n">g_set_application_name</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&quot;Indicator Applet Complete&quot;</span><span class="p">));</span>
+<a name="line-983"></a><span class="cp">#endif</span>
+<a name="line-984"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-985"></a> <span class="n">g_set_application_name</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&quot;Indicator Applet Application Menu&quot;</span><span class="p">));</span>
+<a name="line-986"></a><span class="cp">#endif</span>
+<a name="line-987"></a>
+<a name="line-988"></a> <span class="n">g_log_set_default_handler</span><span class="p">(</span><span class="n">log_to_file</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-989"></a>
+<a name="line-990"></a> <span class="n">tomboy_keybinder_init</span><span class="p">();</span>
+<a name="line-991"></a> <span class="p">}</span>
+<a name="line-992"></a>
+<a name="line-993"></a> <span class="cm">/* Set panel options */</span>
+<a name="line-994"></a> <span class="n">gtk_container_set_border_width</span><span class="p">(</span><span class="n">GTK_CONTAINER</span> <span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-995"></a> <span class="n">mate_panel_applet_set_flags</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">MATE_PANEL_APPLET_EXPAND_MINOR</span><span class="p">);</span>
+<a name="line-996"></a> <span class="n">menubar</span> <span class="o">=</span> <span class="n">gtk_menu_bar_new</span><span class="p">();</span>
+<a name="line-997"></a> <span class="n">action_group</span> <span class="o">=</span> <span class="n">gtk_action_group_new</span> <span class="p">(</span><span class="s">&quot;Indicator Applet Actions&quot;</span><span class="p">);</span>
+<a name="line-998"></a> <span class="n">gtk_action_group_set_translation_domain</span> <span class="p">(</span><span class="n">action_group</span><span class="p">,</span> <span class="n">GETTEXT_PACKAGE</span><span class="p">);</span>
+<a name="line-999"></a> <span class="n">gtk_action_group_add_actions</span> <span class="p">(</span><span class="n">action_group</span><span class="p">,</span> <span class="n">menu_actions</span><span class="p">,</span>
+<a name="line-1000"></a> <span class="n">G_N_ELEMENTS</span> <span class="p">(</span><span class="n">menu_actions</span><span class="p">),</span>
+<a name="line-1001"></a> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1002"></a> <span class="n">mate_panel_applet_setup_menu</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menu_xml</span><span class="p">,</span> <span class="n">action_group</span><span class="p">);</span>
+<a name="line-1003"></a> <span class="n">g_object_unref</span><span class="p">(</span><span class="n">action_group</span><span class="p">);</span>
+<a name="line-1004"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-1005"></a> <span class="n">atk_object_set_name</span> <span class="p">(</span><span class="n">gtk_widget_get_accessible</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">applet</span><span class="p">)),</span>
+<a name="line-1006"></a> <span class="s">&quot;indicator-applet&quot;</span><span class="p">);</span>
+<a name="line-1007"></a><span class="cp">#endif</span>
+<a name="line-1008"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-1009"></a> <span class="n">atk_object_set_name</span> <span class="p">(</span><span class="n">gtk_widget_get_accessible</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">applet</span><span class="p">)),</span>
+<a name="line-1010"></a> <span class="s">&quot;indicator-applet-complete&quot;</span><span class="p">);</span>
+<a name="line-1011"></a><span class="cp">#endif</span>
+<a name="line-1012"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-1013"></a> <span class="n">atk_object_set_name</span> <span class="p">(</span><span class="n">gtk_widget_get_accessible</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">applet</span><span class="p">)),</span>
+<a name="line-1014"></a> <span class="s">&quot;indicator-applet-appmenu&quot;</span><span class="p">);</span>
+<a name="line-1015"></a><span class="cp">#endif</span>
+<a name="line-1016"></a>
+<a name="line-1017"></a> <span class="cm">/* Init some theme/icon stuff */</span>
+<a name="line-1018"></a> <span class="n">gtk_icon_theme_append_search_path</span><span class="p">(</span><span class="n">gtk_icon_theme_get_default</span><span class="p">(),</span>
+<a name="line-1019"></a> <span class="n">INDICATOR_ICONS_DIR</span><span class="p">);</span>
+<a name="line-1020"></a> <span class="cm">/* g_debug(&quot;Icons directory: %s&quot;, INDICATOR_ICONS_DIR); */</span>
+<a name="line-1021"></a> <span class="n">gtk_widget_set_name</span><span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="s">&quot;fast-user-switch-applet&quot;</span><span class="p">);</span>
+<a name="line-1022"></a>
+<a name="line-1023"></a> <span class="cm">/* Build menubar */</span>
+<a name="line-1024"></a> <span class="n">size</span> <span class="o">=</span> <span class="p">(</span><span class="n">mate_panel_applet_get_size</span> <span class="p">(</span><span class="n">applet</span><span class="p">));</span>
+<a name="line-1025"></a> <span class="n">orient</span> <span class="o">=</span> <span class="p">(</span><span class="n">mate_panel_applet_get_orient</span><span class="p">(</span><span class="n">applet</span><span class="p">));</span>
+<a name="line-1026"></a> <span class="n">packdirection</span> <span class="o">=</span> <span class="p">((</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_UP</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-1027"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_DOWN</span><span class="p">))</span> <span class="o">?</span>
+<a name="line-1028"></a> <span class="nl">GTK_PACK_DIRECTION_LTR</span> <span class="p">:</span> <span class="n">GTK_PACK_DIRECTION_TTB</span><span class="p">;</span>
+<a name="line-1029"></a> <span class="n">gtk_menu_bar_set_pack_direction</span><span class="p">(</span><span class="n">GTK_MENU_BAR</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span>
+<a name="line-1030"></a> <span class="n">packdirection</span><span class="p">);</span>
+<a name="line-1031"></a> <span class="n">gtk_widget_set_can_focus</span> <span class="p">(</span><span class="n">menubar</span><span class="p">,</span> <span class="n">TRUE</span><span class="p">);</span>
+<a name="line-1032"></a> <span class="n">gtk_widget_set_name</span><span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="s">&quot;fast-user-switch-menubar&quot;</span><span class="p">);</span>
+<a name="line-1033"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">menubar</span><span class="p">,</span> <span class="s">&quot;button-press-event&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">menubar_press</span><span class="p">),</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-1034"></a> <span class="n">g_signal_connect_after</span><span class="p">(</span><span class="n">menubar</span><span class="p">,</span> <span class="s">&quot;draw&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">menubar_on_draw</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1035"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="s">&quot;change-orient&quot;</span><span class="p">,</span>
+<a name="line-1036"></a> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">matepanelapplet_reorient_cb</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1037"></a> <span class="n">gtk_container_set_border_width</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-1038"></a>
+<a name="line-1039"></a> <span class="cm">/* Add in filter func */</span>
+<a name="line-1040"></a> <span class="n">tomboy_keybinder_bind</span><span class="p">(</span><span class="n">hotkey_keycode</span><span class="p">,</span> <span class="n">hotkey_filter</span><span class="p">,</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1041"></a>
+<a name="line-1042"></a> <span class="n">load_modules</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">indicators_loaded</span><span class="p">);</span>
+<a name="line-1043"></a><span class="cp">#if HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-1044"></a> <span class="n">load_indicators_from_indicator_files</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">indicators_loaded</span><span class="p">);</span>
+<a name="line-1045"></a><span class="cp">#endif</span>
+<a name="line-1046"></a>
+<a name="line-1047"></a> <span class="k">if</span> <span class="p">(</span><span class="n">indicators_loaded</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-1048"></a> <span class="cm">/* A label to allow for click through */</span>
+<a name="line-1049"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">item</span> <span class="o">=</span> <span class="n">gtk_label_new</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&quot;No Indicators&quot;</span><span class="p">));</span>
+<a name="line-1050"></a> <span class="n">mate_panel_applet_set_background_widget</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">item</span><span class="p">);</span>
+<a name="line-1051"></a> <span class="n">gtk_container_add</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="n">item</span><span class="p">);</span>
+<a name="line-1052"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">item</span><span class="p">);</span>
+<a name="line-1053"></a> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+<a name="line-1054"></a> <span class="n">gtk_container_add</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1055"></a> <span class="n">mate_panel_applet_set_background_widget</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1056"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">menubar</span><span class="p">);</span>
+<a name="line-1057"></a> <span class="p">}</span>
+<a name="line-1058"></a>
+<a name="line-1059"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">applet</span><span class="p">));</span>
+<a name="line-1060"></a>
+<a name="line-1061"></a> <span class="k">return</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-1062"></a>
+<a name="line-1063"></a><span class="p">}</span>
+</pre></div>
+</td></tr></table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_unreachable-code/1.html b/[email protected]_unreachable-code/1.html
new file mode 100644
index 0000000..6bc0c8a
--- /dev/null
+++ b/[email protected]_unreachable-code/1.html
@@ -0,0 +1,1208 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/eggaccelerators.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> eggaccelerators.c</p>
+<a href='1.html#line-321'> duplicateExpression 321</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/* eggaccelerators.c</span>
+<a name="line-2"></a><span class="cm"> * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik</span>
+<a name="line-3"></a><span class="cm"> * Developed by Havoc Pennington, Tim Janik</span>
+<a name="line-4"></a><span class="cm"> *</span>
+<a name="line-5"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span>
+<a name="line-6"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span>
+<a name="line-7"></a><span class="cm"> * License as published by the Free Software Foundation; either</span>
+<a name="line-8"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span>
+<a name="line-9"></a><span class="cm"> *</span>
+<a name="line-10"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span>
+<a name="line-11"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="line-12"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<a name="line-13"></a><span class="cm"> * Library General Public License for more details.</span>
+<a name="line-14"></a><span class="cm"> *</span>
+<a name="line-15"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span>
+<a name="line-16"></a><span class="cm"> * License along with this library; if not, write to the</span>
+<a name="line-17"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA</span>
+<a name="line-18"></a><span class="cm"> */</span>
+<a name="line-19"></a>
+<a name="line-20"></a><span class="cp">#include</span> <span class="cpf">&quot;eggaccelerators.h&quot;</span><span class="cp"></span>
+<a name="line-21"></a>
+<a name="line-22"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkx.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a>
+<a name="line-26"></a><span class="k">enum</span>
+<a name="line-27"></a><span class="p">{</span>
+<a name="line-28"></a> <span class="n">EGG_MODMAP_ENTRY_SHIFT</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
+<a name="line-29"></a> <span class="n">EGG_MODMAP_ENTRY_LOCK</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
+<a name="line-30"></a> <span class="n">EGG_MODMAP_ENTRY_CONTROL</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
+<a name="line-31"></a> <span class="n">EGG_MODMAP_ENTRY_MOD1</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span>
+<a name="line-32"></a> <span class="n">EGG_MODMAP_ENTRY_MOD2</span> <span class="o">=</span> <span class="mi">4</span><span class="p">,</span>
+<a name="line-33"></a> <span class="n">EGG_MODMAP_ENTRY_MOD3</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
+<a name="line-34"></a> <span class="n">EGG_MODMAP_ENTRY_MOD4</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span>
+<a name="line-35"></a> <span class="n">EGG_MODMAP_ENTRY_MOD5</span> <span class="o">=</span> <span class="mi">7</span><span class="p">,</span>
+<a name="line-36"></a> <span class="n">EGG_MODMAP_ENTRY_LAST</span> <span class="o">=</span> <span class="mi">8</span>
+<a name="line-37"></a><span class="p">};</span>
+<a name="line-38"></a>
+<a name="line-39"></a><span class="cp">#define MODMAP_ENTRY_TO_MODIFIER(x) (1 &lt;&lt; (x))</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="k">typedef</span> <span class="k">struct</span>
+<a name="line-42"></a><span class="p">{</span>
+<a name="line-43"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">];</span>
+<a name="line-44"></a>
+<a name="line-45"></a><span class="p">}</span> <span class="n">EggModmap</span><span class="p">;</span>
+<a name="line-46"></a>
+<a name="line-47"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span> <span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-48"></a>
+<a name="line-49"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-50"></a><span class="nf">is_alt</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-51"></a><span class="p">{</span>
+<a name="line-52"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-53"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-54"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-55"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-56"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-57"></a><span class="p">}</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-60"></a><span class="nf">is_ctl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-61"></a><span class="p">{</span>
+<a name="line-62"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-63"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-64"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-65"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-66"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-67"></a><span class="p">}</span>
+<a name="line-68"></a>
+<a name="line-69"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-70"></a><span class="nf">is_modx</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-71"></a><span class="p">{</span>
+<a name="line-72"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-73"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-74"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-75"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;d&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;D&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-76"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="sc">&#39;1&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&lt;=</span> <span class="sc">&#39;5&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-77"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-78"></a><span class="p">}</span>
+<a name="line-79"></a>
+<a name="line-80"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-81"></a><span class="nf">is_ctrl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-82"></a><span class="p">{</span>
+<a name="line-83"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-84"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-85"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-86"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-87"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-88"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-89"></a><span class="p">}</span>
+<a name="line-90"></a>
+<a name="line-91"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-92"></a><span class="nf">is_shft</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-93"></a><span class="p">{</span>
+<a name="line-94"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-95"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-96"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-97"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-98"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-99"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-100"></a><span class="p">}</span>
+<a name="line-101"></a>
+<a name="line-102"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-103"></a><span class="nf">is_shift</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-104"></a><span class="p">{</span>
+<a name="line-105"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-106"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-107"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-108"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;i&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;I&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-109"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-110"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-111"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-112"></a><span class="p">}</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-115"></a><span class="nf">is_control</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-116"></a><span class="p">{</span>
+<a name="line-117"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-118"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-119"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-120"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;n&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;N&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-121"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-122"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-123"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-124"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-125"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-126"></a><span class="p">}</span>
+<a name="line-127"></a>
+<a name="line-128"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-129"></a><span class="nf">is_release</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-130"></a><span class="p">{</span>
+<a name="line-131"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-132"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-133"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-134"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-135"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-136"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-137"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-138"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-139"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-140"></a><span class="p">}</span>
+<a name="line-141"></a>
+<a name="line-142"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-143"></a><span class="nf">is_meta</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-144"></a><span class="p">{</span>
+<a name="line-145"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-146"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-147"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-148"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-149"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-150"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-151"></a><span class="p">}</span>
+<a name="line-152"></a>
+<a name="line-153"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-154"></a><span class="nf">is_super</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-155"></a><span class="p">{</span>
+<a name="line-156"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-157"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-158"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;u&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;U&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-159"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-160"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-161"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-162"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-163"></a><span class="p">}</span>
+<a name="line-164"></a>
+<a name="line-165"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-166"></a><span class="nf">is_hyper</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-167"></a><span class="p">{</span>
+<a name="line-168"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-169"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-170"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;y&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;Y&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-171"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-172"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-173"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-174"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-175"></a><span class="p">}</span>
+<a name="line-176"></a>
+<a name="line-177"></a><span class="cm">/**</span>
+<a name="line-178"></a><span class="cm"> * egg_accelerator_parse_virtual:</span>
+<a name="line-179"></a><span class="cm"> * @accelerator: string representing an accelerator</span>
+<a name="line-180"></a><span class="cm"> * @accelerator_key: return location for accelerator keyval</span>
+<a name="line-181"></a><span class="cm"> * @accelerator_mods: return location for accelerator modifier mask</span>
+<a name="line-182"></a><span class="cm"> *</span>
+<a name="line-183"></a><span class="cm"> * Parses a string representing a virtual accelerator. The format</span>
+<a name="line-184"></a><span class="cm"> * looks like &quot;&amp;lt;Control&amp;gt;a&quot; or &quot;&amp;lt;Shift&amp;gt;&amp;lt;Alt&amp;gt;F1&quot; or</span>
+<a name="line-185"></a><span class="cm"> * &quot;&amp;lt;Release&amp;gt;z&quot; (the last one is for key release). The parser</span>
+<a name="line-186"></a><span class="cm"> * is fairly liberal and allows lower or upper case, and also</span>
+<a name="line-187"></a><span class="cm"> * abbreviations such as &quot;&amp;lt;Ctl&amp;gt;&quot; and &quot;&amp;lt;Ctrl&amp;gt;&quot;.</span>
+<a name="line-188"></a><span class="cm"> *</span>
+<a name="line-189"></a><span class="cm"> * If the parse fails, @accelerator_key and @accelerator_mods will</span>
+<a name="line-190"></a><span class="cm"> * be set to 0 (zero) and %FALSE will be returned. If the string contains</span>
+<a name="line-191"></a><span class="cm"> * only modifiers, @accelerator_key will be set to 0 but %TRUE will be</span>
+<a name="line-192"></a><span class="cm"> * returned.</span>
+<a name="line-193"></a><span class="cm"> *</span>
+<a name="line-194"></a><span class="cm"> * The virtual vs. concrete accelerator distinction is a relic of</span>
+<a name="line-195"></a><span class="cm"> * how the X Window System works; there are modifiers Mod2-Mod5 that</span>
+<a name="line-196"></a><span class="cm"> * can represent various keyboard keys (numlock, meta, hyper, etc.),</span>
+<a name="line-197"></a><span class="cm"> * the virtual modifier represents the keyboard key, the concrete</span>
+<a name="line-198"></a><span class="cm"> * modifier the actual Mod2-Mod5 bits in the key press event.</span>
+<a name="line-199"></a><span class="cm"> *</span>
+<a name="line-200"></a><span class="cm"> * Returns: %TRUE on success.</span>
+<a name="line-201"></a><span class="cm"> */</span>
+<a name="line-202"></a><span class="n">gboolean</span>
+<a name="line-203"></a><span class="nf">egg_accelerator_parse_virtual</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">,</span>
+<a name="line-204"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">accelerator_key</span><span class="p">,</span>
+<a name="line-205"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-206"></a><span class="p">{</span>
+<a name="line-207"></a> <span class="n">guint</span> <span class="n">keyval</span><span class="p">;</span>
+<a name="line-208"></a> <span class="n">GdkModifierType</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-209"></a> <span class="n">gint</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-210"></a> <span class="n">gboolean</span> <span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-211"></a>
+<a name="line-212"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-213"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-214"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-215"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-216"></a>
+<a name="line-217"></a> <span class="n">g_return_val_if_fail</span> <span class="p">(</span><span class="n">accelerator</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-218"></a>
+<a name="line-219"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-220"></a>
+<a name="line-221"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-222"></a> <span class="n">mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-223"></a> <span class="n">len</span> <span class="o">=</span> <span class="n">strlen</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-224"></a> <span class="k">while</span> <span class="p">(</span><span class="n">len</span><span class="p">)</span>
+<a name="line-225"></a> <span class="p">{</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span>
+<a name="line-227"></a> <span class="p">{</span>
+<a name="line-228"></a> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_release</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-229"></a> <span class="p">{</span>
+<a name="line-230"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-231"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-232"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_RELEASE_MASK</span><span class="p">;</span>
+<a name="line-233"></a> <span class="p">}</span>
+<a name="line-234"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_control</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-235"></a> <span class="p">{</span>
+<a name="line-236"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-237"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-238"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-239"></a> <span class="p">}</span>
+<a name="line-240"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_shift</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-241"></a> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-243"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-244"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-245"></a> <span class="p">}</span>
+<a name="line-246"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_shft</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-247"></a> <span class="p">{</span>
+<a name="line-248"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-249"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-250"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-251"></a> <span class="p">}</span>
+<a name="line-252"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctrl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-253"></a> <span class="p">{</span>
+<a name="line-254"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-255"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-256"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-257"></a> <span class="p">}</span>
+<a name="line-258"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_modx</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-259"></a> <span class="p">{</span>
+<a name="line-260"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">guint</span> <span class="n">mod_vals</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-261"></a> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">,</span>
+<a name="line-262"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span>
+<a name="line-263"></a> <span class="p">};</span>
+<a name="line-264"></a>
+<a name="line-265"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-266"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">4</span><span class="p">;</span>
+<a name="line-267"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">mod_vals</span><span class="p">[</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">-</span> <span class="sc">&#39;1&#39;</span><span class="p">];</span>
+<a name="line-268"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
+<a name="line-269"></a> <span class="p">}</span>
+<a name="line-270"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-271"></a> <span class="p">{</span>
+<a name="line-272"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-273"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-274"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-275"></a> <span class="p">}</span>
+<a name="line-276"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_alt</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-277"></a> <span class="p">{</span>
+<a name="line-278"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-279"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-280"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-281"></a> <span class="p">}</span>
+<a name="line-282"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_meta</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-283"></a> <span class="p">{</span>
+<a name="line-284"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-285"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-286"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-287"></a> <span class="p">}</span>
+<a name="line-288"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_hyper</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-289"></a> <span class="p">{</span>
+<a name="line-290"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-291"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-292"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-293"></a> <span class="p">}</span>
+<a name="line-294"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_super</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-295"></a> <span class="p">{</span>
+<a name="line-296"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-297"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-298"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-299"></a> <span class="p">}</span>
+<a name="line-300"></a> <span class="k">else</span>
+<a name="line-301"></a> <span class="p">{</span>
+<a name="line-302"></a> <span class="n">gchar</span> <span class="n">last_ch</span><span class="p">;</span>
+<a name="line-303"></a>
+<a name="line-304"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-305"></a> <span class="k">while</span> <span class="p">(</span><span class="n">last_ch</span> <span class="o">&amp;&amp;</span> <span class="n">last_ch</span> <span class="o">!=</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">)</span>
+<a name="line-306"></a> <span class="p">{</span>
+<a name="line-307"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-308"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-309"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-310"></a> <span class="p">}</span>
+<a name="line-311"></a> <span class="p">}</span>
+<a name="line-312"></a> <span class="p">}</span>
+<a name="line-313"></a> <span class="k">else</span>
+<a name="line-314"></a> <span class="p">{</span>
+<a name="line-315"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="n">gdk_keyval_from_name</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-316"></a>
+<a name="line-317"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyval</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-318"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-319"></a>
+<a name="line-320"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-321"></a><span class="hll"> <span class="n">len</span> <span class="o">-=</span> <span class="n">len</span><span class="p">;</span><div class='verbose expandable'><span class='error2'>&lt;--- Same expression on both sides of '-='. <span class='marker'>[+]</span></span><div class='content'>Finding the same expression on both sides of an operator is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to determine if it is correct.</div></div>
+</span><a name="line-322"></a> <span class="p">}</span>
+<a name="line-323"></a> <span class="p">}</span>
+<a name="line-324"></a>
+<a name="line-325"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-326"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="n">gdk_keyval_to_lower</span> <span class="p">(</span><span class="n">keyval</span><span class="p">);</span>
+<a name="line-327"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-328"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-329"></a>
+<a name="line-330"></a> <span class="k">return</span> <span class="o">!</span><span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-331"></a><span class="p">}</span>
+<a name="line-332"></a>
+<a name="line-333"></a><span class="kt">void</span>
+<a name="line-334"></a><span class="nf">egg_keymap_resolve_virtual_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-335"></a> <span class="n">EggVirtualModifierType</span> <span class="n">virtual_mods</span><span class="p">,</span>
+<a name="line-336"></a> <span class="n">GdkModifierType</span> <span class="o">*</span><span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-337"></a><span class="p">{</span>
+<a name="line-338"></a> <span class="n">GdkModifierType</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-339"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-340"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-341"></a>
+<a name="line-342"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-343"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">concrete_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-344"></a>
+<a name="line-345"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-346"></a>
+<a name="line-347"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-348"></a>
+<a name="line-349"></a> <span class="n">concrete</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-350"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-351"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-352"></a> <span class="p">{</span>
+<a name="line-353"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-354"></a> <span class="n">concrete</span> <span class="o">|=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">);</span>
+<a name="line-355"></a>
+<a name="line-356"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-357"></a> <span class="p">}</span>
+<a name="line-358"></a>
+<a name="line-359"></a> <span class="o">*</span><span class="n">concrete_mods</span> <span class="o">=</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-360"></a><span class="p">}</span>
+<a name="line-361"></a>
+<a name="line-362"></a><span class="kt">void</span>
+<a name="line-363"></a><span class="nf">egg_keymap_virtualize_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-364"></a> <span class="n">GdkModifierType</span> <span class="n">concrete_mods</span><span class="p">,</span>
+<a name="line-365"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-366"></a><span class="p">{</span>
+<a name="line-367"></a> <span class="n">GdkModifierType</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-368"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-369"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-370"></a>
+<a name="line-371"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-372"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">virtual_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-373"></a>
+<a name="line-374"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-375"></a>
+<a name="line-376"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-377"></a>
+<a name="line-378"></a> <span class="n">virtual</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-379"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-380"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-381"></a> <span class="p">{</span>
+<a name="line-382"></a> <span class="k">if</span> <span class="p">((</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">)</span> <span class="o">&amp;</span> <span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-383"></a> <span class="p">{</span>
+<a name="line-384"></a> <span class="n">EggVirtualModifierType</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-385"></a>
+<a name="line-386"></a> <span class="n">cleaned</span> <span class="o">=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="o">~</span><span class="p">(</span><span class="n">EGG_VIRTUAL_MOD2_MASK</span> <span class="o">|</span>
+<a name="line-387"></a> <span class="n">EGG_VIRTUAL_MOD3_MASK</span> <span class="o">|</span>
+<a name="line-388"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span> <span class="o">|</span>
+<a name="line-389"></a> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">);</span>
+<a name="line-390"></a>
+<a name="line-391"></a> <span class="k">if</span> <span class="p">(</span><span class="n">cleaned</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-392"></a> <span class="p">{</span>
+<a name="line-393"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-394"></a> <span class="p">}</span>
+<a name="line-395"></a> <span class="k">else</span>
+<a name="line-396"></a> <span class="p">{</span>
+<a name="line-397"></a> <span class="cm">/* Rather than dropping mod2-&gt;mod5 if not bound,</span>
+<a name="line-398"></a><span class="cm"> * go ahead and use the concrete names</span>
+<a name="line-399"></a><span class="cm"> */</span>
+<a name="line-400"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-401"></a> <span class="p">}</span>
+<a name="line-402"></a> <span class="p">}</span>
+<a name="line-403"></a>
+<a name="line-404"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-405"></a> <span class="p">}</span>
+<a name="line-406"></a>
+<a name="line-407"></a> <span class="o">*</span><span class="n">virtual_mods</span> <span class="o">=</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-408"></a><span class="p">}</span>
+<a name="line-409"></a>
+<a name="line-410"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-411"></a><span class="nf">reload_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-412"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">)</span>
+<a name="line-413"></a><span class="p">{</span>
+<a name="line-414"></a> <span class="n">XModifierKeymap</span> <span class="o">*</span><span class="n">xmodmap</span><span class="p">;</span>
+<a name="line-415"></a> <span class="kt">int</span> <span class="n">map_size</span><span class="p">;</span>
+<a name="line-416"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-417"></a>
+<a name="line-418"></a> <span class="cm">/* FIXME multihead */</span>
+<a name="line-419"></a> <span class="n">xmodmap</span> <span class="o">=</span> <span class="n">XGetModifierMapping</span> <span class="p">(</span><span class="n">gdk_x11_get_default_xdisplay</span> <span class="p">());</span>
+<a name="line-420"></a>
+<a name="line-421"></a> <span class="n">memset</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">));</span>
+<a name="line-422"></a>
+<a name="line-423"></a> <span class="cm">/* there are 8 modifiers, and the first 3 are shift, shift lock,</span>
+<a name="line-424"></a><span class="cm"> * and control</span>
+<a name="line-425"></a><span class="cm"> */</span>
+<a name="line-426"></a> <span class="n">map_size</span> <span class="o">=</span> <span class="mi">8</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-427"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-428"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">map_size</span><span class="p">)</span>
+<a name="line-429"></a> <span class="p">{</span>
+<a name="line-430"></a> <span class="cm">/* get the key code at this point in the map,</span>
+<a name="line-431"></a><span class="cm"> * see if its keysym is one we&#39;re interested in</span>
+<a name="line-432"></a><span class="cm"> */</span>
+<a name="line-433"></a> <span class="kt">int</span> <span class="n">keycode</span> <span class="o">=</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">modifiermap</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-434"></a> <span class="n">GdkKeymapKey</span> <span class="o">*</span><span class="n">keys</span><span class="p">;</span>
+<a name="line-435"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">keyvals</span><span class="p">;</span>
+<a name="line-436"></a> <span class="kt">int</span> <span class="n">n_entries</span><span class="p">;</span>
+<a name="line-437"></a> <span class="kt">int</span> <span class="n">j</span><span class="p">;</span>
+<a name="line-438"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-439"></a>
+<a name="line-440"></a> <span class="n">keys</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-441"></a> <span class="n">keyvals</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-442"></a> <span class="n">n_entries</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-443"></a>
+<a name="line-444"></a> <span class="n">gdk_keymap_get_entries_for_keycode</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-445"></a> <span class="n">keycode</span><span class="p">,</span>
+<a name="line-446"></a> <span class="o">&amp;</span><span class="n">keys</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">keyvals</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">n_entries</span><span class="p">);</span>
+<a name="line-447"></a>
+<a name="line-448"></a> <span class="n">mask</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-449"></a> <span class="n">j</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-450"></a> <span class="k">while</span> <span class="p">(</span><span class="n">j</span> <span class="o">&lt;</span> <span class="n">n_entries</span><span class="p">)</span>
+<a name="line-451"></a> <span class="p">{</span>
+<a name="line-452"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Num_Lock</span><span class="p">)</span>
+<a name="line-453"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_NUM_LOCK_MASK</span><span class="p">;</span>
+<a name="line-454"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Scroll_Lock</span><span class="p">)</span>
+<a name="line-455"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SCROLL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-456"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_L</span> <span class="o">||</span>
+<a name="line-457"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_R</span><span class="p">)</span>
+<a name="line-458"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-459"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_L</span> <span class="o">||</span>
+<a name="line-460"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_R</span><span class="p">)</span>
+<a name="line-461"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-462"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_L</span> <span class="o">||</span>
+<a name="line-463"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_R</span><span class="p">)</span>
+<a name="line-464"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-465"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Mode_switch</span><span class="p">)</span>
+<a name="line-466"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MODE_SWITCH_MASK</span><span class="p">;</span>
+<a name="line-467"></a>
+<a name="line-468"></a> <span class="o">++</span><span class="n">j</span><span class="p">;</span>
+<a name="line-469"></a> <span class="p">}</span>
+<a name="line-470"></a>
+<a name="line-471"></a> <span class="cm">/* Mod1Mask is 1 &lt;&lt; 3 for example, i.e. the</span>
+<a name="line-472"></a><span class="cm"> * fourth modifier, i / keyspermod is the modifier</span>
+<a name="line-473"></a><span class="cm"> * index</span>
+<a name="line-474"></a><span class="cm"> */</span>
+<a name="line-475"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="o">/</span><span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">]</span> <span class="o">|=</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-476"></a>
+<a name="line-477"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">);</span>
+<a name="line-478"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keys</span><span class="p">);</span>
+<a name="line-479"></a>
+<a name="line-480"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-481"></a> <span class="p">}</span>
+<a name="line-482"></a>
+<a name="line-483"></a> <span class="cm">/* Add in the not-really-virtual fixed entries */</span>
+<a name="line-484"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_SHIFT</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-485"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_CONTROL</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-486"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LOCK</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-487"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD1</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-488"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD2</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">;</span>
+<a name="line-489"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD3</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">;</span>
+<a name="line-490"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD4</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">;</span>
+<a name="line-491"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD5</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">;</span>
+<a name="line-492"></a>
+<a name="line-493"></a> <span class="n">XFreeModifiermap</span> <span class="p">(</span><span class="n">xmodmap</span><span class="p">);</span>
+<a name="line-494"></a><span class="p">}</span>
+<a name="line-495"></a>
+<a name="line-496"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span>
+<a name="line-497"></a><span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">)</span>
+<a name="line-498"></a><span class="p">{</span>
+<a name="line-499"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-500"></a>
+<a name="line-501"></a> <span class="cm">/* This is all a hack, much simpler when we can just</span>
+<a name="line-502"></a><span class="cm"> * modify GDK directly.</span>
+<a name="line-503"></a><span class="cm"> */</span>
+<a name="line-504"></a>
+<a name="line-505"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-506"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">);</span>
+<a name="line-507"></a>
+<a name="line-508"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span>
+<a name="line-509"></a> <span class="p">{</span>
+<a name="line-510"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_new0</span> <span class="p">(</span><span class="n">EggModmap</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-511"></a>
+<a name="line-512"></a> <span class="cm">/* FIXME modify keymap change events with an event filter</span>
+<a name="line-513"></a><span class="cm"> * and force a reload if we get one</span>
+<a name="line-514"></a><span class="cm"> */</span>
+<a name="line-515"></a>
+<a name="line-516"></a> <span class="n">reload_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span> <span class="n">modmap</span><span class="p">);</span>
+<a name="line-517"></a>
+<a name="line-518"></a> <span class="n">g_object_set_data_full</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-519"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">,</span>
+<a name="line-520"></a> <span class="n">modmap</span><span class="p">,</span>
+<a name="line-521"></a> <span class="n">g_free</span><span class="p">);</span>
+<a name="line-522"></a> <span class="p">}</span>
+<a name="line-523"></a>
+<a name="line-524"></a> <span class="n">g_assert</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-525"></a>
+<a name="line-526"></a> <span class="k">return</span> <span class="n">modmap</span><span class="p">;</span>
+<a name="line-527"></a><span class="p">}</span>
+</pre></div>
+</td></tr></table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_unreachable-code/index.html b/[email protected]_unreachable-code/index.html
new file mode 100644
index 0000000..390cedb
--- /dev/null
+++ b/[email protected]_unreachable-code/index.html
@@ -0,0 +1,104 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Defect summary;</a> </p>
+
+ <label><input type="checkbox" onclick="toggle_all()" checked> Toggle all</label>
+ <table>
+ <tr><th>Show</th><th>#</th><th>Defect ID</th></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='duplicateExpression' name='duplicateExpression' checked></td><td>1</td><td>duplicateExpression</td></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='missingIncludeSystem' name='missingIncludeSystem' checked></td><td>1</td><td>missingIncludeSystem</td></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='shadowArgument' name='shadowArgument' checked></td><td>1</td><td>shadowArgument</td></tr>
+ <tr><td></td><td>3</td><td>total</td></tr>
+ </table>
+ <p><a href="stats.html">Statistics</a></p>
+ </div>
+ <div id="content_index">
+
+ <table>
+ <tr><th>Line</th><th>Id</th><th>CWE</th><th>Severity</th><th>Message</th></tr>
+ <tr><td colspan='5'><a href='2.html'></a></td></tr>
+ <tr class="missingIncludeSystem"><td><a href="2.html#line-0">0</a></td><td>missingIncludeSystem</td><td></td><td>information</td><td >Cppcheck cannot find all the include files (use --check-config for details)</td></tr>
+ <tr><td colspan='5'><a href='0.html'>src/applet-main.c</a></td></tr>
+ <tr class="shadowArgument"><td><a href="0.html#line-544">544</a></td><td>shadowArgument</td><td><a href='https://cwe.mitre.org/data/definitions/398.html'>398</a></td><td>style</td><td >Local variable &apos;entry&apos; shadows outer argument</td></tr>
+ <tr><td colspan='5'><a href='1.html'>src/eggaccelerators.c</a></td></tr>
+ <tr class="duplicateExpression"><td><a href="1.html#line-321">321</a></td><td>duplicateExpression</td><td><a href='https://cwe.mitre.org/data/definitions/398.html'>398</a></td><td>style</td><td >Same expression on both sides of &apos;-=&apos;.</td></tr>
+ </table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_unreachable-code/stats.html b/[email protected]_unreachable-code/stats.html
new file mode 100644
index 0000000..490b8a8
--- /dev/null
+++ b/[email protected]_unreachable-code/stats.html
@@ -0,0 +1,90 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: Statistics </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Back to summary</a> </p>
+
+ </div>
+ <div id="content_index">
+<p>Top 10 files for style severity, total findings: 2</br>
+&#160;&#160;&#160;1&#160;<a href="1.html"> src/eggaccelerators.c</a></br>
+&#160;&#160;&#160;1&#160;<a href="0.html"> src/applet-main.c</a></br>
+</p>
+
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_unreachable-code/style.css b/[email protected]_unreachable-code/style.css
new file mode 100644
index 0000000..c39571c
--- /dev/null
+++ b/[email protected]_unreachable-code/style.css
@@ -0,0 +1,149 @@
+
+body {
+ font: 13px Arial, Verdana, Sans-Serif;
+ margin: 0;
+ width: auto;
+}
+
+h1 {
+ margin: 10px;
+}
+
+#footer > p {
+ margin: 4px;
+}
+
+.error {
+ background-color: #ffb7b7;
+}
+
+.error2 {
+ background-color: #faa;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+.inconclusive {
+ background-color: #B6B6B4;
+}
+
+.inconclusive2 {
+ background-color: #B6B6B4;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+div.verbose {
+ display: inline-block;
+ vertical-align: top;
+ cursor: help;
+}
+
+div.verbose div.content {
+ display: none;
+ position: absolute;
+ padding: 10px;
+ margin: 4px;
+ max-width: 40%;
+ white-space: pre-wrap;
+ border: 1px solid black;
+ background-color: #FFFFCC;
+ cursor: auto;
+}
+
+.highlight .hll {
+ padding: 1px;
+}
+
+#header {
+ border-bottom: thin solid #aaa;
+}
+
+#menu {
+ float: left;
+ margin-top: 5px;
+ text-align: left;
+ width: 150px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu_index {
+ float: left;
+ margin-top: 5px;
+ padding-left: 5px;
+ text-align: left;
+ width: 300px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu > a {
+ display: block;
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+#filename {
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+.highlighttable {
+ background-color:white;
+ z-index: 10;
+ position: relative;
+ margin: -10 px;
+}
+
+#content {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 150px;
+}
+
+#content_index {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 300px;
+}
+
+.linenos {
+ border-right: thin solid #aaa;
+ color: lightgray;
+ padding-right: 6px;
+}
+
+#footer {
+ border-top: thin solid #aaa;
+ clear: both;
+ font-size: 90%;
+ margin-top: 5px;
+}
+
+#footer ul {
+ list-style-type: none;
+ padding-left: 0;
+}
diff --git a/[email protected]_master/0.html b/[email protected]_master/0.html
new file mode 100644
index 0000000..31ac0e7
--- /dev/null
+++ b/[email protected]_master/0.html
@@ -0,0 +1,2280 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/applet-main.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> applet-main.c</p>
+<a href='0.html#line-536'> shadowArgument 536</a><a href='0.html#line-544'> shadowArgument 544</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/*</span>
+<a name="line-2"></a><span class="cm">A small wrapper utility to load indicators and put them as menu items</span>
+<a name="line-3"></a><span class="cm">into the mate-panel using it&#39;s applet interface.</span>
+<a name="line-4"></a>
+<a name="line-5"></a><span class="cm">Copyright 2009-2010 Canonical Ltd.</span>
+<a name="line-6"></a>
+<a name="line-7"></a><span class="cm">Authors:</span>
+<a name="line-8"></a><span class="cm"> Ted Gould &lt;[email protected]&gt;</span>
+<a name="line-9"></a>
+<a name="line-10"></a><span class="cm">This program is free software: you can redistribute it and/or modify it</span>
+<a name="line-11"></a><span class="cm">under the terms of the GNU General Public License version 3, as published</span>
+<a name="line-12"></a><span class="cm">by the Free Software Foundation.</span>
+<a name="line-13"></a>
+<a name="line-14"></a><span class="cm">This program is distributed in the hope that it will be useful, but</span>
+<a name="line-15"></a><span class="cm">WITHOUT ANY WARRANTY; without even the implied warranties of</span>
+<a name="line-16"></a><span class="cm">MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR</span>
+<a name="line-17"></a><span class="cm">PURPOSE. See the GNU General Public License for more details.</span>
+<a name="line-18"></a>
+<a name="line-19"></a><span class="cm">You should have received a copy of the GNU General Public License along</span>
+<a name="line-20"></a><span class="cm">with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
+<a name="line-21"></a><span class="cm">*/</span>
+<a name="line-22"></a>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;stdlib.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a><span class="cp">#include</span> <span class="cpf">&lt;config.h&gt;</span><span class="cp"></span>
+<a name="line-26"></a><span class="cp">#include</span> <span class="cpf">&lt;glib/gi18n.h&gt;</span><span class="cp"></span>
+<a name="line-27"></a><span class="cp">#include</span> <span class="cpf">&lt;mate-panel-applet.h&gt;</span><span class="cp"></span>
+<a name="line-28"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-29"></a><span class="cp">#include</span> <span class="cpf">&lt;gtk/gtk.h&gt;</span><span class="cp"></span>
+<a name="line-30"></a>
+<a name="line-31"></a><span class="cp">#if HAVE_UBUNTU_INDICATOR</span>
+<a name="line-32"></a>
+<a name="line-33"></a><span class="cp">#define INDICATOR_SERVICE_APPMENU &quot;libappmenu.so&quot;</span>
+<a name="line-34"></a><span class="cp">#define INDICATOR_SERVICE_ME &quot;libme.so&quot;</span>
+<a name="line-35"></a><span class="cp">#define INDICATOR_SERVICE_DATETIME &quot;libdatetime.so&quot;</span>
+<a name="line-36"></a>
+<a name="line-37"></a><span class="cp">#define INDICATOR_SERVICE_APPMENU_NG &quot;com.canonical.indicator.appmenu&quot;</span>
+<a name="line-38"></a><span class="cp">#define INDICATOR_SERVICE_ME_NG &quot;com.canonical.indicator.me&quot;</span>
+<a name="line-39"></a><span class="cp">#define INDICATOR_SERVICE_DATETIME_NG &quot;com.canonical.indicator.datetime&quot;</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="cp">#include</span> <span class="cpf">&lt;libindicator/indicator-object.h&gt;</span><span class="cp"></span>
+<a name="line-42"></a><span class="cp">#endif</span>
+<a name="line-43"></a>
+<a name="line-44"></a><span class="cp">#if HAVE_AYATANA_INDICATOR</span>
+<a name="line-45"></a>
+<a name="line-46"></a><span class="cp">#define INDICATOR_SERVICE_APPMENU &quot;libayatana-appmenu.so&quot;</span>
+<a name="line-47"></a><span class="cp">#define INDICATOR_SERVICE_ME &quot;libayatana-me.so&quot;</span>
+<a name="line-48"></a><span class="cp">#define INDICATOR_SERVICE_DATETIME &quot;libayatana-datetime.so&quot;</span>
+<a name="line-49"></a>
+<a name="line-50"></a><span class="cp">#define INDICATOR_SERVICE_APPMENU_NG &quot;org.ayatana.indicator.appmenu&quot;</span>
+<a name="line-51"></a><span class="cp">#define INDICATOR_SERVICE_ME_NG &quot;org.ayatana.indicator.me&quot;</span>
+<a name="line-52"></a><span class="cp">#define INDICATOR_SERVICE_DATETIME_NG &quot;org.ayatana.indicator.datetime&quot;</span>
+<a name="line-53"></a>
+<a name="line-54"></a><span class="cp">#include</span> <span class="cpf">&lt;libayatana-indicator/indicator-object.h&gt;</span><span class="cp"></span>
+<a name="line-55"></a><span class="cp">#endif</span>
+<a name="line-56"></a>
+<a name="line-57"></a><span class="cm">/* For new style indicators */</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="cp">#if HAVE_UBUNTU_INDICATOR &amp;&amp; HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-60"></a>
+<a name="line-61"></a><span class="cp">#include</span> <span class="cpf">&lt;libido/libido.h&gt;</span><span class="cp"></span>
+<a name="line-62"></a><span class="cp">#include</span> <span class="cpf">&lt;libindicator/indicator-ng.h&gt;</span><span class="cp"></span>
+<a name="line-63"></a>
+<a name="line-64"></a><span class="cp">#define INDICATOR_SERVICE_DIR &quot;/usr/share/unity/indicators&quot;</span>
+<a name="line-65"></a>
+<a name="line-66"></a><span class="cp">#endif</span>
+<a name="line-67"></a>
+<a name="line-68"></a><span class="cp">#if HAVE_AYATANA_INDICATOR &amp;&amp; HAVE_AYATANA_INDICATOR_NG</span>
+<a name="line-69"></a>
+<a name="line-70"></a><span class="cp">#include</span> <span class="cpf">&lt;libayatana-ido/libayatana-ido.h&gt;</span><span class="cp"></span>
+<a name="line-71"></a><span class="cp">#include</span> <span class="cpf">&lt;libayatana-indicator/indicator-ng.h&gt;</span><span class="cp"></span>
+<a name="line-72"></a>
+<a name="line-73"></a><span class="cp">#define INDICATOR_SERVICE_DIR &quot;/usr/share/ayatana/indicators&quot;</span>
+<a name="line-74"></a>
+<a name="line-75"></a><span class="cp">#endif</span>
+<a name="line-76"></a>
+<a name="line-77"></a><span class="cp">#include</span> <span class="cpf">&quot;tomboykeybinder.h&quot;</span><span class="cp"></span>
+<a name="line-78"></a>
+<a name="line-79"></a><span class="k">static</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">indicator_order</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-80"></a><span class="cp">#if HAVE_UBUNTU_INDICATOR</span>
+<a name="line-81"></a> <span class="s">&quot;libapplication.so&quot;</span><span class="p">,</span>
+<a name="line-82"></a> <span class="s">&quot;libmessaging.so&quot;</span><span class="p">,</span>
+<a name="line-83"></a> <span class="s">&quot;libsoundmenu.so&quot;</span><span class="p">,</span>
+<a name="line-84"></a> <span class="s">&quot;libdatetime.so&quot;</span><span class="p">,</span>
+<a name="line-85"></a> <span class="s">&quot;libsession.so&quot;</span><span class="p">,</span>
+<a name="line-86"></a><span class="cp">#endif</span>
+<a name="line-87"></a><span class="cp">#if HAVE_AYATANA_INDICATOR</span>
+<a name="line-88"></a> <span class="s">&quot;libayatana-application.so&quot;</span><span class="p">,</span>
+<a name="line-89"></a> <span class="s">&quot;libayatana-messaging.so&quot;</span><span class="p">,</span>
+<a name="line-90"></a> <span class="s">&quot;libayatana-soundmenu.so&quot;</span><span class="p">,</span>
+<a name="line-91"></a> <span class="s">&quot;libayatana-datetime.so&quot;</span><span class="p">,</span>
+<a name="line-92"></a> <span class="s">&quot;libayatana-session.so&quot;</span><span class="p">,</span>
+<a name="line-93"></a><span class="cp">#endif</span>
+<a name="line-94"></a> <span class="nb">NULL</span>
+<a name="line-95"></a><span class="p">};</span>
+<a name="line-96"></a>
+<a name="line-97"></a><span class="k">static</span> <span class="n">GtkPackDirection</span> <span class="n">packdirection</span><span class="p">;</span>
+<a name="line-98"></a><span class="k">static</span> <span class="n">MatePanelAppletOrient</span> <span class="n">orient</span><span class="p">;</span>
+<a name="line-99"></a><span class="k">static</span> <span class="n">guint</span> <span class="n">size</span><span class="p">;</span>
+<a name="line-100"></a>
+<a name="line-101"></a><span class="cp">#define MENU_DATA_INDICATOR_OBJECT &quot;indicator-object&quot;</span>
+<a name="line-102"></a><span class="cp">#define MENU_DATA_INDICATOR_ENTRY &quot;indicator-entry&quot;</span>
+<a name="line-103"></a>
+<a name="line-104"></a><span class="cp">#define IO_DATA_ORDER_NUMBER &quot;indicator-order-number&quot;</span>
+<a name="line-105"></a>
+<a name="line-106"></a><span class="k">static</span> <span class="n">gboolean</span> <span class="nf">applet_fill_cb</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span> <span class="n">applet</span><span class="p">,</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">iid</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">);</span>
+<a name="line-107"></a>
+<a name="line-108"></a><span class="k">static</span> <span class="kt">void</span> <span class="nf">update_accessible_desc</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-109"></a>
+<a name="line-110"></a><span class="cm">/*************</span>
+<a name="line-111"></a><span class="cm"> * main</span>
+<a name="line-112"></a><span class="cm"> * ***********/</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-115"></a><span class="n">MATE_PANEL_APPLET_OUT_PROCESS_FACTORY</span> <span class="p">(</span><span class="s">&quot;IndicatorAppletFactory&quot;</span><span class="p">,</span>
+<a name="line-116"></a> <span class="n">PANEL_TYPE_APPLET</span><span class="p">,</span>
+<a name="line-117"></a> <span class="s">&quot;indicator-applet&quot;</span><span class="p">,</span>
+<a name="line-118"></a> <span class="n">applet_fill_cb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-119"></a><span class="cp">#endif</span>
+<a name="line-120"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-121"></a><span class="n">MATE_PANEL_APPLET_OUT_PROCESS_FACTORY</span> <span class="p">(</span><span class="s">&quot;IndicatorAppletCompleteFactory&quot;</span><span class="p">,</span>
+<a name="line-122"></a> <span class="n">PANEL_TYPE_APPLET</span><span class="p">,</span>
+<a name="line-123"></a> <span class="s">&quot;indicator-applet-complete&quot;</span><span class="p">,</span>
+<a name="line-124"></a> <span class="n">applet_fill_cb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-125"></a><span class="cp">#endif</span>
+<a name="line-126"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-127"></a><span class="n">MATE_PANEL_APPLET_OUT_PROCESS_FACTORY</span> <span class="p">(</span><span class="s">&quot;IndicatorAppletAppmenuFactory&quot;</span><span class="p">,</span>
+<a name="line-128"></a> <span class="n">PANEL_TYPE_APPLET</span><span class="p">,</span>
+<a name="line-129"></a> <span class="s">&quot;indicator-applet-appmenu&quot;</span><span class="p">,</span>
+<a name="line-130"></a> <span class="n">applet_fill_cb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-131"></a><span class="cp">#endif</span>
+<a name="line-132"></a>
+<a name="line-133"></a><span class="cm">/*************</span>
+<a name="line-134"></a><span class="cm"> * log files</span>
+<a name="line-135"></a><span class="cm"> * ***********/</span>
+<a name="line-136"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-137"></a><span class="cp">#define LOG_FILE_NAME &quot;indicator-applet.log&quot;</span>
+<a name="line-138"></a><span class="cp">#endif</span>
+<a name="line-139"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-140"></a><span class="cp">#define LOG_FILE_NAME &quot;indicator-applet-complete.log&quot;</span>
+<a name="line-141"></a><span class="cp">#endif</span>
+<a name="line-142"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-143"></a><span class="cp">#define LOG_FILE_NAME &quot;indicator-applet-appmenu.log&quot;</span>
+<a name="line-144"></a><span class="cp">#endif</span>
+<a name="line-145"></a><span class="n">GOutputStream</span> <span class="o">*</span> <span class="n">log_file</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-146"></a>
+<a name="line-147"></a><span class="cm">/*****************</span>
+<a name="line-148"></a><span class="cm"> * Hotkey support</span>
+<a name="line-149"></a><span class="cm"> * **************/</span>
+<a name="line-150"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-151"></a><span class="n">gchar</span> <span class="o">*</span> <span class="n">hotkey_keycode</span> <span class="o">=</span> <span class="s">&quot;&lt;Super&gt;M&quot;</span><span class="p">;</span>
+<a name="line-152"></a><span class="cp">#endif</span>
+<a name="line-153"></a><span class="cp">#ifdef INDICATOR_APPLET_SESSION</span>
+<a name="line-154"></a><span class="n">gchar</span> <span class="o">*</span> <span class="n">hotkey_keycode</span> <span class="o">=</span> <span class="s">&quot;&lt;Super&gt;S&quot;</span><span class="p">;</span>
+<a name="line-155"></a><span class="cp">#endif</span>
+<a name="line-156"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-157"></a><span class="n">gchar</span> <span class="o">*</span> <span class="n">hotkey_keycode</span> <span class="o">=</span> <span class="s">&quot;&lt;Super&gt;S&quot;</span><span class="p">;</span>
+<a name="line-158"></a><span class="cp">#endif</span>
+<a name="line-159"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-160"></a><span class="n">gchar</span> <span class="o">*</span> <span class="n">hotkey_keycode</span> <span class="o">=</span> <span class="s">&quot;&lt;Super&gt;F1&quot;</span><span class="p">;</span>
+<a name="line-161"></a><span class="cp">#endif</span>
+<a name="line-162"></a>
+<a name="line-163"></a><span class="cm">/********************</span>
+<a name="line-164"></a><span class="cm"> * Environment Names</span>
+<a name="line-165"></a><span class="cm"> * *******************/</span>
+<a name="line-166"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-167"></a><span class="cp">#define INDICATOR_SPECIFIC_ENV &quot;indicator-applet-original&quot;</span>
+<a name="line-168"></a><span class="cp">#endif</span>
+<a name="line-169"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-170"></a><span class="cp">#define INDICATOR_SPECIFIC_ENV &quot;indicator-applet-complete&quot;</span>
+<a name="line-171"></a><span class="cp">#endif</span>
+<a name="line-172"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-173"></a><span class="cp">#define INDICATOR_SPECIFIC_ENV &quot;indicator-applet-appmenu&quot;</span>
+<a name="line-174"></a><span class="cp">#endif</span>
+<a name="line-175"></a>
+<a name="line-176"></a><span class="k">static</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">indicator_env</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-177"></a> <span class="s">&quot;indicator-applet&quot;</span><span class="p">,</span>
+<a name="line-178"></a> <span class="n">INDICATOR_SPECIFIC_ENV</span><span class="p">,</span>
+<a name="line-179"></a> <span class="nb">NULL</span>
+<a name="line-180"></a><span class="p">};</span>
+<a name="line-181"></a>
+<a name="line-182"></a><span class="cm">/*************</span>
+<a name="line-183"></a><span class="cm"> * init function</span>
+<a name="line-184"></a><span class="cm"> * ***********/</span>
+<a name="line-185"></a>
+<a name="line-186"></a><span class="k">static</span> <span class="n">gint</span>
+<a name="line-187"></a><span class="nf">name2order</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">name</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-188"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-189"></a>
+<a name="line-190"></a> <span class="k">for</span> <span class="p">(</span><span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">indicator_order</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-191"></a> <span class="k">if</span> <span class="p">(</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">indicator_order</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-192"></a> <span class="k">return</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-193"></a> <span class="p">}</span>
+<a name="line-194"></a> <span class="p">}</span>
+<a name="line-195"></a>
+<a name="line-196"></a> <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+<a name="line-197"></a><span class="p">}</span>
+<a name="line-198"></a>
+<a name="line-199"></a><span class="k">typedef</span> <span class="k">struct</span> <span class="n">_incoming_position_t</span> <span class="n">incoming_position_t</span><span class="p">;</span>
+<a name="line-200"></a><span class="k">struct</span> <span class="n">_incoming_position_t</span> <span class="p">{</span>
+<a name="line-201"></a> <span class="n">gint</span> <span class="n">objposition</span><span class="p">;</span>
+<a name="line-202"></a> <span class="n">gint</span> <span class="n">entryposition</span><span class="p">;</span>
+<a name="line-203"></a> <span class="n">gint</span> <span class="n">menupos</span><span class="p">;</span>
+<a name="line-204"></a> <span class="n">gboolean</span> <span class="n">found</span><span class="p">;</span>
+<a name="line-205"></a><span class="p">};</span>
+<a name="line-206"></a>
+<a name="line-207"></a><span class="cm">/* This function helps by determining where in the menu list</span>
+<a name="line-208"></a><span class="cm"> this new entry should be placed. It compares the objects</span>
+<a name="line-209"></a><span class="cm"> that they&#39;re on, and then the individual entries. Each</span>
+<a name="line-210"></a><span class="cm"> is progressively more expensive. */</span>
+<a name="line-211"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-212"></a><span class="nf">place_in_menu</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-213"></a><span class="p">{</span>
+<a name="line-214"></a> <span class="n">incoming_position_t</span> <span class="o">*</span> <span class="n">position</span> <span class="o">=</span> <span class="p">(</span><span class="n">incoming_position_t</span> <span class="o">*</span><span class="p">)</span><span class="n">user_data</span><span class="p">;</span>
+<a name="line-215"></a> <span class="k">if</span> <span class="p">(</span><span class="n">position</span><span class="o">-&gt;</span><span class="n">found</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-216"></a> <span class="cm">/* We&#39;ve already been placed, just finish the foreach */</span>
+<a name="line-217"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-218"></a> <span class="p">}</span>
+<a name="line-219"></a>
+<a name="line-220"></a> <span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span> <span class="o">=</span> <span class="n">INDICATOR_OBJECT</span><span class="p">(</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_OBJECT</span><span class="p">));</span>
+<a name="line-221"></a> <span class="n">g_assert</span><span class="p">(</span><span class="n">io</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-222"></a>
+<a name="line-223"></a> <span class="n">gint</span> <span class="n">objposition</span> <span class="o">=</span> <span class="n">GPOINTER_TO_INT</span><span class="p">(</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">IO_DATA_ORDER_NUMBER</span><span class="p">));</span>
+<a name="line-224"></a> <span class="cm">/* We&#39;ve already passed it, well, then this is where</span>
+<a name="line-225"></a><span class="cm"> we should be be. Stop! */</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="n">objposition</span> <span class="o">&gt;</span> <span class="n">position</span><span class="o">-&gt;</span><span class="n">objposition</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-227"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">found</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-228"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-229"></a> <span class="p">}</span>
+<a name="line-230"></a>
+<a name="line-231"></a> <span class="cm">/* The objects don&#39;t match yet, keep looking */</span>
+<a name="line-232"></a> <span class="k">if</span> <span class="p">(</span><span class="n">objposition</span> <span class="o">&lt;</span> <span class="n">position</span><span class="o">-&gt;</span><span class="n">objposition</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-233"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">menupos</span><span class="o">++</span><span class="p">;</span>
+<a name="line-234"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-235"></a> <span class="p">}</span>
+<a name="line-236"></a>
+<a name="line-237"></a> <span class="cm">/* The objects are the same, let&#39;s start looking at entries. */</span>
+<a name="line-238"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-239"></a> <span class="n">gint</span> <span class="n">entryposition</span> <span class="o">=</span> <span class="n">indicator_object_get_location</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-240"></a>
+<a name="line-241"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entryposition</span> <span class="o">&gt;</span> <span class="n">position</span><span class="o">-&gt;</span><span class="n">entryposition</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">found</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-243"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-244"></a> <span class="p">}</span>
+<a name="line-245"></a>
+<a name="line-246"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entryposition</span> <span class="o">&lt;</span> <span class="n">position</span><span class="o">-&gt;</span><span class="n">entryposition</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-247"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">menupos</span><span class="o">++</span><span class="p">;</span>
+<a name="line-248"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-249"></a> <span class="p">}</span>
+<a name="line-250"></a>
+<a name="line-251"></a> <span class="cm">/* We&#39;ve got the same object and the same entry. Well,</span>
+<a name="line-252"></a><span class="cm"> let&#39;s just put it right here then. */</span>
+<a name="line-253"></a> <span class="n">position</span><span class="o">-&gt;</span><span class="n">found</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-254"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-255"></a><span class="p">}</span>
+<a name="line-256"></a>
+<a name="line-257"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-258"></a><span class="nf">something_shown</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-259"></a><span class="p">{</span>
+<a name="line-260"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-261"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-262"></a><span class="p">}</span>
+<a name="line-263"></a>
+<a name="line-264"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-265"></a><span class="nf">something_hidden</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-266"></a><span class="p">{</span>
+<a name="line-267"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-268"></a> <span class="n">gtk_widget_hide</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-269"></a><span class="p">}</span>
+<a name="line-270"></a>
+<a name="line-271"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-272"></a><span class="nf">sensitive_cb</span> <span class="p">(</span><span class="n">GObject</span> <span class="o">*</span> <span class="n">obj</span><span class="p">,</span> <span class="n">GParamSpec</span> <span class="o">*</span> <span class="n">pspec</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-273"></a><span class="p">{</span>
+<a name="line-274"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="p">(</span><span class="n">obj</span><span class="p">));</span>
+<a name="line-275"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">));</span>
+<a name="line-276"></a>
+<a name="line-277"></a> <span class="n">gtk_widget_set_sensitive</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">),</span> <span class="n">gtk_widget_get_sensitive</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">obj</span><span class="p">)));</span>
+<a name="line-278"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-279"></a><span class="p">}</span>
+<a name="line-280"></a>
+<a name="line-281"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-282"></a><span class="nf">entry_activated</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-283"></a><span class="p">{</span>
+<a name="line-284"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="p">(</span><span class="n">widget</span><span class="p">));</span>
+<a name="line-285"></a> <span class="n">gpointer</span> <span class="n">pio</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="s">&quot;indicator&quot;</span><span class="p">);</span>
+<a name="line-286"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">INDICATOR_IS_OBJECT</span><span class="p">(</span><span class="n">pio</span><span class="p">));</span>
+<a name="line-287"></a> <span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span> <span class="o">=</span> <span class="n">INDICATOR_OBJECT</span><span class="p">(</span><span class="n">pio</span><span class="p">);</span>
+<a name="line-288"></a>
+<a name="line-289"></a> <span class="k">return</span> <span class="n">indicator_object_entry_activate</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">user_data</span><span class="p">,</span> <span class="n">gtk_get_current_event_time</span><span class="p">());</span>
+<a name="line-290"></a><span class="p">}</span>
+<a name="line-291"></a>
+<a name="line-292"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-293"></a><span class="nf">entry_scrolled</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menuitem</span><span class="p">,</span> <span class="n">GdkEventScroll</span> <span class="o">*</span><span class="n">event</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-294"></a><span class="p">{</span>
+<a name="line-295"></a> <span class="n">IndicatorObject</span> <span class="o">*</span><span class="n">io</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_OBJECT</span><span class="p">);</span>
+<a name="line-296"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="n">entry</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-297"></a>
+<a name="line-298"></a> <span class="n">g_return_val_if_fail</span><span class="p">(</span><span class="n">INDICATOR_IS_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-299"></a>
+<a name="line-300"></a> <span class="n">g_signal_emit_by_name</span> <span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="s">&quot;scroll&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">event</span><span class="o">-&gt;</span><span class="n">direction</span><span class="p">);</span>
+<a name="line-301"></a> <span class="n">g_signal_emit_by_name</span> <span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="s">&quot;scroll-entry&quot;</span><span class="p">,</span> <span class="n">entry</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">event</span><span class="o">-&gt;</span><span class="n">direction</span><span class="p">);</span>
+<a name="line-302"></a> <span class="n">g_signal_emit_by_name</span> <span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ENTRY_SCROLLED</span><span class="p">,</span> <span class="n">entry</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">event</span><span class="o">-&gt;</span><span class="n">direction</span><span class="p">);</span>
+<a name="line-303"></a>
+<a name="line-304"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-305"></a><span class="p">}</span>
+<a name="line-306"></a>
+<a name="line-307"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-308"></a><span class="nf">accessible_desc_update_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">userdata</span><span class="p">)</span>
+<a name="line-309"></a><span class="p">{</span>
+<a name="line-310"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-311"></a>
+<a name="line-312"></a> <span class="k">if</span> <span class="p">(</span><span class="n">data</span> <span class="o">!=</span> <span class="n">userdata</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-313"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-314"></a> <span class="p">}</span>
+<a name="line-315"></a>
+<a name="line-316"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">data</span><span class="p">;</span>
+<a name="line-317"></a> <span class="n">update_accessible_desc</span><span class="p">(</span><span class="n">entry</span><span class="p">,</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-318"></a><span class="p">}</span>
+<a name="line-319"></a>
+<a name="line-320"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-321"></a><span class="nf">accessible_desc_update</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">)</span>
+<a name="line-322"></a><span class="p">{</span>
+<a name="line-323"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">accessible_desc_update_cb</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-324"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-325"></a><span class="p">}</span>
+<a name="line-326"></a>
+<a name="line-327"></a><span class="cp">#define PANEL_PADDING 8</span>
+<a name="line-328"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-329"></a><span class="nf">entry_resized</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">guint</span> <span class="n">newsize</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-330"></a><span class="p">{</span>
+<a name="line-331"></a> <span class="n">IndicatorObject</span> <span class="o">*</span><span class="n">io</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span><span class="p">)</span><span class="n">data</span><span class="p">;</span>
+<a name="line-332"></a>
+<a name="line-333"></a> <span class="n">size</span> <span class="o">=</span> <span class="n">newsize</span><span class="p">;</span>
+<a name="line-334"></a>
+<a name="line-335"></a> <span class="cm">/* Work on the entries */</span>
+<a name="line-336"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entries</span> <span class="o">=</span> <span class="n">indicator_object_get_entries</span><span class="p">(</span><span class="n">io</span><span class="p">);</span>
+<a name="line-337"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-338"></a>
+<a name="line-339"></a> <span class="k">for</span> <span class="p">(</span><span class="n">entry</span> <span class="o">=</span> <span class="n">entries</span><span class="p">;</span> <span class="n">entry</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">;</span> <span class="n">entry</span> <span class="o">=</span> <span class="n">g_list_next</span><span class="p">(</span><span class="n">entry</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-340"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entrydata</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">;</span>
+<a name="line-341"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entrydata</span><span class="o">-&gt;</span><span class="n">image</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-342"></a> <span class="cm">/* Resize to fit panel */</span>
+<a name="line-343"></a> <span class="n">gtk_image_set_pixel_size</span> <span class="p">(</span><span class="n">entrydata</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">,</span> <span class="n">size</span> <span class="o">-</span> <span class="n">PANEL_PADDING</span><span class="p">);</span>
+<a name="line-344"></a> <span class="p">}</span>
+<a name="line-345"></a> <span class="p">}</span>
+<a name="line-346"></a>
+<a name="line-347"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-348"></a><span class="p">}</span>
+<a name="line-349"></a>
+<a name="line-350"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-351"></a><span class="nf">entry_added</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">)</span>
+<a name="line-352"></a><span class="p">{</span>
+<a name="line-353"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Signal: Entry Added&quot;</span><span class="p">);</span>
+<a name="line-354"></a> <span class="n">gboolean</span> <span class="n">something_visible</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-355"></a> <span class="n">gboolean</span> <span class="n">something_sensitive</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-356"></a>
+<a name="line-357"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span> <span class="o">=</span> <span class="n">gtk_menu_item_new</span><span class="p">();</span>
+<a name="line-358"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">box</span> <span class="o">=</span> <span class="p">(</span><span class="n">packdirection</span> <span class="o">==</span> <span class="n">GTK_PACK_DIRECTION_LTR</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-359"></a> <span class="n">gtk_box_new</span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span> <span class="o">:</span> <span class="n">gtk_box_new</span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span>
+<a name="line-360"></a>
+<a name="line-361"></a> <span class="cm">/* Allows indicators to receive mouse scroll event */</span>
+<a name="line-362"></a> <span class="n">gtk_widget_add_events</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">GDK_SCROLL_MASK</span><span class="p">);</span>
+<a name="line-363"></a>
+<a name="line-364"></a> <span class="n">g_object_set_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;indicator&quot;</span><span class="p">,</span> <span class="n">io</span><span class="p">);</span>
+<a name="line-365"></a> <span class="n">g_object_set_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;box&quot;</span><span class="p">,</span> <span class="n">box</span><span class="p">);</span>
+<a name="line-366"></a>
+<a name="line-367"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;activate&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_activated</span><span class="p">),</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-368"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;scroll-event&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_scrolled</span><span class="p">),</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-369"></a>
+<a name="line-370"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-371"></a> <span class="cm">/* Resize to fit panel */</span>
+<a name="line-372"></a> <span class="n">gtk_image_set_pixel_size</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">,</span> <span class="n">size</span> <span class="o">-</span> <span class="n">PANEL_PADDING</span><span class="p">);</span>
+<a name="line-373"></a> <span class="n">gtk_box_pack_start</span><span class="p">(</span><span class="n">GTK_BOX</span><span class="p">(</span><span class="n">box</span><span class="p">),</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="n">FALSE</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-374"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-375"></a> <span class="n">something_visible</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-376"></a> <span class="p">}</span>
+<a name="line-377"></a>
+<a name="line-378"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_get_sensitive</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-379"></a> <span class="n">something_sensitive</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-380"></a> <span class="p">}</span>
+<a name="line-381"></a>
+<a name="line-382"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="s">&quot;show&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_shown</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-383"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="s">&quot;hide&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_hidden</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-384"></a>
+<a name="line-385"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="s">&quot;notify::sensitive&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">sensitive_cb</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-386"></a> <span class="p">}</span>
+<a name="line-387"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-388"></a> <span class="k">switch</span><span class="p">(</span><span class="n">packdirection</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-389"></a> <span class="k">case</span> <span class="nl">GTK_PACK_DIRECTION_LTR</span><span class="p">:</span>
+<a name="line-390"></a> <span class="n">gtk_label_set_angle</span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="mf">0.0</span><span class="p">);</span>
+<a name="line-391"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-392"></a> <span class="k">case</span> <span class="nl">GTK_PACK_DIRECTION_TTB</span><span class="p">:</span>
+<a name="line-393"></a> <span class="n">gtk_label_set_angle</span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span>
+<a name="line-394"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_LEFT</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-395"></a> <span class="mf">270.0</span> <span class="o">:</span> <span class="mf">90.0</span><span class="p">);</span>
+<a name="line-396"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-397"></a> <span class="k">default</span><span class="o">:</span>
+<a name="line-398"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-399"></a> <span class="p">}</span>
+<a name="line-400"></a> <span class="n">gtk_box_pack_start</span><span class="p">(</span><span class="n">GTK_BOX</span><span class="p">(</span><span class="n">box</span><span class="p">),</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="n">FALSE</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-401"></a>
+<a name="line-402"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-403"></a> <span class="n">something_visible</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-404"></a> <span class="p">}</span>
+<a name="line-405"></a>
+<a name="line-406"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_get_sensitive</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-407"></a> <span class="n">something_sensitive</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-408"></a> <span class="p">}</span>
+<a name="line-409"></a>
+<a name="line-410"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="s">&quot;show&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_shown</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-411"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="s">&quot;hide&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_hidden</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-412"></a>
+<a name="line-413"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="s">&quot;notify::sensitive&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">sensitive_cb</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-414"></a> <span class="p">}</span>
+<a name="line-415"></a> <span class="n">gtk_container_add</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">box</span><span class="p">);</span>
+<a name="line-416"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">box</span><span class="p">);</span>
+<a name="line-417"></a>
+<a name="line-418"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">menu</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-419"></a> <span class="n">gtk_menu_item_set_submenu</span><span class="p">(</span><span class="n">GTK_MENU_ITEM</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">menu</span><span class="p">));</span>
+<a name="line-420"></a> <span class="p">}</span>
+<a name="line-421"></a>
+<a name="line-422"></a> <span class="n">incoming_position_t</span> <span class="n">position</span><span class="p">;</span>
+<a name="line-423"></a> <span class="n">position</span><span class="p">.</span><span class="n">objposition</span> <span class="o">=</span> <span class="n">GPOINTER_TO_INT</span><span class="p">(</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">IO_DATA_ORDER_NUMBER</span><span class="p">));</span>
+<a name="line-424"></a> <span class="n">position</span><span class="p">.</span><span class="n">entryposition</span> <span class="o">=</span> <span class="n">indicator_object_get_location</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-425"></a> <span class="n">position</span><span class="p">.</span><span class="n">menupos</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-426"></a> <span class="n">position</span><span class="p">.</span><span class="n">found</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-427"></a>
+<a name="line-428"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">place_in_menu</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">position</span><span class="p">);</span>
+<a name="line-429"></a>
+<a name="line-430"></a> <span class="n">gtk_menu_shell_insert</span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">menuitem</span><span class="p">,</span> <span class="n">position</span><span class="p">.</span><span class="n">menupos</span><span class="p">);</span>
+<a name="line-431"></a>
+<a name="line-432"></a> <span class="k">if</span> <span class="p">(</span><span class="n">something_visible</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-433"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">accessible_desc</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-434"></a> <span class="n">update_accessible_desc</span><span class="p">(</span><span class="n">entry</span><span class="p">,</span> <span class="n">menuitem</span><span class="p">);</span>
+<a name="line-435"></a> <span class="p">}</span>
+<a name="line-436"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-437"></a> <span class="p">}</span>
+<a name="line-438"></a> <span class="n">gtk_widget_set_sensitive</span><span class="p">(</span><span class="n">menuitem</span><span class="p">,</span> <span class="n">something_sensitive</span><span class="p">);</span>
+<a name="line-439"></a>
+<a name="line-440"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-441"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_OBJECT</span><span class="p">,</span> <span class="n">io</span><span class="p">);</span>
+<a name="line-442"></a>
+<a name="line-443"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-444"></a><span class="p">}</span>
+<a name="line-445"></a>
+<a name="line-446"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-447"></a><span class="nf">entry_removed_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">userdata</span><span class="p">)</span>
+<a name="line-448"></a><span class="p">{</span>
+<a name="line-449"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-450"></a>
+<a name="line-451"></a> <span class="k">if</span> <span class="p">(</span><span class="n">data</span> <span class="o">!=</span> <span class="n">userdata</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-452"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-453"></a> <span class="p">}</span>
+<a name="line-454"></a>
+<a name="line-455"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">data</span><span class="p">;</span>
+<a name="line-456"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-457"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_shown</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-458"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_hidden</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-459"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">label</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">sensitive_cb</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-460"></a> <span class="p">}</span>
+<a name="line-461"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-462"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_shown</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-463"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">something_hidden</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-464"></a> <span class="n">g_signal_handlers_disconnect_by_func</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">image</span><span class="p">),</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">sensitive_cb</span><span class="p">),</span> <span class="n">widget</span><span class="p">);</span>
+<a name="line-465"></a> <span class="p">}</span>
+<a name="line-466"></a>
+<a name="line-467"></a> <span class="n">gtk_widget_destroy</span><span class="p">(</span><span class="n">widget</span><span class="p">);</span>
+<a name="line-468"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-469"></a><span class="p">}</span>
+<a name="line-470"></a>
+<a name="line-471"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-472"></a><span class="nf">entry_removed</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span>
+<a name="line-473"></a> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-474"></a><span class="p">{</span>
+<a name="line-475"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Signal: Entry Removed&quot;</span><span class="p">);</span>
+<a name="line-476"></a>
+<a name="line-477"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">user_data</span><span class="p">),</span> <span class="n">entry_removed_cb</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-478"></a>
+<a name="line-479"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-480"></a><span class="p">}</span>
+<a name="line-481"></a>
+<a name="line-482"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-483"></a><span class="nf">entry_moved_find_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">userdata</span><span class="p">)</span>
+<a name="line-484"></a><span class="p">{</span>
+<a name="line-485"></a> <span class="n">gpointer</span> <span class="o">*</span> <span class="n">array</span> <span class="o">=</span> <span class="p">(</span><span class="n">gpointer</span> <span class="o">*</span><span class="p">)</span><span class="n">userdata</span><span class="p">;</span>
+<a name="line-486"></a> <span class="k">if</span> <span class="p">(</span><span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-487"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-488"></a> <span class="p">}</span>
+<a name="line-489"></a>
+<a name="line-490"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> <span class="n">MENU_DATA_INDICATOR_ENTRY</span><span class="p">);</span>
+<a name="line-491"></a>
+<a name="line-492"></a> <span class="k">if</span> <span class="p">(</span><span class="n">data</span> <span class="o">!=</span> <span class="n">array</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="p">{</span>
+<a name="line-493"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-494"></a> <span class="p">}</span>
+<a name="line-495"></a>
+<a name="line-496"></a> <span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">widget</span><span class="p">;</span>
+<a name="line-497"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-498"></a><span class="p">}</span>
+<a name="line-499"></a>
+<a name="line-500"></a><span class="cm">/* Gets called when an entry for an object was moved. */</span>
+<a name="line-501"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-502"></a><span class="nf">entry_moved</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span>
+<a name="line-503"></a> <span class="n">gint</span> <span class="n">old</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">gint</span> <span class="n">new</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-504"></a><span class="p">{</span>
+<a name="line-505"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-506"></a>
+<a name="line-507"></a> <span class="n">gpointer</span> <span class="n">array</span><span class="p">[</span><span class="mi">2</span><span class="p">];</span>
+<a name="line-508"></a> <span class="n">array</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">entry</span><span class="p">;</span>
+<a name="line-509"></a> <span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-510"></a>
+<a name="line-511"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">entry_moved_find_cb</span><span class="p">,</span> <span class="n">array</span><span class="p">);</span>
+<a name="line-512"></a> <span class="k">if</span> <span class="p">(</span><span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-513"></a> <span class="n">g_warning</span><span class="p">(</span><span class="s">&quot;Moving an entry that isn&#39;t in our menus.&quot;</span><span class="p">);</span>
+<a name="line-514"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-515"></a> <span class="p">}</span>
+<a name="line-516"></a>
+<a name="line-517"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">mi</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span>
+<a name="line-518"></a> <span class="n">g_object_ref</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">mi</span><span class="p">));</span>
+<a name="line-519"></a> <span class="n">gtk_container_remove</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">mi</span><span class="p">);</span>
+<a name="line-520"></a>
+<a name="line-521"></a> <span class="n">incoming_position_t</span> <span class="n">position</span><span class="p">;</span>
+<a name="line-522"></a> <span class="n">position</span><span class="p">.</span><span class="n">objposition</span> <span class="o">=</span> <span class="n">GPOINTER_TO_INT</span><span class="p">(</span><span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">IO_DATA_ORDER_NUMBER</span><span class="p">));</span>
+<a name="line-523"></a> <span class="n">position</span><span class="p">.</span><span class="n">entryposition</span> <span class="o">=</span> <span class="n">indicator_object_get_location</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span>
+<a name="line-524"></a> <span class="n">position</span><span class="p">.</span><span class="n">menupos</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-525"></a> <span class="n">position</span><span class="p">.</span><span class="n">found</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-526"></a>
+<a name="line-527"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">place_in_menu</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">position</span><span class="p">);</span>
+<a name="line-528"></a>
+<a name="line-529"></a> <span class="n">gtk_menu_shell_insert</span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="n">mi</span><span class="p">,</span> <span class="n">position</span><span class="p">.</span><span class="n">menupos</span><span class="p">);</span>
+<a name="line-530"></a> <span class="n">g_object_unref</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">mi</span><span class="p">));</span>
+<a name="line-531"></a>
+<a name="line-532"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-533"></a><span class="p">}</span>
+<a name="line-534"></a>
+<a name="line-535"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-536"></a><span class="hll"><span class="nf">menu_show</span> <span class="p">(</span><span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span><span class="p">,</span> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span><span class='error2'>&lt;--- Shadowed declaration</span>
+</span><a name="line-537"></a> <span class="n">guint32</span> <span class="n">timestamp</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-538"></a><span class="p">{</span>
+<a name="line-539"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span> <span class="o">=</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-540"></a>
+<a name="line-541"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-542"></a> <span class="cm">/* Close any open menus instead of opening one */</span>
+<a name="line-543"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entries</span> <span class="o">=</span> <span class="n">indicator_object_get_entries</span><span class="p">(</span><span class="n">io</span><span class="p">);</span>
+<a name="line-544"></a><span class="hll"> <span class="n">GList</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span><span class='error2'>&lt;--- Shadow variable</span>
+</span><a name="line-545"></a> <span class="k">for</span> <span class="p">(</span><span class="n">entry</span> <span class="o">=</span> <span class="n">entries</span><span class="p">;</span> <span class="n">entry</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">;</span> <span class="n">entry</span> <span class="o">=</span> <span class="n">g_list_next</span><span class="p">(</span><span class="n">entry</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-546"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entrydata</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">;</span>
+<a name="line-547"></a> <span class="n">gtk_menu_popdown</span><span class="p">(</span><span class="n">entrydata</span><span class="o">-&gt;</span><span class="n">menu</span><span class="p">);</span>
+<a name="line-548"></a> <span class="p">}</span>
+<a name="line-549"></a> <span class="n">g_list_free</span><span class="p">(</span><span class="n">entries</span><span class="p">);</span>
+<a name="line-550"></a>
+<a name="line-551"></a> <span class="cm">/* And tell the menubar to exit activation mode too */</span>
+<a name="line-552"></a> <span class="n">gtk_menu_shell_cancel</span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="p">(</span><span class="n">menubar</span><span class="p">));</span>
+<a name="line-553"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-554"></a> <span class="p">}</span>
+<a name="line-555"></a>
+<a name="line-556"></a> <span class="c1">// TODO: do something sensible here</span>
+<a name="line-557"></a><span class="p">}</span>
+<a name="line-558"></a>
+<a name="line-559"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-560"></a><span class="nf">update_accessible_desc</span><span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entry</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menuitem</span><span class="p">)</span>
+<a name="line-561"></a><span class="p">{</span>
+<a name="line-562"></a> <span class="cm">/* FIXME: We need to deal with the use case where the contents of the</span>
+<a name="line-563"></a><span class="cm"> label overrides what is found in the atk object&#39;s name, or at least</span>
+<a name="line-564"></a><span class="cm"> orca speaks the label instead of the atk object name.</span>
+<a name="line-565"></a><span class="cm"> */</span>
+<a name="line-566"></a> <span class="n">AtkObject</span> <span class="o">*</span> <span class="n">menuitem_obj</span> <span class="o">=</span> <span class="n">gtk_widget_get_accessible</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-567"></a> <span class="k">if</span> <span class="p">(</span><span class="n">menuitem_obj</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-568"></a> <span class="cm">/* Should there be an error printed here? */</span>
+<a name="line-569"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-570"></a> <span class="p">}</span>
+<a name="line-571"></a>
+<a name="line-572"></a> <span class="k">if</span> <span class="p">(</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">accessible_desc</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-573"></a> <span class="n">atk_object_set_name</span><span class="p">(</span><span class="n">menuitem_obj</span><span class="p">,</span> <span class="n">entry</span><span class="o">-&gt;</span><span class="n">accessible_desc</span><span class="p">);</span>
+<a name="line-574"></a> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+<a name="line-575"></a> <span class="n">atk_object_set_name</span><span class="p">(</span><span class="n">menuitem_obj</span><span class="p">,</span> <span class="s">&quot;&quot;</span><span class="p">);</span>
+<a name="line-576"></a> <span class="p">}</span>
+<a name="line-577"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-578"></a><span class="p">}</span>
+<a name="line-579"></a>
+<a name="line-580"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-581"></a><span class="nf">load_indicator</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">,</span> <span class="n">IndicatorObject</span> <span class="o">*</span><span class="n">io</span><span class="p">,</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">name</span><span class="p">)</span>
+<a name="line-582"></a><span class="p">{</span>
+<a name="line-583"></a> <span class="cm">/* Set the environment it&#39;s in */</span>
+<a name="line-584"></a> <span class="n">indicator_object_set_environment</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="p">(</span><span class="k">const</span> <span class="n">GStrv</span><span class="p">)</span><span class="n">indicator_env</span><span class="p">);</span>
+<a name="line-585"></a>
+<a name="line-586"></a> <span class="cm">/* Attach the &#39;name&#39; to the object */</span>
+<a name="line-587"></a><span class="cp">#if HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-588"></a> <span class="kt">int</span> <span class="n">pos</span> <span class="o">=</span> <span class="mi">5000</span> <span class="o">-</span> <span class="n">indicator_object_get_position</span><span class="p">(</span><span class="n">io</span><span class="p">);</span>
+<a name="line-589"></a> <span class="k">if</span> <span class="p">(</span><span class="n">pos</span> <span class="o">&gt;</span> <span class="mi">5000</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-590"></a> <span class="n">pos</span> <span class="o">=</span> <span class="n">name2order</span><span class="p">(</span><span class="n">name</span><span class="p">);</span>
+<a name="line-591"></a> <span class="p">}</span>
+<a name="line-592"></a><span class="cp">#else</span>
+<a name="line-593"></a> <span class="kt">int</span> <span class="n">pos</span> <span class="o">=</span> <span class="n">name2order</span><span class="p">(</span><span class="n">name</span><span class="p">);</span>
+<a name="line-594"></a><span class="cp">#endif</span>
+<a name="line-595"></a>
+<a name="line-596"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">IO_DATA_ORDER_NUMBER</span><span class="p">,</span> <span class="n">GINT_TO_POINTER</span><span class="p">(</span><span class="n">pos</span><span class="p">));</span>
+<a name="line-597"></a>
+<a name="line-598"></a> <span class="cm">/* Connect to its signals */</span>
+<a name="line-599"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_added</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-600"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_removed</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-601"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_moved</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-602"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_MENU_SHOW</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">menu_show</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-603"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="n">INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">accessible_desc_update</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-604"></a>
+<a name="line-605"></a> <span class="cm">/* Track panel resize */</span>
+<a name="line-606"></a> <span class="n">g_signal_connect_object</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="s">&quot;change-size&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">entry_resized</span><span class="p">),</span> <span class="n">G_OBJECT</span><span class="p">(</span><span class="n">io</span><span class="p">),</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-607"></a>
+<a name="line-608"></a> <span class="cm">/* Work on the entries */</span>
+<a name="line-609"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entries</span> <span class="o">=</span> <span class="n">indicator_object_get_entries</span><span class="p">(</span><span class="n">io</span><span class="p">);</span>
+<a name="line-610"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">entry</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-611"></a>
+<a name="line-612"></a> <span class="k">for</span> <span class="p">(</span><span class="n">entry</span> <span class="o">=</span> <span class="n">entries</span><span class="p">;</span> <span class="n">entry</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">;</span> <span class="n">entry</span> <span class="o">=</span> <span class="n">g_list_next</span><span class="p">(</span><span class="n">entry</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-613"></a> <span class="n">IndicatorObjectEntry</span> <span class="o">*</span> <span class="n">entrydata</span> <span class="o">=</span> <span class="p">(</span><span class="n">IndicatorObjectEntry</span> <span class="o">*</span><span class="p">)</span><span class="n">entry</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">;</span>
+<a name="line-614"></a> <span class="n">entry_added</span><span class="p">(</span><span class="n">io</span><span class="p">,</span> <span class="n">entrydata</span><span class="p">,</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-615"></a> <span class="p">}</span>
+<a name="line-616"></a>
+<a name="line-617"></a> <span class="n">g_list_free</span><span class="p">(</span><span class="n">entries</span><span class="p">);</span>
+<a name="line-618"></a><span class="p">}</span>
+<a name="line-619"></a>
+<a name="line-620"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-621"></a><span class="nf">load_module</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">name</span><span class="p">,</span> <span class="n">MatePanelApplet</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">)</span>
+<a name="line-622"></a><span class="p">{</span>
+<a name="line-623"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Looking at Module: %s&quot;</span><span class="p">,</span> <span class="n">name</span><span class="p">);</span>
+<a name="line-624"></a> <span class="n">g_return_val_if_fail</span><span class="p">(</span><span class="n">name</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-625"></a>
+<a name="line-626"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_str_has_suffix</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">G_MODULE_SUFFIX</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-627"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-628"></a> <span class="p">}</span>
+<a name="line-629"></a>
+<a name="line-630"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Loading Module: %s&quot;</span><span class="p">,</span> <span class="n">name</span><span class="p">);</span>
+<a name="line-631"></a>
+<a name="line-632"></a> <span class="cm">/* Build the object for the module */</span>
+<a name="line-633"></a> <span class="n">gchar</span> <span class="o">*</span> <span class="n">fullpath</span> <span class="o">=</span> <span class="n">g_build_filename</span><span class="p">(</span><span class="n">INDICATOR_DIR</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-634"></a> <span class="n">IndicatorObject</span> <span class="o">*</span> <span class="n">io</span> <span class="o">=</span> <span class="n">indicator_object_new_from_file</span><span class="p">(</span><span class="n">fullpath</span><span class="p">);</span>
+<a name="line-635"></a> <span class="n">g_free</span><span class="p">(</span><span class="n">fullpath</span><span class="p">);</span>
+<a name="line-636"></a>
+<a name="line-637"></a> <span class="n">load_indicator</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">,</span> <span class="n">io</span><span class="p">,</span> <span class="n">name</span><span class="p">);</span>
+<a name="line-638"></a>
+<a name="line-639"></a> <span class="k">return</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-640"></a><span class="p">}</span>
+<a name="line-641"></a>
+<a name="line-642"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-643"></a><span class="nf">load_modules</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menubar</span><span class="p">,</span> <span class="n">gint</span> <span class="o">*</span><span class="n">indicators_loaded</span><span class="p">)</span>
+<a name="line-644"></a><span class="p">{</span>
+<a name="line-645"></a> <span class="k">if</span> <span class="p">(</span><span class="n">g_file_test</span><span class="p">(</span><span class="n">INDICATOR_DIR</span><span class="p">,</span> <span class="p">(</span><span class="n">G_FILE_TEST_EXISTS</span> <span class="o">|</span> <span class="n">G_FILE_TEST_IS_DIR</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-646"></a> <span class="n">GDir</span> <span class="o">*</span> <span class="n">dir</span> <span class="o">=</span> <span class="n">g_dir_open</span><span class="p">(</span><span class="n">INDICATOR_DIR</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-647"></a>
+<a name="line-648"></a> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">name</span><span class="p">;</span>
+<a name="line-649"></a> <span class="n">gint</span> <span class="n">count</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-650"></a> <span class="k">while</span> <span class="p">((</span><span class="n">name</span> <span class="o">=</span> <span class="n">g_dir_read_name</span><span class="p">(</span><span class="n">dir</span><span class="p">))</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-651"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-652"></a> <span class="k">if</span> <span class="p">(</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_APPMENU</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-653"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-654"></a> <span class="p">}</span>
+<a name="line-655"></a><span class="cp">#else</span>
+<a name="line-656"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_APPMENU</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-657"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-658"></a> <span class="p">}</span>
+<a name="line-659"></a><span class="cp">#endif</span>
+<a name="line-660"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-661"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_ME</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-662"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-663"></a> <span class="p">}</span>
+<a name="line-664"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_DATETIME</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-665"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-666"></a> <span class="p">}</span>
+<a name="line-667"></a><span class="cp">#endif</span>
+<a name="line-668"></a> <span class="k">if</span> <span class="p">(</span><span class="n">load_module</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-669"></a> <span class="n">count</span><span class="o">++</span><span class="p">;</span>
+<a name="line-670"></a> <span class="p">}</span>
+<a name="line-671"></a> <span class="p">}</span>
+<a name="line-672"></a>
+<a name="line-673"></a> <span class="o">*</span><span class="n">indicators_loaded</span> <span class="o">+=</span> <span class="n">count</span><span class="p">;</span>
+<a name="line-674"></a>
+<a name="line-675"></a> <span class="n">g_dir_close</span> <span class="p">(</span><span class="n">dir</span><span class="p">);</span>
+<a name="line-676"></a> <span class="p">}</span>
+<a name="line-677"></a><span class="p">}</span>
+<a name="line-678"></a>
+<a name="line-679"></a><span class="cp">#if HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-680"></a>
+<a name="line-681"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-682"></a><span class="nf">load_indicators_from_indicator_files</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menubar</span><span class="p">,</span> <span class="n">gint</span> <span class="o">*</span><span class="n">indicators_loaded</span><span class="p">)</span>
+<a name="line-683"></a><span class="p">{</span>
+<a name="line-684"></a> <span class="n">GDir</span> <span class="o">*</span><span class="n">dir</span><span class="p">;</span>
+<a name="line-685"></a> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">name</span><span class="p">;</span>
+<a name="line-686"></a> <span class="n">GError</span> <span class="o">*</span><span class="n">error</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-687"></a>
+<a name="line-688"></a> <span class="n">dir</span> <span class="o">=</span> <span class="n">g_dir_open</span> <span class="p">(</span><span class="n">INDICATOR_SERVICE_DIR</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">error</span><span class="p">);</span>
+<a name="line-689"></a>
+<a name="line-690"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">dir</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-691"></a> <span class="n">g_warning</span> <span class="p">(</span><span class="s">&quot;unable to open indicator service file directory: %s&quot;</span><span class="p">,</span> <span class="n">error</span><span class="o">-&gt;</span><span class="n">message</span><span class="p">);</span>
+<a name="line-692"></a> <span class="n">g_error_free</span> <span class="p">(</span><span class="n">error</span><span class="p">);</span>
+<a name="line-693"></a>
+<a name="line-694"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-695"></a> <span class="p">}</span>
+<a name="line-696"></a>
+<a name="line-697"></a> <span class="n">gint</span> <span class="n">count</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-698"></a> <span class="k">while</span> <span class="p">((</span><span class="n">name</span> <span class="o">=</span> <span class="n">g_dir_read_name</span> <span class="p">(</span><span class="n">dir</span><span class="p">)))</span> <span class="p">{</span>
+<a name="line-699"></a> <span class="n">gchar</span> <span class="o">*</span><span class="n">filename</span><span class="p">;</span>
+<a name="line-700"></a> <span class="n">IndicatorNg</span> <span class="o">*</span><span class="n">indicator</span><span class="p">;</span>
+<a name="line-701"></a>
+<a name="line-702"></a> <span class="n">filename</span> <span class="o">=</span> <span class="n">g_build_filename</span> <span class="p">(</span><span class="n">INDICATOR_SERVICE_DIR</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-703"></a> <span class="n">indicator</span> <span class="o">=</span> <span class="n">indicator_ng_new_for_profile</span> <span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="s">&quot;desktop&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">error</span><span class="p">);</span>
+<a name="line-704"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">filename</span><span class="p">);</span>
+<a name="line-705"></a>
+<a name="line-706"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-707"></a> <span class="k">if</span> <span class="p">(</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_APPMENU_NG</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-708"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-709"></a> <span class="p">}</span>
+<a name="line-710"></a><span class="cp">#else</span>
+<a name="line-711"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_APPMENU_NG</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-712"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-713"></a> <span class="p">}</span>
+<a name="line-714"></a><span class="cp">#endif</span>
+<a name="line-715"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-716"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_ME_NG</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-717"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-718"></a> <span class="p">}</span>
+<a name="line-719"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_strcmp0</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">INDICATOR_SERVICE_DATETIME_NG</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-720"></a> <span class="k">continue</span><span class="p">;</span>
+<a name="line-721"></a> <span class="p">}</span>
+<a name="line-722"></a><span class="cp">#endif</span>
+<a name="line-723"></a>
+<a name="line-724"></a> <span class="k">if</span> <span class="p">(</span><span class="n">indicator</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-725"></a> <span class="n">load_indicator</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">,</span> <span class="n">INDICATOR_OBJECT</span> <span class="p">(</span><span class="n">indicator</span><span class="p">),</span> <span class="n">name</span><span class="p">);</span>
+<a name="line-726"></a> <span class="n">count</span><span class="o">++</span><span class="p">;</span>
+<a name="line-727"></a> <span class="p">}</span><span class="k">else</span><span class="p">{</span>
+<a name="line-728"></a> <span class="n">g_warning</span> <span class="p">(</span><span class="s">&quot;unable to load &#39;%s&#39;: %s&quot;</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">error</span><span class="o">-&gt;</span><span class="n">message</span><span class="p">);</span>
+<a name="line-729"></a> <span class="n">g_clear_error</span> <span class="p">(</span><span class="o">&amp;</span><span class="n">error</span><span class="p">);</span>
+<a name="line-730"></a> <span class="p">}</span>
+<a name="line-731"></a> <span class="p">}</span>
+<a name="line-732"></a>
+<a name="line-733"></a> <span class="o">*</span><span class="n">indicators_loaded</span> <span class="o">+=</span> <span class="n">count</span><span class="p">;</span>
+<a name="line-734"></a>
+<a name="line-735"></a> <span class="n">g_dir_close</span> <span class="p">(</span><span class="n">dir</span><span class="p">);</span>
+<a name="line-736"></a><span class="p">}</span>
+<a name="line-737"></a><span class="cp">#endif </span><span class="cm">/* HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG */</span><span class="cp"></span>
+<a name="line-738"></a>
+<a name="line-739"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-740"></a><span class="nf">hotkey_filter</span> <span class="p">(</span><span class="kt">char</span> <span class="o">*</span> <span class="n">keystring</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-741"></a><span class="p">{</span>
+<a name="line-742"></a> <span class="n">g_return_if_fail</span><span class="p">(</span><span class="n">GTK_IS_MENU_SHELL</span><span class="p">(</span><span class="n">data</span><span class="p">));</span>
+<a name="line-743"></a>
+<a name="line-744"></a> <span class="cm">/* Oh, wow, it&#39;s us! */</span>
+<a name="line-745"></a> <span class="n">GList</span> <span class="o">*</span> <span class="n">children</span> <span class="o">=</span> <span class="n">gtk_container_get_children</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">data</span><span class="p">));</span>
+<a name="line-746"></a> <span class="k">if</span> <span class="p">(</span><span class="n">children</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-747"></a> <span class="n">g_debug</span><span class="p">(</span><span class="s">&quot;Menubar has no children&quot;</span><span class="p">);</span>
+<a name="line-748"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-749"></a> <span class="p">}</span>
+<a name="line-750"></a>
+<a name="line-751"></a> <span class="n">gtk_menu_shell_select_item</span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="p">(</span><span class="n">data</span><span class="p">),</span> <span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">g_list_last</span><span class="p">(</span><span class="n">children</span><span class="p">)</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">));</span>
+<a name="line-752"></a> <span class="n">g_list_free</span><span class="p">(</span><span class="n">children</span><span class="p">);</span>
+<a name="line-753"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-754"></a><span class="p">}</span>
+<a name="line-755"></a>
+<a name="line-756"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-757"></a><span class="nf">menubar_press</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span>
+<a name="line-758"></a> <span class="n">GdkEventButton</span> <span class="o">*</span><span class="n">event</span><span class="p">,</span>
+<a name="line-759"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="n">G_GNUC_UNUSED</span><span class="p">)</span>
+<a name="line-760"></a><span class="p">{</span>
+<a name="line-761"></a> <span class="k">if</span> <span class="p">(</span><span class="n">event</span><span class="o">-&gt;</span><span class="n">button</span> <span class="o">!=</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-762"></a> <span class="n">g_signal_stop_emission_by_name</span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> <span class="s">&quot;button-press-event&quot;</span><span class="p">);</span>
+<a name="line-763"></a> <span class="p">}</span>
+<a name="line-764"></a>
+<a name="line-765"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-766"></a><span class="p">}</span>
+<a name="line-767"></a>
+<a name="line-768"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-769"></a><span class="nf">menubar_on_draw</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">widget</span><span class="p">,</span>
+<a name="line-770"></a> <span class="n">cairo_t</span> <span class="o">*</span> <span class="n">cr</span><span class="p">,</span>
+<a name="line-771"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">menubar</span><span class="p">)</span>
+<a name="line-772"></a><span class="p">{</span>
+<a name="line-773"></a> <span class="cm">/* FIXME: either port to gtk_render_focus or remove this function */</span>
+<a name="line-774"></a> <span class="k">if</span> <span class="p">(</span><span class="n">gtk_widget_has_focus</span><span class="p">(</span><span class="n">menubar</span><span class="p">))</span>
+<a name="line-775"></a> <span class="n">gtk_paint_focus</span><span class="p">(</span><span class="n">gtk_widget_get_style</span><span class="p">(</span><span class="n">widget</span><span class="p">),</span>
+<a name="line-776"></a> <span class="n">cr</span><span class="p">,</span>
+<a name="line-777"></a> <span class="n">gtk_widget_get_state</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span>
+<a name="line-778"></a> <span class="n">widget</span><span class="p">,</span> <span class="s">&quot;menubar-applet&quot;</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">);</span>
+<a name="line-779"></a>
+<a name="line-780"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-781"></a><span class="p">}</span>
+<a name="line-782"></a>
+<a name="line-783"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-784"></a><span class="nf">about_cb</span> <span class="p">(</span><span class="n">GtkAction</span> <span class="o">*</span><span class="n">action</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-785"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="n">G_GNUC_UNUSED</span><span class="p">)</span>
+<a name="line-786"></a><span class="p">{</span>
+<a name="line-787"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">authors</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-788"></a> <span class="s">&quot;Ted Gould &lt;[email protected]&gt;&quot;</span><span class="p">,</span>
+<a name="line-789"></a> <span class="nb">NULL</span>
+<a name="line-790"></a> <span class="p">};</span>
+<a name="line-791"></a>
+<a name="line-792"></a> <span class="k">static</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">license</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-793"></a> <span class="n">N_</span><span class="p">(</span><span class="s">&quot;This program is free software: you can redistribute it and/or modify it &quot;</span>
+<a name="line-794"></a> <span class="s">&quot;under the terms of the GNU General Public License version 3, as published &quot;</span>
+<a name="line-795"></a> <span class="s">&quot;by the Free Software Foundation.&quot;</span><span class="p">),</span>
+<a name="line-796"></a> <span class="n">N_</span><span class="p">(</span><span class="s">&quot;This program is distributed in the hope that it will be useful, but &quot;</span>
+<a name="line-797"></a> <span class="s">&quot;WITHOUT ANY WARRANTY; without even the implied warranties of &quot;</span>
+<a name="line-798"></a> <span class="s">&quot;MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR &quot;</span>
+<a name="line-799"></a> <span class="s">&quot;PURPOSE. See the GNU General Public License for more details.&quot;</span><span class="p">),</span>
+<a name="line-800"></a> <span class="n">N_</span><span class="p">(</span><span class="s">&quot;You should have received a copy of the GNU General Public License along &quot;</span>
+<a name="line-801"></a> <span class="s">&quot;with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.&quot;</span><span class="p">),</span>
+<a name="line-802"></a> <span class="nb">NULL</span>
+<a name="line-803"></a> <span class="p">};</span>
+<a name="line-804"></a> <span class="n">gchar</span> <span class="o">*</span><span class="n">license_i18n</span><span class="p">;</span>
+<a name="line-805"></a>
+<a name="line-806"></a> <span class="n">license_i18n</span> <span class="o">=</span> <span class="n">g_strconcat</span> <span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">license</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span> <span class="s">&quot;</span><span class="se">\n\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="n">license</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="s">&quot;</span><span class="se">\n\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="n">license</span><span class="p">[</span><span class="mi">2</span><span class="p">]),</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-807"></a>
+<a name="line-808"></a> <span class="n">gtk_show_about_dialog</span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span>
+<a name="line-809"></a> <span class="s">&quot;version&quot;</span><span class="p">,</span> <span class="n">VERSION</span><span class="p">,</span>
+<a name="line-810"></a> <span class="s">&quot;copyright&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;Copyright </span><span class="se">\xc2\xa9</span><span class="s"> 2009-2010 Canonical, Ltd.</span><span class="se">\n</span><span class="s">&quot;</span>
+<a name="line-811"></a> <span class="s">&quot;Copyright </span><span class="se">\xc2\xa9</span><span class="s"> 2011-2020 MATE developers&quot;</span><span class="p">),</span>
+<a name="line-812"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-813"></a> <span class="s">&quot;comments&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;An applet to hold your application menus.&quot;</span><span class="p">),</span>
+<a name="line-814"></a><span class="cp">#endif</span>
+<a name="line-815"></a> <span class="s">&quot;comments&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;An applet to hold all of the system indicators.&quot;</span><span class="p">),</span>
+<a name="line-816"></a> <span class="s">&quot;authors&quot;</span><span class="p">,</span> <span class="n">authors</span><span class="p">,</span>
+<a name="line-817"></a> <span class="s">&quot;license&quot;</span><span class="p">,</span> <span class="n">license_i18n</span><span class="p">,</span>
+<a name="line-818"></a> <span class="s">&quot;wrap-license&quot;</span><span class="p">,</span> <span class="n">TRUE</span><span class="p">,</span>
+<a name="line-819"></a> <span class="s">&quot;translator-credits&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;translator-credits&quot;</span><span class="p">),</span>
+<a name="line-820"></a> <span class="s">&quot;logo-icon-name&quot;</span><span class="p">,</span> <span class="s">&quot;mate-indicator-applet&quot;</span><span class="p">,</span>
+<a name="line-821"></a> <span class="s">&quot;icon-name&quot;</span><span class="p">,</span> <span class="s">&quot;mate-indicator-applet&quot;</span><span class="p">,</span>
+<a name="line-822"></a> <span class="s">&quot;website&quot;</span><span class="p">,</span> <span class="s">&quot;https://mate-desktop.org&quot;</span><span class="p">,</span>
+<a name="line-823"></a> <span class="s">&quot;website-label&quot;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&quot;MATE Website&quot;</span><span class="p">),</span>
+<a name="line-824"></a> <span class="nb">NULL</span>
+<a name="line-825"></a> <span class="p">);</span>
+<a name="line-826"></a>
+<a name="line-827"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">license_i18n</span><span class="p">);</span>
+<a name="line-828"></a>
+<a name="line-829"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-830"></a><span class="p">}</span>
+<a name="line-831"></a>
+<a name="line-832"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-833"></a><span class="nf">swap_orient_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">item</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-834"></a><span class="p">{</span>
+<a name="line-835"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">from</span> <span class="o">=</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="p">)</span> <span class="n">data</span><span class="p">;</span>
+<a name="line-836"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">to</span> <span class="o">=</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="p">)</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">from</span><span class="p">),</span> <span class="s">&quot;to&quot;</span><span class="p">);</span>
+<a name="line-837"></a> <span class="n">g_object_ref</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">item</span><span class="p">));</span>
+<a name="line-838"></a> <span class="n">gtk_container_remove</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">from</span><span class="p">),</span> <span class="n">item</span><span class="p">);</span>
+<a name="line-839"></a> <span class="k">if</span> <span class="p">(</span><span class="n">GTK_IS_LABEL</span><span class="p">(</span><span class="n">item</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-840"></a> <span class="k">switch</span><span class="p">(</span><span class="n">packdirection</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-841"></a> <span class="k">case</span> <span class="nl">GTK_PACK_DIRECTION_LTR</span><span class="p">:</span>
+<a name="line-842"></a> <span class="n">gtk_label_set_angle</span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="p">(</span><span class="n">item</span><span class="p">),</span> <span class="mf">0.0</span><span class="p">);</span>
+<a name="line-843"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-844"></a> <span class="k">case</span> <span class="nl">GTK_PACK_DIRECTION_TTB</span><span class="p">:</span>
+<a name="line-845"></a> <span class="n">gtk_label_set_angle</span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="p">(</span><span class="n">item</span><span class="p">),</span>
+<a name="line-846"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_LEFT</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-847"></a> <span class="mf">270.0</span> <span class="o">:</span> <span class="mf">90.0</span><span class="p">);</span>
+<a name="line-848"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-849"></a> <span class="k">default</span><span class="o">:</span>
+<a name="line-850"></a> <span class="k">break</span><span class="p">;</span>
+<a name="line-851"></a> <span class="p">}</span>
+<a name="line-852"></a> <span class="p">}</span>
+<a name="line-853"></a> <span class="n">gtk_box_pack_start</span><span class="p">(</span><span class="n">GTK_BOX</span><span class="p">(</span><span class="n">to</span><span class="p">),</span> <span class="n">item</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-854"></a> <span class="k">return</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-855"></a><span class="p">}</span>
+<a name="line-856"></a>
+<a name="line-857"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-858"></a><span class="nf">reorient_box_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menuitem</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-859"></a><span class="p">{</span>
+<a name="line-860"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">from</span> <span class="o">=</span> <span class="n">g_object_get_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;box&quot;</span><span class="p">);</span>
+<a name="line-861"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">to</span> <span class="o">=</span> <span class="p">(</span><span class="n">packdirection</span> <span class="o">==</span> <span class="n">GTK_PACK_DIRECTION_LTR</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-862"></a> <span class="n">gtk_box_new</span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="o">:</span> <span class="n">gtk_box_new</span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-863"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">from</span><span class="p">),</span> <span class="s">&quot;to&quot;</span><span class="p">,</span> <span class="n">to</span><span class="p">);</span>
+<a name="line-864"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">from</span><span class="p">),</span> <span class="p">(</span><span class="n">GtkCallback</span><span class="p">)</span><span class="n">swap_orient_cb</span><span class="p">,</span>
+<a name="line-865"></a> <span class="n">from</span><span class="p">);</span>
+<a name="line-866"></a> <span class="n">gtk_container_remove</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">from</span><span class="p">);</span>
+<a name="line-867"></a> <span class="n">gtk_container_add</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="n">to</span><span class="p">);</span>
+<a name="line-868"></a> <span class="n">g_object_set_data</span><span class="p">(</span><span class="n">G_OBJECT</span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span> <span class="s">&quot;box&quot;</span><span class="p">,</span> <span class="n">to</span><span class="p">);</span>
+<a name="line-869"></a> <span class="n">gtk_widget_show_all</span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span>
+<a name="line-870"></a> <span class="k">return</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-871"></a><span class="p">}</span>
+<a name="line-872"></a>
+<a name="line-873"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-874"></a><span class="nf">matepanelapplet_reorient_cb</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">applet</span><span class="p">,</span> <span class="n">MatePanelAppletOrient</span> <span class="n">neworient</span><span class="p">,</span>
+<a name="line-875"></a> <span class="n">gpointer</span> <span class="n">data</span><span class="p">)</span>
+<a name="line-876"></a><span class="p">{</span>
+<a name="line-877"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menubar</span> <span class="o">=</span> <span class="p">(</span><span class="n">GtkWidget</span> <span class="o">*</span><span class="p">)</span><span class="n">data</span><span class="p">;</span>
+<a name="line-878"></a> <span class="k">if</span> <span class="p">((((</span><span class="n">neworient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_UP</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-879"></a> <span class="p">(</span><span class="n">neworient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_DOWN</span><span class="p">))</span> <span class="o">&amp;&amp;</span>
+<a name="line-880"></a> <span class="p">((</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_LEFT</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-881"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_RIGHT</span><span class="p">)))</span> <span class="o">||</span>
+<a name="line-882"></a> <span class="p">(((</span><span class="n">neworient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_LEFT</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-883"></a> <span class="p">(</span><span class="n">neworient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_RIGHT</span><span class="p">))</span> <span class="o">&amp;&amp;</span>
+<a name="line-884"></a> <span class="p">((</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_UP</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-885"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_DOWN</span><span class="p">))))</span> <span class="p">{</span>
+<a name="line-886"></a> <span class="n">packdirection</span> <span class="o">=</span> <span class="p">(</span><span class="n">packdirection</span> <span class="o">==</span> <span class="n">GTK_PACK_DIRECTION_LTR</span><span class="p">)</span> <span class="o">?</span>
+<a name="line-887"></a> <span class="nl">GTK_PACK_DIRECTION_TTB</span> <span class="p">:</span> <span class="n">GTK_PACK_DIRECTION_LTR</span><span class="p">;</span>
+<a name="line-888"></a> <span class="n">gtk_menu_bar_set_pack_direction</span><span class="p">(</span><span class="n">GTK_MENU_BAR</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span>
+<a name="line-889"></a> <span class="n">packdirection</span><span class="p">);</span>
+<a name="line-890"></a> <span class="n">orient</span> <span class="o">=</span> <span class="n">neworient</span><span class="p">;</span>
+<a name="line-891"></a> <span class="n">gtk_container_foreach</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span>
+<a name="line-892"></a> <span class="p">(</span><span class="n">GtkCallback</span><span class="p">)</span><span class="n">reorient_box_cb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-893"></a> <span class="p">}</span>
+<a name="line-894"></a> <span class="n">orient</span> <span class="o">=</span> <span class="n">neworient</span><span class="p">;</span>
+<a name="line-895"></a> <span class="k">return</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-896"></a><span class="p">}</span>
+<a name="line-897"></a>
+<a name="line-898"></a><span class="cp">#ifdef N_</span>
+<a name="line-899"></a><span class="cp">#undef N_</span>
+<a name="line-900"></a><span class="cp">#endif</span>
+<a name="line-901"></a><span class="cp">#define N_(x) x</span>
+<a name="line-902"></a>
+<a name="line-903"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-904"></a><span class="nf">log_to_file_cb</span> <span class="p">(</span><span class="n">GObject</span> <span class="o">*</span> <span class="n">source_obj</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-905"></a> <span class="n">GAsyncResult</span> <span class="o">*</span> <span class="n">result</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span>
+<a name="line-906"></a><span class="p">{</span>
+<a name="line-907"></a> <span class="n">g_free</span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span>
+<a name="line-908"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-909"></a><span class="p">}</span>
+<a name="line-910"></a>
+<a name="line-911"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-912"></a><span class="nf">log_to_file</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">domain</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-913"></a> <span class="n">GLogLevelFlags</span> <span class="n">level</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-914"></a> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">message</span><span class="p">,</span>
+<a name="line-915"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="n">G_GNUC_UNUSED</span><span class="p">)</span>
+<a name="line-916"></a><span class="p">{</span>
+<a name="line-917"></a> <span class="k">if</span> <span class="p">(</span><span class="n">log_file</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-918"></a> <span class="n">GError</span> <span class="o">*</span> <span class="n">error</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-919"></a> <span class="n">gchar</span> <span class="o">*</span> <span class="n">filename</span> <span class="o">=</span> <span class="n">g_build_filename</span><span class="p">(</span><span class="n">g_get_user_cache_dir</span><span class="p">(),</span> <span class="n">LOG_FILE_NAME</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-920"></a> <span class="n">GFile</span> <span class="o">*</span> <span class="n">file</span> <span class="o">=</span> <span class="n">g_file_new_for_path</span><span class="p">(</span><span class="n">filename</span><span class="p">);</span>
+<a name="line-921"></a> <span class="n">g_free</span><span class="p">(</span><span class="n">filename</span><span class="p">);</span>
+<a name="line-922"></a>
+<a name="line-923"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">g_file_test</span><span class="p">(</span><span class="n">g_get_user_cache_dir</span><span class="p">(),</span> <span class="n">G_FILE_TEST_EXISTS</span> <span class="o">|</span> <span class="n">G_FILE_TEST_IS_DIR</span><span class="p">))</span> <span class="p">{</span>
+<a name="line-924"></a> <span class="n">GFile</span> <span class="o">*</span> <span class="n">cachedir</span> <span class="o">=</span> <span class="n">g_file_new_for_path</span><span class="p">(</span><span class="n">g_get_user_cache_dir</span><span class="p">());</span>
+<a name="line-925"></a> <span class="n">g_file_make_directory_with_parents</span><span class="p">(</span><span class="n">cachedir</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">error</span><span class="p">);</span>
+<a name="line-926"></a>
+<a name="line-927"></a> <span class="k">if</span> <span class="p">(</span><span class="n">error</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-928"></a> <span class="n">g_error</span><span class="p">(</span><span class="s">&quot;Unable to make directory &#39;%s&#39; for log file: %s&quot;</span><span class="p">,</span> <span class="n">g_get_user_cache_dir</span><span class="p">(),</span> <span class="n">error</span><span class="o">-&gt;</span><span class="n">message</span><span class="p">);</span>
+<a name="line-929"></a> <span class="p">}</span>
+<a name="line-930"></a> <span class="p">}</span>
+<a name="line-931"></a>
+<a name="line-932"></a> <span class="n">g_file_delete</span><span class="p">(</span><span class="n">file</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-933"></a>
+<a name="line-934"></a> <span class="n">GFileIOStream</span> <span class="o">*</span> <span class="n">io</span> <span class="o">=</span> <span class="n">g_file_create_readwrite</span><span class="p">(</span><span class="n">file</span><span class="p">,</span>
+<a name="line-935"></a> <span class="n">G_FILE_CREATE_REPLACE_DESTINATION</span><span class="p">,</span> <span class="cm">/* flags */</span>
+<a name="line-936"></a> <span class="nb">NULL</span><span class="p">,</span> <span class="cm">/* cancelable */</span>
+<a name="line-937"></a> <span class="o">&amp;</span><span class="n">error</span><span class="p">);</span> <span class="cm">/* error */</span>
+<a name="line-938"></a> <span class="k">if</span> <span class="p">(</span><span class="n">error</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-939"></a> <span class="n">g_error</span><span class="p">(</span><span class="s">&quot;Unable to replace file: %s&quot;</span><span class="p">,</span> <span class="n">error</span><span class="o">-&gt;</span><span class="n">message</span><span class="p">);</span>
+<a name="line-940"></a> <span class="p">}</span>
+<a name="line-941"></a>
+<a name="line-942"></a> <span class="n">log_file</span> <span class="o">=</span> <span class="n">g_io_stream_get_output_stream</span><span class="p">(</span><span class="n">G_IO_STREAM</span><span class="p">(</span><span class="n">io</span><span class="p">));</span>
+<a name="line-943"></a> <span class="p">}</span>
+<a name="line-944"></a>
+<a name="line-945"></a> <span class="n">gchar</span> <span class="o">*</span> <span class="n">outputstring</span> <span class="o">=</span> <span class="n">g_strdup_printf</span><span class="p">(</span><span class="s">&quot;%s</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">message</span><span class="p">);</span>
+<a name="line-946"></a> <span class="n">g_output_stream_write_async</span><span class="p">(</span><span class="n">log_file</span><span class="p">,</span>
+<a name="line-947"></a> <span class="n">outputstring</span><span class="p">,</span> <span class="cm">/* data */</span>
+<a name="line-948"></a> <span class="n">strlen</span><span class="p">(</span><span class="n">outputstring</span><span class="p">),</span> <span class="cm">/* length */</span>
+<a name="line-949"></a> <span class="n">G_PRIORITY_LOW</span><span class="p">,</span> <span class="cm">/* priority */</span>
+<a name="line-950"></a> <span class="nb">NULL</span><span class="p">,</span> <span class="cm">/* cancelable */</span>
+<a name="line-951"></a> <span class="n">log_to_file_cb</span><span class="p">,</span> <span class="cm">/* callback */</span>
+<a name="line-952"></a> <span class="n">outputstring</span><span class="p">);</span> <span class="cm">/* data */</span>
+<a name="line-953"></a>
+<a name="line-954"></a> <span class="k">return</span><span class="p">;</span>
+<a name="line-955"></a><span class="p">}</span>
+<a name="line-956"></a>
+<a name="line-957"></a><span class="k">static</span> <span class="n">gboolean</span>
+<a name="line-958"></a><span class="nf">applet_fill_cb</span> <span class="p">(</span><span class="n">MatePanelApplet</span> <span class="o">*</span> <span class="n">applet</span><span class="p">,</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span> <span class="n">iid</span> <span class="n">G_GNUC_UNUSED</span><span class="p">,</span>
+<a name="line-959"></a> <span class="n">gpointer</span> <span class="n">data</span> <span class="n">G_GNUC_UNUSED</span><span class="p">)</span>
+<a name="line-960"></a><span class="p">{</span>
+<a name="line-961"></a><span class="cp">#if HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-962"></a> <span class="n">ido_init</span><span class="p">();</span>
+<a name="line-963"></a><span class="cp">#endif</span>
+<a name="line-964"></a>
+<a name="line-965"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">GtkActionEntry</span> <span class="n">menu_actions</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-966"></a> <span class="p">{</span><span class="s">&quot;About&quot;</span><span class="p">,</span> <span class="n">GTK_STOCK_ABOUT</span><span class="p">,</span> <span class="n">N_</span><span class="p">(</span><span class="s">&quot;_About&quot;</span><span class="p">),</span> <span class="nb">NULL</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">about_cb</span><span class="p">)}</span>
+<a name="line-967"></a> <span class="p">};</span>
+<a name="line-968"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">menu_xml</span> <span class="o">=</span> <span class="s">&quot;&lt;menuitem name=</span><span class="se">\&quot;</span><span class="s">About</span><span class="se">\&quot;</span><span class="s"> action=</span><span class="se">\&quot;</span><span class="s">About</span><span class="se">\&quot;</span><span class="s">/&gt;&quot;</span><span class="p">;</span>
+<a name="line-969"></a>
+<a name="line-970"></a> <span class="k">static</span> <span class="n">gboolean</span> <span class="n">first_time</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-971"></a> <span class="n">GtkWidget</span> <span class="o">*</span><span class="n">menubar</span><span class="p">;</span>
+<a name="line-972"></a> <span class="n">gint</span> <span class="n">indicators_loaded</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-973"></a> <span class="n">GtkActionGroup</span> <span class="o">*</span><span class="n">action_group</span><span class="p">;</span>
+<a name="line-974"></a>
+<a name="line-975"></a> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">first_time</span><span class="p">)</span>
+<a name="line-976"></a> <span class="p">{</span>
+<a name="line-977"></a> <span class="n">first_time</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-978"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-979"></a> <span class="n">g_set_application_name</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&quot;Indicator Applet&quot;</span><span class="p">));</span>
+<a name="line-980"></a><span class="cp">#endif</span>
+<a name="line-981"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-982"></a> <span class="n">g_set_application_name</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&quot;Indicator Applet Complete&quot;</span><span class="p">));</span>
+<a name="line-983"></a><span class="cp">#endif</span>
+<a name="line-984"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-985"></a> <span class="n">g_set_application_name</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&quot;Indicator Applet Application Menu&quot;</span><span class="p">));</span>
+<a name="line-986"></a><span class="cp">#endif</span>
+<a name="line-987"></a>
+<a name="line-988"></a> <span class="n">g_log_set_default_handler</span><span class="p">(</span><span class="n">log_to_file</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-989"></a>
+<a name="line-990"></a> <span class="n">tomboy_keybinder_init</span><span class="p">();</span>
+<a name="line-991"></a> <span class="p">}</span>
+<a name="line-992"></a>
+<a name="line-993"></a> <span class="cm">/* Set panel options */</span>
+<a name="line-994"></a> <span class="n">gtk_container_set_border_width</span><span class="p">(</span><span class="n">GTK_CONTAINER</span> <span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-995"></a> <span class="n">mate_panel_applet_set_flags</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">MATE_PANEL_APPLET_EXPAND_MINOR</span><span class="p">);</span>
+<a name="line-996"></a> <span class="n">menubar</span> <span class="o">=</span> <span class="n">gtk_menu_bar_new</span><span class="p">();</span>
+<a name="line-997"></a> <span class="n">action_group</span> <span class="o">=</span> <span class="n">gtk_action_group_new</span> <span class="p">(</span><span class="s">&quot;Indicator Applet Actions&quot;</span><span class="p">);</span>
+<a name="line-998"></a> <span class="n">gtk_action_group_set_translation_domain</span> <span class="p">(</span><span class="n">action_group</span><span class="p">,</span> <span class="n">GETTEXT_PACKAGE</span><span class="p">);</span>
+<a name="line-999"></a> <span class="n">gtk_action_group_add_actions</span> <span class="p">(</span><span class="n">action_group</span><span class="p">,</span> <span class="n">menu_actions</span><span class="p">,</span>
+<a name="line-1000"></a> <span class="n">G_N_ELEMENTS</span> <span class="p">(</span><span class="n">menu_actions</span><span class="p">),</span>
+<a name="line-1001"></a> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1002"></a> <span class="n">mate_panel_applet_setup_menu</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menu_xml</span><span class="p">,</span> <span class="n">action_group</span><span class="p">);</span>
+<a name="line-1003"></a> <span class="n">g_object_unref</span><span class="p">(</span><span class="n">action_group</span><span class="p">);</span>
+<a name="line-1004"></a><span class="cp">#ifdef INDICATOR_APPLET</span>
+<a name="line-1005"></a> <span class="n">atk_object_set_name</span> <span class="p">(</span><span class="n">gtk_widget_get_accessible</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">applet</span><span class="p">)),</span>
+<a name="line-1006"></a> <span class="s">&quot;indicator-applet&quot;</span><span class="p">);</span>
+<a name="line-1007"></a><span class="cp">#endif</span>
+<a name="line-1008"></a><span class="cp">#ifdef INDICATOR_APPLET_COMPLETE</span>
+<a name="line-1009"></a> <span class="n">atk_object_set_name</span> <span class="p">(</span><span class="n">gtk_widget_get_accessible</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">applet</span><span class="p">)),</span>
+<a name="line-1010"></a> <span class="s">&quot;indicator-applet-complete&quot;</span><span class="p">);</span>
+<a name="line-1011"></a><span class="cp">#endif</span>
+<a name="line-1012"></a><span class="cp">#ifdef INDICATOR_APPLET_APPMENU</span>
+<a name="line-1013"></a> <span class="n">atk_object_set_name</span> <span class="p">(</span><span class="n">gtk_widget_get_accessible</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">applet</span><span class="p">)),</span>
+<a name="line-1014"></a> <span class="s">&quot;indicator-applet-appmenu&quot;</span><span class="p">);</span>
+<a name="line-1015"></a><span class="cp">#endif</span>
+<a name="line-1016"></a>
+<a name="line-1017"></a> <span class="cm">/* Init some theme/icon stuff */</span>
+<a name="line-1018"></a> <span class="n">gtk_icon_theme_append_search_path</span><span class="p">(</span><span class="n">gtk_icon_theme_get_default</span><span class="p">(),</span>
+<a name="line-1019"></a> <span class="n">INDICATOR_ICONS_DIR</span><span class="p">);</span>
+<a name="line-1020"></a> <span class="cm">/* g_debug(&quot;Icons directory: %s&quot;, INDICATOR_ICONS_DIR); */</span>
+<a name="line-1021"></a> <span class="n">gtk_widget_set_name</span><span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="s">&quot;fast-user-switch-applet&quot;</span><span class="p">);</span>
+<a name="line-1022"></a>
+<a name="line-1023"></a> <span class="cm">/* Build menubar */</span>
+<a name="line-1024"></a> <span class="n">size</span> <span class="o">=</span> <span class="p">(</span><span class="n">mate_panel_applet_get_size</span> <span class="p">(</span><span class="n">applet</span><span class="p">));</span>
+<a name="line-1025"></a> <span class="n">orient</span> <span class="o">=</span> <span class="p">(</span><span class="n">mate_panel_applet_get_orient</span><span class="p">(</span><span class="n">applet</span><span class="p">));</span>
+<a name="line-1026"></a> <span class="n">packdirection</span> <span class="o">=</span> <span class="p">((</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_UP</span><span class="p">)</span> <span class="o">||</span>
+<a name="line-1027"></a> <span class="p">(</span><span class="n">orient</span> <span class="o">==</span> <span class="n">MATE_PANEL_APPLET_ORIENT_DOWN</span><span class="p">))</span> <span class="o">?</span>
+<a name="line-1028"></a> <span class="nl">GTK_PACK_DIRECTION_LTR</span> <span class="p">:</span> <span class="n">GTK_PACK_DIRECTION_TTB</span><span class="p">;</span>
+<a name="line-1029"></a> <span class="n">gtk_menu_bar_set_pack_direction</span><span class="p">(</span><span class="n">GTK_MENU_BAR</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span>
+<a name="line-1030"></a> <span class="n">packdirection</span><span class="p">);</span>
+<a name="line-1031"></a> <span class="n">gtk_widget_set_can_focus</span> <span class="p">(</span><span class="n">menubar</span><span class="p">,</span> <span class="n">TRUE</span><span class="p">);</span>
+<a name="line-1032"></a> <span class="n">gtk_widget_set_name</span><span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="s">&quot;fast-user-switch-menubar&quot;</span><span class="p">);</span>
+<a name="line-1033"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">menubar</span><span class="p">,</span> <span class="s">&quot;button-press-event&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">menubar_press</span><span class="p">),</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-1034"></a> <span class="n">g_signal_connect_after</span><span class="p">(</span><span class="n">menubar</span><span class="p">,</span> <span class="s">&quot;draw&quot;</span><span class="p">,</span> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">menubar_on_draw</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1035"></a> <span class="n">g_signal_connect</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="s">&quot;change-orient&quot;</span><span class="p">,</span>
+<a name="line-1036"></a> <span class="n">G_CALLBACK</span><span class="p">(</span><span class="n">matepanelapplet_reorient_cb</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1037"></a> <span class="n">gtk_container_set_border_width</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">menubar</span><span class="p">),</span> <span class="mi">0</span><span class="p">);</span>
+<a name="line-1038"></a>
+<a name="line-1039"></a> <span class="cm">/* Add in filter func */</span>
+<a name="line-1040"></a> <span class="n">tomboy_keybinder_bind</span><span class="p">(</span><span class="n">hotkey_keycode</span><span class="p">,</span> <span class="n">hotkey_filter</span><span class="p">,</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1041"></a>
+<a name="line-1042"></a> <span class="n">load_modules</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">indicators_loaded</span><span class="p">);</span>
+<a name="line-1043"></a><span class="cp">#if HAVE_AYATANA_INDICATOR_NG || HAVE_UBUNTU_INDICATOR_NG</span>
+<a name="line-1044"></a> <span class="n">load_indicators_from_indicator_files</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">indicators_loaded</span><span class="p">);</span>
+<a name="line-1045"></a><span class="cp">#endif</span>
+<a name="line-1046"></a>
+<a name="line-1047"></a> <span class="k">if</span> <span class="p">(</span><span class="n">indicators_loaded</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
+<a name="line-1048"></a> <span class="cm">/* A label to allow for click through */</span>
+<a name="line-1049"></a> <span class="n">GtkWidget</span> <span class="o">*</span> <span class="n">item</span> <span class="o">=</span> <span class="n">gtk_label_new</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&quot;No Indicators&quot;</span><span class="p">));</span>
+<a name="line-1050"></a> <span class="n">mate_panel_applet_set_background_widget</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">item</span><span class="p">);</span>
+<a name="line-1051"></a> <span class="n">gtk_container_add</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="n">item</span><span class="p">);</span>
+<a name="line-1052"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">item</span><span class="p">);</span>
+<a name="line-1053"></a> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+<a name="line-1054"></a> <span class="n">gtk_container_add</span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="p">(</span><span class="n">applet</span><span class="p">),</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1055"></a> <span class="n">mate_panel_applet_set_background_widget</span><span class="p">(</span><span class="n">applet</span><span class="p">,</span> <span class="n">menubar</span><span class="p">);</span>
+<a name="line-1056"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">menubar</span><span class="p">);</span>
+<a name="line-1057"></a> <span class="p">}</span>
+<a name="line-1058"></a>
+<a name="line-1059"></a> <span class="n">gtk_widget_show</span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">applet</span><span class="p">));</span>
+<a name="line-1060"></a>
+<a name="line-1061"></a> <span class="k">return</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-1062"></a>
+<a name="line-1063"></a><span class="p">}</span>
+</pre></div>
+</td></tr></table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/1.html b/[email protected]_master/1.html
new file mode 100644
index 0000000..6bc0c8a
--- /dev/null
+++ b/[email protected]_master/1.html
@@ -0,0 +1,1208 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/eggaccelerators.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> eggaccelerators.c</p>
+<a href='1.html#line-321'> duplicateExpression 321</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/* eggaccelerators.c</span>
+<a name="line-2"></a><span class="cm"> * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik</span>
+<a name="line-3"></a><span class="cm"> * Developed by Havoc Pennington, Tim Janik</span>
+<a name="line-4"></a><span class="cm"> *</span>
+<a name="line-5"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span>
+<a name="line-6"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span>
+<a name="line-7"></a><span class="cm"> * License as published by the Free Software Foundation; either</span>
+<a name="line-8"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span>
+<a name="line-9"></a><span class="cm"> *</span>
+<a name="line-10"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span>
+<a name="line-11"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="line-12"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<a name="line-13"></a><span class="cm"> * Library General Public License for more details.</span>
+<a name="line-14"></a><span class="cm"> *</span>
+<a name="line-15"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span>
+<a name="line-16"></a><span class="cm"> * License along with this library; if not, write to the</span>
+<a name="line-17"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA</span>
+<a name="line-18"></a><span class="cm"> */</span>
+<a name="line-19"></a>
+<a name="line-20"></a><span class="cp">#include</span> <span class="cpf">&quot;eggaccelerators.h&quot;</span><span class="cp"></span>
+<a name="line-21"></a>
+<a name="line-22"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkx.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a>
+<a name="line-26"></a><span class="k">enum</span>
+<a name="line-27"></a><span class="p">{</span>
+<a name="line-28"></a> <span class="n">EGG_MODMAP_ENTRY_SHIFT</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
+<a name="line-29"></a> <span class="n">EGG_MODMAP_ENTRY_LOCK</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
+<a name="line-30"></a> <span class="n">EGG_MODMAP_ENTRY_CONTROL</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
+<a name="line-31"></a> <span class="n">EGG_MODMAP_ENTRY_MOD1</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span>
+<a name="line-32"></a> <span class="n">EGG_MODMAP_ENTRY_MOD2</span> <span class="o">=</span> <span class="mi">4</span><span class="p">,</span>
+<a name="line-33"></a> <span class="n">EGG_MODMAP_ENTRY_MOD3</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
+<a name="line-34"></a> <span class="n">EGG_MODMAP_ENTRY_MOD4</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span>
+<a name="line-35"></a> <span class="n">EGG_MODMAP_ENTRY_MOD5</span> <span class="o">=</span> <span class="mi">7</span><span class="p">,</span>
+<a name="line-36"></a> <span class="n">EGG_MODMAP_ENTRY_LAST</span> <span class="o">=</span> <span class="mi">8</span>
+<a name="line-37"></a><span class="p">};</span>
+<a name="line-38"></a>
+<a name="line-39"></a><span class="cp">#define MODMAP_ENTRY_TO_MODIFIER(x) (1 &lt;&lt; (x))</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="k">typedef</span> <span class="k">struct</span>
+<a name="line-42"></a><span class="p">{</span>
+<a name="line-43"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">];</span>
+<a name="line-44"></a>
+<a name="line-45"></a><span class="p">}</span> <span class="n">EggModmap</span><span class="p">;</span>
+<a name="line-46"></a>
+<a name="line-47"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span> <span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-48"></a>
+<a name="line-49"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-50"></a><span class="nf">is_alt</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-51"></a><span class="p">{</span>
+<a name="line-52"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-53"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-54"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-55"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-56"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-57"></a><span class="p">}</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-60"></a><span class="nf">is_ctl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-61"></a><span class="p">{</span>
+<a name="line-62"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-63"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-64"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-65"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-66"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-67"></a><span class="p">}</span>
+<a name="line-68"></a>
+<a name="line-69"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-70"></a><span class="nf">is_modx</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-71"></a><span class="p">{</span>
+<a name="line-72"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-73"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-74"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-75"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;d&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;D&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-76"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="sc">&#39;1&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&lt;=</span> <span class="sc">&#39;5&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-77"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-78"></a><span class="p">}</span>
+<a name="line-79"></a>
+<a name="line-80"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-81"></a><span class="nf">is_ctrl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-82"></a><span class="p">{</span>
+<a name="line-83"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-84"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-85"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-86"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-87"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-88"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-89"></a><span class="p">}</span>
+<a name="line-90"></a>
+<a name="line-91"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-92"></a><span class="nf">is_shft</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-93"></a><span class="p">{</span>
+<a name="line-94"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-95"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-96"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-97"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-98"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-99"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-100"></a><span class="p">}</span>
+<a name="line-101"></a>
+<a name="line-102"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-103"></a><span class="nf">is_shift</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-104"></a><span class="p">{</span>
+<a name="line-105"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-106"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-107"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-108"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;i&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;I&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-109"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-110"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-111"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-112"></a><span class="p">}</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-115"></a><span class="nf">is_control</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-116"></a><span class="p">{</span>
+<a name="line-117"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-118"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-119"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-120"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;n&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;N&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-121"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-122"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-123"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-124"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-125"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-126"></a><span class="p">}</span>
+<a name="line-127"></a>
+<a name="line-128"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-129"></a><span class="nf">is_release</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-130"></a><span class="p">{</span>
+<a name="line-131"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-132"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-133"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-134"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-135"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-136"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-137"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-138"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-139"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-140"></a><span class="p">}</span>
+<a name="line-141"></a>
+<a name="line-142"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-143"></a><span class="nf">is_meta</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-144"></a><span class="p">{</span>
+<a name="line-145"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-146"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-147"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-148"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-149"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-150"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-151"></a><span class="p">}</span>
+<a name="line-152"></a>
+<a name="line-153"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-154"></a><span class="nf">is_super</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-155"></a><span class="p">{</span>
+<a name="line-156"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-157"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-158"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;u&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;U&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-159"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-160"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-161"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-162"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-163"></a><span class="p">}</span>
+<a name="line-164"></a>
+<a name="line-165"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-166"></a><span class="nf">is_hyper</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-167"></a><span class="p">{</span>
+<a name="line-168"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-169"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-170"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;y&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;Y&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-171"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-172"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-173"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-174"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-175"></a><span class="p">}</span>
+<a name="line-176"></a>
+<a name="line-177"></a><span class="cm">/**</span>
+<a name="line-178"></a><span class="cm"> * egg_accelerator_parse_virtual:</span>
+<a name="line-179"></a><span class="cm"> * @accelerator: string representing an accelerator</span>
+<a name="line-180"></a><span class="cm"> * @accelerator_key: return location for accelerator keyval</span>
+<a name="line-181"></a><span class="cm"> * @accelerator_mods: return location for accelerator modifier mask</span>
+<a name="line-182"></a><span class="cm"> *</span>
+<a name="line-183"></a><span class="cm"> * Parses a string representing a virtual accelerator. The format</span>
+<a name="line-184"></a><span class="cm"> * looks like &quot;&amp;lt;Control&amp;gt;a&quot; or &quot;&amp;lt;Shift&amp;gt;&amp;lt;Alt&amp;gt;F1&quot; or</span>
+<a name="line-185"></a><span class="cm"> * &quot;&amp;lt;Release&amp;gt;z&quot; (the last one is for key release). The parser</span>
+<a name="line-186"></a><span class="cm"> * is fairly liberal and allows lower or upper case, and also</span>
+<a name="line-187"></a><span class="cm"> * abbreviations such as &quot;&amp;lt;Ctl&amp;gt;&quot; and &quot;&amp;lt;Ctrl&amp;gt;&quot;.</span>
+<a name="line-188"></a><span class="cm"> *</span>
+<a name="line-189"></a><span class="cm"> * If the parse fails, @accelerator_key and @accelerator_mods will</span>
+<a name="line-190"></a><span class="cm"> * be set to 0 (zero) and %FALSE will be returned. If the string contains</span>
+<a name="line-191"></a><span class="cm"> * only modifiers, @accelerator_key will be set to 0 but %TRUE will be</span>
+<a name="line-192"></a><span class="cm"> * returned.</span>
+<a name="line-193"></a><span class="cm"> *</span>
+<a name="line-194"></a><span class="cm"> * The virtual vs. concrete accelerator distinction is a relic of</span>
+<a name="line-195"></a><span class="cm"> * how the X Window System works; there are modifiers Mod2-Mod5 that</span>
+<a name="line-196"></a><span class="cm"> * can represent various keyboard keys (numlock, meta, hyper, etc.),</span>
+<a name="line-197"></a><span class="cm"> * the virtual modifier represents the keyboard key, the concrete</span>
+<a name="line-198"></a><span class="cm"> * modifier the actual Mod2-Mod5 bits in the key press event.</span>
+<a name="line-199"></a><span class="cm"> *</span>
+<a name="line-200"></a><span class="cm"> * Returns: %TRUE on success.</span>
+<a name="line-201"></a><span class="cm"> */</span>
+<a name="line-202"></a><span class="n">gboolean</span>
+<a name="line-203"></a><span class="nf">egg_accelerator_parse_virtual</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">,</span>
+<a name="line-204"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">accelerator_key</span><span class="p">,</span>
+<a name="line-205"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-206"></a><span class="p">{</span>
+<a name="line-207"></a> <span class="n">guint</span> <span class="n">keyval</span><span class="p">;</span>
+<a name="line-208"></a> <span class="n">GdkModifierType</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-209"></a> <span class="n">gint</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-210"></a> <span class="n">gboolean</span> <span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-211"></a>
+<a name="line-212"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-213"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-214"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-215"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-216"></a>
+<a name="line-217"></a> <span class="n">g_return_val_if_fail</span> <span class="p">(</span><span class="n">accelerator</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-218"></a>
+<a name="line-219"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-220"></a>
+<a name="line-221"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-222"></a> <span class="n">mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-223"></a> <span class="n">len</span> <span class="o">=</span> <span class="n">strlen</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-224"></a> <span class="k">while</span> <span class="p">(</span><span class="n">len</span><span class="p">)</span>
+<a name="line-225"></a> <span class="p">{</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span>
+<a name="line-227"></a> <span class="p">{</span>
+<a name="line-228"></a> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_release</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-229"></a> <span class="p">{</span>
+<a name="line-230"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-231"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-232"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_RELEASE_MASK</span><span class="p">;</span>
+<a name="line-233"></a> <span class="p">}</span>
+<a name="line-234"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_control</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-235"></a> <span class="p">{</span>
+<a name="line-236"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-237"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-238"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-239"></a> <span class="p">}</span>
+<a name="line-240"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_shift</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-241"></a> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-243"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-244"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-245"></a> <span class="p">}</span>
+<a name="line-246"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_shft</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-247"></a> <span class="p">{</span>
+<a name="line-248"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-249"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-250"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-251"></a> <span class="p">}</span>
+<a name="line-252"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctrl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-253"></a> <span class="p">{</span>
+<a name="line-254"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-255"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-256"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-257"></a> <span class="p">}</span>
+<a name="line-258"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_modx</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-259"></a> <span class="p">{</span>
+<a name="line-260"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">guint</span> <span class="n">mod_vals</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-261"></a> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">,</span>
+<a name="line-262"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span>
+<a name="line-263"></a> <span class="p">};</span>
+<a name="line-264"></a>
+<a name="line-265"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-266"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">4</span><span class="p">;</span>
+<a name="line-267"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">mod_vals</span><span class="p">[</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">-</span> <span class="sc">&#39;1&#39;</span><span class="p">];</span>
+<a name="line-268"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
+<a name="line-269"></a> <span class="p">}</span>
+<a name="line-270"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-271"></a> <span class="p">{</span>
+<a name="line-272"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-273"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-274"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-275"></a> <span class="p">}</span>
+<a name="line-276"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_alt</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-277"></a> <span class="p">{</span>
+<a name="line-278"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-279"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-280"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-281"></a> <span class="p">}</span>
+<a name="line-282"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_meta</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-283"></a> <span class="p">{</span>
+<a name="line-284"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-285"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-286"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-287"></a> <span class="p">}</span>
+<a name="line-288"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_hyper</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-289"></a> <span class="p">{</span>
+<a name="line-290"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-291"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-292"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-293"></a> <span class="p">}</span>
+<a name="line-294"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_super</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-295"></a> <span class="p">{</span>
+<a name="line-296"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-297"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-298"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-299"></a> <span class="p">}</span>
+<a name="line-300"></a> <span class="k">else</span>
+<a name="line-301"></a> <span class="p">{</span>
+<a name="line-302"></a> <span class="n">gchar</span> <span class="n">last_ch</span><span class="p">;</span>
+<a name="line-303"></a>
+<a name="line-304"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-305"></a> <span class="k">while</span> <span class="p">(</span><span class="n">last_ch</span> <span class="o">&amp;&amp;</span> <span class="n">last_ch</span> <span class="o">!=</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">)</span>
+<a name="line-306"></a> <span class="p">{</span>
+<a name="line-307"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-308"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-309"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-310"></a> <span class="p">}</span>
+<a name="line-311"></a> <span class="p">}</span>
+<a name="line-312"></a> <span class="p">}</span>
+<a name="line-313"></a> <span class="k">else</span>
+<a name="line-314"></a> <span class="p">{</span>
+<a name="line-315"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="n">gdk_keyval_from_name</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-316"></a>
+<a name="line-317"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyval</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-318"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-319"></a>
+<a name="line-320"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-321"></a><span class="hll"> <span class="n">len</span> <span class="o">-=</span> <span class="n">len</span><span class="p">;</span><div class='verbose expandable'><span class='error2'>&lt;--- Same expression on both sides of '-='. <span class='marker'>[+]</span></span><div class='content'>Finding the same expression on both sides of an operator is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to determine if it is correct.</div></div>
+</span><a name="line-322"></a> <span class="p">}</span>
+<a name="line-323"></a> <span class="p">}</span>
+<a name="line-324"></a>
+<a name="line-325"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-326"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="n">gdk_keyval_to_lower</span> <span class="p">(</span><span class="n">keyval</span><span class="p">);</span>
+<a name="line-327"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-328"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-329"></a>
+<a name="line-330"></a> <span class="k">return</span> <span class="o">!</span><span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-331"></a><span class="p">}</span>
+<a name="line-332"></a>
+<a name="line-333"></a><span class="kt">void</span>
+<a name="line-334"></a><span class="nf">egg_keymap_resolve_virtual_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-335"></a> <span class="n">EggVirtualModifierType</span> <span class="n">virtual_mods</span><span class="p">,</span>
+<a name="line-336"></a> <span class="n">GdkModifierType</span> <span class="o">*</span><span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-337"></a><span class="p">{</span>
+<a name="line-338"></a> <span class="n">GdkModifierType</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-339"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-340"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-341"></a>
+<a name="line-342"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-343"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">concrete_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-344"></a>
+<a name="line-345"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-346"></a>
+<a name="line-347"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-348"></a>
+<a name="line-349"></a> <span class="n">concrete</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-350"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-351"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-352"></a> <span class="p">{</span>
+<a name="line-353"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-354"></a> <span class="n">concrete</span> <span class="o">|=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">);</span>
+<a name="line-355"></a>
+<a name="line-356"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-357"></a> <span class="p">}</span>
+<a name="line-358"></a>
+<a name="line-359"></a> <span class="o">*</span><span class="n">concrete_mods</span> <span class="o">=</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-360"></a><span class="p">}</span>
+<a name="line-361"></a>
+<a name="line-362"></a><span class="kt">void</span>
+<a name="line-363"></a><span class="nf">egg_keymap_virtualize_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-364"></a> <span class="n">GdkModifierType</span> <span class="n">concrete_mods</span><span class="p">,</span>
+<a name="line-365"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-366"></a><span class="p">{</span>
+<a name="line-367"></a> <span class="n">GdkModifierType</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-368"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-369"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-370"></a>
+<a name="line-371"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-372"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">virtual_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-373"></a>
+<a name="line-374"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-375"></a>
+<a name="line-376"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-377"></a>
+<a name="line-378"></a> <span class="n">virtual</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-379"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-380"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-381"></a> <span class="p">{</span>
+<a name="line-382"></a> <span class="k">if</span> <span class="p">((</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">)</span> <span class="o">&amp;</span> <span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-383"></a> <span class="p">{</span>
+<a name="line-384"></a> <span class="n">EggVirtualModifierType</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-385"></a>
+<a name="line-386"></a> <span class="n">cleaned</span> <span class="o">=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="o">~</span><span class="p">(</span><span class="n">EGG_VIRTUAL_MOD2_MASK</span> <span class="o">|</span>
+<a name="line-387"></a> <span class="n">EGG_VIRTUAL_MOD3_MASK</span> <span class="o">|</span>
+<a name="line-388"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span> <span class="o">|</span>
+<a name="line-389"></a> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">);</span>
+<a name="line-390"></a>
+<a name="line-391"></a> <span class="k">if</span> <span class="p">(</span><span class="n">cleaned</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-392"></a> <span class="p">{</span>
+<a name="line-393"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-394"></a> <span class="p">}</span>
+<a name="line-395"></a> <span class="k">else</span>
+<a name="line-396"></a> <span class="p">{</span>
+<a name="line-397"></a> <span class="cm">/* Rather than dropping mod2-&gt;mod5 if not bound,</span>
+<a name="line-398"></a><span class="cm"> * go ahead and use the concrete names</span>
+<a name="line-399"></a><span class="cm"> */</span>
+<a name="line-400"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-401"></a> <span class="p">}</span>
+<a name="line-402"></a> <span class="p">}</span>
+<a name="line-403"></a>
+<a name="line-404"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-405"></a> <span class="p">}</span>
+<a name="line-406"></a>
+<a name="line-407"></a> <span class="o">*</span><span class="n">virtual_mods</span> <span class="o">=</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-408"></a><span class="p">}</span>
+<a name="line-409"></a>
+<a name="line-410"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-411"></a><span class="nf">reload_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-412"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">)</span>
+<a name="line-413"></a><span class="p">{</span>
+<a name="line-414"></a> <span class="n">XModifierKeymap</span> <span class="o">*</span><span class="n">xmodmap</span><span class="p">;</span>
+<a name="line-415"></a> <span class="kt">int</span> <span class="n">map_size</span><span class="p">;</span>
+<a name="line-416"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-417"></a>
+<a name="line-418"></a> <span class="cm">/* FIXME multihead */</span>
+<a name="line-419"></a> <span class="n">xmodmap</span> <span class="o">=</span> <span class="n">XGetModifierMapping</span> <span class="p">(</span><span class="n">gdk_x11_get_default_xdisplay</span> <span class="p">());</span>
+<a name="line-420"></a>
+<a name="line-421"></a> <span class="n">memset</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">));</span>
+<a name="line-422"></a>
+<a name="line-423"></a> <span class="cm">/* there are 8 modifiers, and the first 3 are shift, shift lock,</span>
+<a name="line-424"></a><span class="cm"> * and control</span>
+<a name="line-425"></a><span class="cm"> */</span>
+<a name="line-426"></a> <span class="n">map_size</span> <span class="o">=</span> <span class="mi">8</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-427"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-428"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">map_size</span><span class="p">)</span>
+<a name="line-429"></a> <span class="p">{</span>
+<a name="line-430"></a> <span class="cm">/* get the key code at this point in the map,</span>
+<a name="line-431"></a><span class="cm"> * see if its keysym is one we&#39;re interested in</span>
+<a name="line-432"></a><span class="cm"> */</span>
+<a name="line-433"></a> <span class="kt">int</span> <span class="n">keycode</span> <span class="o">=</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">modifiermap</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-434"></a> <span class="n">GdkKeymapKey</span> <span class="o">*</span><span class="n">keys</span><span class="p">;</span>
+<a name="line-435"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">keyvals</span><span class="p">;</span>
+<a name="line-436"></a> <span class="kt">int</span> <span class="n">n_entries</span><span class="p">;</span>
+<a name="line-437"></a> <span class="kt">int</span> <span class="n">j</span><span class="p">;</span>
+<a name="line-438"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-439"></a>
+<a name="line-440"></a> <span class="n">keys</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-441"></a> <span class="n">keyvals</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-442"></a> <span class="n">n_entries</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-443"></a>
+<a name="line-444"></a> <span class="n">gdk_keymap_get_entries_for_keycode</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-445"></a> <span class="n">keycode</span><span class="p">,</span>
+<a name="line-446"></a> <span class="o">&amp;</span><span class="n">keys</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">keyvals</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">n_entries</span><span class="p">);</span>
+<a name="line-447"></a>
+<a name="line-448"></a> <span class="n">mask</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-449"></a> <span class="n">j</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-450"></a> <span class="k">while</span> <span class="p">(</span><span class="n">j</span> <span class="o">&lt;</span> <span class="n">n_entries</span><span class="p">)</span>
+<a name="line-451"></a> <span class="p">{</span>
+<a name="line-452"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Num_Lock</span><span class="p">)</span>
+<a name="line-453"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_NUM_LOCK_MASK</span><span class="p">;</span>
+<a name="line-454"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Scroll_Lock</span><span class="p">)</span>
+<a name="line-455"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SCROLL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-456"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_L</span> <span class="o">||</span>
+<a name="line-457"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_R</span><span class="p">)</span>
+<a name="line-458"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-459"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_L</span> <span class="o">||</span>
+<a name="line-460"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_R</span><span class="p">)</span>
+<a name="line-461"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-462"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_L</span> <span class="o">||</span>
+<a name="line-463"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_R</span><span class="p">)</span>
+<a name="line-464"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-465"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Mode_switch</span><span class="p">)</span>
+<a name="line-466"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MODE_SWITCH_MASK</span><span class="p">;</span>
+<a name="line-467"></a>
+<a name="line-468"></a> <span class="o">++</span><span class="n">j</span><span class="p">;</span>
+<a name="line-469"></a> <span class="p">}</span>
+<a name="line-470"></a>
+<a name="line-471"></a> <span class="cm">/* Mod1Mask is 1 &lt;&lt; 3 for example, i.e. the</span>
+<a name="line-472"></a><span class="cm"> * fourth modifier, i / keyspermod is the modifier</span>
+<a name="line-473"></a><span class="cm"> * index</span>
+<a name="line-474"></a><span class="cm"> */</span>
+<a name="line-475"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="o">/</span><span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">]</span> <span class="o">|=</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-476"></a>
+<a name="line-477"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">);</span>
+<a name="line-478"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keys</span><span class="p">);</span>
+<a name="line-479"></a>
+<a name="line-480"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-481"></a> <span class="p">}</span>
+<a name="line-482"></a>
+<a name="line-483"></a> <span class="cm">/* Add in the not-really-virtual fixed entries */</span>
+<a name="line-484"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_SHIFT</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-485"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_CONTROL</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-486"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LOCK</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-487"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD1</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-488"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD2</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">;</span>
+<a name="line-489"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD3</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">;</span>
+<a name="line-490"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD4</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">;</span>
+<a name="line-491"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD5</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">;</span>
+<a name="line-492"></a>
+<a name="line-493"></a> <span class="n">XFreeModifiermap</span> <span class="p">(</span><span class="n">xmodmap</span><span class="p">);</span>
+<a name="line-494"></a><span class="p">}</span>
+<a name="line-495"></a>
+<a name="line-496"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span>
+<a name="line-497"></a><span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">)</span>
+<a name="line-498"></a><span class="p">{</span>
+<a name="line-499"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-500"></a>
+<a name="line-501"></a> <span class="cm">/* This is all a hack, much simpler when we can just</span>
+<a name="line-502"></a><span class="cm"> * modify GDK directly.</span>
+<a name="line-503"></a><span class="cm"> */</span>
+<a name="line-504"></a>
+<a name="line-505"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-506"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">);</span>
+<a name="line-507"></a>
+<a name="line-508"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span>
+<a name="line-509"></a> <span class="p">{</span>
+<a name="line-510"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_new0</span> <span class="p">(</span><span class="n">EggModmap</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-511"></a>
+<a name="line-512"></a> <span class="cm">/* FIXME modify keymap change events with an event filter</span>
+<a name="line-513"></a><span class="cm"> * and force a reload if we get one</span>
+<a name="line-514"></a><span class="cm"> */</span>
+<a name="line-515"></a>
+<a name="line-516"></a> <span class="n">reload_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span> <span class="n">modmap</span><span class="p">);</span>
+<a name="line-517"></a>
+<a name="line-518"></a> <span class="n">g_object_set_data_full</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-519"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">,</span>
+<a name="line-520"></a> <span class="n">modmap</span><span class="p">,</span>
+<a name="line-521"></a> <span class="n">g_free</span><span class="p">);</span>
+<a name="line-522"></a> <span class="p">}</span>
+<a name="line-523"></a>
+<a name="line-524"></a> <span class="n">g_assert</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-525"></a>
+<a name="line-526"></a> <span class="k">return</span> <span class="n">modmap</span><span class="p">;</span>
+<a name="line-527"></a><span class="p">}</span>
+</pre></div>
+</td></tr></table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/index.html b/[email protected]_master/index.html
new file mode 100644
index 0000000..390cedb
--- /dev/null
+++ b/[email protected]_master/index.html
@@ -0,0 +1,104 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Defect summary;</a> </p>
+
+ <label><input type="checkbox" onclick="toggle_all()" checked> Toggle all</label>
+ <table>
+ <tr><th>Show</th><th>#</th><th>Defect ID</th></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='duplicateExpression' name='duplicateExpression' checked></td><td>1</td><td>duplicateExpression</td></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='missingIncludeSystem' name='missingIncludeSystem' checked></td><td>1</td><td>missingIncludeSystem</td></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='shadowArgument' name='shadowArgument' checked></td><td>1</td><td>shadowArgument</td></tr>
+ <tr><td></td><td>3</td><td>total</td></tr>
+ </table>
+ <p><a href="stats.html">Statistics</a></p>
+ </div>
+ <div id="content_index">
+
+ <table>
+ <tr><th>Line</th><th>Id</th><th>CWE</th><th>Severity</th><th>Message</th></tr>
+ <tr><td colspan='5'><a href='2.html'></a></td></tr>
+ <tr class="missingIncludeSystem"><td><a href="2.html#line-0">0</a></td><td>missingIncludeSystem</td><td></td><td>information</td><td >Cppcheck cannot find all the include files (use --check-config for details)</td></tr>
+ <tr><td colspan='5'><a href='0.html'>src/applet-main.c</a></td></tr>
+ <tr class="shadowArgument"><td><a href="0.html#line-544">544</a></td><td>shadowArgument</td><td><a href='https://cwe.mitre.org/data/definitions/398.html'>398</a></td><td>style</td><td >Local variable &apos;entry&apos; shadows outer argument</td></tr>
+ <tr><td colspan='5'><a href='1.html'>src/eggaccelerators.c</a></td></tr>
+ <tr class="duplicateExpression"><td><a href="1.html#line-321">321</a></td><td>duplicateExpression</td><td><a href='https://cwe.mitre.org/data/definitions/398.html'>398</a></td><td>style</td><td >Same expression on both sides of &apos;-=&apos;.</td></tr>
+ </table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/stats.html b/[email protected]_master/stats.html
new file mode 100644
index 0000000..490b8a8
--- /dev/null
+++ b/[email protected]_master/stats.html
@@ -0,0 +1,90 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: Statistics </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Back to summary</a> </p>
+
+ </div>
+ <div id="content_index">
+<p>Top 10 files for style severity, total findings: 2</br>
+&#160;&#160;&#160;1&#160;<a href="1.html"> src/eggaccelerators.c</a></br>
+&#160;&#160;&#160;1&#160;<a href="0.html"> src/applet-main.c</a></br>
+</p>
+
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/style.css b/[email protected]_master/style.css
new file mode 100644
index 0000000..c39571c
--- /dev/null
+++ b/[email protected]_master/style.css
@@ -0,0 +1,149 @@
+
+body {
+ font: 13px Arial, Verdana, Sans-Serif;
+ margin: 0;
+ width: auto;
+}
+
+h1 {
+ margin: 10px;
+}
+
+#footer > p {
+ margin: 4px;
+}
+
+.error {
+ background-color: #ffb7b7;
+}
+
+.error2 {
+ background-color: #faa;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+.inconclusive {
+ background-color: #B6B6B4;
+}
+
+.inconclusive2 {
+ background-color: #B6B6B4;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+div.verbose {
+ display: inline-block;
+ vertical-align: top;
+ cursor: help;
+}
+
+div.verbose div.content {
+ display: none;
+ position: absolute;
+ padding: 10px;
+ margin: 4px;
+ max-width: 40%;
+ white-space: pre-wrap;
+ border: 1px solid black;
+ background-color: #FFFFCC;
+ cursor: auto;
+}
+
+.highlight .hll {
+ padding: 1px;
+}
+
+#header {
+ border-bottom: thin solid #aaa;
+}
+
+#menu {
+ float: left;
+ margin-top: 5px;
+ text-align: left;
+ width: 150px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu_index {
+ float: left;
+ margin-top: 5px;
+ padding-left: 5px;
+ text-align: left;
+ width: 300px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu > a {
+ display: block;
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+#filename {
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+.highlighttable {
+ background-color:white;
+ z-index: 10;
+ position: relative;
+ margin: -10 px;
+}
+
+#content {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 150px;
+}
+
+#content_index {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 300px;
+}
+
+.linenos {
+ border-right: thin solid #aaa;
+ color: lightgray;
+ padding-right: 6px;
+}
+
+#footer {
+ border-top: thin solid #aaa;
+ clear: both;
+ font-size: 90%;
+ margin-top: 5px;
+}
+
+#footer ul {
+ list-style-type: none;
+ padding-left: 0;
+}
diff --git a/[email protected]_master/0.html b/[email protected]_master/0.html
new file mode 100644
index 0000000..dfb584a
--- /dev/null
+++ b/[email protected]_master/0.html
@@ -0,0 +1,1208 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/eggaccelerators.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> eggaccelerators.c</p>
+<a href='0.html#line-321'> duplicateExpression 321</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/* eggaccelerators.c</span>
+<a name="line-2"></a><span class="cm"> * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik</span>
+<a name="line-3"></a><span class="cm"> * Developed by Havoc Pennington, Tim Janik</span>
+<a name="line-4"></a><span class="cm"> *</span>
+<a name="line-5"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span>
+<a name="line-6"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span>
+<a name="line-7"></a><span class="cm"> * License as published by the Free Software Foundation; either</span>
+<a name="line-8"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span>
+<a name="line-9"></a><span class="cm"> *</span>
+<a name="line-10"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span>
+<a name="line-11"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="line-12"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<a name="line-13"></a><span class="cm"> * Library General Public License for more details.</span>
+<a name="line-14"></a><span class="cm"> *</span>
+<a name="line-15"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span>
+<a name="line-16"></a><span class="cm"> * License along with this library; if not, write to the</span>
+<a name="line-17"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA</span>
+<a name="line-18"></a><span class="cm"> */</span>
+<a name="line-19"></a>
+<a name="line-20"></a><span class="cp">#include</span> <span class="cpf">&quot;eggaccelerators.h&quot;</span><span class="cp"></span>
+<a name="line-21"></a>
+<a name="line-22"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkx.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a>
+<a name="line-26"></a><span class="k">enum</span>
+<a name="line-27"></a><span class="p">{</span>
+<a name="line-28"></a> <span class="n">EGG_MODMAP_ENTRY_SHIFT</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
+<a name="line-29"></a> <span class="n">EGG_MODMAP_ENTRY_LOCK</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
+<a name="line-30"></a> <span class="n">EGG_MODMAP_ENTRY_CONTROL</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
+<a name="line-31"></a> <span class="n">EGG_MODMAP_ENTRY_MOD1</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span>
+<a name="line-32"></a> <span class="n">EGG_MODMAP_ENTRY_MOD2</span> <span class="o">=</span> <span class="mi">4</span><span class="p">,</span>
+<a name="line-33"></a> <span class="n">EGG_MODMAP_ENTRY_MOD3</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
+<a name="line-34"></a> <span class="n">EGG_MODMAP_ENTRY_MOD4</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span>
+<a name="line-35"></a> <span class="n">EGG_MODMAP_ENTRY_MOD5</span> <span class="o">=</span> <span class="mi">7</span><span class="p">,</span>
+<a name="line-36"></a> <span class="n">EGG_MODMAP_ENTRY_LAST</span> <span class="o">=</span> <span class="mi">8</span>
+<a name="line-37"></a><span class="p">};</span>
+<a name="line-38"></a>
+<a name="line-39"></a><span class="cp">#define MODMAP_ENTRY_TO_MODIFIER(x) (1 &lt;&lt; (x))</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="k">typedef</span> <span class="k">struct</span>
+<a name="line-42"></a><span class="p">{</span>
+<a name="line-43"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">];</span>
+<a name="line-44"></a>
+<a name="line-45"></a><span class="p">}</span> <span class="n">EggModmap</span><span class="p">;</span>
+<a name="line-46"></a>
+<a name="line-47"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span> <span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-48"></a>
+<a name="line-49"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-50"></a><span class="nf">is_alt</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-51"></a><span class="p">{</span>
+<a name="line-52"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-53"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-54"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-55"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-56"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-57"></a><span class="p">}</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-60"></a><span class="nf">is_ctl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-61"></a><span class="p">{</span>
+<a name="line-62"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-63"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-64"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-65"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-66"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-67"></a><span class="p">}</span>
+<a name="line-68"></a>
+<a name="line-69"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-70"></a><span class="nf">is_modx</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-71"></a><span class="p">{</span>
+<a name="line-72"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-73"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-74"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-75"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;d&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;D&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-76"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="sc">&#39;1&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&lt;=</span> <span class="sc">&#39;5&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-77"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-78"></a><span class="p">}</span>
+<a name="line-79"></a>
+<a name="line-80"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-81"></a><span class="nf">is_ctrl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-82"></a><span class="p">{</span>
+<a name="line-83"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-84"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-85"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-86"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-87"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-88"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-89"></a><span class="p">}</span>
+<a name="line-90"></a>
+<a name="line-91"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-92"></a><span class="nf">is_shft</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-93"></a><span class="p">{</span>
+<a name="line-94"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-95"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-96"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-97"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-98"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-99"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-100"></a><span class="p">}</span>
+<a name="line-101"></a>
+<a name="line-102"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-103"></a><span class="nf">is_shift</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-104"></a><span class="p">{</span>
+<a name="line-105"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-106"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-107"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-108"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;i&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;I&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-109"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-110"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-111"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-112"></a><span class="p">}</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-115"></a><span class="nf">is_control</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-116"></a><span class="p">{</span>
+<a name="line-117"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-118"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-119"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-120"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;n&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;N&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-121"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-122"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-123"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-124"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-125"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-126"></a><span class="p">}</span>
+<a name="line-127"></a>
+<a name="line-128"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-129"></a><span class="nf">is_release</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-130"></a><span class="p">{</span>
+<a name="line-131"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-132"></a> <span class="p">(</span>