1. necromoine
  2. gSharkDown

Commits

necromoine  committed 5ea08c1

Adding android copy function

  • Participants
  • Parent commits 1ad5361
  • Branches default

Comments (0)

Files changed (7)

File data/main_window.ui

View file
  • Ignore whitespace
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.16"/>
-  <!-- interface-naming-policy project-wide -->
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkImage" id="image_playlist_back">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixel_size">23</property>
+    <property name="icon_name">media-skip-backward</property>
+  </object>
   <object class="GtkMenu" id="downloadmenu">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
         <property name="label">gtk-media-pause</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_pause_download" swapped="no"/>
         <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" swapped="no"/>
         <property name="label">gtk-delete</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" swapped="no"/>
       </object>
     </child>
+    <child>
+      <object class="GtkImageMenuItem" id="menuitem5">
+        <property name="label" translatable="yes">Send to Android</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="image">image6</property>
+        <property name="use_stock">False</property>
+        <signal name="activate" handler="copy_to_android" swapped="no"/>
+      </object>
+    </child>
+  </object>
+  <object class="GtkImage" id="image9">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-clear</property>
   </object>
   <object class="GtkImage" id="image1">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="stock">gtk-refresh</property>
   </object>
-  <object class="GtkImage" id="image9">
+  <object class="GtkImage" id="image6">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="stock">gtk-clear</property>
+    <property name="stock">gtk-copy</property>
   </object>
   <object class="GtkImage" id="image_add">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="stock">gtk-media-pause</property>
   </object>
-  <object class="GtkImage" id="image_playlist_back">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="pixel_size">23</property>
-    <property name="icon_name">media-skip-backward</property>
-  </object>
   <object class="GtkImage" id="image_playlist_lyrics">
     <property name="visible">True</property>
     <property name="can_focus">False</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="on_open_preferences" swapped="no"/>
         <property name="label">gtk-fullscreen</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_toggle_fullscreen" swapped="no"/>
         <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="on_check_for_updates" swapped="no"/>
         <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="on_show_about" swapped="no"/>
         <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="on_quit_app" swapped="no"/>
             <property name="can_focus">False</property>
             <property name="toolbar_style">both-horiz</property>
             <property name="show_arrow">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="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="changed" handler="on_search_text_changed" swapped="no"/>
                     <signal name="activate" handler="on_search_grooveshark" swapped="no"/>
                   </object>
               <object class="GtkToolItem" id="toolbutton3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
                 <child>
                   <object class="GtkToggleButton" id="togglebutton_playlist">
                     <property name="label" translatable="yes">Playlist</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
                     <property name="tooltip_text" translatable="yes">Switch to playlist</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="image">image_toolbar_playlist</property>
                     <property name="relief">none</property>
                     <property name="active">True</property>
               <object class="GtkToolItem" id="toolbutton4">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
                 <child>
                   <object class="GtkToggleButton" id="togglebutton_downloads">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
                     <property name="tooltip_text" translatable="yes">Switch to downloads list</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="relief">none</property>
                     <signal name="toggled" handler="on_show_downloadsview" swapped="no"/>
                     <child>
               <object class="GtkToolItem" id="toolbutton5">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
                 <child>
                   <placeholder/>
                 </child>
                 <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="is_important">True</property>
                 <property name="label" translatable="yes">Menu</property>
                 <property name="use_underline">True</property>
                             <property name="invisible_char">•</property>
                             <property name="secondary_icon_stock">gtk-clear</property>
                             <property name="primary_icon_activatable">False</property>
-                            <property name="secondary_icon_activatable">True</property>
-                            <property name="primary_icon_sensitive">True</property>
-                            <property name="secondary_icon_sensitive">True</property>
                             <signal name="changed" handler="on_filter_changed" swapped="no"/>
                             <signal name="icon-release" handler="on_filter_entry_icon_press" swapped="no"/>
                           </object>
                           <object class="GtkScrolledWindow" id="scrolledwindow1">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="hscrollbar_policy">automatic</property>
-                            <property name="vscrollbar_policy">automatic</property>
                             <property name="shadow_type">in</property>
                             <child>
                               <object class="GtkTreeView" id="list_results">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="rules_hint">True</property>
