1. Vladimir Kolev
  2. gSharkDown

Commits

Vladimir Kolev  committed 6d75b93

Added the new GUI to work with the code. Still have to add the new features:

  • Participants
  • Parent commits 11d338f
  • Branches default

Comments (0)

Files changed (3)

File data/love_song.svg

View file
  • Ignore whitespace
Old
Old image
New
New image

File data/main_window.ui

View file
  • Ignore whitespace
     <property name="visible">True</property>
     <property name="stock">gtk-refresh</property>
   </object>
-  <object class="GtkImage" id="image5">
-    <property name="visible">True</property>
-    <property name="pixbuf">love_song.svg</property>
-  </object>
   <object class="GtkImage" id="image_add">
     <property name="visible">True</property>
     <property name="stock">gtk-add</property>
     <property name="visible">True</property>
     <property name="stock">gtk-clear</property>
   </object>
-  <object class="GtkImage" id="image_delete">
-    <property name="visible">True</property>
-    <property name="stock">gtk-delete</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_information">
-    <property name="visible">True</property>
-    <property name="icon_name">dialog-information</property>
-  </object>
   <object class="GtkImage" id="image_open">
     <property name="visible">True</property>
     <property name="stock">gtk-open</property>
   </object>
-  <object class="GtkImage" id="image_playlist_repeat">
-    <property name="visible">True</property>
-    <property name="icon_name">media-playlist-repeat</property>
-  </object>
-  <object class="GtkImage" id="image_playlist_shuffle">
-    <property name="visible">True</property>
-    <property name="icon_name">media-playlist-shuffle</property>
-  </object>
   <object class="GtkImage" id="image_resume">
     <property name="visible">True</property>
     <property name="icon_name">document-revert</property>
         <child>
           <object class="GtkToolbar" id="toolbar1">
             <property name="visible">True</property>
+            <property name="toolbar_style">both-horiz</property>
             <property name="icon_size_set">True</property>
             <child>
               <object class="GtkToolItem" id="toolbutton1">
               </packing>
             </child>
             <child>
-              <object class="GtkToolButton" id="toolbutton_play_previous">
+              <object class="GtkToolItem" id="toolbutton3">
                 <property name="visible">True</property>
-                <property name="tooltip_text" translatable="yes">Previous</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="on_play_previous"/>
+                <child>
+                  <object class="GtkToggleButton" id="togglebutton1">
+                    <property name="label" translatable="yes">Playlist</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="image">image12</property>
+                    <property name="relief">none</property>
+                    <property name="active">True</property>
+                    <signal name="toggled" handler="on_show_playview"/>
+                  </object>
+                </child>
               </object>
               <packing>
                 <property name="expand">False</property>
               </packing>
             </child>
             <child>
-              <object class="GtkToolButton" id="toolbutton_play">
+              <object class="GtkToolItem" id="toolbutton4">
                 <property name="visible">True</property>
-                <property name="tooltip_text" translatable="yes">Play/Stop</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="on_play_selected"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkToolButton" id="toolbutton_play_next">
-                <property name="visible">True</property>
-                <property name="tooltip_text" translatable="yes">Next</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="on_play_next"/>
+                <child>
+                  <object class="GtkToggleButton" id="togglebutton2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="relief">none</property>
+                    <signal name="toggled" handler="on_show_downloadsview"/>
+                    <child>
+                      <object class="GtkHBox" id="hbox6">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkImage" id="image2">
+                            <property name="visible">True</property>
+                            <property name="pixel_size">22</property>
+                            <property name="icon_name">go-down</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="downloads_count">
+                            <property name="visible">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
               </object>
               <packing>
                 <property name="expand">False</property>
               <object class="GtkToolItem" id="toolbutton_volume">
                 <property name="visible">True</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="relief">none</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="orientation">vertical</property>
-                    <property name="value">0.5</property>
-                    <property name="icons">audio-volume-muted
-audio-volume-high
-audio-volume-low
-audio-volume-medium</property>
-                    <signal name="value_changed" handler="on_volume_change"/>
-                  </object>
+                  <placeholder/>
                 </child>
               </object>
               <packing>
-                <property name="expand">False</property>
+                <property name="expand">True</property>
                 <property name="homogeneous">True</property>
               </packing>
             </child>
             <child>
-              <object class="GtkToolButton" id="toolbutton_lyrics">
+              <object class="GtkToggleToolButton" id="fullscreen_button">
                 <property name="visible">True</property>
-                <property name="is_important">True</property>
-                <property name="label" translatable="yes">Lyrics</property>
+                <property name="label" translatable="yes">Fullscreen</property>
                 <property name="use_underline">True</property>
