Wed, 19 Mar 2008 15:02:10 +0100 <thp@perli.net>
Various Bluetooth-related fixes * data/gpodder.glade: Use the "bluetooth" icon instead of the (old?) "stock_bluetooth" icon; in Gnome 2.22, the "bluetooth" icon is nicer, i.e. more Tango-ish than the "stock_bluetooth" icon * src/gpodder/gui.py: Fix a logging error; Only show "Send to [...] via bluetooth"/"Send to bluetooth device" when we have already downloaded the episodes (won't obviously work otherwise..) * src/gpodder/util.py: Fix bluetooth_send_file to work with both bluetooth-sendto and gnome-obex-send (different command line argument format for both) git-svn-id: svn://svn.berlios.de/gpodder/trunk@613 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
99aa1bcf84
commit
b76cd01606
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
Wed, 19 Mar 2008 15:02:10 +0100 <thp@perli.net>
|
||||
Various Bluetooth-related fixes
|
||||
|
||||
* data/gpodder.glade: Use the "bluetooth" icon instead of the (old?)
|
||||
"stock_bluetooth" icon; in Gnome 2.22, the "bluetooth" icon is nicer,
|
||||
i.e. more Tango-ish than the "stock_bluetooth" icon
|
||||
* src/gpodder/gui.py: Fix a logging error; Only show "Send to [...]
|
||||
via bluetooth"/"Send to bluetooth device" when we have already
|
||||
downloaded the episodes (won't obviously work otherwise..)
|
||||
* src/gpodder/util.py: Fix bluetooth_send_file to work with both
|
||||
bluetooth-sendto and gnome-obex-send (different command line argument
|
||||
format for both)
|
||||
|
||||
Sun, 16 Mar 2008 12:55:49 +0100 <thp@perli.net>
|
||||
Python-feedparser is a dependency, so mention it in the README
|
||||
|
||||
|
|
|
@ -4037,7 +4037,7 @@ Filesystem-based MP3 player</property>
|
|||
<widget class="GtkImage" id="image2929">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_size">6</property>
|
||||
<property name="icon_name">stock_bluetooth</property>
|
||||
<property name="icon_name">bluetooth</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
|
@ -4377,7 +4377,7 @@ Filesystem-based MP3 player</property>
|
|||
<widget class="GtkImage" id="image2928">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_size">3</property>
|
||||
<property name="icon_name">stock_bluetooth</property>
|
||||
<property name="icon_name">bluetooth</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
|
|
|
@ -452,7 +452,7 @@ class gPodder(GladeWidget):
|
|||
shutil.copyfile(filename, destfile)
|
||||
result = 0
|
||||
except:
|
||||
log('Cannot copy "%s" to "%s".', sender=self)
|
||||
log('Cannot copy "%s" to "%s".', filename, destfile, sender=self)
|
||||
result = 1
|
||||
|
||||
if result == 0 or not os.path.exists(destfile):
|
||||
|
@ -516,15 +516,15 @@ class gPodder(GladeWidget):
|
|||
item.set_image( gtk.image_new_from_stock( gtk.STOCK_SAVE_AS, gtk.ICON_SIZE_MENU))
|
||||
item.connect( 'activate', lambda w: self.save_episode_as_file( episode_url))
|
||||
menu.append( item)
|
||||
if gl.config.bluetooth_enabled:
|
||||
if gl.config.bluetooth_ask_always:
|
||||
bt_device_name = _('bluetooth device')
|
||||
else:
|
||||
bt_device_name = _('%s via bluetooth')%gl.config.bluetooth_device_name
|
||||
item = gtk.ImageMenuItem(_('Send to %s') % bt_device_name)
|
||||
item.set_image(gtk.image_new_from_icon_name('stock_bluetooth', gtk.ICON_SIZE_MENU))
|
||||
item.connect('activate', lambda w: self.copy_episode_bluetooth(episode_url))
|
||||
menu.append( item)
|
||||
if gl.config.bluetooth_enabled:
|
||||
if gl.config.bluetooth_ask_always:
|
||||
bt_device_name = _('bluetooth device')
|
||||
else:
|
||||
bt_device_name = _('%s via bluetooth')%gl.config.bluetooth_device_name
|
||||
item = gtk.ImageMenuItem(_('Send to %s') % bt_device_name)
|
||||
item.set_image(gtk.image_new_from_icon_name('bluetooth', gtk.ICON_SIZE_MENU))
|
||||
item.connect('activate', lambda w: self.copy_episode_bluetooth(episode_url))
|
||||
menu.append( item)
|
||||
menu.append( gtk.SeparatorMenuItem())
|
||||
else:
|
||||
episode_title = _('%d selected episodes') % len(paths)
|
||||
|
@ -1840,17 +1840,22 @@ class gPodderProperties(GladeWidget):
|
|||
self.iPodMountpoint.set_label( ipod.mount_point)
|
||||
|
||||
def on_bluetooth_select_device_clicked(self, widget):
|
||||
label_old = self.bluetooth_select_device.get_label()
|
||||
self.bluetooth_select_device.set_sensitive(False)
|
||||
self.bluetooth_select_device.set_label(_('Searching...'))
|
||||
gtk.main_iteration(False)
|
||||
found = False
|
||||
for name, address in util.discover_bluetooth_devices():
|
||||
if self.show_confirmation('Use this device as your bluetooth device?', name):
|
||||
gl.config.bluetooth_device_name = name
|
||||
gl.config.bluetooth_device_address = address
|
||||
self.bluetooth_device_name.set_markup('<b>%s</b>'%gl.config.bluetooth_device_name)
|
||||
self.bluetooth_select_device.set_sensitive(True)
|
||||
return
|
||||
self.show_message('No more devices found', 'Scan finished')
|
||||
found = True
|
||||
break
|
||||
if not found:
|
||||
self.show_message('No more devices found', 'Scan finished')
|
||||
self.bluetooth_select_device.set_sensitive(True)
|
||||
self.bluetooth_select_device.set_label(label_old)
|
||||
|
||||
def set_uar(self, uar):
|
||||
self.comboAudioPlayerApp.set_model(uar.get_applications_as_model())
|
||||
|
|
|
@ -700,12 +700,14 @@ def bluetooth_send_file(filename, device=None, callback_finished=None):
|
|||
|
||||
if find_command('bluetooth-sendto'):
|
||||
command_line = ['bluetooth-sendto']
|
||||
if device is not None:
|
||||
command_line.append('--device=%s' % device)
|
||||
elif find_command('gnome-obex-send'):
|
||||
command_line = ['gnome-obex-send']
|
||||
|
||||
if command_line is not None:
|
||||
if device is not None:
|
||||
command_line += ['--dest', device]
|
||||
|
||||
if command_line is not None:
|
||||
command_line.append(filename)
|
||||
result = (subprocess.Popen(command_line).wait() == 0)
|
||||
if callback_finished is not None:
|
||||
|
|
Loading…
Reference in New Issue