+                                <child internal-child="selection">
+                                  <object class="GtkTreeSelection" id="treeview-selection1"/>
+                                </child>
                               </object>
                             </child>
                           </object>
                                 <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_download</property>
                                 <signal name="clicked" handler="on_download_selected" swapped="no"/>
                               </object>
                                 <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_add</property>
                                 <signal name="clicked" handler="on_add_to_playlist" swapped="no"/>
                               </object>
                             <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_delete</property>
                             <property name="relief">none</property>
                             <property name="focus_on_click">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_clear</property>
                             <property name="relief">none</property>
                             <property name="focus_on_click">False</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
                             <property name="tooltip_text" translatable="yes">Save playlist to file</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="image">image_save_as</property>
                             <property name="relief">none</property>
                             <signal name="clicked" handler="on_playlist_save_as" swapped="no"/>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
                             <property name="tooltip_text" translatable="yes">Load playlist from file</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="image">image_open</property>
                             <property name="relief">none</property>
                             <signal name="clicked" handler="on_playlist_open" swapped="no"/>
                                 <property name="selection_mode">multiple</property>
                                 <property name="row_spacing">0</property>
                                 <property name="column_spacing">3</property>
-                                <property name="margin">0</property>
                                 <property name="reorderable">True</property>
                                 <property name="item_padding">5</property>
                                 <signal name="selection-changed" handler="on_playlist_view_selection_changed" swapped="no"/>
                       <object class="GtkScrolledWindow" id="scrolledwindow3">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <property name="shadow_type">in</property>
                         <child>
                           <object class="GtkTreeView" id="list_downloads">
                             <property name="can_focus">True</property>
                             <property name="reorderable">True</property>
                             <signal name="button-press-event" handler="right_click_download" swapped="no"/>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" id="treeview-selection2"/>
+                            </child>
                           </object>
                         </child>
                       </object>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
                             <property name="tooltip_text" translatable="yes">Cancels all downloads</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="image">image_delete_download</property>
                             <signal name="clicked" handler="on_cancel_all_downloads" swapped="no"/>
                           </object>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
                             <property name="tooltip_text" translatable="yes">Stops all downloads</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="image">image_pause_download</property>
                             <signal name="clicked" handler="on_stop_all_downloads" swapped="no"/>
                           </object>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
                             <property name="tooltip_text" translatable="yes">Resumes all downloads</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="image">image_resume</property>
                             <signal name="clicked" handler="on_resume_all_downloads" swapped="no"/>
                           </object>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
                             <property name="tooltip_text" translatable="yes">Clear completed downloads</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="image">image9</property>
                             <signal name="clicked" handler="on_clear_downloadlist" swapped="no"/>
                           </object>
                         <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_playlist_back</property>
                         <signal name="clicked" handler="on_play_previous" swapped="no"/>
                       </object>
                         <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">widget_image_play</property>
                         <signal name="clicked" handler="on_play_selected" swapped="no"/>
                       </object>
                         <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_playlist_pause</property>
                         <signal name="clicked" handler="on_pause_toggled" swapped="no"/>
                       </object>
                         <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_playlist_next</property>
                         <signal name="clicked" handler="on_play_next" swapped="no"/>
                       </object>
                         <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="relief">none</property>
                         <property name="focus_on_click">False</property>
                         <property name="orientation">vertical</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="use_action_appearance">False</property>
                         <property name="image">image_playlist_repeat</property>
                         <property name="relief">none</property>
                         <signal name="toggled" handler="on_toggle_repeat" swapped="no"/>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
                         <property name="tooltip_text" translatable="yes">Toggle shuffle all</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="image">image_playlist_shuffle</property>
                         <property name="relief">none</property>
                         <signal name="toggled" handler="on_toggle_shuffle" swapped="no"/>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
                         <property name="tooltip_text" translatable="yes">Show info for the song</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="image">image_information</property>
                         <property name="relief">none</property>
                         <signal name="clicked" handler="on_show_info" swapped="no"/>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
                         <property name="tooltip_text" translatable="yes">Love track on Last.fm</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="relief">none</property>
                         <signal name="clicked" handler="on_love_song" swapped="no"/>
                         <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="image">image_playlist_lyrics</property>
                         <property name="relief">none</property>
                         <signal name="clicked" handler="on_show_lyrics" swapped="no"/>