-                <property name="stock_id">gtk-italic</property>
-                <signal name="clicked" handler="on_show_lyrics"/>
+                <property name="stock_id">gtk-fullscreen</property>
+                <signal name="toggled" handler="on_toggle_fullscreen"/>
               </object>
               <packing>
                 <property name="expand">False</property>
               </packing>
             </child>
             <child>
-              <object class="GtkToolButton" id="toolbutton3">
-                <property name="sensitive">False</property>
-                <property name="tooltip_text" translatable="yes">Love song on Last.fm</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"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkToolItem" id="toolbutton4">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkLabel" id="songinfo">
-                    <property name="visible">True</property>
-                    <property name="yalign">0.4699999988079071</property>
-                    <property name="justify">center</property>
-                    <property name="ellipsize">end</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkToolButton" id="toolbutton2">
                 <property name="visible">True</property>
                 <property name="tooltip_text" translatable="yes">Menu</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="tab_pos">bottom</property>
+            <property name="show_tabs">False</property>
             <child>
               <object class="GtkVBox" id="vbox2">
                 <property name="height_request">400</property>
                               <object class="GtkHBox" id="hbox4">
                                 <property name="visible">True</property>
                                 <child>
-                                  <object class="GtkButton" id="button_songinfo">
+                                  <object class="GtkButton" id="button_download_selected">
+                                    <property name="label" translatable="yes">Download selected</property>
                                     <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="image">image_information</property>
-                                    <property name="relief">none</property>
-                                    <signal name="clicked" handler="on_show_info"/>
+                                    <property name="tooltip_text" translatable="yes">Download selected</property>
+                                    <property name="image">image_download</property>
+                                    <signal name="clicked" handler="on_download_selected"/>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkButton" id="button_download_selected">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="tooltip_text" translatable="yes">Download selected</property>
-                                    <property name="image">image_download</property>
-                                    <property name="relief">none</property>
-                                    <signal name="clicked" handler="on_download_selected"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
+                                  <placeholder/>
                                 </child>
                                 <child>
                                   <object class="GtkAlignment" id="alignment4">
                                 </child>
                                 <child>
                                   <object class="GtkButton" id="button_add">
-                                    <property name="label" translatable="yes">Add &gt;</property>
+                                    <property name="label" translatable="yes">Add to playlist</property>
                                     <property name="visible">True</property>
                                     <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="image">image_add</property>
-                                    <property name="relief">none</property>
                                     <signal name="clicked" handler="on_add_to_playlist"/>
                                   </object>
                                   <packing>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkToggleButton" id="togglebutton_repeat">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="tooltip_text" translatable="yes">Toggle repeat all</property>
-                                    <property name="image">image_playlist_repeat</property>
-                                    <property name="relief">none</property>
-                                    <signal name="toggled" handler="on_toggle_repeat"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
+                                  <placeholder/>
                                 </child>
                                 <child>
-                                  <object class="GtkToggleButton" id="togglebutton_shuffle">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="tooltip_text" translatable="yes">Toggle shuffle</property>
-                                    <property name="image">image_playlist_shuffle</property>
-                                    <property name="relief">none</property>
-                                    <signal name="toggled" handler="on_toggle_shuffle"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">3</property>
-                                  </packing>
+                                  <placeholder/>
                                 </child>
                                 <child>
                                   <object class="GtkAlignment" id="alignment3">
                 <child>
                   <object class="GtkAlignment" id="alignment7">
                     <property name="visible">True</property>
-                    <property name="bottom_padding">8</property>
-                    <property name="left_padding">9</property>
+                    <property name="bottom_padding">1</property>
+                    <property name="left_padding">2</property>
                     <child>
                       <object class="GtkHButtonBox" id="hbuttonbox1">
                         <property name="visible">True</property>
-                        <property name="spacing">3</property>
+                        <property name="spacing">1</property>
                         <property name="layout_style">start</property>
                         <child>
                           <object class="GtkButton" id="button1">
               </packing>
             </child>
             <child type="tab">
-              <object class="GtkHBox" id="hbox6">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkImage" id="image2">
-                    <property name="visible">True</property>
-                    <property name="icon_name">document-save</property>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="downloads_count">
-                    <property name="visible">True</property>
-                  </object>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-              </packing>
+              <placeholder/>
             </child>
           </object>
           <packing>
             <property name="position">1</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkVBox" id="vbox6">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkAlignment" id="alignment8">
