diff --git a/data/glade/privacy_list_edit_window.glade b/data/glade/privacy_list_edit_window.glade deleted file mode 100644 index 1f14d6b71..000000000 --- a/data/glade/privacy_list_edit_window.glade +++ /dev/null @@ -1,779 +0,0 @@ - - - - - - - 6 - True - Privacy List - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - - 600 - True - False - 0 - - - - True - True - 0 - - - - True - <i>Privacy List</i> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - Active for this session - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - - True - True - Active on each startup - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - 0 - False - True - - - - - - True - - - 5 - False - False - - - - - - True - <b>List of rules</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 5 - False - False - - - - - - True - - False - True - - - - 5 - False - True - - - - - - True - True - 0 - - - - 5 - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - - 5 - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - - 6 - True - True - gtk-edit - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - 0 - False - True - - - - - - 5 - False - 0 - - - - True - - - 5 - True - True - - - - - - True - <b>Add / Edit a rule</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 5 - False - False - - - - - - True - False - 0 - - - - True - True - 0 - - - - True - True - Allow - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Deny - True - GTK_RELIEF_NORMAL - True - False - False - True - edit_allow_radiobutton - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - True - 0 - - - - 5 - True - False - 0 - - - - True - True - JabberID - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 5 - False - False - - - - - - True - True - True - True - 0 - - True - - False - - - 5 - True - True - - - - - 0 - True - True - - - - - - 5 - True - False - 0 - - - - True - True - all in the group - True - GTK_RELIEF_NORMAL - True - False - False - True - edit_type_jabberid_radiobutton - - - 5 - False - False - - - - - - True - - False - True - - - 5 - True - True - - - - - 0 - True - True - - - - - - 5 - True - False - 0 - - - - True - True - all by subscription - True - GTK_RELIEF_NORMAL - True - False - False - True - edit_type_jabberid_radiobutton - - - 5 - False - False - - - - - - True - none -both -from -to - False - True - - - 5 - True - True - - - - - 0 - True - True - - - - - - 10 - True - False - 0 - - - - True - True - All - True - GTK_RELIEF_NORMAL - True - False - False - True - edit_type_jabberid_radiobutton - - - 0 - False - False - - - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - True - 0 - - - - True - True - to send me messages - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - to send me queries - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - to view my status - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - to send me status - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - True - 0 - - - - True - False - 0 - - - - True - Order: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 5 - False - False - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 0 100 1 10 10 - - - 0 - False - True - - - - - 0 - True - True - - - - - - 5 - True - True - gtk-save - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - - - 0 - False - True - - - - - - True - True - 0 - - - - 5 - True - True - gtk-refresh - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - - 5 - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - 0 - False - True - - - - - - - diff --git a/data/glade/privacy_lists_first_window.glade b/data/glade/privacy_lists_first_window.glade deleted file mode 100644 index 7a7470123..000000000 --- a/data/glade/privacy_lists_first_window.glade +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - 12 - True - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - - True - False - 0 - - - - True - Server-based Privacy Lists - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 5 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - 4 - True - - False - True - - - 0 - True - True - - - - - - True - True - 0 - - - - 5 - True - True - gtk-delete - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - - 5 - True - True - gtk-open - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - - - 5 - True - True - - - - - - True - Create your own Privacy Lists - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 5 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - True - True - 0 - - True - - False - - - 4 - False - False - - - - - - 5 - True - True - gtk-new - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - - True - - - 5 - True - True - - - - - - True - True - 0 - - - - 5 - True - True - gtk-refresh - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - - 5 - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - 0 - True - True - - - - - - - diff --git a/data/iconsets/transports/gadugadu/16x16/away.png b/data/iconsets/transports/gadugadu/16x16/away.png deleted file mode 100644 index e84aea305..000000000 Binary files a/data/iconsets/transports/gadugadu/16x16/away.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/16x16/chat.png b/data/iconsets/transports/gadugadu/16x16/chat.png deleted file mode 100644 index 9d9b4fe4a..000000000 Binary files a/data/iconsets/transports/gadugadu/16x16/chat.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/16x16/dnd.png b/data/iconsets/transports/gadugadu/16x16/dnd.png deleted file mode 100644 index e84aea305..000000000 Binary files a/data/iconsets/transports/gadugadu/16x16/dnd.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/16x16/offline.png b/data/iconsets/transports/gadugadu/16x16/offline.png deleted file mode 100644 index b8623f4b5..000000000 Binary files a/data/iconsets/transports/gadugadu/16x16/offline.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/16x16/online.png b/data/iconsets/transports/gadugadu/16x16/online.png deleted file mode 100644 index 9d9b4fe4a..000000000 Binary files a/data/iconsets/transports/gadugadu/16x16/online.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/16x16/xa.png b/data/iconsets/transports/gadugadu/16x16/xa.png deleted file mode 100644 index e84aea305..000000000 Binary files a/data/iconsets/transports/gadugadu/16x16/xa.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/32x32/away.png b/data/iconsets/transports/gadugadu/32x32/away.png deleted file mode 100644 index 5c46145eb..000000000 Binary files a/data/iconsets/transports/gadugadu/32x32/away.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/32x32/chat.png b/data/iconsets/transports/gadugadu/32x32/chat.png deleted file mode 100644 index 05a95d49c..000000000 Binary files a/data/iconsets/transports/gadugadu/32x32/chat.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/32x32/dnd.png b/data/iconsets/transports/gadugadu/32x32/dnd.png deleted file mode 100644 index 5c46145eb..000000000 Binary files a/data/iconsets/transports/gadugadu/32x32/dnd.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/32x32/offline.png b/data/iconsets/transports/gadugadu/32x32/offline.png deleted file mode 100644 index ef8d3a246..000000000 Binary files a/data/iconsets/transports/gadugadu/32x32/offline.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/32x32/online.png b/data/iconsets/transports/gadugadu/32x32/online.png deleted file mode 100644 index 05a95d49c..000000000 Binary files a/data/iconsets/transports/gadugadu/32x32/online.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/32x32/xa.png b/data/iconsets/transports/gadugadu/32x32/xa.png deleted file mode 100644 index 5c46145eb..000000000 Binary files a/data/iconsets/transports/gadugadu/32x32/xa.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/48x48/offline.png b/data/iconsets/transports/gadugadu/48x48/offline.png deleted file mode 100644 index 93729d4ff..000000000 Binary files a/data/iconsets/transports/gadugadu/48x48/offline.png and /dev/null differ diff --git a/data/iconsets/transports/gadugadu/48x48/online.png b/data/iconsets/transports/gadugadu/48x48/online.png deleted file mode 100644 index 3f0937933..000000000 Binary files a/data/iconsets/transports/gadugadu/48x48/online.png and /dev/null differ diff --git a/data/pixmaps/events/new_email_recv.png b/data/pixmaps/events/new_email_recv.png new file mode 100644 index 000000000..bd6b4e9b7 Binary files /dev/null and b/data/pixmaps/events/new_email_recv.png differ diff --git a/src/history_manager.py b/src/history_manager.py index 21d74491f..a4bd75528 100755 --- a/src/history_manager.py +++ b/src/history_manager.py @@ -193,7 +193,9 @@ class HistoryManager: gtk.main_quit() def _fill_jids_listview(self): - self.cur.execute('SELECT jid, jid_id FROM jids ORDER BY jid') + # get those jids that have at least one entry in logs + self.cur.execute('SELECT jid, jid_id FROM jids WHERE jid_id IN (SELECT ' + 'distinct logs.jid_id FROM logs) ORDER BY jid') rows = self.cur.fetchall() # list of tupples: [(u'aaa@bbb',), (u'cc@dd',)] for row in rows: self.jids_already_in.append(row[0]) # jid diff --git a/src/music_track_listener.py b/src/music_track_listener.py index b5bccbdc4..ca4550749 100644 --- a/src/music_track_listener.py +++ b/src/music_track_listener.py @@ -14,6 +14,8 @@ ## GNU General Public License for more details. ## import gobject +if __name__ == '__main__': + from common import i18n import dbus_support if dbus_support.supported: import dbus @@ -24,8 +26,9 @@ class MusicTrackInfo(object): class MusicTrackListener(gobject.GObject): - __gsignals__ = { 'music-track-changed': (gobject.SIGNAL_RUN_LAST, None, - (object,)) } + __gsignals__ = { + 'music-track-changed': (gobject.SIGNAL_RUN_LAST, None, (object,)), + } _instance = None @classmethod @@ -36,14 +39,43 @@ class MusicTrackListener(gobject.GObject): def __init__(self): super(MusicTrackListener, self).__init__() + self._last_playing_music = None + bus = dbus.SessionBus() + + ## Muine bus.add_signal_receiver(self._muine_music_track_change_cb, 'SongChanged', 'org.gnome.Muine.Player') + bus.add_signal_receiver(self._player_name_owner_changed, + 'NameOwnerChanged', 'org.freedesktop.DBus', arg0='org.gnome.Muine') + bus.add_signal_receiver(self._player_playing_changed_cb, 'StateChanged', + 'org.gnome.Muine.Player') + + ## Rhythmbox bus.add_signal_receiver(self._rhythmbox_music_track_change_cb, 'playingUriChanged', 'org.gnome.Rhythmbox.Player') + bus.add_signal_receiver(self._player_name_owner_changed, + 'NameOwnerChanged', 'org.freedesktop.DBus', arg0='org.gnome.Rhythmbox') + bus.add_signal_receiver(self._player_playing_changed_cb, + 'playingChanged', 'org.gnome.Rhythmbox.Player') + + def do_music_track_changed(self, info): + if info is not None: + self._last_playing_music = info + + def _player_name_owner_changed(self, name, old, new): + if not new: + self.emit('music-track-changed', None) + + def _player_playing_changed_cb(self, playing): + if playing: + self.emit('music-track-changed', self._last_playing_music) + else: + self.emit('music-track-changed', None) def _muine_properties_extract(self, song_string): - d = dict((x.strip() for x in s1.split(':', 1)) for s1 in song_string.split('\n')) + d = dict((x.strip() for x in s1.split(':', 1)) for s1 in \ + song_string.split('\n')) info = MusicTrackInfo() info.title = d['title'] info.album = d['album'] @@ -67,7 +99,8 @@ class MusicTrackListener(gobject.GObject): def _rhythmbox_music_track_change_cb(self, uri): bus = dbus.SessionBus() - rbshellobj = bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Shell') + rbshellobj = bus.get_object('org.gnome.Rhythmbox', + '/org/gnome/Rhythmbox/Shell') rbshell = dbus.Interface(rbshellobj, 'org.gnome.Rhythmbox.Shell') props = rbshell.getSongProperties(uri) info = self._rhythmbox_properties_extract(props) @@ -87,19 +120,22 @@ class MusicTrackListener(gobject.GObject): if player.GetPlaying(): song_string = player.GetCurrentSong() song = self._muine_properties_extract(song_string) + self._last_playing_music = song return song ## Check Rhythmbox playing song if dbus.dbus_bindings.bus_name_has_owner(bus.get_connection(), 'org.gnome.Rhythmbox'): - rbshellobj = bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Shell') + rbshellobj = bus.get_object('org.gnome.Rhythmbox', + '/org/gnome/Rhythmbox/Shell') player = dbus.Interface( - bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Player'), - 'org.gnome.Rhythmbox.Player') + bus.get_object('org.gnome.Rhythmbox', + '/org/gnome/Rhythmbox/Player'), 'org.gnome.Rhythmbox.Player') rbshell = dbus.Interface(rbshellobj, 'org.gnome.Rhythmbox.Shell') uri = player.getPlayingUri() props = rbshell.getSongProperties(uri) info = self._rhythmbox_properties_extract(props) + self._last_playing_music = info return info return None @@ -107,7 +143,10 @@ class MusicTrackListener(gobject.GObject): # here we test :) if __name__ == '__main__': def music_track_change_cb(listener, music_track_info): - print music_track_info.title + if music_track_info is None: + print "Stop!" + else: + print music_track_info.title listener = MusicTrackListener.get() listener.connect('music-track-changed', music_track_change_cb) track = listener.get_playing_track() diff --git a/src/roster_window.py b/src/roster_window.py index 4100e54b3..2af1eef9f 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -691,8 +691,11 @@ class RosterWindow: xml_console_menuitem.connect('activate', self.on_xml_console_menuitem_activate, account) - privacy_lists_menuitem.connect('activate', - self.on_privacy_lists_menuitem_activate, account) + if gajim.connections[account] and gajim.connections[account].privacy_rules_supported: + privacy_lists_menuitem.connect('activate', + self.on_privacy_lists_menuitem_activate, account) + else: + privacy_lists_menuitem.set_sensitive(False) send_server_message_menuitem.connect('activate', self.on_send_server_message_menuitem_activate, account) @@ -2469,6 +2472,11 @@ _('If "%s" accepts this request you will know his or her status.') % jid) {'title': music_track_info.title, 'artist': music_track_info.artist } for acct in accounts: + if not gajim.config.get_per('accounts', acct, + 'sync_with_global_status'): + continue + if not gajim.connections[acct].connected: + continue current_show = gajim.SHOW_LIST[gajim.connections[acct].connected] self.send_status(acct, current_show, status_message) diff --git a/src/systraywin32.py b/src/systraywin32.py index c758247e0..2705897f7 100644 --- a/src/systraywin32.py +++ b/src/systraywin32.py @@ -275,10 +275,7 @@ class SystrayWin32(systray.Systray): def load_icos(self): '''load .ico files and return them to a dic of SHOW --> img_obj''' - iconset = str(gajim.config.get('iconset')) - if not iconset: - iconset = 'dcraven' - + iconset = gajim.config.get('iconset') imgs = {} path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16', 'icos') # icon folder for missing icons