File data/preferenes_dialog.ui

View file
  • Ignore whitespace
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.16"/>
-  <!-- interface-naming-policy project-wide -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1">
     <property name="upper">65535</property>
     <property name="value">100</property>
     <property name="border_width">5</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="spacing">2</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
               <object class="GtkNotebook" id="notebook1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="tab_border">4</property>
-                <property name="homogeneous">True</property>
                 <child>
                   <object class="GtkAlignment" id="alignment3">
                     <property name="visible">True</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="xalign">0.5</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
                             <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="xalign">0.5</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkCheckButton" id="checkbutton4">
-                            <property name="label" translatable="yes">Check for updates on startup</property>
+                          <object class="GtkCheckButton" id="checkbutton5">
+                            <property name="label" translatable="yes">Minimize on close</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="xalign">0.5</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
                                 <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>
                                 <property name="adjustment">adjustment2</property>
                                 <property name="digits">2</property>
                               </object>
                             <property name="position">3</property>
                           </packing>
                         </child>
+                        <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="xalign">0.5</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
                   </object>
                                 <property name="invisible_char_set">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="invisible_char_set">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>
                                   </object>
                                   <packing>
                                     <property name="expand">True</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="xalign">0.5</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <signal name="toggled" handler="on_proxy_radio_changed" swapped="no"/>
                             <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="xalign">0.5</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">radio_proxy_0</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="xalign">0.5</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">radio_proxy_0</property>
                                     <property name="invisible_char_set">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>
                                   </object>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="invisible_char_set">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="snap_to_ticks">True</property>
                                     <property name="numeric">True</property>
                                     <property name="invisible_char_set">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>
                                   </object>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="invisible_char_set">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>
                                   </object>
                                   <packing>
                                     <property name="left_attach">1</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="xalign">0.5</property>
                             <property name="draw_indicator">True</property>
                             <signal name="toggled" handler="on_scrobble_toggle" swapped="no"/>
                           </object>
                                 <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="left_attach">1</property>
                                 <property name="primary_icon_stock">gtk-dialog-authentication</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="left_attach">1</property>
                     <property name="tab_fill">False</property>
                   </packing>
                 </child>
+                <child>
+                  <object class="GtkAlignment" id="alignment6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="top_padding">12</property>
+                    <property name="left_padding">12</property>
+                    <property name="right_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox7">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <object class="GtkTable" id="table_lastfm1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">8</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label20">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Android Music</property>
+                              </object>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkFileChooserButton" id="filechooserbutton2">
+                                <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="show_hidden">True</property>
+                                <property name="title" translatable="yes">Android Desination Directory</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+                <child type="tab">
+                  <object class="GtkLabel" id="label19">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Android</property>
+                    <property name="justify">right</property>
+                  </object>
+                  <packing>
+                    <property name="position">4</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
               </object>
             </child>
           </object>
                 <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_cancel" swapped="no"/>
               </object>
                 <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_save" swapped="no"/>
               </object>

File lib/PlayList.py

View file
  • Ignore whitespace
 from enviroment import env, config
 import gtk
 import glib
+from gettext import gettext as _
 
 class PlayList (AbstractSongList):
     """

File lib/SharkDown.py

View file
  • Ignore whitespace
 import os
 import sys
 import random
+import threading
 from tfuncs import PlayThread
 from tfuncs import SearchThread
 from tfuncs import KeyListenerThread
 
         # Main window and widgets initialization
         self.window = builder.get_object('mainwindow')
-        self.window.connect("delete-event", self.window.hide_on_delete)
+        self.window.connect("delete-event", self.on_hide_window)
         self.mainmenu = builder.get_object('mainmenu')
 
         self.vbox_results = builder.get_object('vbox_results')
         groove.onInitStart(self.on_groove_init_start)
         groove.onInitFinish(self.on_groove_init_finish)
         groove.onInitError(self.on_groove_init_error)
+        
 
     def on_groove_init_start(self):
         self.window.set_title(_("gSharkDown - Initializing Grooveshark..."))
             SongCoverThread.cancel_downloads.set()
             gtk.main_quit()
 
+    def on_hide_window(self, widget, data = None):
+        if config()['minimize_on_close'] == '1':
+            self.window.hide()
+        else:
+            self.on_quit_app(widget, data)
+        return True
+
     def on_copy_song(self, widget, data = None):
         """
         Copy the selected song name from the results list in the
                 selected_rows = self.downloads.get_selected_rows()
                 self.downmenu.get_children()[0].set_sensitive(False)
                 self.downmenu.get_children()[1].set_sensitive(False)
