summaryrefslogtreecommitdiffstats
path: root/perl-install/pixmaps/exit.png
blob: 7e4e1e1d5800bee2608ef6a324b84a797305ea03 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 30 00 00 00 30 08 06 00 00 00 57 02 f9 .PNG........IHDR...0...0.....W..
0020 87 00 00 00 04 67 41 4d 41 00 00 d6 d8 d4 4f 58 32 00 00 00 19 74 45 58 74 53 6f 66 74 77 61 72 .....gAMA.....OX2....tEXtSoftwar
0040 65 00 41 64 6f 62 65 20 49 6d 61 67 65 52 65 61 64 79 71 c9 65 3c 00 00 07 d7 49 44 41 54 78 da e.Adobe.ImageReadyq.e<....IDATx.
0060 62 f8 ff ff 3f 03 b5 b0 90 4a 00 1f 35 cd 23 06 03 04 10 13 03 15 01 1f 1f ff bb f2 96 bd ff 81 b...?....J..5.#.................
0080 f8 1f 31 ea 19 19 19 7f 37 36 36 fe 4f 4c 4c fc 0f 64 83 f0 5b 52 ed 04 08 20 aa 7a 40 58 50 84 ..1.....766.OLL..d..[R.....z@XP.
00a0 f9 f1 fd 8b 0c 53 3b 43 19 89 71 fc aa 55 ab 58 ea eb eb 19 14 14 14 60 c2 42 50 8f ec 24 d6 4e .....S;C..q..U.X.......`.BP..$.N
00c0 80 00 a2 5a 54 0a ab 06 fe cb ae dc f0 5f c7 d0 fd 3f d0 5c 30 c6 9b dc 84 84 fe bf 7f ff 1e a4 ...ZT........_...?.\0...........
00e0 e6 3f d0 03 70 3d 20 dc d9 d9 09 a2 77 12 63 2f 40 00 51 cd 03 4a c6 89 ff f3 ab 37 a0 38 c4 cd .?..p=......w.c/@.Q..J.....7.8..
0100 cd 0d ab 43 40 72 09 09 09 60 c7 cf 9f 3f 1f 45 8f 83 83 03 58 fc c8 91 23 44 79 02 20 80 a8 95 ...C@r...`...?.E....X...#Dy.....
0120 79 bf 87 a7 ce fa 6f ed 14 87 e2 98 fb f7 ef ff 3f 73 e6 0c d8 51 40 3e 28 5f bc 6d 68 68 00 cb y.....o.........?s...Q@>(_.mhh..
0140 9d 3f 7f 1e ec 50 a8 1c 1c 83 3c 04 03 33 67 ce fc 4f c8 6e 80 00 a2 4a 1e 60 65 65 e3 90 10 13 .?...P....<..3g..O.n...J.`ee....
0160 63 b8 72 6e 17 5c 2c 20 20 00 9c b6 8d 8d 8d 19 04 04 04 c0 c9 de c0 c0 40 48 5e 5e 1e 2c ef e8 c.rn.\,.................@H^^.,..
0180 e8 c8 a0 a8 a8 88 9c fe c1 6c 60 cc c0 f9 db b7 6f 07 e5 15 bc 05 02 40 00 51 23 f4 df da fb 37 .........l`.....o......@.Q#....7
01a0 fe 4f c8 9a f9 1f e8 50 78 48 ee df bf 1f 1c 8a a0 58 40 0e dd f5 eb d7 c3 d5 c1 92 0b 48 2d d0 .O.....PxH.......X@..........H-.
01c0 73 ff 41 b1 03 03 c8 fa f0 d9 0f 10 40 14 c7 00 13 13 b3 90 91 be 29 83 85 85 09 03 d0 21 e0 d0 s.A.........@.........)......!..
01e0 06 85 24 d0 71 60 f9 89 13 27 82 69 90 f8 c5 8b 17 c1 f8 c3 87 0f 60 b1 f8 f8 78 30 0d 52 0b f4 ..$.q`...'.i..........`...x0.R..
0200 1c c3 86 0d 1b e0 72 0b 17 2e 44 2e b1 70 16 af 00 01 44 71 0c 68 59 67 fd 2f 6b de f3 ff cc c5 ......r...D..p....Dq.hYg./k.....
0220 67 e0 90 03 95 2c c0 e4 03 2f 61 60 a1 0d 0a 61 90 38 2c cd 83 c4 61 6a 40 00 94 a9 91 33 37 72 g....,.../a`...a.8,...aj@....37r
0240 2c 81 f2 0f 2e fb 01 02 88 d2 e4 f3 33 a9 60 f9 ff f6 c9 47 e0 0e 01 25 11 e4 12 05 e4 10 58 31 ,...........3.`....G...%......X1
0260 59 50 50 00 f6 08 c8 91 20 31 58 46 46 4e 2e 48 8e 86 27 3b 7c c9 08 20 80 28 4a 42 dc dc 3c 6c YPP......1XFFN.H..';|....(JB..<l
0280 22 c2 a2 0c 27 f6 4e 86 8b 21 47 3d 28 29 01 43 19 9e 9c 1e 3c 78 c0 00 74 34 03 a8 f2 02 b1 0d "...'.N..!G=().C....<x..t4......
02a0 0d 0d 19 80 b5 30 3c 99 c1 00 2c 19 81 f4 43 0b 00 9c 00 20 80 28 09 fd af de 51 bd ff 03 a3 1a .....0<...,...C......(....Q.....
02c0 e1 51 8f 1e 92 a0 cc 09 4a 26 b0 e4 00 2b 22 41 31 81 2b c4 41 6a 41 fa 40 34 48 3d 4c 0e 97 3b .Q......J&...+"A1.+.AjA.@4H=L..;
02e0 00 02 88 6c 0f 88 69 84 fe 2f 69 dc f5 5f 55 d3 1a c5 72 18 1b 94 44 90 2b 2a 90 1c 0c 20 ab 83 ...l..i../i.._U...r...D.+*......
0300 d5 17 30 4f 81 f2 09 08 f4 f7 f7 c3 03 04 e4 21 5c 9e 00 08 20 16 b2 da 3c aa 81 cf 14 e5 95 19 ..0O...........!\.......<.......
0320 3e 7f 7a cd 70 fb fa 51 b8 38 d0 11 0c fa fa fa 0c c0 06 1a 03 30 ad 33 1c 38 70 00 5c ea c0 ca >.z.p..Q.8...........0.3.8p.\...
0340 7a 50 d9 8f 0e 60 f5 05 d0 c1 e0 a4 e3 ef ef 0f 16 df b8 71 23 c3 c3 87 0f c1 c9 0f 94 dc a0 a5 zP...`.............q#...........
0360 11 c8 23 ef 80 0e 17 86 e9 07 08 20 b2 42 5f 44 2d e8 3f a8 dd 93 98 35 11 25 34 61 a5 0a 72 f3 ..#..........B_D-.?....5.%4a..r.
0380 00 94 51 91 db 3a a0 a4 06 52 07 2a f3 41 7a 41 99 1e 06 40 fa 40 18 16 f2 b0 64 04 ca f8 c8 c9 ..Q..:...R.*.AzA...@.@....d.....
03a0 14 14 23 d0 d2 8a 01 20 80 c8 f2 80 8a 59 0a bc e8 04 39 10 64 11 ac f8 03 01 98 85 20 1a 64 19 ..#..........Y....9.d.........d.
03c0 28 59 20 7b 08 06 40 9e 40 d6 07 4a ef 20 cf 82 c4 40 66 82 30 48 3d 36 bd a1 a1 a1 60 0f 00 04 (Y.{..@.@..J.....@f.0H=6....`...
03e0 10 39 99 f7 17 a8 dd 53 df 7d 00 a5 e8 84 85 2c b2 85 a0 74 0d 4a cb e8 0d 35 18 40 2e 5e 91 0b .9.....S.}.....,...t.J...5.@.^..
0400 00 58 80 c0 30 2c 30 60 60 f7 ee dd f0 fc 00 10 40 24 7b 40 4a 3b 02 1c fa bb 0f de c3 a8 84 40 .X..0,0``.......@${@J;.........@
0420 16 a3 97 28 c8 25 0e 48 0e d6 c4 40 ae 2f 60 0e 84 65 7e 10 46 6f a5 82 02 02 39 e6 60 ee 01 08 ...(.%.H...@./`..e~.Fo....9.`...
0440 20 16 12 33 ef 17 5d 6d 43 30 fb db 87 cb 40 52 11 9c f1 40 4d 00 58 f9 0d 6a 1e 80 9a 14 a0 86 ...3..]mC0....@R...@M.X..j......
0460 1a 08 5c b8 70 01 64 11 23 52 b3 60 27 d0 01 6e a0 0c 0e 03 a0 b2 1e 56 de c3 1a 73 07 0f 1e 04 ..\.p.d.#R.`'..n.......V...s....
0480 67 6e a0 47 c1 75 05 28 43 83 f4 80 ec 00 ea 7f 07 aa 4b 40 00 20 80 48 0a 7d 51 f5 e0 ff 85 75 gn.G.u.(C.........K@...H.}Q....u
04a0 db c0 31 00 6a ab 83 da ec c8 21 05 6b 1e c0 8a 3d bc e5 37 52 e8 82 42 1c 56 5f 80 92 12 2c d9 ..1.j.....!.k...=..7R..B.V_...,.
04c0 81 62 0f 39 4f 61 33 13 20 80 48 49 fb 37 f5 ec f3 c1 8e 07 b6 3e ff 41 1d b1 53 54 54 14 a5 84 .b.9Oa3...HI.7.......>.A..STT...
04e0 41 4e 52 04 3b 23 68 c9 03 44 23 07 08 ac c4 41 76 3c ba b9 00 01 44 42 97 31 e8 3f a8 dd 93 5c ANR.;#h..D#....Av<....DB.1.?...\
0500 b8 fc 3f d0 33 7f b1 39 04 94 36 91 32 e3 6f 22 3c b0 53 45 45 05 ac 07 84 61 79 08 14 00 b0 4c ..?.3..9..6.2.o"<.SEE....ay....L
0520 0b 0b 0c 24 8c d2 4b 03 08 20 a2 3d a0 68 94 00 0e 7d 6d 9b 6c 7c c9 02 d4 ec 7d 4b 4a b2 04 3a ...$..K....=.h...}m.l|....}KJ..:
0540 f8 1f 28 43 c3 7a 6a b0 e2 12 96 b4 f0 85 3e 08 03 04 10 0b 91 99 f7 a7 a5 99 2d c3 ef df bf 18 ..(C.zj.......>...........-.....
0560 9e bf 78 fa 07 4f bb 4a 98 d4 5a 1d 98 44 98 c2 c2 c2 40 45 23 38 23 83 6a 66 50 2d 0c 03 a0 c6 ..x..O.J..Z..D....@E#8#.jfP-....
0580 1f 28 e3 82 1a 89 0b 16 2c 78 87 ae 1f 20 80 88 f2 00 2b 0b 2b 9b a6 ba 2e c3 b1 93 07 41 dc 17 .(......,x........+.+........A..
05a0 0c 54 06 ab 57 af 06 d3 a0 4e 0d 08 80 9a 22 20 90 9f 9f 0f 6e 92 80 c0 ad 5b b7 40 f2 18 01 04 .T..W....N....".....n....[.@....
05c0 10 40 c4 64 de 57 e6 1e 95 e0 86 1b b0 14 fa 47 ab 11 36 50 72 41 6f a5 c2 9a 26 20 1a 94 d4 b0 .@.d.W.........G..6PrAo...&.....
05e0 e9 03 08 20 26 c2 5d 46 26 51 13 43 73 86 eb 37 2f 33 fc fd fb f7 27 30 39 b1 32 d0 00 64 66 66 ....&.]F&Q.Cs..7/3....'09.2..dff
0600 82 92 08 b8 1e 00 95 fd a0 90 07 f1 41 65 ff d6 ad 5b c1 49 0d 9b 3e 80 00 22 18 32 9a 56 99 e0 ............Ae...[.I..>..".2.V..
0620 cc 2b a7 1f f3 9f 96 63 9c b0 e2 18 54 6c a2 f7 2b f0 15 c9 00 01 84 37 06 80 ad ce 7f 7a c0 9a .+.....c....Tl..+......7.....z..
0640 f7 d5 eb 17 0c 5f be 7e f9 cd 40 43 f0 fa f5 6b f8 60 00 72 af 0e 0a 76 e1 d2 07 10 40 78 3d c0 ....._.~..@C...k.`.r...v....@x=.
0660 ce ce c1 28 2f a7 04 cc bc 87 18 de de 5e cf c6 40 5b f0 1f d6 8c 00 25 1d b4 54 e2 8e 4b 13 40 ...(/........^..@[.....%..T..K.@
0680 00 b1 e0 28 36 41 e9 fc 83 91 81 39 c3 e7 2f 9f 18 de be 7b fd 9f 81 d6 ae ff ff 9f c9 c4 c4 e4 ...(6A.....9../....{............
06a0 ff ed db b7 e1 1d 18 28 f8 83 4f 1f 40 00 61 8d 01 60 68 ff 66 62 62 e6 d2 d5 d2 67 38 77 e1 14 .......(..O.@.a..`h.fbb....g8w..
06c0 c8 f0 87 0c 74 00 67 ce 9c 61 5c b2 64 09 23 b2 a3 81 76 e3 2d 34 00 02 08 57 0c dc 54 00 26 1d ....t.g..a\.d.#...v.-4...W..T.&.
06e0 66 66 16 86 7b 0f 6e ff 07 7a 48 91 81 8e 80 90 a3 91 01 40 00 31 e1 18 bb 57 03 25 9f 4b 57 cf ff..{.n..zH........@.1...W.%.KW.
0700 83 8a ce 4f 0c 83 18 00 04 10 56 0f f0 f1 f2 33 08 09 0a 33 5c ba 72 0e 94 9c 04 06 b3 07 00 02 ...O......V....3...3\.r.........
0720 88 09 b3 e8 0c fe 67 a8 6f ca f0 f8 c9 03 86 5f bf 7e fe 65 18 e4 00 20 80 30 3c c0 cc cc c4 a8 ......g.o......_.~.e.....0<.....
0740 a4 a0 ca 70 16 98 79 81 a1 cf 32 d8 3d 00 10 40 4c 68 99 f7 95 ba aa 36 c3 d7 6f 5f e8 52 74 52 ...p..y...2.=..@Lh.....6..o_.RtR
0760 03 00 04 10 13 6a e6 65 12 d5 d3 31 64 38 76 e2 20 a8 24 b8 3f 14 3c 00 10 40 28 1e 10 13 15 67 .....j.e...1d8v...$.?.<..@(....g
0780 60 63 65 63 78 fa ec 31 28 f9 28 0f 05 0f 00 04 10 dc 03 a0 0e bb 91 be 19 c3 95 6b 17 19 fe fd `cecx..1(.(................k....
07a0 ff f7 9e 61 88 00 80 00 82 7b 80 8d 8d 9d 41 5a 4a 96 e1 f2 b5 0b a0 d0 17 1a 2a 1e 00 08 20 16 ...a.....{....AZJ.........*.....
07c0 50 bb 07 58 e3 7e 37 31 32 67 b8 7b ff 16 a8 e8 fc cd 30 84 00 40 00 31 81 da 3d ff ff ff 63 d6 P..X.~712g.{......0..@.1..=...c.
07e0 00 96 3e 67 ce 9d a0 47 ab 93 aa 00 20 80 98 80 31 70 47 5e 56 91 e1 e3 a7 8f c0 36 ff e7 ff 0c ..>g...G........1pG^V......6....
0800 43 0c 00 04 10 b0 c7 c8 a4 6c 0c 6c f7 9c 3d 7f 82 e1 cd ad 75 4c 43 cd 03 00 01 c4 f4 ef df bf C........l.l..=.....uLC.........
0820 4b 5c 5c 3c ef 9f 3c 7b 3c e4 42 1f 04 00 02 0c 00 3e b4 ac 51 be a2 cc 04 00 00 00 00 49 45 4e K\\<..<{<.B......>..Q........IEN
0840 44 ae 42 60 82 D.B`.
ref='#n439'>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 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444
package ugtk2;

use diagnostics;
use strict;
use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $force_center $force_focus $force_position $grab $pop_it $border); #- leave it on one line, for automatic removal of the line at package creation

@ISA = qw(Exporter);
%EXPORT_TAGS = (
    wrappers => [ qw(gtkadd gtkappend gtkappend_page gtkappenditems gtkcombo_setpopdown_strings gtkdestroy
                     gtkentry gtkexpand gtkflush gtkhide gtkmodify_font gtkmove gtkpack gtkpack2 gtkpack2_
                     gtkpack2__ gtkpack_ gtkpack__ gtkpowerpack gtkput gtkradio gtkresize gtkroot
                     gtkset_active gtkset_border_width gtkset_editable gtkset_justify gtkset_alignment gtkset_layout gtkset_markup
                     gtkset_modal gtkset_mousecursor gtkset_mousecursor_normal gtkset_mousecursor_wait gtkset_name
                     gtkset_property gtkset_relief gtkset_selectable gtkset_sensitive gtkset_shadow_type gtkset_size_request
                     gtkset_text gtkset_tip gtkset_visibility gtksetstyle gtkshow gtksignal_connect gtksize gtktext_append
                     gtktext_insert ) ],

    helpers => [ qw(add2notebook add_icon_path fill_tiled fill_tiled_coords get_text_coord gtkcolor gtkcreate_img
                    gtkcreate_pixbuf gtkfontinfo gtkset_background n_line_size set_back_pixbuf string_size
                    string_width string_height wrap_paragraph) ],

    create => [ qw(create_adjustment create_box_with_title create_dialog create_factory_menu create_factory_popup_menu
                   create_hbox create_hpaned create_menu create_notebook create_okcancel create_packtable
                   create_scrolled_window create_vbox create_vpaned _create_dialog ) ],

    ask => [ qw(ask_browse_tree_info ask_browse_tree_info_given_widgets ask_dir ask_from_entry ask_okcancel ask_warn
                ask_yesorno ) ],
    dialogs => [ qw(err_dialog warn_dialog) ],

);
$EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ];
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;

use c;
use log;
use common;

use Gtk2;
use Gtk2::Gdk::Keysyms;

unless ($::no_ugtk_init) {
    !check_for_xserver() and die "Cannot be run in console mode.\n";
    $::one_message_has_been_translated and warn("N() was called from $::one_message_has_been_translated BEFORE gtk2 initialisation, replace it with a N_() AND a translate() later.\n"), c::_exit(1);

    Gtk2->init;
    c::bind_textdomain_codeset($_, 'UTF8') foreach 'libDrakX', @::textdomains;
    $::need_utf8_i18n = 1;
}


$border = 5;


# -=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---
#                 wrappers
#
# Functional-style wrappers to existing Gtk functions; allows to program in
# a more functional way, and especially, first, to avoid using temp
# variables, and second, to "see" directly in the code the user interface
# you're building.

sub gtkdestroy                { $_[0] and $_[0]->destroy }
sub gtkflush()                { Gtk2->main_iteration while Gtk2->events_pending }
sub gtkhide                   { $_[0]->hide; $_[0] }
sub gtkmove                   { $_[0]->window->move($_[1], $_[2]); $_[0] }
sub gtkpack                   { gtkpowerpack(1, 1, @_) }
sub gtkpack_                  { gtkpowerpack('arg', 1, @_) }
sub gtkpack__                 { gtkpowerpack(0, 1, @_) }
sub gtkpack2                  { gtkpowerpack(1, 0, @_) }
sub gtkpack2_                 { gtkpowerpack('arg', 0, @_) }
sub gtkpack2__                { gtkpowerpack(0, 0, @_) }
sub gtkput                    { $_[0]->put(gtkshow($_[1]), $_[2], $_[3]); $_[0] }
sub gtkresize                 { $_[0]->window->resize($_[1], $_[2]); $_[0] }
sub gtkset_active             { $_[0]->set_active($_[1]); $_[0] }
sub gtkset_border_width       { $_[0]->set_border_width($_[1]); $_[0] }
sub gtkset_editable           { $_[0]->set_editable($_[1]); $_[0] }
sub gtkset_selectable         { $_[0]->set_selectable($_[1]); $_[0] }
sub gtkset_justify            { $_[0]->set_justify($_[1]); $_[0] }
sub gtkset_alignment          { $_[0]->set_alignment($_[1], $_[2]); $_[0] }
sub gtkset_layout             { $_[0]->set_layout($_[1]); $_[0] }
sub gtkset_modal              { $_[0]->set_modal($_[1]); $_[0] }
sub gtkset_mousecursor_normal { gtkset_mousecursor('left-ptr', @_) }
sub gtkset_mousecursor_wait   { gtkset_mousecursor('watch', @_) }
sub gtkset_relief             { $_[0]->set_relief($_[1]); $_[0] }
sub gtkset_sensitive          { $_[0]->set_sensitive($_[1]); $_[0] }
sub gtkset_visibility         { $_[0]->set_visibility($_[1]); $_[0] }
sub gtkset_tip                { $_[0]->set_tip($_[1], $_[2]) if $_[2]; $_[1] }
sub gtkset_shadow_type        { $_[0]->set_shadow_type($_[1]); $_[0] }
sub gtkset_style              { $_[0]->set_style($_[1]); $_[0] }
sub gtkset_size_request       { $_[0]->set_size_request($_[1], $_[2]); $_[0] }
sub gtkshow                   { $_[0]->show; $_[0] }
sub gtksize                   { $_[0]->size($_[1], $_[2]); $_[0] }
sub gtkexpand                 { $_[0]->expand; $_[0] }
sub gtkset_markup             { $_[0]->set_markup($_[1]); $_[0] }

sub gtkadd {
    my $w = shift;
    foreach (@_) {
	my $l = $_;
	ref $l or $l = Gtk2::Label->new($l);
	$w->add(gtkshow($l));
    }
    $w
}

sub gtkappend {
    my $w = shift;
    foreach (@_) {
	my $l = $_;
	ref $l or $l = Gtk2::Label->new($l);
	$w->append(gtkshow($l));
    }
    $w
}

sub gtkappenditems {
    my $w = shift;
    $_->show foreach @_;
    $w->append_items(@_);
    $w
}

# append page to a notebook
sub gtkappend_page {
    my $w = shift;
    $w->append_page(@_);
    $w
}

sub gtkentry {
    my ($text) = @_;
    my $e = Gtk2::Entry->new;
    $text and $e->set_text($text);
    $e;
}

sub gtksetstyle { 
    my ($w, $s) = @_;
    $w->set_style($s);
    $w;
}

sub gtkradio {
    my $def = shift;
    my $radio;
    map { gtkset_active($radio = Gtk2::RadioButton->new($radio ? $radio->get_group : undef, $_), $_ eq $def) } @_;
}

sub gtkroot() {
    my $root if 0;
    $root ||= Gtk2::Gdk->get_default_root_window;
}

sub gtkset_text {
    my ($w, $s) = @_;
    $w->set_text($s);
    $w;
}

sub gtkcombo_setpopdown_strings {
    my $w = shift;
    $w->set_popdown_strings(@_);
    $w;
}

sub gtkset_mousecursor {
    my ($type, $w) = @_;
    ($w || gtkroot())->set_cursor(Gtk2::Gdk::Cursor->new($type));
}

sub gtksignal_connect {
    my $w = shift;
    $w->signal_connect(@_);
    $w;
}

sub gtkset_name {
    my ($widget, $name) = @_;
    $widget->set_name($name);
    $widget;
}


sub gtkpowerpack {
    #- Get Default Attributes (if any). 2 syntaxes allowed :
    #- gtkpowerpack( {expand => 1, fill => 0}, $box...) : the attributes are picked from a specified hash ref
    #- gtkpowerpack(1, 0, 1, $box, ...) : the attributes are picked from the non-ref list, in the order (expand, fill, padding, pack_end).
    my @attributes_list = qw(expand fill padding pack_end);
    my $default_attrs = {};
    if (ref($_[0]) eq 'HASH') {
	$default_attrs = shift;
    } elsif (!ref($_[0])) {
	foreach (@attributes_list) {
	    ref($_[0]) and last;
	    $default_attrs->{$_} = shift;
	}
    }
    my $box = shift;

    while (@_) {
	#- Get attributes (if specified). 4 syntaxes allowed (default values are undef ie. false...) :
	#- gtkpowerpack({defaultattrs}, $box, $widget1, $widget2, ...) : the attrs are picked from the default ones (if they exist)
	#- gtkpowerpack($box, {fill=>1, expand=>0, ...}, $widget1, ...) : the attributes are picked from a specified hash ref
	#- gtkpowerpack($box, [1,0,1], $widget1, ...) : the attributes are picked from the array ref : (expand, fill, padding, pack_end).
	#- gtkpowerpack({attr=>'arg'}, $box, 1, $widget1, 0, $widget2, etc...) : the 'arg' value will tell gtkpowerpack to always read the 
	#- attr value directly in the arg list (avoiding confusion between value 0 and Gtk::Label("0"). That can simplify some writings but
	#- this arg(s) MUST then be present...
	my (%attr, $attrs);
	ref($_[0]) eq 'HASH' || ref($_[0]) eq 'ARRAY' and $attrs = shift;
	foreach (@attributes_list) {
	    if (($default_attrs->{$_} || '') eq 'arg') {
		ref($_[0]) and die "error in packing definition\n";
		$attr{$_} = shift;
		ref($attrs) eq 'ARRAY' and shift @$attrs;
	    } elsif (ref($attrs) eq 'HASH' && defined($attrs->{$_})) {
		$attr{$_} = $attrs->{$_};
	    } elsif (ref($attrs) eq 'ARRAY') {
		$attr{$_} = shift @$attrs;
	    } elsif (defined($default_attrs->{$_})) {
		$attr{$_} = int $default_attrs->{$_};
	    } else {
		$attr{$_} = 0;
	    }
	}
	#- Get and pack the widget (create it if necessary to  a label...)
	my $widget = ref($_[0]) ? shift : Gtk2::Label->new(shift);
	my $pack_call = 'pack_'.($attr{pack_end} ? 'end' : 'start');
	$box->$pack_call($widget, $attr{expand}, $attr{fill}, $attr{padding});
	$widget->show;
    }
    return $box;
}

sub gtktreeview_children {
    my ($model, $iter) = @_;
    my @l;
    $model && $iter or return;
    for (my $p = $model->iter_children($iter); $p; $p = $model->iter_next($p)) {
	push @l, $p;
    }
    @l;
}



# -=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---
#                 create
#
# Helpers that allow omitting common operations on common widgets
# (e.g. create widgets with good default properties)

sub create_pixbutton {
    my ($label, $pix, $reverse_order) = @_;
    my @label_and_pix = (0, $label, if_($pix, 0, $pix));
    gtkadd(Gtk2::Button->new,
	   gtkpack_(Gtk2::HBox->new(0, 3),
		    1, "",
		    $reverse_order ? reverse(@label_and_pix) : @label_and_pix,
		    1, ""));
}

sub create_adjustment {
    my ($val, $min, $max) = @_;
    Gtk2::Adjustment->new($val, $min, $max + 1, 1, ($max - $min + 1) / 10, 1);
}

sub create_scrolled_window {
    my ($W, $o_policy, $o_viewport_shadow) = @_;
    my $w = Gtk2::ScrolledWindow->new(undef, undef);
    $w->set_policy($o_policy ? @$o_policy : ('automatic', 'automatic'));
    if (member(ref($W), qw(Gtk2::Layout Gtk2::Text Gtk2::TextView Gtk2::TreeView))) {
	$w->add($W)
    } else {
	$w->add_with_viewport($W);
    }
    $o_viewport_shadow and gtkset_shadow_type($w->child, $o_viewport_shadow);
    $W->can('set_focus_vadjustment') and $W->set_focus_vadjustment($w->get_vadjustment);
    $W->show;
    if (ref($W) eq 'Gtk2::TextView') {
    	gtkadd(gtkset_shadow_type(Gtk2::Frame->new, 'in'), $w)
    } else {
	$w
    }
}

sub n_line_size {
    my ($nbline, $type, $widget) = @_;
    my $spacing = ${{ text => 3, various => 17 }}{$type};
    my %fontinfo = gtkfontinfo($widget);
    round($nbline * ($fontinfo{ascent} + $fontinfo{descent} + $spacing) + 8);
}

sub create_box_with_title {
    my $o = shift;

    my $nbline = sum(map { round(length($_) / 60 + 1/2) } map { split "\n" } @_);
    my $box = Gtk2::VBox->new(0,0);
    if ($nbline == 0) {
	$o->{box_size} = 0;
	return $box;
    }
    $o->{box_size} = n_line_size($nbline, 'text', $box);
    if (@_ <= 2 && ($nbline > 4 || ($nbline > 1 && ref($::o) && member($::o->{locale}{lang}, qw(ja))))) {