diff --git a/data/glade/manage_pep_services_window.glade b/data/glade/manage_pep_services_window.glade index c3995a2a1..d9812ff07 100644 --- a/data/glade/manage_pep_services_window.glade +++ b/data/glade/manage_pep_services_window.glade @@ -1,28 +1,107 @@ - - - + + + - - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 350 - 150 - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - - - + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 350 + 150 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + + + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + + True + GTK_BUTTONBOX_DEFAULT_STYLE + 0 + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + + 0 + True + True + + + + + + diff --git a/src/config.py b/src/config.py index 1765e2ab7..c54fedf14 100644 --- a/src/config.py +++ b/src/config.py @@ -3446,6 +3446,12 @@ class ManagePEPServicesWindow: '''close window''' del gajim.interface.instances[self.account]['pep_services'] + def on_ok_button_clicked(self, widget): + pass + + def on_cancel_button_clicked(self, widget): + self.window.destroy() + def cellrenderer_combo_edited(self, cellrenderer, path, new_text): self.treestore[path][1] = new_text @@ -3470,6 +3476,7 @@ class ManagePEPServicesWindow: model.append(['presence']) model.append(['roster']) model.append(['whitelist']) + model.append(['delete']) cellrenderer_combo = gtk.CellRendererCombo() cellrenderer_combo.set_property('text-column', 0) cellrenderer_combo.set_property('model', model) diff --git a/src/roster_window.py b/src/roster_window.py index 180315856..59f65d620 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1072,18 +1072,19 @@ class RosterWindow: profile_avatar_sub_menu = gtk.Menu() pep_services_sub_menu = gtk.Menu() for account in connected_accounts_with_vcard: - # profile, avatar - profile_avatar_item = gtk.MenuItem(_('of account %s') % account, - False) - profile_avatar_sub_menu.append(profile_avatar_item) - profile_avatar_item.connect('activate', - self.on_profile_avatar_menuitem_activate, account) - # PEP services - pep_services_item = gtk.MenuItem(_('of account %s') % account, - False) - pep_services_sub_menu.append(pep_services_item) - pep_services_item.connect('activate', - self.on_pep_services_menuitem_activate, account) + if gajim.connections[account].pep_supported: + # profile, avatar + profile_avatar_item = gtk.MenuItem(_('of account %s') % account, + False) + profile_avatar_sub_menu.append(profile_avatar_item) + profile_avatar_item.connect('activate', + self.on_profile_avatar_menuitem_activate, account) + # PEP services + pep_services_item = gtk.MenuItem(_('of account %s') % account, + False) + pep_services_sub_menu.append(pep_services_item) + pep_services_item.connect('activate', + self.on_pep_services_menuitem_activate, account) profile_avatar_menuitem.set_submenu(profile_avatar_sub_menu) profile_avatar_sub_menu.show_all() pep_services_menuitem.set_submenu(pep_services_sub_menu)