+                self.downmenu.get_children()[3].set_sensitive(False)
                 for path in selected_rows:
                     if self.downloads.get_song(path).is_downloading() == False and self.downloads.get_song(path).get_state() != Song.STATE_NOT_STARTED:
                         self.downmenu.get_children()[1].set_sensitive(True)
+                        self.downmenu.get_children()[3].set_sensitive(True)
                     else:
                         self.downmenu.get_children()[0].set_sensitive(True)
 
         load the download list in order to resume.
         Resume stopped download
         """
+	
         select = self.downloads.get_selected_rows()
         for path in select:
             self.downloads.get_song(path).reset_unfinished_download_state()
-
+            
+    def copy(self, source, destination):
+        source = open(source, "rb")
+        destination = open(destination, "wb")
+        while True:
+	    try: 
+	        data = source.read(1)
+		if data != "":
+		    destination.write(data)
+		else:
+         	    break
+	    except EOFError: 
+	    	break
+                
+    def copy_to_android(self, button, data = None):
+			"""
+			Copy the selected song(s) to the Android Device set in Parameters
+			"""
+			select = self.downloads.get_selected_rows()
+			for path in select:
+				filename = self.downloads.get_song(path).get_filename()
+				if os.path.isdir(config()["android_path"]) and os.path.isfile(filename):
+					thread = threading.Thread(target=self.copy, args=(filename, config()["android_path"] + "/" + os.path.basename(filename))).start()
+				else:
+					print "Wrong output directory, please check Preferences"
+ 				
+				
     def on_love_song(self, button):
         if self.get_playing_song() == None:
             info = guihelpers.InfoDialog(self.window,

File lib/enviroment.py

View file
  • Ignore whitespace
             'proxy_user': '',
             'proxy_pass': '',
             'cover_cache_limit': 16 * 1024 * 1024,
+            'minimize_on_close' : 0,
         }
 
     def _safe_create_dirs(self, dirs):

File lib/guihelpers.py

View file
  • Ignore whitespace
 
         self.prefs = builder.get_object('window1')
         self.dest = builder.get_object('filechooserbutton1')
+        self.android = builder.get_object('filechooserbutton2')
         self.dest.set_filename(config()['down_path'])
+        self.android.set_filename(config()['android_path'])
         self.quit_without_confirmation = builder.get_object("checkbutton1")
         self.quit_without_confirmation.set_active(int(config()['quit_without_confirmation']))
         self.bubble = builder.get_object("checkbutton2")
+        self.minimize_on_close = builder.get_object("checkbutton5")
+        self.minimize_on_close.set_active(int(config()['minimize_on_close']))
         self.speed = builder.get_object("spinbutton1")
         self.speed.set_value(int(config()['speed_limit']))
         self.file_pattern = builder.get_object("entry1")
         configuration file
         """
         config()['down_path'] = self.dest.get_filename()
-
+        config()['android_path'] = self.android.get_filename()	
         if self.quit_without_confirmation.get_active():
             config()['quit_without_confirmation'] = '1'
         else:
             config()['quit_without_confirmation'] = '0'
 
+        if self.minimize_on_close.get_active():
+            config()['minimize_on_close'] = '1'
+        else:
+            config()['minimize_on_close'] = '0'
+
         if self.bubble.get_active():
             config()['show_notification'] = 1
         else:

File po/pl.po

View file
  • Ignore whitespace
 "Project-Id-Version: gsharkdown\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-13 16:21-0300\n"
