Added system tray icon... it'll do for now, even though it doesn't do anything yet

This commit is contained in:
Anna 2010-05-24 15:23:39 -04:00
parent 6fa0c8d7f7
commit e4a1823788
4 changed files with 29 additions and 1 deletions

View File

@ -32,3 +32,8 @@ To search for a user, prepend the search with 'user: '.
After the first run, the program will write a file called ~/.hrafn.conf, with default configuration. Feel free to edit this file if needed. After the first run, the program will write a file called ~/.hrafn.conf, with default configuration. Feel free to edit this file if needed.
If things get really mucked up, deleting ~/.hrafn.db will reset the application to a pristine state. You will have to re-authenticate, though. If things get really mucked up, deleting ~/.hrafn.db will reset the application to a pristine state. You will have to re-authenticate, though.
### Notes
The system tray icon is Public Domain from: http://commons.wikimedia.org/wiki/File:Capi_x_Raven.svg

View File

@ -48,7 +48,7 @@ class Hrafn():
# Init the glade stuff here, so we don't have a race condition with # Init the glade stuff here, so we don't have a race condition with
# the lists-ready signal # the lists-ready signal
self.init_user_interface('./default.glade') self.init_user_interface('./ui/default.glade')
self.first_account_item = None self.first_account_item = None
# And init the DB stuff here # And init the DB stuff here
@ -126,6 +126,10 @@ class Hrafn():
self.help_menu.append(menu_item) self.help_menu.append(menu_item)
menu_item.show() menu_item.show()
# Add a system tray icon
self.tray_icon = gtk.status_icon_new_from_file('ui/icon.svg')
# Set the account label # Set the account label
self.update_account_label() self.update_account_label()

