ability to see pep nodes and their access model. TODO: ability to change it

This commit is contained in:
Yann Leboulanger 2007-06-03 10:30:34 +00:00
parent e3ef0821b3
commit 07b324ced4
7 changed files with 467 additions and 452 deletions

View File

@ -1,444 +1,338 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--*- mode: xml -*-->
<glade-interface>
<widget class="GtkWindow" id="roster_window">
<property name="width_request">85</property>
<property name="height_request">200</property>
<property name="title" translatable="yes">Gajim</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="default_width">200</property>
<property name="default_height">400</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="role">roster</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<signal name="delete_event" handler="on_roster_window_delete_event" last_modification_time="Mon, 21 Mar 2005 12:34:59 GMT"/>
<signal name="focus_in_event" handler="on_roster_window_focus_in_event" last_modification_time="Sun, 04 Sep 2005 16:33:35 GMT"/>
<signal name="key_press_event" handler="on_roster_window_key_press_event" last_modification_time="Tue, 20 Sep 2005 19:26:27 GMT"/>
<signal name="focus_out_event" handler="on_roster_window_focus_out_event" last_modification_time="Tue, 08 Nov 2005 14:01:01 GMT"/>
<signal name="popup_menu" handler="on_roster_window_popup_menu" last_modification_time="Sat, 18 Nov 2006 21:12:06 GMT"/>
<child>
<widget class="GtkVBox" id="roster_vbox">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkMenuBar" id="menubar">
<property name="visible">True</property>
<property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
<property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
<child>
<widget class="GtkMenuItem" id="actions_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_Actions</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_actions_menuitem_activate" last_modification_time="Sun, 19 Feb 2006 17:10:56 GMT"/>
<child>
<widget class="GtkMenu" id="actions_menu_menu">
<child>
<widget class="GtkImageMenuItem" id="new_chat_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Start Chat</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1605">
<property name="visible">True</property>
<property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="join_gc_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Group Chat</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1606">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="add_new_contact_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Add _Contact</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1607">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="service_disco_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Discover Services</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1608">
<property name="visible">True</property>
<property name="stock">gtk-find</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="advanced_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Advanced</property>
<property name="use_underline">True</property>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="quit_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Quit</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_quit_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 23:37:49 GMT"/>
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1609">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="edit_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_Edit</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_edit_menuitem_activate" last_modification_time="Fri, 07 Apr 2006 22:46:56 GMT"/>
<child>
<widget class="GtkMenu" id="edit_menu_menu">
<child>
<widget class="GtkImageMenuItem" id="accounts_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">A_ccounts</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_accounts_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 23:23:19 GMT"/>
<accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1610">
<property name="visible">True</property>
<property name="stock">gtk-network</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="profile_avatar_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Profile, A_vatar</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1611">
<property name="visible">True</property>
<property name="stock">gtk-properties</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator2">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="preferences_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Preferences</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_preferences_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 22:58:18 GMT"/>
<accelerator key="P" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1612">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="view_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_View</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_view_menu_activate" last_modification_time="Fri, 29 Sep 2006 14:56:42 GMT"/>
<child>
<widget class="GtkMenu" id="view_menu_menu">
<child>
<widget class="GtkCheckMenuItem" id="show_offline_contacts_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Show _Offline Contacts</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="on_show_offline_contacts_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 23:29:52 GMT"/>
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
<child>
<widget class="GtkCheckMenuItem" id="show_transports_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Show Trans_ports</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="on_show_transports_menuitem_activate" last_modification_time="Fri, 29 Sep 2006 15:35:28 GMT"/>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator3">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="file_transfers_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">File _Transfers</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_file_transfers_menuitem_activate" last_modification_time="Wed, 03 Aug 2005 15:44:28 GMT"/>
<accelerator key="T" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1613">
<property name="visible">True</property>
<property name="stock">gtk-file</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="help_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="help_menu_menu">
<child>
<widget class="GtkImageMenuItem" id="contents_menuitem">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Help online</property>
<property name="label" translatable="yes">_Contents</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_contents_menuitem_activate" last_modification_time="Thu, 06 Oct 2005 23:29:10 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1614">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="faq_menuitem">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Frequently Asked Questions (online)</property>
<property name="label" translatable="yes">_FAQ</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_faq_menuitem_activate" last_modification_time="Thu, 06 Oct 2005 23:29:10 GMT"/>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="about_menuitem">
<property name="visible">True</property>
<property name="label">gtk-about</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_about_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 22:56:45 GMT"/>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow">
<property name="border_width">2</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTreeView" id="roster_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="rules_hint">False</property>
<property name="reorderable">True</property>
<property name="enable_search">True</property>
<property name="fixed_height_mode">False</property>
<property name="hover_selection">False</property>
<property name="hover_expand">False</property>
<signal name="button_press_event" handler="on_roster_treeview_button_press_event" last_modification_time="Mon, 28 Feb 2005 14:16:44 GMT"/>
<signal name="row_activated" handler="on_roster_treeview_row_activated" last_modification_time="Mon, 28 Feb 2005 14:18:06 GMT"/>
<signal name="row_expanded" handler="on_roster_treeview_row_expanded" last_modification_time="Mon, 28 Feb 2005 14:18:14 GMT"/>
<signal name="row_collapsed" handler="on_roster_treeview_row_collapsed" last_modification_time="Mon, 28 Feb 2005 14:18:33 GMT"/>
<signal name="key_press_event" handler="on_roster_treeview_key_press_event" last_modification_time="Sat, 26 Mar 2005 20:39:36 GMT"/>
<signal name="motion_notify_event" handler="on_roster_treeview_motion_notify_event" last_modification_time="Wed, 06 Jul 2005 14:38:58 GMT"/>
<signal name="leave_notify_event" handler="on_roster_treeview_leave_notify_event" last_modification_time="Wed, 06 Jul 2005 14:39:06 GMT"/>
<signal name="scroll_event" handler="on_roster_treeview_scroll_event" last_modification_time="Fri, 08 Jul 2005 22:09:03 GMT"/>
<signal name="style_set" handler="on_roster_treeview_style_set" last_modification_time="Tue, 08 Nov 2005 14:03:30 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="status_combobox">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property>
<signal name="changed" handler="on_status_combobox_changed" last_modification_time="Sat, 05 Nov 2005 18:07:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
<widget class="GtkWindow" id="roster_window">
<property name="width_request">85</property>
<property name="height_request">200</property>
<property name="title" translatable="yes">Gajim</property>
<property name="role">roster</property>
<property name="default_width">200</property>
<property name="default_height">400</property>
<signal name="popup_menu" handler="on_roster_window_popup_menu"/>
<signal name="focus_out_event" handler="on_roster_window_focus_out_event"/>
<signal name="focus_in_event" handler="on_roster_window_focus_in_event"/>
<signal name="key_press_event" handler="on_roster_window_key_press_event"/>
<signal name="delete_event" handler="on_roster_window_delete_event"/>
<child>
<widget class="GtkVBox" id="roster_vbox">
<property name="visible">True</property>
<child>
<widget class="GtkMenuBar" id="menubar">
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="actions_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_Actions</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_actions_menuitem_activate"/>
<child>
<widget class="GtkMenu" id="actions_menu_menu">
<child>
<widget class="GtkImageMenuItem" id="new_chat_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Start Chat</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1605">
<property name="visible">True</property>
<property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="join_gc_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Group Chat</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1606">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="add_new_contact_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Add _Contact</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1607">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="service_disco_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Discover Services</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1608">
<property name="visible">True</property>
<property name="stock">gtk-find</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="advanced_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Advanced</property>
<property name="use_underline">True</property>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="quit_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Quit</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_quit_menuitem_activate"/>
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1609">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="edit_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_Edit</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_edit_menuitem_activate"/>
<child>
<widget class="GtkMenu" id="edit_menu_menu">
<child>
<widget class="GtkImageMenuItem" id="accounts_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">A_ccounts</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_accounts_menuitem_activate"/>
<accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1610">
<property name="visible">True</property>
<property name="stock">gtk-network</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="profile_avatar_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Profile, A_vatar</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1611">
<property name="visible">True</property>
<property name="stock">gtk-properties</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator2">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="preferences_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Preferences</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_preferences_menuitem_activate"/>
<accelerator key="P" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1612">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="pep_services_menuitem">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">_Services</property>
<property name="use_underline">True</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="view_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_View</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_view_menu_activate"/>
<child>
<widget class="GtkMenu" id="view_menu_menu">
<child>
<widget class="GtkCheckMenuItem" id="show_offline_contacts_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Show _Offline Contacts</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_show_offline_contacts_menuitem_activate"/>
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
<child>
<widget class="GtkCheckMenuItem" id="show_transports_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Show Trans_ports</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_show_transports_menuitem_activate"/>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator3">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="file_transfers_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">File _Transfers</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_file_transfers_menuitem_activate"/>
<accelerator key="T" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1613">
<property name="visible">True</property>
<property name="stock">gtk-missing-image</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="help_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="help_menu_menu">
<child>
<widget class="GtkImageMenuItem" id="contents_menuitem">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Help online</property>
<property name="label" translatable="yes">_Contents</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_contents_menuitem_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1614">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="faq_menuitem">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Frequently Asked Questions (online)</property>
<property name="label" translatable="yes">_FAQ</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_faq_menuitem_activate"/>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="about_menuitem">
<property name="visible">True</property>
<property name="label">gtk-about</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_about_menuitem_activate"/>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">2</property>
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<child>
<widget class="GtkTreeView" id="roster_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="reorderable">True</property>
<signal name="leave_notify_event" handler="on_roster_treeview_leave_notify_event"/>
<signal name="button_press_event" handler="on_roster_treeview_button_press_event"/>
<signal name="motion_notify_event" handler="on_roster_treeview_motion_notify_event"/>
<signal name="row_collapsed" handler="on_roster_treeview_row_collapsed"/>
<signal name="row_expanded" handler="on_roster_treeview_row_expanded"/>
<signal name="key_press_event" handler="on_roster_treeview_key_press_event"/>
<signal name="row_activated" handler="on_roster_treeview_row_activated"/>
<signal name="scroll_event" handler="on_roster_treeview_scroll_event"/>
<signal name="style_set" handler="on_roster_treeview_style_set"/>
</widget>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="status_combobox">
<property name="visible">True</property>
<signal name="changed" handler="on_status_combobox_changed"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -46,6 +46,7 @@ VCARD_ARRIVED = 'vcard_arrived'
AGENT_REMOVED = 'agent_removed'
METACONTACTS_ARRIVED = 'metacontacts_arrived'
PRIVACY_ARRIVED = 'privacy_arrived'
PEP_ACCESS_MODEL = 'pep_access_model'
HAS_IDLE = True
try:
import idle
@ -1068,6 +1069,15 @@ class ConnectionVcard:
self.get_privacy_list('block')
# Ask metacontacts before roster
self.get_metacontacts()
elif self.awaiting_answers[id][0] == PEP_ACCESS_MODEL:
conf = iq_obj.getTag('pubsub').getTag('configure')
node = conf.getAttr('node')
form_tag = conf.getTag('x', namespace=common.xmpp.NS_DATA)
form = common.dataforms.ExtendForm(node=form_tag)
for field in form.iter_fields():
if field.var == 'pubsub#access_model':
self.dispatch('PEP_ACCESS_MODEL', (node, field.value))
break
del self.awaiting_answers[id]