-"PO-Revision-Date: 2012-01-01 16:17+0100\n"
-"Last-Translator: Vladimir Kolev <vladimir.r.kolev@gmail.com>\n"
+"PO-Revision-Date: 2012-10-25 17:11+0100\n"
+"Last-Translator: - <->\n"
 "Language-Team: darone\n"
 "Language: pl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2)\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
 "X-Poedit-Language: Polish\n"
 "X-Poedit-Country: POLAND\n"
 
 #, python-format
 msgid ""
 "GrooveShark service has probably changed or is not working!\n"
-"gSharkDown will not works propperly, so please be patient until we find a "
-"solution.\n"
+"gSharkDown will not works propperly, so please be patient until we find a solution.\n"
 "Also, this may usually caused by a proxy misconfiguration\n"
 "please check your proxy configuration.\n"
 "\n"
 "The error was: %s"
 msgstr ""
+"Usługa GrooveShark została prawdopodobnie zmodyfikowana lub przestała działać!\n"
+"gSharkDown nie może w tej sytuacji poprawnie funckjonować.\n"
+"Oczekuj cierpliwie rozwiązania, które postaramy się dostarczyć.\n"
+"\n"
+"Innym wytłumaczeniem zaistniałej sytuacji może być zła konfiguracja proxy\n"
+"Sprawdź swpje ustawienia proxy!\n"
+"\n"
+"Komunikat błędu: %s"
 
 #: ../lib/SharkDown.py:284
 #, fuzzy
 msgid "Error while saving the download queue"
 msgstr "Błąd podczas zapisu kolejki pobierania"
 
-#: ../lib/SharkDown.py:325 ../data/main_window.ui.h:21
+#: ../lib/SharkDown.py:325
+#: ../data/main_window.ui.h:21
 msgid "Save playlist to file"
 msgstr "Zapisz listę odtwarzania do pliku"
 
 msgstr "Wyłączyć?"
 
 #: ../lib/SharkDown.py:573
-msgid ""
-"<b>Playing:</b> <i>{title}</i> <span fgcolor='#777777'>by {artist}</span>"
-msgstr ""
+msgid "<b>Playing:</b> <i>{title}</i> <span fgcolor='#777777'>by {artist}</span>"
+msgstr "<b>Odtwarzanie:</b> <i>{title}</i> <span fgcolor='#777777'>, wykonawca: {artist}</span>"
 
 #: ../lib/SharkDown.py:609
 msgid "Now playing"
 #, python-format
 msgid "%d track"
 msgid_plural "%d tracks"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "%d ścieżka"
+msgstr[1] "%d ścieżki"
+msgstr[2] "%d ścieżki"
 
 #: ../lib/SharkDown.py:708
 msgid "Track {0} of {1}"
-msgstr ""
+msgstr "Ścieżka {0} z {1}"
 
 #: ../lib/SharkDown.py:738
 #, fuzzy
 
 #: ../lib/guihelpers.py:152
 msgid "Song Information - {songid}"
-msgstr "Informacje o piosence - {songid}"
+msgstr "Informacje o utworze - {songid}"
 
 #: ../lib/guihelpers.py:153
 msgid "<b>Title:</b> {title}\n"
 
 #: ../lib/guihelpers.py:260
 msgid "There is no proxy configured in your system"
-msgstr ""
+msgstr "Brak konfiguracji proxy w twoim systemie"
 
 #: ../lib/guihelpers.py:266
 #, python-format
 msgid "The system proxy is: %s"
-msgstr ""
+msgstr "Systemowe proxy to: %s"
 
 #: ../lib/guihelpers.py:322
 msgid "The Last.fm username must not be empty."
-msgstr ""
+msgstr "Nazwa użytkownika Last.fm nie może być pusta"
 
 #: ../lib/guihelpers.py:330
 msgid "The Last.fm password must not be empty."
-msgstr ""
+msgstr "Hasło Last.fm nie może być puste."
 
 #: ../lib/guihelpers.py:347
 #, fuzzy
-msgid ""
-"Please check your username and password for Last.fm or disable scrobbling"
+msgid "Please check your username and password for Last.fm or disable scrobbling"
 msgstr "Sprawdź swój login i hasło do Last.fm"
 
 #: ../lib/guihelpers.py:399
 
 #: ../lib/guihelpers.py:416
 msgid "Check for update"
-msgstr "Sprawd aktualizację"
+msgstr "Sprawdź aktualizacje"
 
-#: ../lib/guihelpers.py:447 ../gsharkdown.desktop.in.h:2
+#: ../lib/guihelpers.py:447
+#: ../gsharkdown.desktop.in.h:2
 #: ../data/main_window.ui.h:34
 msgid "gSharkDown"
 msgstr "gSharkDown"
 msgstr "Pliki listy odtwarzania"
 
 #: ../lib/groove.py:186
+#, fuzzy
 msgid "Grooveshark is not initialized"
-msgstr ""
+msgstr "Grooveshark nie zainicjowany"
 
 #: ../lib/PlayList.py:157
 msgid ""
 "<b>Album:</b> {album}\n"
 "<b>Year:</b> {year}"
 msgstr ""
+"<b>Tytuł:</b> {title}\n"
+"<b>Artysta:</b> {artist}\n"
+"<b>Album:</b> {album}\n"
+"<b>Rok:</b> {year}"
 
 #: ../lib/tfuncs.py:82
 #, python-format
 "\n"
 "The error was: %s"
 msgstr ""
+"W trakcie odtwarzania utworu wystąpił błąd. Proszę spróbować jeszcze raz, później.\n"
+"\n"
+"Komunikat błędu: %s"
 
 #: ../lib/tfuncs.py:163
 msgid "No songs found"
-msgstr ""
+msgstr "Nie znaleziono żadnych utworów"
 
 #: ../lib/tfuncs.py:170
 #, python-format
 "\n"
 "The error was: %s"
 msgstr ""
+"Wyszukiwanie w witrynie Grooveshark zakończyło się błędem.\n"
+"Komunikat błędu: %s"
 
 #: ../lib/tfuncs.py:192
 msgid "To update to the latest version "
 msgstr "Aby zaktualizować do najnowszej wersji"
 
 #: ../lib/tfuncs.py:193
-msgid ""
-"you can visit the <a href=\"http://https://bitbucket.org/vkolev/gsharkdown/"
-"downloads\"> "
-msgstr ""
-"odwiedź <a href=\"http://https://bitbucket.org/vkolev/gsharkdown/downloads"
-"\"> "
+msgid "you can visit the <a href=\"http://https://bitbucket.org/vkolev/gsharkdown/downloads\"> "
+msgstr "odwiedź <a href=\"http://https://bitbucket.org/vkolev/gsharkdown/downloads\"> "
 
 #: ../lib/tfuncs.py:194
 msgid "download site</a>. If you are using the latest version and want to be "
 msgstr "stronę pobierania</a>. Jeśli używasz najnowszej wersji i chcesz by"
 
 #: ../lib/tfuncs.py:195
-msgid ""
-"informed about new versions, just enable the option in the <b>Preferences</"
-"b> dialog."
-msgstr ""
-"informowany o nowszych wersjach, po prostu włącz opcję w  <b>Preferencjach</"
-"b>."
+msgid "informed about new versions, just enable the option in the <b>Preferences</b> dialog."
+msgstr "informowany o nowszych wersjach, po prostu włącz opcję w  <b>Preferencjach</b>."
 
 #: ../lib/tfuncs.py:198
 #, python-format
 msgid "<b>New version <span fgcolor=\"red\"><i>%s</i></span> is available</b>"
-msgstr ""
-"<b>Nowa wersja <span fgcolor=\"red\"><i>%s</i></span> jest dostępna</b>"
+msgstr "<b>Nowa wersja <span fgcolor=\"red\"><i>%s</i></span> jest dostępna</b>"
 
 #: ../lib/tfuncs.py:200
 msgid "New version"
 msgid "Loading lyrics..."
 msgstr "ładowanie Tekstu"
 
-#: ../lib/tfuncs.py:232 ../data/main_window.ui.h:13
+#: ../lib/tfuncs.py:232
+#: ../data/main_window.ui.h:13
 msgid "Lyrics"
 msgstr "Tekst"
 
 
 #: ../lib/DownloadList.py:73
 msgid "Speed"
-msgstr ""
+msgstr "Prędkość"
 
 #: ../lib/DownloadList.py:77
 msgid "Size"
 
 #: ../lib/PlayListStyleWidget.py:13
 msgid "Text below icons"