+                <property name="visible">True</property>
+                <property name="left_padding">5</property>
+                <property name="right_padding">5</property>
+                <child>
+                  <object class="GtkHBox" id="hbox7">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkButton" id="button4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="image">image8</property>
+                        <signal name="clicked" handler="on_play_previous"/>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="button5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="image">toolbutton_play</property>
+                        <signal name="clicked" handler="on_play_selected"/>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="button6">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="image">image10</property>
+                        <signal name="clicked" handler="on_play_next"/>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <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="relief">none</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="orientation">vertical</property>
+                        <property name="value">0.5</property>
+                        <property name="icons">audio-volume-muted
+audio-volume-high
+audio-volume-low
+audio-volume-medium</property>
+                        <signal name="value_changed" handler="on_volume_change"/>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHScale" id="hscale1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="draw_value">False</property>
+                      </object>
+                      <packing>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">-:--/--:--</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="padding">2</property>
+                        <property name="position">5</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="padding">3</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment9">
+                <property name="visible">True</property>
+                <property name="left_padding">5</property>
+                <property name="right_padding">5</property>
+                <child>
+                  <object class="GtkHBox" id="hbox8">
+                    <property name="visible">True</property>
+                    <property name="spacing">1</property>
+                    <child>
+                      <object class="GtkToggleButton" id="togglebutton_repeat">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="image">image_playlist_repeat</property>
+                        <property name="relief">none</property>
+                        <signal name="toggled" handler="on_toggle_repeat"/>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkToggleButton" id="togglebutton_shuffle">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="image">image_playlist_shuffle</property>
+                        <property name="relief">none</property>
+                        <signal name="toggled" handler="on_toggle_shuffle"/>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <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="image">image_information</property>
+                        <property name="relief">none</property>
+                        <signal name="clicked" handler="on_show_info"/>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="button7">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="relief">none</property>
+                        <signal name="clicked" handler="on_love_song"/>
+                        <child>
+                          <object class="GtkImage" id="image5">
+                            <property name="visible">True</property>
+                            <property name="pixbuf">love_song.svg</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="toolbutton_lyrics">
+                        <property name="label" translatable="yes">Lyrics</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="image">image11</property>
+                        <property name="relief">none</property>
+                        <signal name="clicked" handler="on_show_lyrics"/>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="songinfo">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">label</property>
+                        <property name="justify">center</property>
+                        <property name="ellipsize">end</property>
+                      </object>
+                      <packing>
+                        <property name="position">5</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="padding">3</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
       </object>
     </child>
   </object>
+  <object class="GtkImage" id="image_delete">
+    <property name="visible">True</property>
+    <property name="stock">gtk-delete</property>
+  </object>
+  <object class="GtkImage" id="image12">
+    <property name="visible">True</property>
+    <property name="pixel_size">22</property>
+    <property name="icon_name">preferences-desktop-multimedia</property>
+  </object>
+  <object class="GtkImage" id="image8">
+    <property name="visible">True</property>
+    <property name="pixel_size">23</property>
+    <property name="icon_name">media-skip-backward</property>
+  </object>
+  <object class="GtkImage" id="image10">
+    <property name="visible">True</property>
+    <property name="pixel_size">23</property>
+    <property name="icon_name">media-skip-forward</property>
+  </object>
+  <object class="GtkImage" id="image_playlist_repeat">
+    <property name="visible">True</property>
+    <property name="icon_name">media-playlist-repeat</property>
+  </object>
+  <object class="GtkImage" id="image_playlist_shuffle">
+    <property name="visible">True</property>
+    <property name="icon_name">media-playlist-shuffle</property>
+  </object>
+  <object class="GtkImage" id="image_information">
+    <property name="visible">True</property>
+    <property name="icon_name">dialog-information</property>
+  </object>
+  <object class="GtkImage" id="image11">
+    <property name="visible">True</property>
+    <property name="stock">gtk-italic</property>
+  </object>
+  <object class="GtkImage" id="toolbutton_play">
+    <property name="visible">True</property>
+    <property name="pixel_size">22</property>
+    <property name="icon_name">media-playback-start</property>
+  </object>
 </interface>

File lib/SharkDown.py

View file
  • Ignore whitespace
         Initialise the main application window
         """
         gobject.threads_init()
-        
+
         self.working = None
         self.playing = None
         # just to prevend scrobbeling more then once for 
         self.current_song = None
         self.play_thread = None
         self.notify_timeout_id = None
-        
+
         init_thread = InitThread(self)
         init_thread.start()
-        
+
         # Main window initialization
         builder = gtk.Builder()
         builder.set_translation_domain(env().APP)
         repeat_button.set_active(int(config()['repeat_playlist']))
         shuffle_button = builder.get_object('togglebutton_shuffle')
         shuffle_button.set_active(int(config()['shuffle_playlist']))
+        self.panes = builder.get_object('notebook1')
+        self.playview_pane_label = builder.get_object('togglebutton1')
+        self.downloads_pane_label = builder.get_object('togglebutton2')
         self.player = gst.element_factory_make("playbin", "player")
 
         # Completition configuration
         self.downloads = DownloadList(builder.get_object('list_downloads'))
         self.downloads.connect("downloads-changed", self.on_downloads_changed)
         self.downloads.get_view().hide_all()
-        
+
         # Downloads related initialization
         self.downloads_count = builder.get_object('downloads_count')
         self.downloads_expander = builder.get_object('expander_download')
         self.downmenu = builder.get_object('downloadmenu')
         self.on_downloads_changed(self.downloads, 0)
-        
+
         # Song lists initialization
         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"
-            
+
         self.staticon = guihelpers.GsharkIndicator(self)
-        
+
         # Set default directory if is empty
         if config()['down_path'] == "":
             config()['down_path'] = env().get_default_down_path()
         # Pynotify initialization
         if int(config()['show_notification']) == 1 and env().HAVE_NOTIFY:
             pynotify.init("gSharkDown")
-            
+
         # Scrobbling initialization
         self.lastfm = None
         if int(config()['scrobbling']) == 1 and env().HAVE_PYLAST:
         builder.connect_signals(self)
         self.tlisten = KeyListenerThread(self)
         self.tlisten.start()
-        
+
         # Updates checking
         if config()['update_checked'] == 0:
             self.check_for_updates()
         else:
             if config()['startup_update_check'] == 1:
                 self.check_for_updates()
-        
+
         self.window.set_sensitive(False)
         self.window.show_all()
- 
-        
+
+
     def on_init_thread_success(self):
         self.window.set_sensitive(True)
         if os.path.exists("%s/.gsharkdown/downqueue.pkl" % os.environ.get("HOME")):
             self.load_downqueue_list("%s/.gsharkdown/downqueue.pkl" % os.environ.get("HOME"))
-            
+
     def on_init_thread_failed(self):
         error = guihelpers.ErrorMessage(None,
                         "GrooveShark service has probably changed!\n" +
                         "be patient until we find a solution.")
         error.show_all()
 
+    def on_show_playview(self, button, data = None):
+        """docstring for on_show_playview"""
+        if button.get_active():
+            self.panes.set_current_page(0)
+            self.downloads_pane_label.set_active(False)
+        else:
+            pass
+
+    def on_show_downloadsview(self, button, data = None):
+        if button.get_active():
+            self.panes.set_current_page(1)
+            self.playview_pane_label.set_active(False)
+        else:
+            pass
+
+    def on_toggle_fullscreen(self, button, data = None):
+        """docstring for on_toggle_fullscreen"""
+        if button.get_active():
+            self.window.fullscreen()
+        else:
+            self.window.unfullscreen()
+
     def get_iter_last(self, model):
         """
         Get the last iter from a model
                 self.playlist.append_song(song)
             except:
                 eoferror = False
-                
+
         file.close()
-                
+
     def save_playlist(self, path):
         """
         Saves the playlist from the playlist treeview to 
                 self.downloads.append_song(song)
             except:
                 eoferror = False
-                
+
         file.close()
 
     def save_downqueue(self, path):
         self.window.hide_on_delete()
         self.windowstate = 0
         return True
-    
+
     def check_for_updates(self):
         """
         Checks if a new version of the application is available
         """
         t = UpdateThread()
         t.start()
-    
+
     def on_check_for_updates(self, widget, data = None):
         self.check_for_updates()
 
         selection = self.playlist.get_selected_rows()
         if len(selection) > 0:
             for i in selection:
-                self.playlist.get_model().remove( self.playlist.get_model().get_iter(i) )
-                
+                self.playlist.get_model().remove(self.playlist.get_model().get_iter(i))
+
             if len(self.playlist) > 0:
                 select_path = selection[len(selection) - 1]
                 if select_path[0] >= len(self.playlist):
-                    select_path = (select_path[0]-1,)
+                    select_path = (select_path[0] - 1,)
                 self.playlist.get_view().select_path(select_path)
-                
+
             if self.get_playing_iter() == None:
                 self.stop_play()
 
         """
         song = self.result.get_song(column[0])
         self.playlist.append_song(song)
-            
+
     def get_playing_iter(self):
         return self.playlist.get_song_iter(self.get_playing_song())
-    
+
     def get_playing_song(self):
         return self.playlist.get_playing_song()
-        
+
     def set_playing_song(self, song):
         """
         Updates some labels and icons when a song is playing
         """
         self.playlist.set_playing_song(song)
-        
+
         if song != None:
             self.staticon.change_status_playing()
-            
+
             play_stop_image = gtk.Image()
             play_stop_image.set_from_stock(gtk.STOCK_MEDIA_STOP, gtk.ICON_SIZE_MENU)
             self.staticon.change_playbutton(play_stop_image)
-            self.play_button.set_stock_id(gtk.STOCK_MEDIA_STOP)
+            self.play_button.set_from_icon_name("media-playback-stop", 22)
             self.scrobbled = 0
 
             self.songinfo.set_markup(
                 if self.notify_timeout_id != None:
                     gobject.source_remove(self.notify_timeout_id)
                 self.notify_timeout_id = gobject.timeout_add(1000, self.show_playing_song_notification)
-                
+
             self.player.set_state(gst.STATE_NULL)
-            
+
             if self.play_thread != None:
                 # Avoid the current song streaming
                 self.play_thread.stop()
         else:
             if self.play_thread != None:
                 self.play_thread.stop()
-            
+
             self.staticon.change_status_stopped()
             play_stop_image = gtk.Image()
             play_stop_image.set_from_stock(gtk.STOCK_MEDIA_PLAY, gtk.ICON_SIZE_MENU)
             self.staticon.change_playbutton(play_stop_image)
             self.player.set_state(gst.STATE_NULL)
-            self.play_button.set_stock_id(gtk.STOCK_MEDIA_PLAY)
+            self.play_button.set_from_icon_name("media-playback-start", 22)
             self.songinfo.set_markup("")
-    
+
     def show_playing_song_notification(self):
         song = self.get_playing_song()
         n = pynotify.Notification(_("Now playing"),
             "audio-x-generic")
         n.set_timeout(50)
         n.show()
-    
+
     def play_first_song(self):
         if len(self.playlist) > 0:
             self.set_playing_song(self.playlist.get_song(0))
-    
+
     def on_play_selected(self, widget, data = None, row = None):
         """
         Starts the play thread
             self.play_first_song()
         else:
             self.stop_play()
-            
+
     def on_play_next(self, widget, data = None):
         self.play_next()
-        
+
     def on_play_previous(self, widget, data = None):
         self.play_previous()
-    
+
     def next_shuffled_index(self):
         path = None
-        
+
         if len(self.playlist) == 1:
             return 0
-        
+
         if self.get_playing_song() != None:
             path = self.playlist.get_song_path(self.get_playing_song())
-            
+
         while True:
             index = random.randint(0, len(self.playlist) - 1)
             if path == None or index != path[0]:
                 break
-            
+
         return index
-    
+
     def play_next(self):
         """
         Plays the next item from the playlist
         """
         if len(self.playlist) == 0:
             return
-        
+
         if self.get_playing_song() == None:
             self.play_first_song()
         else:
                 else:
                     index = None
                     self.stop_play()
-            
+
             if index != None:
-                self.set_playing_song( self.playlist.get_song((index,)) )
-        
+                self.set_playing_song(self.playlist.get_song((index,)))
+
     def play_previous(self):
         """
         Plays the previous song from the playlist
         """
         if len(self.playlist) == 0:
             return
-        
+
         if self.get_playing_iter() == None:
             self.play_first_song()
         else:
                     index = len(self.playlist) - 1
                 else:
                     index = 0
-            
-            self.set_playing_song( self.playlist.get_song((index,)) )
+
+            self.set_playing_song(self.playlist.get_song((index,)))
 
     def stop_play(self):
         """
             song = self.result.get_song(select[1][0])
             dialog = guihelpers.SongInfoDialog(song)
             dialog.show_all()
-            
+
 
     def on_show_lyrics(self, widget, data = None):
         """
         """
         dialog = guihelpers.PreferencesDialog(self)
         dialog.show_all()
-        
+
     def on_search_grooveshark(self, widget, data = None):
         """
         Starts the search thread
         select = self.result.get_selected_rows()
         for path in select:
             song = self.result.get_song(path)
-            
+
             filename = self.get_overwritten_filename(song.get_default_filename())
 
             if filename != None:
             cur = iter
             iter = self.downloads.next(iter)
             self.downloads.get_song(cur).cancel_download()
-            
+
     def on_stop_all_downloads(self, widget, data = None):
         """
         Cancel all downloads
         while iter != None:
             self.downloads.get_song(iter).pause_download()
             iter = self.downloads.next(iter)
-            
+
     def on_resume_all_downloads(self, widget, data = None):
         """
         Cancel all downloads