View File

@ -1,5 +1,7 @@
import xmpp
import gajim
import dataforms
import connection_handlers
class ConnectionPubSub:
def __init__(self):
@ -92,3 +94,12 @@ class ConnectionPubSub:
cb(conn, stanza, *args, **kwargs)
except KeyError:
pass
def request_pb_configuration(self, jid, node):
query = xmpp.Iq('get', to=jid)
e = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB_OWNER)
e = e.addChild('configure', {'node': node})
id = self.connection.getAnID()
query.setID(id)
self.awaiting_answers[id] = (connection_handlers.PEP_ACCESS_MODEL,)
self.connection.send(query)

View File

@ -74,6 +74,7 @@ NS_PRIVACY ='jabber:iq:privacy'
NS_PRIVATE ='jabber:iq:private'
NS_PROFILE ='http://jabber.org/protocol/profile' # JEP-0154
NS_PUBSUB ='http://jabber.org/protocol/pubsub' # JEP-0060
NS_PUBSUB_OWNER ='http://jabber.org/protocol/pubsub#owner' # JEP-0060
NS_REGISTER ='jabber:iq:register'
NS_ROSTER ='jabber:iq:roster'
NS_ROSTERX ='http://jabber.org/protocol/rosterx' # JEP-0144

View File

@ -3360,7 +3360,7 @@ class ZeroconfPropertiesWindow:
config['keyname'] = self.xml.get_widget('gpg_name_label').get_text().\
decode('utf-8')
if config['keyname'] == '': #no key selected
if config['keyname'] == '': # no key selected
config['keyid'] = ''
config['savegpgpass'] = False
config['gpgpassword'] = ''
@ -3430,3 +3430,65 @@ class ZeroconfPropertiesWindow:
st = widget.get_active()
w = self.xml.get_widget('gpg_password_entry')
w.set_sensitive(bool(st))
class ManagePEPServicesWindow:
def __init__(self, account):
self.xml = gtkgui_helpers.get_glade('manage_pep_services_window.glade')
self.window = self.xml.get_widget('manage_pep_services_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.xml.signal_autoconnect(self)
self.account = account
self.init_services()
self.window.show_all()
def on_manage_pep_services_window_destroy(self, widget):
'''close window'''
del gajim.interface.instances[self.account]['pep_services']
def cellrenderer_combo_edited(self, cellrenderer, path, new_text):
self.treestore[path][1] = new_text
def init_services(self):
treeview = self.xml.get_widget('services_treeview')
# service, access_model, group
self.treestore = gtk.ListStore(str, str, str)
treeview.set_model(self.treestore)
col = gtk.TreeViewColumn('Service')
treeview.append_column(col)
cellrenderer_text = gtk.CellRendererText()
col.pack_start(cellrenderer_text)
col.add_attribute(cellrenderer_text, 'text', 0)
col = gtk.TreeViewColumn('access model')
treeview.append_column(col)
model = gtk.ListStore(str)
model.append(['open'])
model.append(['presence'])
model.append(['roster'])
model.append(['whitelist'])
cellrenderer_combo = gtk.CellRendererCombo()
cellrenderer_combo.set_property('text-column', 0)
cellrenderer_combo.set_property('model', model)
cellrenderer_combo.set_property('has-entry', False)
cellrenderer_combo.set_property('editable', True)
cellrenderer_combo.connect('edited', self.cellrenderer_combo_edited)
col.pack_start(cellrenderer_combo)
col.add_attribute(cellrenderer_combo, 'text', 1)
our_jid = gajim.get_jid_from_account(self.account)
gajim.connections[self.account].discoverItems(our_jid)
def items_received(self, items):
our_jid = gajim.get_jid_from_account(self.account)
for item in items:
if 'jid' in item and item['jid'] == our_jid and 'node' in item:
# ask <configure> to have access model
gajim.connections[self.account].request_pb_configuration(
item['jid'], item['node'])
def new_service(self, node, model):
self.treestore.append([node, model, ''])

View File

@ -934,6 +934,11 @@ class Interface:
def handle_event_agent_info_items(self, account, array):
#('AGENT_INFO_ITEMS', account, (agent, node, items))
our_jid = gajim.get_jid_from_account(account)
if gajim.interface.instances[account].has_key('pep_services') and \
array[0] == our_jid:
gajim.interface.instances[account]['pep_services'].items_received(
array[2])
try:
gajim.connections[account].services_cache.agent_items(array[0],
array[1], array[2])
@ -1776,6 +1781,11 @@ class Interface:
_('You are already connected to this account with the same resource. Please type a new one'), input_str = gajim.connections[account].server_resource,
is_modal = False, ok_handler = on_ok)
def handle_event_pep_access_model(self, account, data):
# ('PEP_ACCESS_MODEL', account, (node, model))
if self.instances[account].has_key('pep_services'):
self.instances[account]['pep_services'].new_service(data[0], data[1])
def read_sleepy(self):
'''Check idle status and change that status if needed'''
if not self.sleeper.poll():
@ -2102,6 +2112,7 @@ class Interface:
'SEARCH_FORM': self.handle_event_search_form,
'SEARCH_RESULT': self.handle_event_search_result,
'RESOURCE_CONFLICT': self.handle_event_resource_conflict,
'PEP_ACCESS_MODEL': self.handle_event_pep_access_model,
}
gajim.handlers = self.handlers