-msgstr ""
+msgstr "Tekst pod ikonami"
 
 #: ../lib/PlayListStyleWidget.py:14
 msgid "Text beside icons"
-msgstr ""
+msgstr "Tekst obok ikon"
 
 #. (PlayList.ICONS_BIG, _("Icons only (big)"),),
 #. (PlayList.ICONS_SMALL, _("Icons only (small)"),),
 #: ../lib/PlayListStyleWidget.py:17
 msgid "Not show"
-msgstr ""
+msgstr "Nie pokazuj"
 
 #: ../lib/PlayListStyleWidget.py:42
 #, fuzzy
 "Please update your version of PyGtk\n"
 "to change the playlist style"
 msgstr ""
+"Aby zmienić wygląd playlisty,\n"
+"zaktualizuj PyGtk"
 
 #: ../gsharkdown.desktop.in.h:1
 msgid "Play and download songs from Grooveshark"
-msgstr ""
+msgstr "Odtwarzaj i ściągaj utwory z Grooveshark"
 
 #: ../data/lyrics_dialog.ui.h:1
 msgid "<b>Lyrics for:</b>"
 "\t<b>{album}</b> - The album name\n"
 "</span>"
 msgstr ""
-"<b>Możesz skorzystać z następujących symboli zastępczych: »<b>{artist}</b> - "
-"Nazwa wykonawcy\n"
+"<b>Możesz skorzystać z następujących symboli zastępczych: »<b>{artist}</b> - Nazwa wykonawcy\n"
 "»<b>{song}</b> - Nazwa utworu \n"
 "»<b>{album}</b> - Nazwa albumu"
 
 
 #: ../data/preferenes_dialog.ui.h:8
 msgid "Do not use proxy"
-msgstr ""
+msgstr "Nie używaj proxy"
 
 #: ../data/preferenes_dialog.ui.h:9
 msgid "Download Directory:"
 
 #: ../data/preferenes_dialog.ui.h:13
 msgid "General"
-msgstr ""
+msgstr "Ogólne"
 
 #: ../data/preferenes_dialog.ui.h:14
 msgid "Last.fm"
-msgstr ""
+msgstr "Last.fm"
 
 #: ../data/preferenes_dialog.ui.h:15
 msgid "Maximum download speed: "
 
 #: ../data/preferenes_dialog.ui.h:16
 msgid "MegaBytes"
-msgstr ""
+msgstr "MegaBytes"
 
 #: ../data/preferenes_dialog.ui.h:17
 #, fuzzy
 
 #: ../data/preferenes_dialog.ui.h:18
 msgid "Port:"
-msgstr ""
+msgstr "Port:"
 
 #: ../data/preferenes_dialog.ui.h:19
 msgid "Proxy"
-msgstr ""
+msgstr "Proxy"
 
 #: ../data/preferenes_dialog.ui.h:20
 msgid "Quit application without confirmation"
 
 #: ../data/preferenes_dialog.ui.h:22
 msgid "Server:"
-msgstr ""
+msgstr "Serwer:"
 
 #: ../data/preferenes_dialog.ui.h:23
 msgid "Show notifications on track change"
 
 #: ../data/preferenes_dialog.ui.h:24
 msgid "Song cover cache limit:"
-msgstr ""
+msgstr "Maksymalny rozmiar bufora przechowyjącego okładki płyt"
 
 #: ../data/preferenes_dialog.ui.h:25
 msgid "Use a custom proxy"
-msgstr ""
+msgstr "Użyj własnych ustawień proxy"
 
 #: ../data/preferenes_dialog.ui.h:26
 msgid "Use system configured proxy"
-msgstr ""
+msgstr "Użyj systemowych ustawień proxy"
 
 #: ../data/preferenes_dialog.ui.h:27
 msgid "Username:"
 "You need to install pylast to use Last.fm.\n"
 "Please execute \"sudo pip install pylast\" to install it."
 msgstr ""
+"Aby używać Last.fm musisz zainstalować pylast.\n"
+"Uruchom \"sudo pip install pylast\" aby przeprowadzić instalację."
 
 #: ../data/preferenes_dialog.ui.h:30
 msgid "You need to restart gSharkDown for the proxy changes to takes effect."