19
ui/icon.svg Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="542.2428" height="539.74005" id="svg2" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="cuervo.svg" sodipodi:docbase="/home/capi_x/Desktop" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:modified="true">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview inkscape:window-height="617" inkscape:window-width="872" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="1.5081334" inkscape:cx="358.21224" inkscape:cy="140.40785" inkscape:window-x="198" inkscape:window-y="69" inkscape:current-layer="svg2"/>
<defs id="defs4"/>
<g transform="translate(-5.48321, -9.08633)" id="layer1">
<g transform="translate(-199.286, -88.5714)" id="g3196">
<path d="M 517.25,0 C 509.32063,-0.050210508 498.30767,1.3306775 493.09375,2.59375 C 469.51988,8.30454 428.30022,40.514981 395.84375,63.9375 C 368.9833,83.32159 332.07034,87.032232 327.34375,99.6875 C 322.86299,111.6846 281.23821,218.72407 271.65625,231.5 C 262.07432,244.27593 232.12185,230.49133 218.28125,234.75 C 204.4407,239.00863 185.28341,229.82331 184.21875,224.5 C 183.15408,219.1767 207.25522,208.19951 176.90625,216.59375 C 119.05778,232.59408 127.9407,225.09273 141.78125,210.1875 C 155.62185,195.28227 157.72852,198.5 137.5,198.5 C 117.27144,198.5 72.285672,251.04623 85.53125,220.09375 C 105.96466,172.34453 92.031249,176.69613 92.03125,172.4375 C 92.03125,168.17887 68.873029,203.95558 57.65625,212.34375 C 47.24869,220.12674 56.776921,204.82979 58.90625,196.3125 C 61.03559,187.79524 68.07722,182.38176 65.125,179.3125 C 58.60786,172.53706 55.53125,134.60341 55.53125,145.25 C 55.53125,155.8966 28.924,231.0499 23.71875,229.9375 C 17.57497,228.62452 12.95374,187.84884 11.875,183.59375 C 10.81033,179.39419 -4.36681,173.19036 1.21875,181.46875 C 6.10862,188.71598 1.2392,287.91055 6.5625,285.78125 C 11.8858,283.65191 37.437502,298.56251 37.4375,298.5625 C 37.4375,298.5625 52.335119,295.37716 56.59375,294.3125 C 60.85238,293.24784 157.7392,340.08295 163.0625,345.40625 C 168.3858,350.72955 141.75218,374.17236 140.6875,381.625 C 139.62284,389.07764 146.01612,390.11518 153.46875,410.34375 C 160.92139,430.57227 151.89942,471.76137 157.22272,470.69671 C 162.54601,469.63204 183.26469,428.17885 187.52332,421.79093 C 191.78195,415.40296 206.70682,406.10025 228,402.90625 C 249.29319,399.71229 304.67458,434.84593 311.0625,433.78125 C 317.45047,432.71658 322.56684,443.80703 320.4375,461.90625 C 318.3082,480.00547 301.20752,480.58442 303.71875,513 C 304.59392,524.29672 322.06245,527.14227 332.34375,539.1875 C 335.10854,542.42661 327.00432,530.66488 324.875,526.40625 C 322.74566,522.14758 331.28126,518.96876 331.28125,518.96875 C 331.28125,518.96875 320.6315,518.93964 317.4375,517.875 C 314.24353,516.81034 308.43655,500.89075 315.3125,496.59375 C 338.08001,482.36567 342.98704,497.65842 349.375,496.59375 C 355.76297,495.52908 362.16058,510.4235 360.03125,501.90625 C 357.90192,493.38895 346.17786,484.88151 335.53125,481.6875 C 324.88466,478.49354 330.49572,465.75759 331.40911,460.40625 C 332.99676,451.10453 338.4603,450.3752 340.47271,457.54204 C 343.0891,466.85984 358.05028,479.98416 354.81536,473.98636 C 351.4429,467.73356 347.30963,456.72701 350.625,457.25 C 352.72833,457.58179 367.47705,463.8892 363.21875,461.46875 C 346.89223,452.18862 348.1888,447.36843 347.30679,437.71082 C 349.43609,435.58153 367.64589,434.18936 373.21193,434.57218 C 371.26996,429.91973 345.12934,426.31468 343,425.25 C 340.87066,424.18533 341.93751,405.03126 341.9375,405.03125 C 341.9375,405.03125 349.36853,402.91272 352.5625,399.71875 C 355.75651,396.52475 370.49353,400.21443 373.6875,402.34375 C 376.88146,404.47305 391.39328,400.19185 397.78125,398.0625 C 404.16922,395.93321 412.77474,399.26295 415.96875,392.875 C 419.16271,386.48703 438.05601,392.87935 441.25,390.75 C 444.44397,388.62067 447.33944,379.03988 449.46875,374.78125 C 451.59808,370.52262 479.27691,365.62932 481.40625,363.5 C 483.53554,361.37066 485.96875,353.63362 485.96875,349.375 C 485.96875,345.11632 509.06032,334.75648 510.125,331.5625 C 511.18963,328.3685 515.47093,325.19613 514.40625,320.9375 C 513.34158,316.67883 528.23913,306.03773 533.5625,302.84375 C 538.88579,299.64975 543.15843,278.3502 542.09375,275.15625 C 541.02909,271.96225 527.16706,292.18536 521.84375,293.25 C 516.52046,294.31466 478.21343,302.83513 465.4375,307.09375 C 452.66161,311.35238 414.32329,319.87283 409,320.9375 C 403.67671,322.00213 394.09593,311.35239 393.03125,307.09375 C 391.96659,302.83512 406.85889,300.68968 399.40625,299.625 C 391.95362,298.56033 350.44617,278.35239 346.1875,274.09375 C 341.92887,269.83508 355.77262,262.37933 360.03125,260.25 C 364.28988,258.1207 367.46663,254.91706 368.53125,249.59375 C 369.59592,244.27046 382.389,237.87184 390.90625,224.03125 C 399.42355,210.1907 410.06466,146.32976 409,137.8125 C 407.93538,129.2952 427.26562,116.08062 432.40625,105.875 C 437.76104,95.24417 457.2229,75.21187 469.75,65.65625 C 493.65136,47.42448 528.12389,6.018379 526.28125,1.96875 C 525.64692,0.57467925 522.00762,0.030126305 517.25,0 z M 320.34375,406.9375 C 324.25261,406.85605 328.43749,408.18749 328.4375,408.1875 C 333.08053,404.75492 329.06499,411.60459 330.43068,422.15054 C 331.63915,431.48245 334.39759,431.00822 319.15229,422.61818 C 311.30061,418.29711 303.89724,424.40209 313.84375,410.90625 C 315.65864,408.44373 317.30353,407.00085 320.34375,406.9375 z " transform="translate(204.769, 97.6578)" style="fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" id="path2221" sodipodi:nodetypes="cssssssssssssssssssscsssssssssssscssssssszssccscsssssssssssssssssssssssssccssssc"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB