Commits

Damián Nohales committed dee3fa7 Merge

Comments (0)

Files changed (14)

+syntax: glob
+*.pyc

data/main_window.ui

-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.18"/>
   <!-- interface-naming-policy project-wide -->
   <object class="GtkMenu" id="downloadmenu">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <child>
       <object class="GtkImageMenuItem" id="menuitem2">
         <property name="label">gtk-cancel</property>
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="use_stock">True</property>
-        <signal name="activate" handler="on_cancel_download"/>
+        <signal name="activate" handler="on_cancel_download" swapped="no"/>
       </object>
     </child>
     <child>
       <object class="GtkImageMenuItem" id="menuitem3">
         <property name="label">gtk-media-stop</property>
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="use_stock">True</property>
-        <signal name="activate" handler="on_stop_download"/>
+        <signal name="activate" handler="on_stop_download" swapped="no"/>
       </object>
     </child>
     <child>
       <object class="GtkImageMenuItem" id="menuitem4">
         <property name="label" translatable="yes">Resume</property>
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="use_action_appearance">False</property>
         <property name="image">image4</property>
         <property name="use_stock">False</property>
-        <signal name="activate" handler="on_resume_download"/>
+        <signal name="activate" handler="on_resume_download" swapped="no"/>
       </object>
     </child>
   </object>
   <object class="GtkImage" id="image1">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="icon_name">system-software-update</property>
   </object>
   <object class="GtkImage" id="image4">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="stock">gtk-refresh</property>
   </object>
+  <object class="GtkImage" id="image5">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixbuf">love_song.svg</property>
+  </object>
+  <object class="GtkImage" id="image_add">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-add</property>
+  </object>
   <object class="GtkImage" id="image_clear">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="stock">gtk-clear</property>
   </object>
   <object class="GtkImage" id="image_delete">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="stock">gtk-delete</property>
   </object>
+  <object class="GtkImage" id="image_download">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="xpad">4</property>
+    <property name="icon_name">go-down</property>
+  </object>
+  <object class="GtkImage" id="image_information">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="icon_name">dialog-information</property>
+  </object>
   <object class="GtkImage" id="image_open">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="stock">gtk-open</property>
   </object>
   <object class="GtkImage" id="image_playlist_repeat">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="icon_name">media-playlist-repeat</property>
   </object>
   <object class="GtkImage" id="image_playlist_shuffle">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="icon_name">media-playlist-shuffle</property>
   </object>
   <object class="GtkImage" id="image_resume">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="icon_name">document-revert</property>
   </object>
   <object class="GtkImage" id="image_save_as">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="stock">gtk-save-as</property>
   </object>
   <object class="GtkImage" id="image_volume_high">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="pixel_size">25</property>
     <property name="icon_name">audio-volume-high</property>
   </object>
   <object class="GtkMenu" id="mainmenu">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <child>
       <object class="GtkImageMenuItem" id="perfsmenuitem">
         <property name="label">gtk-preferences</property>
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Edit Preferences</property>
+        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="use_stock">True</property>
-        <signal name="activate" handler="edit_preferences"/>
+        <signal name="activate" handler="on_open_preferences" swapped="no"/>
       </object>
     </child>
     <child>
       <object class="GtkImageMenuItem" id="chekupdatemenuitem">
         <property name="label" translatable="yes">Check for Updates</property>
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Check for Updates</property>
+        <property name="use_action_appearance">False</property>
         <property name="image">image1</property>
         <property name="use_stock">False</property>
-        <signal name="activate" handler="check_for_update"/>
+        <signal name="activate" handler="on_check_for_updates" swapped="no"/>
       </object>
     </child>
     <child>
       <object class="GtkImageMenuItem" id="aboutmenuitem">
         <property name="label">gtk-about</property>
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Show About dialog</property>
+        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="use_stock">True</property>
-        <signal name="activate" handler="show_about"/>
+        <signal name="activate" handler="on_show_about" swapped="no"/>
       </object>
     </child>
     <child>
       <object class="GtkSeparatorMenuItem" id="menuitem1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
       </object>
     </child>
     <child>
       <object class="GtkImageMenuItem" id="quitmenuitem">
         <property name="label">gtk-quit</property>
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Quit the application</property>
+        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="use_stock">True</property>
-        <signal name="activate" handler="quit_app"/>
+        <signal name="activate" handler="on_quit_app" swapped="no"/>
       </object>
     </child>
   </object>
   <object class="GtkWindow" id="mainwindow">
     <property name="height_request">560</property>
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">gSharkDown</property>
     <property name="window_position">center</property>
     <property name="default_width">700</property>
     <child>
       <object class="GtkVBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <child>
           <object class="GtkToolbar" id="toolbar1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="icon_size_set">True</property>
             <child>
               <object class="GtkToolItem" id="toolbutton1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="use_action_appearance">False</property>
                 <child>
                   <object class="GtkEntry" id="toolentry_search">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="tooltip_text" translatable="yes">Search the grooveshark</property>
-                    <property name="invisible_char">&#x2022;</property>
+                    <property name="invisible_char"></property>
                     <property name="xalign">0.039999999105930328</property>
                     <property name="primary_icon_stock">gtk-find</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property name="secondary_icon_activatable">False</property>
                     <property name="primary_icon_sensitive">True</property>
                     <property name="secondary_icon_sensitive">True</property>
-                    <signal name="activate" handler="search_grooveshark"/>
+                    <signal name="activate" handler="on_search_grooveshark" swapped="no"/>
                   </object>
                 </child>
               </object>
             <child>
               <object class="GtkSeparatorToolItem" id="toolbutton12">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="expand">False</property>
             <child>
               <object class="GtkToolButton" id="toolbutton_play_previous">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Previous</property>
+                <property name="use_action_appearance">False</property>
                 <property name="label" translatable="yes">Previous</property>
                 <property name="use_underline">True</property>
                 <property name="stock_id">gtk-media-previous</property>
-                <signal name="clicked" handler="play_previous"/>
+                <signal name="clicked" handler="play_previous" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
             <child>
               <object class="GtkToolButton" id="toolbutton_play">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Play/Stop</property>
+                <property name="use_action_appearance">False</property>
                 <property name="label" translatable="yes">Play/Stop</property>
                 <property name="use_underline">True</property>
                 <property name="icon_name">media-playback-start</property>
-                <signal name="clicked" handler="play_selected"/>
+                <signal name="clicked" handler="play_selected" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
             <child>
               <object class="GtkToolButton" id="toolbutton_play_next">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Next</property>
+                <property name="use_action_appearance">False</property>
                 <property name="label" translatable="yes">Next</property>
                 <property name="use_underline">True</property>
                 <property name="stock_id">gtk-media-next</property>
-                <signal name="clicked" handler="play_next"/>
+                <signal name="clicked" handler="play_next" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
             <child>
               <object class="GtkToolItem" id="toolbutton_volume">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="use_action_appearance">False</property>
                 <child>
                   <object class="GtkVolumeButton" id="volumebutton1">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
                     <property name="has_tooltip">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="relief">none</property>
                     <property name="focus_on_click">False</property>
                     <property name="orientation">vertical</property>
 audio-volume-high
 audio-volume-low
 audio-volume-medium</property>
-                    <signal name="value_changed" handler="on_volume_change"/>
+                    <signal name="value-changed" handler="on_volume_change" swapped="no"/>
                   </object>
                 </child>
               </object>
             <child>
               <object class="GtkToolButton" id="toolbutton_lyrics">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="is_important">True</property>
                 <property name="label" translatable="yes">Lyrics</property>
                 <property name="use_underline">True</property>
                 <property name="stock_id">gtk-italic</property>
-                <signal name="clicked" handler="get_lyrics"/>
+                <signal name="clicked" handler="on_show_lyrics" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
             <child>
               <object class="GtkToolButton" id="toolbutton3">
                 <property name="sensitive">False</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Love song on Last.fm</property>
+                <property name="use_action_appearance">False</property>
                 <property name="label" translatable="yes">Love Song</property>
                 <property name="use_underline">True</property>
                 <property name="icon_widget">image5</property>
-                <signal name="clicked" handler="on_love_song"/>
+                <signal name="clicked" handler="on_love_song" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
             <child>
               <object class="GtkToolItem" id="aligment">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="use_action_appearance">False</property>
                 <child>
                   <object class="GtkLabel" id="songinfo">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="selectable">True</property>
                     <property name="ellipsize">end</property>
                     <property name="single_line_mode">True</property>
             <child>
               <object class="GtkToolButton" id="toolbutton2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Menu</property>
+                <property name="use_action_appearance">False</property>
                 <property name="label" translatable="yes">Settings</property>
                 <property name="use_underline">True</property>
                 <property name="stock_id">gtk-properties</property>
-                <signal name="clicked" handler="show_prefs_menu"/>
+                <signal name="clicked" handler="show_prefs_menu" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="padding">1</property>
             <property name="position">0</property>
           </packing>
               <object class="GtkVBox" id="vbox2">
                 <property name="height_request">400</property>
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkFrame" id="frame1">
                     <property name="width_request">250</property>
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
                       <object class="GtkAlignment" id="alignment1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="left_padding">8</property>
                         <property name="right_padding">8</property>
                         <child>
                           <object class="GtkVBox" id="vbox4">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkScrolledWindow" id="scrolledwindow1">
                                 <property name="visible">True</property>
                                 </child>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
                               <object class="GtkHBox" id="hbox4">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <child>
                                   <object class="GtkButton" id="button_songinfo">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip_text" translatable="yes">Show info about selected</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="image">image_information</property>
-                                    <signal name="clicked" handler="show_info"/>
+                                    <signal name="clicked" handler="on_show_info" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
+                                    <property name="fill">True</property>
                                     <property name="position">0</property>
                                   </packing>
                                 </child>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip_text" translatable="yes">Download selected</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="image">image_download</property>
-                                    <signal name="clicked" handler="download_selected"/>
+                                    <signal name="clicked" handler="on_download_selected" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
+                                    <property name="fill">True</property>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkAlignment" id="alignment4">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <child>
                                       <placeholder/>
                                     </child>
                                   </object>
                                   <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
                                     <property name="position">2</property>
                                   </packing>
                                 </child>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip_text" translatable="yes">Add selected to playlist</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="image">image_add</property>
-                                    <signal name="clicked" handler="add_to_playlist"/>
+                                    <signal name="clicked" handler="on_add_to_playlist" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
+                                    <property name="fill">True</property>
                                     <property name="position">3</property>
                                   </packing>
                                 </child>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
                     <child type="label">
                       <object class="GtkAlignment" id="alignment5">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="left_padding">7</property>
                         <child>
                           <object class="GtkHBox" id="hbox3">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkImage" id="image7">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="stock">gtk-find</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
                               <object class="GtkLabel" id="label4">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">&lt;b&gt;Search Results&lt;/b&gt;</property>
                                 <property name="use_markup">True</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                   <object class="GtkFrame" id="frame2">
                     <property name="width_request">300</property>
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0.0099999997764825821</property>
                     <property name="shadow_type">none</property>
                     <child>
                       <object class="GtkAlignment" id="alignment2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="left_padding">8</property>
                         <property name="right_padding">8</property>
                         <child>
                           <object class="GtkVBox" id="vbox3">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkScrolledWindow" id="scrolledwindow2">
                                 <property name="visible">True</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
+                                <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
                               <object class="GtkHBox" id="hbox1">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <child>
                                   <object class="GtkButton" id="button_delete">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip_text" translatable="yes">Remove selected from playlist</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="image">image_delete</property>
-                                    <signal name="clicked" handler="remove_from_playlist"/>
+                                    <signal name="clicked" handler="on_remove_from_playlist" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
+                                    <property name="fill">True</property>
                                     <property name="position">0</property>
                                   </packing>
                                 </child>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip_text" translatable="yes">Clear the playlist</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="image">image_clear</property>
-                                    <signal name="clicked" handler="clear_playlist"/>
+                                    <signal name="clicked" handler="on_clear_playlist" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
+                                    <property name="fill">True</property>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip_text" translatable="yes">Toggle repeat all</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="image">image_playlist_repeat</property>
-                                    <signal name="toggled" handler="toggle_repeat"/>
+                                    <signal name="toggled" handler="on_toggle_repeat" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
+                                    <property name="fill">True</property>
                                     <property name="position">2</property>
                                   </packing>
                                 </child>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip_text" translatable="yes">Toggle shuffle</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="image">image_playlist_shuffle</property>
-                                    <signal name="toggled" handler="toggle_shuffle"/>
+                                    <signal name="toggled" handler="on_toggle_shuffle" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
+                                    <property name="fill">True</property>
                                     <property name="position">3</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkAlignment" id="alignment3">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <child>
                                       <placeholder/>
                                     </child>
                                   </object>
                                   <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
                                     <property name="position">4</property>
                                   </packing>
                                 </child>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip_text" translatable="yes">Save playlist</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="image">image_save_as</property>
-                                    <signal name="clicked" handler="save_as_playlist"/>
+                                    <signal name="clicked" handler="on_playlist_save_as" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
+                                    <property name="fill">True</property>
                                     <property name="position">5</property>
                                   </packing>
                                 </child>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip_text" translatable="yes">Open saved playlist</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="image">image_open</property>
-                                    <signal name="clicked" handler="open_saved_playlist"/>
+                                    <signal name="clicked" handler="on_playlist_open" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
+                                    <property name="fill">True</property>
                                     <property name="position">6</property>
                                   </packing>
                                 </child>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
                     <child type="label">
                       <object class="GtkHBox" id="hbox2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkImage" id="image6">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="icon_name">audio-x-generic</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkLabel" id="label5">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">&lt;b&gt;Playlist&lt;/b&gt;</property>
                             <property name="use_markup">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
             <child type="tab">
               <object class="GtkHBox" id="hbox5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkImage" id="image3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="icon_name">media-playback-start</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">&lt;b&gt;Player&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
             <child>
               <object class="GtkVBox" id="vbox5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkAlignment" id="alignment6">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="top_padding">9</property>
                     <property name="left_padding">10</property>
                     <property name="right_padding">10</property>
                             <property name="height_request">100</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <signal name="button_press_event" handler="right_click_download"/>
+                            <signal name="button-press-event" handler="right_click_download" swapped="no"/>
                           </object>
                         </child>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="padding">3</property>
                     <property name="position">0</property>
                   </packing>
                 <child>
                   <object class="GtkAlignment" id="alignment7">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="bottom_padding">8</property>
                     <property name="left_padding">9</property>
                     <child>
                       <object class="GtkHButtonBox" id="hbuttonbox1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">3</property>
                         <property name="layout_style">start</property>
                         <child>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
-                            <signal name="activate" handler="on_cancel_download"/>
+                            <signal name="activate" handler="on_cancel_download" swapped="no"/>
                           </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
-                            <signal name="clicked" handler="on_stop_download"/>
+                            <signal name="clicked" handler="on_stop_download" swapped="no"/>
                           </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="image">image_resume</property>
-                            <signal name="clicked" handler="on_resume_download"/>
+                            <signal name="clicked" handler="on_resume_download" swapped="no"/>
                           </object>
                           <packing>
                             <property name="expand">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="padding">4</property>
                     <property name="position">1</property>
                   </packing>
             <child type="tab">
               <object class="GtkHBox" id="hbox6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkImage" id="image2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="icon_name">document-save</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkLabel" id="downloads_count">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
       </object>
     </child>
   </object>
-  <object class="GtkImage" id="image_information">
-    <property name="visible">True</property>
-    <property name="icon_name">dialog-information</property>
-  </object>
-  <object class="GtkImage" id="image_download">
-    <property name="visible">True</property>
-    <property name="xpad">4</property>
-    <property name="icon_name">go-down</property>
-  </object>
-  <object class="GtkImage" id="image_add">
-    <property name="visible">True</property>
-    <property name="stock">gtk-add</property>
-  </object>
-  <object class="GtkImage" id="image5">
-    <property name="visible">True</property>
-    <property name="pixbuf">love_song.svg</property>
-  </object>
 </interface>

data/preferenes_dialog.ui

-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy project-wide -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">10000</property>
+    <property name="value">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkFileChooserDialog" id="filechooserdialog1">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="spacing">2</property>
-        <child>
-          <placeholder/>
-        </child>
         <child internal-child="action_area">
           <object class="GtkHButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <placeholder/>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="pack_type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
     </child>
   </object>
   <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Preferences</property>
     <property name="type_hint">dialog</property>
     <child>
       <object class="GtkVBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="spacing">2</property>
         <child>
           <object class="GtkHBox" id="hbox1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Download Directory:</property>
               </object>
               <packing>
                 <property name="expand">False</property>
+                <property name="fill">True</property>
                 <property name="padding">5</property>
                 <property name="position">0</property>
               </packing>
             <child>
               <object class="GtkFileChooserButton" id="filechooserbutton1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="action">select-folder</property>
                 <property name="preview_widget_active">False</property>
                 <property name="title" translatable="yes">Select the download directory</property>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="padding">5</property>
                 <property name="position">1</property>
               </packing>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="padding">14</property>
             <property name="position">0</property>
           </packing>
         <child>
           <object class="GtkHBox" id="hbox2">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkCheckButton" id="checkbutton1">
                 <property name="label" translatable="yes">Quit application without confirmation</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="draw_indicator">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
+                <property name="fill">True</property>
                 <property name="padding">15</property>
                 <property name="position">0</property>
               </packing>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="padding">6</property>
             <property name="position">1</property>
           </packing>
         <child>
           <object class="GtkHBox" id="hbox3">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkCheckButton" id="checkbutton2">
                 <property name="label" translatable="yes">Show notifications on track change</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="draw_indicator">True</property>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="padding">15</property>
                 <property name="position">0</property>
               </packing>
         <child>
           <object class="GtkHBox" id="hbox6">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkCheckButton" id="checkbutton4">
                 <property name="label" translatable="yes">Check for updates on startup</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="draw_indicator">True</property>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="padding">15</property>
                 <property name="position">0</property>
               </packing>
         <child>
           <object class="GtkFrame" id="frame1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="left_padding">12</property>
                 <child>
                   <object class="GtkVBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkHBox" id="hbox4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label3">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Username:</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                           <object class="GtkEntry" id="entry2">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="invisible_char">&#x2022;</property>
+                            <property name="invisible_char"></property>
                             <property name="primary_icon_name">face-monkey</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
                             <property name="primary_icon_sensitive">True</property>
                             <property name="secondary_icon_sensitive">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkHBox" id="hbox5">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label4">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Password:  </property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                             <property name="can_focus">True</property>
                             <property name="invisible_char_set">True</property>
                             <property name="primary_icon_name">dialog-password</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
                             <property name="primary_icon_sensitive">True</property>
                             <property name="secondary_icon_sensitive">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="draw_indicator">True</property>
-                        <signal name="toggled" handler="on_scrobble_toggle"/>
+                        <signal name="toggled" handler="on_scrobble_toggle" swapped="no"/>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
             <child type="label">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">&lt;b&gt;Last.fm Scrobbling&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
               </object>
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">4</property>
           </packing>
         </child>
         <child>
           <object class="GtkFrame" id="frame2">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="left_padding">12</property>
                 <child>
                   <object class="GtkVBox" id="vbox3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">4</property>
                     <child>
                       <object class="GtkHBox" id="hbox7">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label6">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Maximum download speed: </property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                           <object class="GtkSpinButton" id="spinbutton1">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="invisible_char">&#x2022;</property>
+                            <property name="invisible_char"></property>
                             <property name="overwrite_mode">True</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
                             <property name="adjustment">adjustment1</property>
                             <property name="climb_rate">0.5</property>
                             <property name="digits">2</property>
                             <property name="numeric">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkLabel" id="label7">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">&lt;b&gt;Kb/s&lt;/b&gt;</property>
                             <property name="use_markup">True</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
+                            <property name="fill">True</property>
                             <property name="padding">5</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkVBox" id="vbox4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkHBox" id="hbox8">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="homogeneous">True</property>
                             <child>
                               <object class="GtkLabel" id="label8">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">File renaming pattern:</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
                               <object class="GtkEntry" id="entry1">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="invisible_char">&#x2022;</property>
+                                <property name="invisible_char">•</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="padding">3</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkLabel" id="label9">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">&lt;b&gt;You can use the following placeholders:&lt;/b&gt;
 	&lt;b&gt;{artist}&lt;/b&gt; - The name of the artist
 	&lt;b&gt;{song}&lt;/b&gt; - The name of the song
                             <property name="use_markup">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
                             <property name="fill">False</property>
                             <property name="padding">3</property>
                             <property name="position">1</property>
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
             <child type="label">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">&lt;b&gt;Download options&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
               </object>
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">5</property>
           </packing>
         </child>
         <child>
           <object class="GtkHSeparator" id="hseparator1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">6</property>
           </packing>
         </child>
         <child>
           <object class="GtkHButtonBox" id="hbuttonbox1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="spacing">12</property>
             <property name="layout_style">end</property>
             <child>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
-                <signal name="clicked" handler="close_preferences"/>
+                <signal name="clicked" handler="on_cancel" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
-                <signal name="clicked" handler="save_preferences"/>
+                <signal name="clicked" handler="on_save" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="padding">5</property>
             <property name="position">7</property>
           </packing>
       </object>
     </child>
   </object>
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">100</property>
-    <property name="upper">10000</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
 </interface>
 by the grooveshark.com service
 """
 
-import os
-import sys
-import random
-import dbus
-import dbus.service
-import dbus.glib
-from lib.tfuncs import InitThread
-from lib.tfuncs import DownloadThread
-from lib.tfuncs import PlayThread
-from lib.tfuncs import SearchThread
-from lib.tfuncs import KeyListenerThread
-from lib.tfuncs import LyricsThread
-from lib.tfuncs import UpdateThread
-from lib.tfuncs import SongCoverThread
-import lib.guihelpers
-import locale
-import gettext
-from gettext import gettext as _
-import urllib2
-import webbrowser
-import pickle
-
+# Imports with dependency check
+# Imports PyGtk
 try:
     import pygtk
     pygtk.require('2.0')
     print "You don't have python-gtk2 installed!"
     sys.exit(1)
 
-try:
-    import pynotify
-    HAVE_NOTIFY = True
-except ImportError:
-    print "You don't have pynotify installed!"
-    HAVE_NOTIFY = False
-
+# Imports GStreamer
 try:
     import pygst
     pygst.require('0.10')
     print "You don't have python-gstreamer installed!"
     sys.exit(1)
 
+# Imports ConfigObj to manage ini files
+try:
+    from configobj import ConfigObj
+except ImportError:
+    print "You don't have python-configobj installed!"
+    sys.exit(1)
+
+# Imports PyCurl
+try:
+    import pycurl
+except:
+    print "You don't have python-pycurl installed!"
+    sys.exit(1)
+
+# Imports pynotify
+try:
+    import pynotify
+    HAVE_NOTIFY = True
+except ImportError:
+    print "You don't have pynotify installed!"
+    HAVE_NOTIFY = False
+
+# Imports PyLast for scrobbling with Last.fm
 try:
     import pylast
     HAVE_PYLAST = True
     print "You need to install pylast: sudo pip install pylast"
     HAVE_PYLAST = False
 
+# Imports application indicator
+try:
+    import appindicator
+    HAVE_INDICATOR = True
+except ImportError:
+    print "You don't have python-appindicator installed!"
+    print "StautsIcon will be used instead"
+    HAVE_INDICATOR = False
+    
+# Common imports
+import os
+import sys
+import dbus
+import dbus.service
+import dbus.glib
+from lib.enviroment import env
+from lib.SingleService import SingleService
+from lib.SharkDown import SharkDown
 
-try:
-    from configobj import ConfigObj
-except ImportError:
-    print "You don't have python-configobj installed!"
-    sys.exit(1)
-
-BASEPATH = os.path.abspath(os.path.dirname(sys.argv[0]))
-
-APP = 'gsharkdown'
-if os.path.exists("locale"):
-    DIR = "%s/locale" % BASEPATH
-else:
-    DIR = os.path.join(sys.prefix, 'share', 'locale')
-
-try:
-    locale.setlocale(locale.LC_ALL, '')
-except locale.Error:
-    locale.setlocale(locale.LC_ALL, 'en_US.utf8')
-locale.bindtextdomain(APP, DIR)
-locale.bind_textdomain_codeset(APP, 'UTF-8')
-gettext.bindtextdomain(APP, DIR)
-gettext.textdomain(APP)
-gettext.install(APP, localedir = DIR, unicode = True)
-
-LAST_KEY = "51fd71dc8939360b25a1029e556258a4"
-LAST_SECRET = "cf35dd38f998ca4d3af4adbe59ae23f7"
-
-if os.path.exists("%s/.gsharkdown/gsharkdown.ini" % os.environ.get("HOME")):
-    CONFIG = ConfigObj("%s/.gsharkdown/gsharkdown.ini" % os.environ.get("HOME"))
-    try:
-        if HAVE_PYLAST:
-            test = CONFIG['scrobbling']
-        else:
-            raise KeyError()
-    except KeyError:
-        CONFIG['scrobbling'] = 0
-        CONFIG['lastuser'] = ""
-        CONFIG['lastpass'] = ""
-
-    try:
-        if HAVE_NOTIFY:
-            test = CONFIG['show_notification']
-        else:
-            raise KeyError()
-    except KeyError:
-        CONFIG['show_notification'] = 0
-
-    try:
-        test = CONFIG['quit_without_confirmation']
-    except KeyError:
-        CONFIG['quit_without_confirmation'] = 1
-
-    try:
-        test = CONFIG['startup_update_check']
-    except KeyError:
-        CONFIG['startup_update_check'] = 1
-    try:
-        test = CONFIG['speed_limit']
-    except:
-        CONFIG['speed_limit'] = 0
-
-    try:
-        test = CONFIG['file_pattern']
-    except KeyError:
-        CONFIG['file_pattern'] = "{artist} - {song}"
-
-    CONFIG.write()
-
-else:
-    try:
-        os.mkdir("%s/.gsharkdown/" % os.environ.get("HOME"))
-    except:
-        pass
-    CONFIG = ConfigObj("%s/.gsharkdown/gsharkdown.ini" % os.environ.get("HOME"))
-    MUSIC_DIR = glib.get_user_special_dir(glib.USER_DIRECTORY_MUSIC) or os.path.join(os.environ.get("HOME"), "Music")
-    CONFIG['down_path'] = os.path.join(MUSIC_DIR, "Grooveshark")
-    if os.path.isdir(CONFIG['down_path']) == False:
-        try:
-            os.makedirs(CONFIG['down_path'])
-        except:
-            pass
-    CONFIG['show_stat_icon'] = 0
-    CONFIG['repeat_playlist'] = 1
-    CONFIG['shuffle_playlist'] = 0
-    CONFIG['show_notification'] = 0
-    CONFIG['update_checked'] = 0
-    CONFIG['completition'] = ""
-    CONFIG['scrobbling'] = 0
-    CONFIG['lastuser'] = ""
-    CONFIG['lastpass'] = ""
-    CONFIG['startup_update_check'] = 1
-    CONFIG['quit_without_confirmation'] = 1
-    CONFIG['speed_limit'] = 0
-    CONFIG['file_pattern'] = "{artist} - {song}"
-    CONFIG.write()
-
-
-class SharkDown:
-    """
-    The main application class for gSharkDown
-    """
-    working = None
-    playing = None
-    # just to prevend scrobbeling more then once for 
-    # track.
-    scrobbled = 0
-    # Download dictionary in form Filename : Thread
-    downqueue = []
-
-    last_iter = None
-
-    def __init__(self):
-        """
-        Initialise the main application window
-        """
-        gobject.threads_init()
-        builder = gtk.Builder()
-        builder.set_translation_domain(APP)
-        builder.add_from_file('%s/data/main_window.ui' % BASEPATH)
-        self.window = builder.get_object('mainwindow')
-        self.window.connect('delete-event', self.window_close)
-        self.windowstate = 1
-        self.current_song = None
-        self.play_button = builder.get_object('toolbutton_play')
-        self.ff_button = builder.get_object('toolbutton_play_next')
-        self.prev_button = builder.get_object('toolbutton_play_previous')
-        self.lyrics_button = builder.get_object('toolbutton_lyrics')
-        self.songinfo = builder.get_object('songinfo')
-        self.songinfo.set_text("")
-        self.prefsmenu = builder.get_object('mainmenu')
-        self.lovebutton = builder.get_object('toolbutton3')
-        repeat_button = builder.get_object('togglebutton_repeat')
-        repeat_button.set_active(int(CONFIG['repeat_playlist']))
-        shuffle_button = builder.get_object('togglebutton_shuffle')
-        shuffle_button.set_active(int(CONFIG['shuffle_playlist']))
-        self.player = gst.element_factory_make("playbin", "player")
-
-        # Completition configuration
-        self.entry = builder.get_object('toolentry_search')
-        completition = gtk.EntryCompletion()
-        comp_store = gtk.ListStore(str)
-        completition.set_model(comp_store)
-        for item in CONFIG['completition'].split("|"):
-            comp_store.append([item])
-        completition.set_minimum_key_length(1)
-        completition.set_text_column(0)
-        self.entry.set_completion(completition)
-
-        # Results List definition
-        # Model: Title, Artist, Album, SongID, Song Array
-        self.result = gtk.ListStore(str, str, str, str, object)
-        self.result_view = builder.get_object('list_results')
-        self.result_view.set_model(self.result)
-        self.result_view.connect("row-activated", self.on_result_row_activated)
-        self.result_view.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
-        self._create_search_columns()
-
-        # Play List definition
-        # Model: Title, Artist, SongID, Song Array, Font Weight (bold on playing)
-        self.sw2 = builder.get_object('scrolledwindow2')
-        self.playlist = gtk.ListStore(str, gtk.gdk.Pixbuf, str, str, object, int)
-        self.play_view = gtk.IconView(self.playlist)
-        self.play_view.set_markup_column(0)
-        self.play_view.set_pixbuf_column(1)
-        self.play_view.set_tooltip_column(2)
-        self.play_view.set_item_width(120);
-        self.play_view.set_reorderable(True)
-        self.play_view.set_columns(999)
-        self.play_view.connect('item-activated', self.double_click_start)
-        self.play_view.show()
-        self.sw2.add(self.play_view)
-        #self._create_play_columns()
-        #self.selector = self.play_view.get_selection()
-
-        # Download list definition
-        # Model: File Name, SongID, Progress, Size, Thread Object
-        self.downloads = gtk.ListStore(str, str, int, str, object)
-        self.downloads_view = builder.get_object('list_downloads')
-        self.downloads_view.set_model(self.downloads)
-        self.downloads_view.hide_all()
-        self._create_downloads_columns()
-        self.downloads_count = builder.get_object('downloads_count')
-        self.downloads_expander = builder.get_object('expander_download')
-        self.update_downloads_count()
-        self.downmenu = builder.get_object('downloadmenu')
-
-        self.staticon = lib.guihelpers.GsharkIndicator(self)
-
-        if os.path.exists("%s/.gsharkdown/playlist.pkl" % os.environ.get("HOME")):
-            self.load_saved_playlist("%s/.gsharkdown/playlist.pkl" % os.environ.get("HOME"))
-        else:
-            print "Playlist not found"
-
-        if os.path.exists("%s/.gsharkdown/downqueue.pkl" % os.environ.get("HOME")):
-            self.load_downqueue_list("%s/.gsharkdown/downqueue.pkl" % os.environ.get("HOME"))
-
-        if int(CONFIG['show_notification']) == 1 and HAVE_NOTIFY:
-            pynotify.init("gSharkDown")
-
-        # Set default directory if is empty
-        if CONFIG['down_path'] == "":
-            CONFIG['down_path'] = os.path.join(glib.get_user_special_dir(glib.USER_DIRECTORY_MUSIC), "Grooveshark")
-
-        # Scrobbling initialisation
-        self.lastfm = ""
-        if int(CONFIG['scrobbling']) == 1 and HAVE_PYLAST:
-            try:
-                self.lastfm = pylast.LastFMNetwork(api_key = LAST_KEY,
-                                          api_secret = LAST_SECRET,
-                                          username = CONFIG['lastuser'],
-                                          password_hash = CONFIG['lastpass'])
-                self.lovebutton.set_sensitive(True)
-            except pylast.WSError:
-                error = lib.guihelpers.ErrorMessage(self.window,
-                            _("Check your password and username for Last.fm"))
-                error.show_all()
-                pass
-
-        builder.connect_signals(self)
-        self.tlisten = KeyListenerThread(self)
-        self.tlisten.start()
-        if CONFIG['update_checked'] == 0:
-            self.check_for_update(None)
-        else:
-            if CONFIG['startup_update_check'] == 1:
-                self.check_for_update(None)
-        self.window.show_all()
-
-    def get_playing_iter(self):
-        iter = self.playlist.get_iter_first()
-        while iter != None:
-            if self.playlist[iter][5] > 400:
-                return iter
-            iter = self.playlist.iter_next(iter)
-
-        return None
-
-    def get_iter_last(self, model):
-        """
-        Get the last iter from a model
-        """
-        rows = model.iter_n_children(None);
-        return model.get_iter([rows - 1]);
-
-    def result_song(self, index):
-        return self.result[index][4]
-
-    def playlist_song(self, index):
-        return self.playlist[index][4]
-
-    def show_prefs_menu(self, button, data = None):
-        self.prefsmenu.popup(None, None, None, 0, 0)
-
-    def add_song_to_playlist(self, song):
-        song_string = "<span>%s</span>\n<span fgcolor='#777777'>%s</span>" % (self.get_sliced_string(glib.markup_escape_text(song['SongName']), 25),
-                                                                              self.get_sliced_string(glib.markup_escape_text(song['ArtistName']), 20))
-        #if len(song_string) > 14:
-        #    song_string = song_string[:13] + "..."
-        tooltip = _("<b>Title:</b> {title}\n").format(title = glib.markup_escape_text(song['SongName']))
-        tooltip += _("<b>Artist:</b> {artist}\n").format(artist = glib.markup_escape_text(song['ArtistName']))
-        tooltip += _("<b>Album:</b> {album}\n").format(album = glib.markup_escape_text(song['AlbumName']))
-        tooltip += _("<b>Year:</b> {year}").format(year = song['Year'])
-
-        appended_iter = self.playlist.append([
-            song_string,
-            self.create_loading_track_icon(),
-            tooltip,
-            song['SongID'],
-            song,
-            400
-        ])
-
-        thread = SongCoverThread(self, appended_iter)
-        thread.start()
-
-    def create_default_track_icon(self):
-        default = gtk.gdk.pixbuf_new_from_file("%s/data/sdefault.png" % BASEPATH)
-        return self.create_cornered_image(default)
-
-    def create_loading_track_icon(self):
-        default = gtk.gdk.pixbuf_new_from_file("%s/data/loading.png" % BASEPATH)
-        return self.create_cornered_image(default)
-
-    def create_cornered_image(self, pixbuf):
-        corners = gtk.gdk.pixbuf_new_from_file("%s/data/corners.png" % BASEPATH)
-        corners.composite(pixbuf, 0, 0, pixbuf.props.width, pixbuf.props.height,
-                          0, 0, 1.0, 1.0, gtk.gdk.INTERP_HYPER, 255)
-        return pixbuf
-
-    def recover_icon(self, cover_url):
-        try:
-            url = "http://beta.grooveshark.com/static/amazonart/s%s"
-            response = urllib2.urlopen(url % cover_url)
-            loader = gtk.gdk.PixbufLoader()
-            loader.write(response.read())
-            loader.close()
-            image = loader.get_pixbuf()
-            return image
-        except:
-            image = self.create_default_track_icon()
-            return image
-
-    def get_current_cover_url(self, iter):
-        song = self.playlist.get_value(self.last_iter, 4)
-        try:
-            return song['CoverArtFilename']
-        except:
-            return "sdefault"
-
-
-    def load_saved_playlist(self, path):
-        """
-        Loads the saved playlist from .pkl file
-        """
-        file = open(path, 'rb')
-        eoferror = True
-        playitems = []
-
-        while eoferror:
-            try:
-                playitems.append(pickle.load(file))
-            except:
-                eoferror = False
-
-        for i in range(0, len(playitems)):
-            self.add_song_to_playlist(playitems[i])
-
-    def load_downqueue_list(self, path):
-        """
-        Loads the saved playlist from the .pkl file
-        """
-        file = open(path, 'rb')
-        eoferror = True
-        downitems = []
-
-        while eoferror:
-            try:
-                downitems.append(pickle.load(file))
-            except:
-                eoferror = False
-
-        for i in range(0, len(downitems)):
-            tDownload = DownloadThread(self,
-                                       downitems[i]['song'],
-                                       downitems[i]['filename'])
-            tDownload.start()
-
-    def save_playlist(self, path):
-        """
-        Saves the playlist from the playlist treeview to 
-        /home/$USER/.gsharkdown/playlist.pkl
-        """
-        try:
-            output = open(path, 'w')
-            for i in range(0, len(self.playlist)):
-                pickle.dump(self.playlist_song(i), output)
-            output.close()
-        except:
-            error = lib.guihelpers.ErrorMessage(None,
-                            _("Error saving the playlist"))
-            error.show_all()
-
-    def save_downwueue(self, path):
-        """
-        Saves the download queue to pickle file in
-        /home/$USER/.gsharkdown/downqueue.pkl
-        """
-        try:
-            output = open(path, 'w')
-            for i in range(0, len(self.downqueue)):
-                pickle.dump(self.downqueue[i], output, -1)
-            output.close()
-        except:
-            error = lib.guihelpers.ErrorMessage(None,
-                            _("Error saving the download queue"))
-            error.show_all()
-
-
-    def save_as_playlist(self, widget, data = None):
-        """
-        Saves the playlist to .pkl file in directory
-        choosen from the user
-        """
-        savedlg = gtk.FileChooserDialog(_("Save playlist to file"),
-                                       None,
-                                       gtk.FILE_CHOOSER_ACTION_SAVE,
-                                       (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
-                                       gtk.STOCK_SAVE, gtk.RESPONSE_OK))
-        response = savedlg.run()
-
-        if response == gtk.RESPONSE_OK:
-            filename = savedlg.get_filename()
-            if filename[-4:] != ".pkl":
-                filename += ".pkl"
-            self.save_playlist(filename)
-        savedlg.destroy()
-
-    def open_saved_playlist(self, widget, data = None):
-        """
-        Opens a usersaved playlist from .pkl file
-        """
-        opendlg = gtk.FileChooserDialog(_("Select Playlist to open"),
-                                       None,
-                                       gtk.FILE_CHOOSER_ACTION_OPEN,
-                                       (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
-                                       gtk.STOCK_OPEN, gtk.RESPONSE_OK))
-        openfilter = gtk.FileFilter()
-        openfilter.set_name(_('Playlist files'))
-        openfilter.add_pattern("*.pkl")
-
-        opendlg.add_filter(openfilter)
-
-        response = opendlg.run()
-
-        if response == gtk.RESPONSE_OK:
-            self.playlist.clear()
-            self.stop_play()
-            self.load_saved_playlist(opendlg.get_filename())
-            self.play_by_index(0)
-        opendlg.destroy()
-
-    def window_close(self, widget, data = None):
-        """
-        Closes the main window
-        """
-        self.window.hide_on_delete()
-        self.windowstate = 0
-        return True
-
-    def check_for_update(self, widget, data = None):
-        """
-        Checks if a new version of the application is available
-        on the application website. NEVER change the VERSION file
-        manually!
-        """
-        othertext = _("To update to the latest version ")
-        othertext += _("you can visit the <a href=\"http://https://bitbucket.org/vkolev/gsharkdown/downloads\"> ")
-        othertext += _("download site</a>. If you are using the latest version and want to be ")
-        othertext += _("informed about new versions, just enable the option in the <b>Preferences</b> dialog.")
-        markup = _("<b>New version <span fgcolor=\"red\"><i>%s</i></span> is available</b>")
-        nmarkup = _("<b>You are using the latest version!</b>")
-        CONFIG['update_checked'] = 1
-        CONFIG.write()
-        t = UpdateThread(BASEPATH, markup, nmarkup, othertext)
-        t.start()
-
-    def icon_clicked(self, widget, data = None):
-        """
-        Executed on left clicking the statusicon
-        """
-        if(self.windowstate == 0):
-            self.window.show_all()
-            self.windowstate = 1
-        else:
-            self.window.hide_on_delete()
-            self.windowstate = 0
-            return True
-
-    def _create_search_columns(self):
-        """
-        Generate the TreeView columns in the main window
-        for the search results
-        """
-        rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn(_("Title"), rendererText, text = 0)
-        column.set_resizable(True)
-        column.set_max_width(300)
-        self.result_view.append_column(column)
-
-        rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn(_("Artist"), rendererText, text = 1)
-        column.set_resizable(True)
-        self.result_view.append_column(column)
-
-        rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn(_("Album"), rendererText, text = 2)
-        column.set_resizable(True)
-        column.set_max_width(150)
-        self.result_view.append_column(column)
-
-        rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn(_("SongID"), rendererText, text = 3)
-        column.set_resizable(True)
-        self.result_view.append_column(column)
-
-    def _create_downloads_columns(self):
-        """
-        Generate the TreeView columns in the main window
-        for the download list items
-        """
-        rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn(_("File name"), rendererText, text = 0)
-        column.set_resizable(True)
-        self.downloads_view.append_column(column)
-
-        rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn(_("SongID"), rendererText, text = 1)
-        column.set_resizable(True)
-        self.downloads_view.append_column(column)
-
-        rendererProgress = gtk.CellRendererProgress()
-        column = gtk.TreeViewColumn(_("Download progress"), rendererProgress, value = 2)
-        column.set_resizable(True)
-        self.downloads_view.append_column(column)
-
-        rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn(_("Size"), rendererText, text = 3)
-        column.set_resizable(True)
-        self.downloads_view.append_column(column)
-
-    def quit_app(self, widget, data = None):
-        """
-        Confirmation dialog when exiting the application
-        """
-        if CONFIG['quit_without_confirmation'] == '0':
-            dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL,
-                                  type = gtk.MESSAGE_QUESTION,
-                                  buttons = gtk.BUTTONS_YES_NO,
-                                  message_format = _("Are you sure to quit?"))
-            dialog.set_title(_("Quit?"))
-            response = dialog.run()
-            dialog.destroy()
-        else:
-            response = gtk.RESPONSE_YES
-
-        if response == gtk.RESPONSE_YES:
-            self.save_playlist("%s/.gsharkdown/playlist.pkl" % os.environ.get("HOME"))
-            self.save_downwueue("%s/.gsharkdown/downqueue.pkl" % os.environ.get("HOME"))
-            self.stop_all_downloads()
-            gtk.main_quit()
-
-    def copy_song(self, widget, data = None):
-        """
-        Copy the selected song name from the results list in the
-        GNOME Clipboard
-        """
-        select = self.result_view.get_selection().get_selected_rows()
-        if self.result_view.get_selection().count_selected_rows() > 0:
-            song = self.result_song(select[1][0])
-            copystring = "%s - %s" % (song['ArtistName'], song['SongName'])
-            clipboard = gtk.clipboard_get()
-            clipboard.set_text(copystring)
-            clipboard.store()
-
-    def add_to_playlist(self, widget, data = None):
-        """
-        Adds selected item from the results to the playlist
-        """
-        select = self.result_view.get_selection().get_selected_rows()
-        for item in select[1]:
-            song = self.result_song(item[0])