-msgstr ""
+msgstr "Do użycia nowych ustwawień proxy wymagany jest restart"
 
 #: ../data/preferenes_dialog.ui.h:31
 #, fuzzy
 
 #: ../data/preferenes_dialog.ui.h:32
 msgid "kB/s"
-msgstr ""
+msgstr "kB/s"
 
 #: ../data/about_dialog.ui.h:1
 msgid "About GrooveDown"
 
 #: ../data/about_dialog.ui.h:6
 msgid "Copyright © 2011-2012 Vladimir Kolev and Damián Nohales"
-msgstr ""
+msgstr "Copyright © 2011-2012 Vladimir Kolev and Damián Nohales"
 
 #: ../data/about_dialog.ui.h:7
 #, fuzzy
-msgid ""
-"Downloading MP3's is illegal in some countries! Please check the law in your "
-"country."
-msgstr ""
-"<b>Pobieranie mp3 jest nielegalne w niektórych krajach! Sprawdz prawo w "
-"swoim kraju.</b>"
+msgid "Downloading MP3's is illegal in some countries! Please check the law in your country."
+msgstr "<b>Pobieranie mp3 jest nielegalne w niektórych krajach! Sprawdz prawo w swoim kraju.</b>"
 
 #: ../data/about_dialog.ui.h:8
-msgid ""
-"Gnome-toolkit based desktop application for downloading music files from "
-"Grooveshark.com"
-msgstr ""
-"Oparta na Gnome-toolkit aplikacja do pobierania plików muzycznych z "
-"Grooveshark.com"
+msgid "Gnome-toolkit based desktop application for downloading music files from Grooveshark.com"
+msgstr "Oparta na Gnome-toolkit aplikacja do pobierania plików muzycznych z Grooveshark.com"
 
 #: ../data/about_dialog.ui.h:9
 msgid "Please buy me a beer :)"
-msgstr ""
+msgstr "Postaw piwko :)"
 
 #: ../data/about_dialog.ui.h:10
 msgid ""
 "\n"
 "The gSharkDown icon is made by wall-e-ps (http://wall-e-ps.deviantart.com/)\n"
 "\n"
-"The groove.py library is developed by George Stephanos (jacktheripper51 @ "
-"github)\n"
+"The groove.py library is developed by George Stephanos (jacktheripper51 @ github)\n"
 "Link to the sources: https://github.com/jacktheripper51/groove-dl"
 msgstr ""
 "gSharkDown jest na licencji GNU GPL v3 License\n"
 "\n"
-"Ikona gSharkDown jest autorstwa wall-e-ps (http://wall-e-ps.deviantart."
-"com/)\n"
+"Ikona gSharkDown jest autorstwa wall-e-ps (http://wall-e-ps.deviantart.com/)\n"
 "\n"
-"Biblioteka groove.py została opracowana przez George Stephanos "
-"(jacktheripper51 @ github)\n"
+"Biblioteka groove.py została opracowana przez George Stephanos (jacktheripper51 @ github)\n"
 "Link do plików źródłowych: https://github.com/jacktheripper51/groove-dl"
 
 #: ../data/about_dialog.ui.h:16
 
 #: ../data/main_window.ui.h:5
 msgid "Clear"
-msgstr ""
+msgstr "Wyczyść"
 
 #: ../data/main_window.ui.h:6
 #, fuzzy
 
 #: ../data/main_window.ui.h:9
 msgid "Edit Preferences"
-msgstr "Zmień preferencje"
+msgstr "Zmień ustawienia"
 
 #: ../data/main_window.ui.h:10
 msgid "Filter: "
-msgstr ""
+msgstr "Filtr:"
 
 #: ../data/main_window.ui.h:11
 #, fuzzy
 
 #: ../data/main_window.ui.h:24
 msgid "Show About dialog"
-msgstr "Pokaż O programie"
+msgstr "Pokaż \"O programie\""
 
 #: ../data/main_window.ui.h:25
 #, fuzzy
 "Track seeking is planned\n"
 "for future version"
 msgstr ""
+"Przewijanie utwory będzie\n"
+"dostępne w przyszłości"
 
 #~ msgid "<b>Download options</b>"
 #~ msgstr "<b>Opcje pobierania</b>"