View File

@ -903,7 +903,8 @@ class RosterWindow:
add_new_contact_menuitem = self.xml.get_widget('add_new_contact_menuitem')
service_disco_menuitem = self.xml.get_widget('service_disco_menuitem')
advanced_menuitem = self.xml.get_widget('advanced_menuitem')
profile_avatar_menuitem = self.xml.get_widget('profile_avatar_menuitem')
profile_avatar_menuitem = self.xml.get_widget('profile_avatar_menuitem')
pep_services_menuitem = self.xml.get_widget('pep_services_menuitem')
# destroy old advanced menus
for m in self.advanced_menus:
@ -927,10 +928,10 @@ class RosterWindow:
self.new_chat_menuitem_handler_id)
self.new_chat_menuitem_handler_id = None
if self.profile_avatar_menuitem_handler_id:
profile_avatar_menuitem.handler_disconnect(
self.profile_avatar_menuitem_handler_id)
self.profile_avatar_menuitem_handler_id = None
if self.pep_services_menuitem_handler_id:
pep_services_menuitem.handler_disconnect(
self.pep_services_menuitem_handler_id)
self.pep_services_menuitem_handler_id = None
# remove the existing submenus
@ -940,6 +941,7 @@ class RosterWindow:
new_chat_menuitem.remove_submenu()
advanced_menuitem.remove_submenu()
profile_avatar_menuitem.remove_submenu()
pep_services_menuitem.remove_submenu()
# remove the existing accelerator
if self.have_new_chat_accel:
@ -1068,27 +1070,43 @@ class RosterWindow:
if len(connected_accounts_with_vcard) > 1:
# 2 or more accounts? make submenus
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,
profile_avatar_item = gtk.MenuItem(_('of account %s') % account,
False)
profile_avatar_sub_menu.append(profile_avatar_item)
profile_avatar_item.connect('activate',
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)
pep_services_sub_menu.show_all()
elif len(connected_accounts_with_vcard) == 1: # user has only one account
account = connected_accounts_with_vcard[0]
# profile, avatar
if not self.profile_avatar_menuitem_handler_id:
self.profile_avatar_menuitem_handler_id = \
profile_avatar_menuitem.connect('activate', self.\
on_profile_avatar_menuitem_activate, account)
profile_avatar_menuitem.connect('activate',
self.on_profile_avatar_menuitem_activate, account)
# PEP services
if not self.pep_services_menuitem_handler_id:
self.pep_services_menuitem_handler_id = \
pep_services_menuitem.connect('activate',
self.on_pep_services_menuitem_activate, account)
if len(connected_accounts_with_vcard) == 0:
profile_avatar_menuitem.set_sensitive(False)
pep_services_menuitem.set_sensitive(False)
else:
profile_avatar_menuitem.set_sensitive(True)
pep_services_menuitem.set_sensitive(True)
newitem = gtk.ImageMenuItem(_('_Manage Bookmarks...'))
img = gtk.image_new_from_stock(gtk.STOCK_PREFERENCES,
@ -3684,6 +3702,13 @@ class RosterWindow:
else:
gajim.interface.instances['preferences'] = config.PreferencesWindow()
def on_pep_services_menuitem_activate(self, widget, account):
if gajim.interface.instances[account].has_key('pep_services'):
gajim.interface.instances[account]['pep_services'].window.present()
else:
gajim.interface.instances[account]['pep_services'] = \
config.ManagePEPServicesWindow(account)
def on_add_new_contact(self, widget, account):
dialogs.AddNewContactWindow(account)
@ -4840,6 +4865,7 @@ class RosterWindow:
self.service_disco_handler_id = False
self.new_chat_menuitem_handler_id = False
self.profile_avatar_menuitem_handler_id = False
self.pep_services_menuitem_handler_id = False
self.actions_menu_needs_rebuild = True
self.regroup = gajim.config.get('mergeaccounts')
if len(gajim.connections) < 2: # Do not merge accounts if only one exists