remove old way of doing advanced notification.
This commit is contained in:
parent
3927db7c5c
commit
d598cbb041
10 changed files with 20 additions and 1588 deletions
|
@ -1,951 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="2.16"/>
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
<!-- column-name item -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">contact(s)</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">group(s)</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">everybody</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore2">
|
||||
<columns>
|
||||
<!-- column-name item -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Receive a Message</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Contact Disconnected </col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Contact Change Status </col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Group Chat Message Highlight </col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Group Chat Message Received </col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">File Transfer Request </col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">File Transfer Started </col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">File Transfer Finished</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkWindow" id="advanced_notifications_window">
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Advanced Notifications Control</property>
|
||||
<property name="role">Advanced Notifications Control</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox95">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3041">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label396">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Hi HG users ! This window does nothing for the moment. Discussions about this take place in ticket #1005.</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox100">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow23">
|
||||
<property name="height_request">90</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="vscrollbar_policy">automatic</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="conditions_treeview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<signal name="cursor_changed" handler="on_conditions_treeview_cursor_changed"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment99">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="left_padding">212</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3045">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkHButtonBox" id="hbuttonbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="new_button">
|
||||
<property name="label">gtk-new</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="on_new_button_clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="up_button">
|
||||
<property name="label">gtk-go-up</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="on_up_button_clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="down_button">
|
||||
<property name="label">gtk-go-down</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="on_down_button_clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="delete_button">
|
||||
<property name="label">gtk-delete</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="on_delete_button_clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="config_vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label391">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Conditions</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox101">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3042">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label401">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">When </property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="event_combobox">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">liststore2</property>
|
||||
<signal name="changed" handler="on_event_combobox_changed"/>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext2"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3048">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label400">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">for </property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="recipient_type_combobox">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">liststore1</property>
|
||||
<signal name="changed" handler="on_recipient_type_combobox_changed"/>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="recipient_list_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<signal name="changed" handler="on_recipient_list_entry_changed"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3049">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label402">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">when I'm in</property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="status_hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="all_status_rb">
|
||||
<property name="label" translatable="yes">All statuses</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_status_radiobutton_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="special_status_rb">
|
||||
<property name="label" translatable="yes">One or more special statuses...</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">all_status_rb</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="online_cb">
|
||||
<property name="label" translatable="yes">Online / Free For Chat</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_status_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="away_cb">
|
||||
<property name="label" translatable="yes">Away</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_status_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="xa_cb">
|
||||
<property name="label" translatable="yes">Not Available</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_status_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="dnd_cb">
|
||||
<property name="label" translatable="yes">Busy </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_status_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="invisible_cb">
|
||||
<property name="label" translatable="yes">Invisible</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_status_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3053">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label408">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">and I </property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="tab_opened_cb">
|
||||
<property name="label" translatable="yes">Have </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_tab_opened_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="not_tab_opened_cb">
|
||||
<property name="label" translatable="yes">Don't have </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_not_tab_opened_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label409">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"> a window/tab opened with that contact </property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label392">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Actions</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame35">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3027">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="use_popup_cb">
|
||||
<property name="label" translatable="yes">_Inform me with a popup window</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_popup_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="disable_popup_cb">
|
||||
<property name="label" translatable="yes">_Disable existing popup window</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_disable_popup_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkFrame" id="frame38">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment93">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox98">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3028">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="use_sound_cb">
|
||||
<property name="label" translatable="yes">Play a sound</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_sound_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="sound_file_hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="sound_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<signal name="changed" handler="on_sound_entry_changed"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button4">
|
||||
<property name="label">...</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="clicked" handler="on_browse_for_sounds_button_clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="play_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<signal name="clicked" handler="on_play_button_clicked"/>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1372">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-media-play</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="disable_sound_cb">
|
||||
<property name="label" translatable="yes">_Disable existing sound for this event</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_disable_sound_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label394">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Sounds</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3032">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="use_auto_open_cb">
|
||||
<property name="label" translatable="yes">_Open chat window with user</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_auto_open_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="disable_auto_open_cb">
|
||||
<property name="label" translatable="yes">_Disable auto opening chat window</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_disable_auto_open_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkExpander" id="expander1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="expanded">True</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox99">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3033">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="run_command_cb">
|
||||
<property name="label" translatable="yes">Launch a command</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_run_command_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="command_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<signal name="changed" handler="on_command_entry_changed"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3035">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="use_systray_cb">
|
||||
<property name="label" translatable="yes">_Show event in notification area</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_systray_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="disable_systray_cb">
|
||||
<property name="label" translatable="yes">_Disable showing event in notification area</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_disable_systray_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox3052">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="use_roster_cb">
|
||||
<property name="label" translatable="yes">_Show event in roster</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_roster_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="disable_roster_cb">
|
||||
<property name="label" translatable="yes">_Disable showing event in roster</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_disable_roster_cb_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="urgency_hint_cb">
|
||||
<property name="label" translatable="yes">_Activate window manager's UrgencyHint to make chat window in taskbar flash</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_urgency_hint_checkbutton_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label395">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Advanced Actions</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment97">
|
||||
<property name="visible">True</property>
|
||||
<property name="left_padding">413</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="close_button">
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="on_close_window"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -746,33 +746,6 @@
|
|||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox2">
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="advanced_notifications_button">
|
||||
<property name="label" translatable="yes">Advanced...</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<signal name="clicked" handler="on_advanced_notifications_button_clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -445,22 +445,6 @@ class Config:
|
|||
'rooms': ({
|
||||
'speller_language': [ opt_str, '', _('Language for which we want to check misspelled words')],
|
||||
}, {}),
|
||||
'notifications': ({
|
||||
'event': [opt_str, ''],
|
||||
'recipient_type': [opt_str, 'all'],
|
||||
'recipients': [opt_str, ''],
|
||||
'status': [opt_str, 'all', _('all or space separated status')],
|
||||
'tab_opened': [opt_str, 'both', _("'yes', 'no', or 'both'")],
|
||||
'sound': [opt_str, '', _("'yes', 'no' or ''")],
|
||||
'sound_file': [opt_str, ''],
|
||||
'popup': [opt_str, '', _("'yes', 'no' or ''")],
|
||||
'auto_open': [opt_str, '', _("'yes', 'no' or ''")],
|
||||
'run_command': [opt_bool, False],
|
||||
'command': [opt_str, ''],
|
||||
'systray': [opt_str, '', _("'yes', 'no' or ''")],
|
||||
'roster': [opt_str, '', _("'yes', 'no' or ''")],
|
||||
'urgency_hint': [opt_bool, False],
|
||||
}, {}),
|
||||
'plugins': ({
|
||||
'active': [opt_bool, False, _('State whether plugins should be activated on exit (this is saved on Gajim exit). This option SHOULD NOT be used to (de)activate plug-ins. Use GUI instead.')],
|
||||
},{}),
|
||||
|
|
|
@ -2028,8 +2028,6 @@ class NotificationEvent(nec.NetworkIncomingEvent):
|
|||
self.do_command = False
|
||||
self.command = ''
|
||||
|
||||
self.open_chat = False
|
||||
self.activate_urgency_hint = False
|
||||
self.show_in_notification_area = False
|
||||
self.show_in_roster = False
|
||||
|
||||
|
|
|
@ -1009,8 +1009,8 @@ def get_os_info():
|
|||
return os_info
|
||||
|
||||
|
||||
def allow_showing_notification(account, type_ = 'notify_on_new_message',
|
||||
advanced_notif_num = None, is_first_message = True):
|
||||
def allow_showing_notification(account, type_='notify_on_new_message',
|
||||
is_first_message=True):
|
||||
"""
|
||||
Is it allowed to show nofication?
|
||||
|
||||
|
@ -1018,13 +1018,6 @@ def allow_showing_notification(account, type_ = 'notify_on_new_message',
|
|||
option that need to be True e.g.: notify_on_signing is_first_message: set it
|
||||
to false when it's not the first message
|
||||
"""
|
||||
if advanced_notif_num is not None:
|
||||
popup = gajim.config.get_per('notifications', str(advanced_notif_num),
|
||||
'popup')
|
||||
if popup == 'yes':
|
||||
return True
|
||||
if popup == 'no':
|
||||
return False
|
||||
if type_ and (not gajim.config.get(type_) or not is_first_message):
|
||||
return False
|
||||
if gajim.config.get('autopopupaway'): # always show notification
|
||||
|
@ -1033,17 +1026,10 @@ def allow_showing_notification(account, type_ = 'notify_on_new_message',
|
|||
return True
|
||||
return False
|
||||
|
||||
def allow_popup_window(account, advanced_notif_num = None):
|
||||
def allow_popup_window(account):
|
||||
"""
|
||||
Is it allowed to popup windows?
|
||||
"""
|
||||
if advanced_notif_num is not None:
|
||||
popup = gajim.config.get_per('notifications', str(advanced_notif_num),
|
||||
'auto_open')
|
||||
if popup == 'yes':
|
||||
return True
|
||||
if popup == 'no':
|
||||
return False
|
||||
autopopup = gajim.config.get('autopopup')
|
||||
autopopupaway = gajim.config.get('autopopupaway')
|
||||
if autopopup and (autopopupaway or \
|
||||
|
@ -1051,14 +1037,7 @@ def allow_popup_window(account, advanced_notif_num = None):
|
|||
return True
|
||||
return False
|
||||
|
||||
def allow_sound_notification(account, sound_event, advanced_notif_num=None):
|
||||
if advanced_notif_num is not None:
|
||||
sound = gajim.config.get_per('notifications', str(advanced_notif_num),
|
||||
'sound')
|
||||
if sound == 'yes':
|
||||
return True
|
||||
if sound == 'no':
|
||||
return False
|
||||
def allow_sound_notification(account, sound_event):
|
||||
if gajim.config.get('sounddnd') or gajim.connections[account].connected != \
|
||||
gajim.SHOW_LIST.index('dnd') and gajim.config.get_per('soundevents',
|
||||
sound_event, 'enabled'):
|
||||
|
|
|
@ -865,9 +865,6 @@ class PreferencesWindow:
|
|||
gajim.interface.systray_enabled = True
|
||||
gajim.interface.systray.show_icon()
|
||||
|
||||
def on_advanced_notifications_button_clicked(self, widget):
|
||||
dialogs.AdvancedNotificationsWindow()
|
||||
|
||||
def on_play_sounds_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'sounds_on',
|
||||
[self.xml.get_object('manage_sounds_button')])
|
||||
|
|
470
src/dialogs.py
470
src/dialogs.py
|
@ -4725,476 +4725,6 @@ class AddSpecialNotificationDialog:
|
|||
active_iter = self.listen_sound_combobox.get_active_iter()
|
||||
listen_sound_model = self.listen_sound_combobox.get_model()
|
||||
|
||||
class AdvancedNotificationsWindow:
|
||||
events_list = ['message_received', 'contact_connected',
|
||||
'contact_disconnected', 'contact_change_status', 'gc_msg_highlight',
|
||||
'gc_msg', 'ft_request', 'ft_started', 'ft_finished']
|
||||
recipient_types_list = ['contact', 'group', 'all']
|
||||
config_options = ['event', 'recipient_type', 'recipients', 'status',
|
||||
'tab_opened', 'sound', 'sound_file', 'popup', 'auto_open',
|
||||
'run_command', 'command', 'systray', 'roster', 'urgency_hint']
|
||||
def __init__(self):
|
||||
self.xml = gtkgui_helpers.get_gtk_builder(
|
||||
'advanced_notifications_window.ui')
|
||||
self.window = self.xml.get_object('advanced_notifications_window')
|
||||
for w in ('conditions_treeview', 'config_vbox', 'event_combobox',
|
||||
'recipient_type_combobox', 'recipient_list_entry', 'delete_button',
|
||||
'status_hbox', 'use_sound_cb', 'disable_sound_cb', 'use_popup_cb',
|
||||
'disable_popup_cb', 'use_auto_open_cb', 'disable_auto_open_cb',
|
||||
'use_systray_cb', 'disable_systray_cb', 'use_roster_cb',
|
||||
'disable_roster_cb', 'tab_opened_cb', 'not_tab_opened_cb',
|
||||
'sound_entry', 'sound_file_hbox', 'up_button', 'down_button',
|
||||
'run_command_cb', 'command_entry', 'urgency_hint_cb'):
|
||||
self.__dict__[w] = self.xml.get_object(w)
|
||||
|
||||
# Contains status checkboxes
|
||||
childs = self.status_hbox.get_children()
|
||||
|
||||
self.all_status_rb = childs[0]
|
||||
self.special_status_rb = childs[1]
|
||||
self.online_cb = childs[2]
|
||||
self.away_cb = childs[3]
|
||||
self.xa_cb = childs[4]
|
||||
self.dnd_cb = childs[5]
|
||||
self.invisible_cb = childs[6]
|
||||
|
||||
model = gtk.ListStore(int, str)
|
||||
model.set_sort_column_id(0, gtk.SORT_ASCENDING)
|
||||
model.clear()
|
||||
self.conditions_treeview.set_model(model)
|
||||
|
||||
## means number
|
||||
col = gtk.TreeViewColumn(_('#'))
|
||||
self.conditions_treeview.append_column(col)
|
||||
renderer = gtk.CellRendererText()
|
||||
col.pack_start(renderer, expand=False)
|
||||
col.set_attributes(renderer, text=0)
|
||||
|
||||
col = gtk.TreeViewColumn(_('Condition'))
|
||||
self.conditions_treeview.append_column(col)
|
||||
renderer = gtk.CellRendererText()
|
||||
col.pack_start(renderer, expand=True)
|
||||
col.set_attributes(renderer, text=1)
|
||||
|
||||
self.xml.connect_signals(self)
|
||||
|
||||
# Fill conditions_treeview
|
||||
num = 0
|
||||
while gajim.config.get_per('notifications', str(num)):
|
||||
iter_ = model.append((num, ''))
|
||||
path = model.get_path(iter_)
|
||||
self.conditions_treeview.set_cursor(path)
|
||||
self.active_num = num
|
||||
self.initiate_rule_state()
|
||||
self.set_treeview_string()
|
||||
num += 1
|
||||
|
||||
# No rule selected at init time
|
||||
self.conditions_treeview.get_selection().unselect_all()
|
||||
self.active_num = -1
|
||||
self.config_vbox.set_sensitive(False)
|
||||
self.delete_button.set_sensitive(False)
|
||||
self.down_button.set_sensitive(False)
|
||||
self.up_button.set_sensitive(False)
|
||||
|
||||
self.window.show_all()
|
||||
|
||||
def initiate_rule_state(self):
|
||||
"""
|
||||
Set values for all widgets
|
||||
"""
|
||||
if self.active_num < 0:
|
||||
return
|
||||
# event
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
'event')
|
||||
if value:
|
||||
self.event_combobox.set_active(self.events_list.index(value))
|
||||
else:
|
||||
self.event_combobox.set_active(-1)
|
||||
# recipient_type
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
'recipient_type')
|
||||
if value:
|
||||
self.recipient_type_combobox.set_active(
|
||||
self.recipient_types_list.index(value))
|
||||
else:
|
||||
self.recipient_type_combobox.set_active(-1)
|
||||
# recipient
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
'recipients')
|
||||
if not value:
|
||||
value = ''
|
||||
self.recipient_list_entry.set_text(value)
|
||||
# status
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
'status')
|
||||
if value == 'all':
|
||||
self.all_status_rb.set_active(True)
|
||||
else:
|
||||
self.special_status_rb.set_active(True)
|
||||
values = value.split()
|
||||
for v in ('online', 'away', 'xa', 'dnd', 'invisible'):
|
||||
if v in values:
|
||||
self.__dict__[v + '_cb'].set_active(True)
|
||||
else:
|
||||
self.__dict__[v + '_cb'].set_active(False)
|
||||
self.on_status_radiobutton_toggled(self.all_status_rb)
|
||||
# tab_opened
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
'tab_opened')
|
||||
self.tab_opened_cb.set_active(True)
|
||||
self.not_tab_opened_cb.set_active(True)
|
||||
if value == 'no':
|
||||
self.tab_opened_cb.set_active(False)
|
||||
elif value == 'yes':
|
||||
self.not_tab_opened_cb.set_active(False)
|
||||
# sound_file
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
'sound_file')
|
||||
self.sound_entry.set_text(value)
|
||||
# sound, popup, auto_open, systray, roster
|
||||
for option in ('sound', 'popup', 'auto_open', 'systray', 'roster'):
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
option)
|
||||
if value == 'yes':
|
||||
self.__dict__['use_' + option + '_cb'].set_active(True)
|
||||
else:
|
||||
self.__dict__['use_' + option + '_cb'].set_active(False)
|
||||
if value == 'no':
|
||||
self.__dict__['disable_' + option + '_cb'].set_active(True)
|
||||
else:
|
||||
self.__dict__['disable_' + option + '_cb'].set_active(False)
|
||||
# run_command
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
'run_command')
|
||||
self.run_command_cb.set_active(value)
|
||||
# command
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
'command')
|
||||
self.command_entry.set_text(value)
|
||||
# urgency_hint
|
||||
value = gajim.config.get_per('notifications', str(self.active_num),
|
||||
'urgency_hint')
|
||||
self.urgency_hint_cb.set_active(value)
|
||||
|
||||
def set_treeview_string(self):
|
||||
(model, iter_) = self.conditions_treeview.get_selection().get_selected()
|
||||
if not iter_:
|
||||
return
|
||||
event = self.event_combobox.get_active_text()
|
||||
recipient_type = self.recipient_type_combobox.get_active_text()
|
||||
recipient = ''
|
||||
if recipient_type != 'everybody':
|
||||
recipient = self.recipient_list_entry.get_text()
|
||||
if self.all_status_rb.get_active():
|
||||
status = ''
|
||||
else:
|
||||
status = _('when I am ')
|
||||
for st in ('online', 'away', 'xa', 'dnd', 'invisible'):
|
||||
if self.__dict__[st + '_cb'].get_active():
|
||||
status += helpers.get_uf_show(st) + ' '
|
||||
model[iter_][1] = "When %s for %s %s %s" % (event, recipient_type,
|
||||
recipient, status)
|
||||
|
||||
def on_conditions_treeview_cursor_changed(self, widget):
|
||||
(model, iter_) = widget.get_selection().get_selected()
|
||||
if not iter_:
|
||||
self.active_num = -1
|
||||
return
|
||||
self.active_num = model[iter_][0]
|
||||
if self.active_num == 0:
|
||||
self.up_button.set_sensitive(False)
|
||||
else:
|
||||
self.up_button.set_sensitive(True)
|
||||
max = self.conditions_treeview.get_model().iter_n_children(None)
|
||||
if self.active_num == max - 1:
|
||||
self.down_button.set_sensitive(False)
|
||||
else:
|
||||
self.down_button.set_sensitive(True)
|
||||
self.initiate_rule_state()
|
||||
self.config_vbox.set_sensitive(True)
|
||||
self.delete_button.set_sensitive(True)
|
||||
|
||||
def on_new_button_clicked(self, widget):
|
||||
model = self.conditions_treeview.get_model()
|
||||
num = self.conditions_treeview.get_model().iter_n_children(None)
|
||||
gajim.config.add_per('notifications', str(num))
|
||||
iter_ = model.append((num, ''))
|
||||
path = model.get_path(iter_)
|
||||
self.conditions_treeview.set_cursor(path)
|
||||
self.active_num = num
|
||||
self.set_treeview_string()
|
||||
self.config_vbox.set_sensitive(True)
|
||||
|
||||
def on_delete_button_clicked(self, widget):
|
||||
(model, iter_) = self.conditions_treeview.get_selection().get_selected()
|
||||
if not iter_:
|
||||
return
|
||||
# up all others
|
||||
iter2 = model.iter_next(iter_)
|
||||
num = self.active_num
|
||||
while iter2:
|
||||
num = model[iter2][0]
|
||||
model[iter2][0] = num - 1
|
||||
for opt in self.config_options:
|
||||
val = gajim.config.get_per('notifications', str(num), opt)
|
||||
gajim.config.set_per('notifications', str(num - 1), opt, val)
|
||||
iter2 = model.iter_next(iter2)
|
||||
model.remove(iter_)
|
||||
gajim.config.del_per('notifications', str(num)) # delete latest
|
||||
self.active_num = -1
|
||||
self.config_vbox.set_sensitive(False)
|
||||
self.delete_button.set_sensitive(False)
|
||||
self.up_button.set_sensitive(False)
|
||||
self.down_button.set_sensitive(False)
|
||||
|
||||
def on_up_button_clicked(self, widget):
|
||||
(model, iter_) = self.conditions_treeview.get_selection().\
|
||||
get_selected()
|
||||
if not iter_:
|
||||
return
|
||||
for opt in self.config_options:
|
||||
val = gajim.config.get_per('notifications', str(self.active_num),
|
||||
opt)
|
||||
val2 = gajim.config.get_per('notifications',
|
||||
str(self.active_num - 1), opt)
|
||||
gajim.config.set_per('notifications', str(self.active_num), opt,
|
||||
val2)
|
||||
gajim.config.set_per('notifications', str(self.active_num - 1), opt,
|
||||
val)
|
||||
|
||||
model[iter_][0] = self.active_num - 1
|
||||
# get previous iter
|
||||
path = model.get_path(iter_)
|
||||
iter_ = model.get_iter((path[0] - 1,))
|
||||
model[iter_][0] = self.active_num
|
||||
self.on_conditions_treeview_cursor_changed(self.conditions_treeview)
|
||||
|
||||
def on_down_button_clicked(self, widget):
|
||||
(model, iter_) = self.conditions_treeview.get_selection().get_selected()
|
||||
if not iter_:
|
||||
return
|
||||
for opt in self.config_options:
|
||||
val = gajim.config.get_per('notifications', str(self.active_num),
|
||||
opt)
|
||||
val2 = gajim.config.get_per('notifications',
|
||||
str(self.active_num + 1), opt)
|
||||
gajim.config.set_per('notifications', str(self.active_num), opt,
|
||||
val2)
|
||||
gajim.config.set_per('notifications', str(self.active_num + 1), opt,
|
||||
val)
|
||||
|
||||
model[iter_][0] = self.active_num + 1
|
||||
iter_ = model.iter_next(iter_)
|
||||
model[iter_][0] = self.active_num
|
||||
self.on_conditions_treeview_cursor_changed(self.conditions_treeview)
|
||||
|
||||
def on_event_combobox_changed(self, widget):
|
||||
if self.active_num < 0:
|
||||
return
|
||||
active = self.event_combobox.get_active()
|
||||
if active == -1:
|
||||
event = ''
|
||||
else:
|
||||
event = self.events_list[active]
|
||||
gajim.config.set_per('notifications', str(self.active_num), 'event',
|
||||
event)
|
||||
self.set_treeview_string()
|
||||
|
||||
def on_recipient_type_combobox_changed(self, widget):
|
||||
if self.active_num < 0:
|
||||
return
|
||||
recipient_type = self.recipient_types_list[self.recipient_type_combobox.\
|
||||
get_active()]
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'recipient_type', recipient_type)
|
||||
if recipient_type == 'all':
|
||||
self.recipient_list_entry.hide()
|
||||
else:
|
||||
self.recipient_list_entry.show()
|
||||
self.set_treeview_string()
|
||||
|
||||
def on_recipient_list_entry_changed(self, widget):
|
||||
if self.active_num < 0:
|
||||
return
|
||||
recipients = widget.get_text().decode('utf-8')
|
||||
#TODO: do some check
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'recipients', recipients)
|
||||
self.set_treeview_string()
|
||||
|
||||
def set_status_config(self):
|
||||
if self.active_num < 0:
|
||||
return
|
||||
status = ''
|
||||
for st in ('online', 'away', 'xa', 'dnd', 'invisible'):
|
||||
if self.__dict__[st + '_cb'].get_active():
|
||||
status += st + ' '
|
||||
if status:
|
||||
status = status[:-1]
|
||||
gajim.config.set_per('notifications', str(self.active_num), 'status',
|
||||
status)
|
||||
self.set_treeview_string()
|
||||
|
||||
def on_status_radiobutton_toggled(self, widget):
|
||||
if self.active_num < 0:
|
||||
return
|
||||
if self.all_status_rb.get_active():
|
||||
gajim.config.set_per('notifications', str(self.active_num), 'status',
|
||||
'all')
|
||||
# 'All status' clicked
|
||||
for st in ('online', 'away', 'xa', 'dnd', 'invisible'):
|
||||
self.__dict__[st + '_cb'].hide()
|
||||
|
||||
self.special_status_rb.show()
|
||||
else:
|
||||
self.set_status_config()
|
||||
# 'special status' clicked
|
||||
for st in ('online', 'away', 'xa', 'dnd', 'invisible'):
|
||||
self.__dict__[st + '_cb'].show()
|
||||
|
||||
self.special_status_rb.hide()
|
||||
self.set_treeview_string()
|
||||
|
||||
def on_status_cb_toggled(self, widget):
|
||||
if self.active_num < 0:
|
||||
return
|
||||
self.set_status_config()
|
||||
|
||||
# tab_opened OR (not xor) not_tab_opened must be active
|
||||
def on_tab_opened_cb_toggled(self, widget):
|
||||
if self.active_num < 0:
|
||||
return
|
||||
if self.tab_opened_cb.get_active():
|
||||
if self.not_tab_opened_cb.get_active():
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'tab_opened', 'both')
|
||||
else:
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'tab_opened', 'yes')
|
||||
elif not self.not_tab_opened_cb.get_active():
|
||||
self.not_tab_opened_cb.set_active(True)
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'tab_opened', 'no')
|
||||
|
||||
def on_not_tab_opened_cb_toggled(self, widget):
|
||||
if self.active_num < 0:
|
||||
return
|
||||
if self.not_tab_opened_cb.get_active():
|
||||
if self.tab_opened_cb.get_active():
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'tab_opened', 'both')
|
||||
else:
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'tab_opened', 'no')
|
||||
elif not self.tab_opened_cb.get_active():
|
||||
self.tab_opened_cb.set_active(True)
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'tab_opened', 'yes')
|
||||
|
||||
def on_use_it_toggled(self, widget, oposite_widget, option):
|
||||
if widget.get_active():
|
||||
if oposite_widget.get_active():
|
||||
oposite_widget.set_active(False)
|
||||
gajim.config.set_per('notifications', str(self.active_num), option,
|
||||
'yes')
|
||||
elif oposite_widget.get_active():
|
||||
gajim.config.set_per('notifications', str(self.active_num), option,
|
||||
'no')
|
||||
else:
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
option, '')
|
||||
|
||||
def on_disable_it_toggled(self, widget, oposite_widget, option):
|
||||
if widget.get_active():
|
||||
if oposite_widget.get_active():
|
||||
oposite_widget.set_active(False)
|
||||
gajim.config.set_per('notifications', str(self.active_num), option,
|
||||
'no')
|
||||
elif oposite_widget.get_active():
|
||||
gajim.config.set_per('notifications', str(self.active_num), option,
|
||||
'yes')
|
||||
else:
|
||||
gajim.config.set_per('notifications', str(self.active_num), option,
|
||||
'')
|
||||
|
||||
def on_use_sound_cb_toggled(self, widget):
|
||||
self.on_use_it_toggled(widget, self.disable_sound_cb, 'sound')
|
||||
if widget.get_active():
|
||||
self.sound_file_hbox.set_sensitive(True)
|
||||
else:
|
||||
self.sound_file_hbox.set_sensitive(False)
|
||||
|
||||
def on_browse_for_sounds_button_clicked(self, widget, data=None):
|
||||
if self.active_num < 0:
|
||||
return
|
||||
|
||||
def on_ok(widget, path_to_snd_file):
|
||||
dialog.destroy()
|
||||
if not path_to_snd_file:
|
||||
path_to_snd_file = ''
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'sound_file', path_to_snd_file)
|
||||
self.sound_entry.set_text(path_to_snd_file)
|
||||
|
||||
path_to_snd_file = self.sound_entry.get_text().decode('utf-8')
|
||||
path_to_snd_file = os.path.join(os.getcwd(), path_to_snd_file)
|
||||
dialog = SoundChooserDialog(path_to_snd_file, on_ok)
|
||||
|
||||
def on_play_button_clicked(self, widget):
|
||||
helpers.play_sound_file(self.sound_entry.get_text().decode('utf-8'))
|
||||
|
||||
def on_disable_sound_cb_toggled(self, widget):
|
||||
self.on_disable_it_toggled(widget, self.use_sound_cb, 'sound')
|
||||
|
||||
def on_sound_entry_changed(self, widget):
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'sound_file', widget.get_text().decode('utf-8'))
|
||||
|
||||
def on_use_popup_cb_toggled(self, widget):
|
||||
self.on_use_it_toggled(widget, self.disable_popup_cb, 'popup')
|
||||
|
||||
def on_disable_popup_cb_toggled(self, widget):
|
||||
self.on_disable_it_toggled(widget, self.use_popup_cb, 'popup')
|
||||
|
||||
def on_use_auto_open_cb_toggled(self, widget):
|
||||
self.on_use_it_toggled(widget, self.disable_auto_open_cb, 'auto_open')
|
||||
|
||||
def on_disable_auto_open_cb_toggled(self, widget):
|
||||
self.on_disable_it_toggled(widget, self.use_auto_open_cb, 'auto_open')
|
||||
|
||||
def on_run_command_cb_toggled(self, widget):
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'run_command', widget.get_active())
|
||||
if widget.get_active():
|
||||
self.command_entry.set_sensitive(True)
|
||||
else:
|
||||
self.command_entry.set_sensitive(False)
|
||||
|
||||
def on_command_entry_changed(self, widget):
|
||||
gajim.config.set_per('notifications', str(self.active_num), 'command',
|
||||
widget.get_text().decode('utf-8'))
|
||||
|
||||
def on_use_systray_cb_toggled(self, widget):
|
||||
self.on_use_it_toggled(widget, self.disable_systray_cb, 'systray')
|
||||
|
||||
def on_disable_systray_cb_toggled(self, widget):
|
||||
self.on_disable_it_toggled(widget, self.use_systray_cb, 'systray')
|
||||
|
||||
def on_use_roster_cb_toggled(self, widget):
|
||||
self.on_use_it_toggled(widget, self.disable_roster_cb, 'roster')
|
||||
|
||||
def on_disable_roster_cb_toggled(self, widget):
|
||||
self.on_disable_it_toggled(widget, self.use_roster_cb, 'roster')
|
||||
|
||||
def on_urgency_hint_cb_toggled(self, widget):
|
||||
gajim.config.set_per('notifications', str(self.active_num),
|
||||
'uregency_hint', widget.get_active())
|
||||
|
||||
def on_close_window(self, widget):
|
||||
self.window.destroy()
|
||||
|
||||
class TransformChatToMUC:
|
||||
# Keep a reference on windows so garbage collector don't restroy them
|
||||
instances = []
|
||||
|
|
|
@ -57,12 +57,6 @@ def get_show_in_roster(event, account, contact, session=None):
|
|||
"""
|
||||
if event == 'gc_message_received':
|
||||
return True
|
||||
num = get_advanced_notification(event, account, contact)
|
||||
if num is not None:
|
||||
if gajim.config.get_per('notifications', str(num), 'roster') == 'yes':
|
||||
return True
|
||||
if gajim.config.get_per('notifications', str(num), 'roster') == 'no':
|
||||
return False
|
||||
if event == 'message_received':
|
||||
if session and session.control:
|
||||
return False
|
||||
|
@ -72,73 +66,16 @@ def get_show_in_systray(event, account, contact, type_=None):
|
|||
"""
|
||||
Return True if this event must be shown in systray, else False
|
||||
"""
|
||||
num = get_advanced_notification(event, account, contact)
|
||||
if num is not None:
|
||||
if gajim.config.get_per('notifications', str(num), 'systray') == 'yes':
|
||||
return True
|
||||
if gajim.config.get_per('notifications', str(num), 'systray') == 'no':
|
||||
return False
|
||||
if type_ == 'printed_gc_msg' and not gajim.config.get(
|
||||
'notify_on_all_muc_messages'):
|
||||
# it's not an highlighted message, don't show in systray
|
||||
return False
|
||||
return gajim.config.get('trayicon_notification_on_events')
|
||||
|
||||
def get_advanced_notification(event, account, contact):
|
||||
"""
|
||||
Returns the number of the first (top most) advanced notification else None
|
||||
"""
|
||||
num = 0
|
||||
notif = gajim.config.get_per('notifications', str(num))
|
||||
while notif:
|
||||
recipient_ok = False
|
||||
status_ok = False
|
||||
tab_opened_ok = False
|
||||
# test event
|
||||
if gajim.config.get_per('notifications', str(num), 'event') == event:
|
||||
# test recipient
|
||||
recipient_type = gajim.config.get_per('notifications', str(num),
|
||||
'recipient_type')
|
||||
recipients = gajim.config.get_per('notifications', str(num),
|
||||
'recipients').split()
|
||||
if recipient_type == 'all':
|
||||
recipient_ok = True
|
||||
elif recipient_type == 'contact' and contact.jid in recipients:
|
||||
recipient_ok = True
|
||||
elif recipient_type == 'group':
|
||||
for group in contact.groups:
|
||||
if group in contact.groups:
|
||||
recipient_ok = True
|
||||
break
|
||||
if recipient_ok:
|
||||
# test status
|
||||
our_status = gajim.SHOW_LIST[gajim.connections[account].connected]
|
||||
status = gajim.config.get_per('notifications', str(num), 'status')
|
||||
if status == 'all' or our_status in status.split():
|
||||
status_ok = True
|
||||
if status_ok:
|
||||
# test window_opened
|
||||
tab_opened = gajim.config.get_per('notifications', str(num),
|
||||
'tab_opened')
|
||||
if tab_opened == 'both':
|
||||
tab_opened_ok = True
|
||||
else:
|
||||
chat_control = helpers.get_chat_control(account, contact)
|
||||
if (chat_control and tab_opened == 'yes') or (not chat_control \
|
||||
and tab_opened == 'no'):
|
||||
tab_opened_ok = True
|
||||
if tab_opened_ok:
|
||||
return num
|
||||
|
||||
num += 1
|
||||
notif = gajim.config.get_per('notifications', str(num))
|
||||
|
||||
def notify(event, jid, account, parameters, advanced_notif_num=None):
|
||||
def notify(event, jid, account, parameters):
|
||||
"""
|
||||
Check what type of notifications we want, depending on basic and the
|
||||
advanced configuration of notifications and do these notifications;
|
||||
advanced_notif_num holds the number of the first (top most) advanced
|
||||
notification
|
||||
"""
|
||||
# First, find what notifications we want
|
||||
do_popup = False
|
||||
|
@ -164,15 +101,14 @@ def notify(event, jid, account, parameters, advanced_notif_num=None):
|
|||
if gajim.config.get_per('soundevents', 'contact_connected',
|
||||
'enabled') and not gajim.block_signed_in_notifications[account] and \
|
||||
not block_transport and helpers.allow_sound_notification(account,
|
||||
event, advanced_notif_num):
|
||||
event):
|
||||
do_sound = True
|
||||
elif event == 'contact_disconnected':
|
||||
status_message = parameters
|
||||
if helpers.allow_showing_notification(account, 'notify_on_signout'):
|
||||
do_popup = True
|
||||
if gajim.config.get_per('soundevents', 'contact_disconnected',
|
||||
'enabled') and helpers.allow_sound_notification(account,
|
||||
event, advanced_notif_num):
|
||||
'enabled') and helpers.allow_sound_notification(account, event):
|
||||
do_sound = True
|
||||
elif event == 'new_message':
|
||||
message_type = parameters[0]
|
||||
|
@ -187,26 +123,22 @@ def notify(event, jid, account, parameters, advanced_notif_num=None):
|
|||
message = ''
|
||||
focused = parameters[4]
|
||||
if helpers.allow_showing_notification(account, 'notify_on_new_message',
|
||||
advanced_notif_num, is_first_message):
|
||||
is_first_message):
|
||||
do_popup = True
|
||||
if is_first_message and helpers.allow_sound_notification(account,
|
||||
'first_message_received', advanced_notif_num):
|
||||
'first_message_received'):
|
||||
do_sound = True
|
||||
elif not is_first_message and focused and \
|
||||
helpers.allow_sound_notification(account,
|
||||
'next_message_received_focused', advanced_notif_num):
|
||||
'next_message_received_focused'):
|
||||
do_sound = True
|
||||
elif not is_first_message and not focused and \
|
||||
helpers.allow_sound_notification(account,
|
||||
'next_message_received_unfocused', advanced_notif_num):
|
||||
'next_message_received_unfocused'):
|
||||
do_sound = True
|
||||
else:
|
||||
print '*Event not implemeted yet*'
|
||||
|
||||
if advanced_notif_num is not None and gajim.config.get_per('notifications',
|
||||
str(advanced_notif_num), 'run_command'):
|
||||
do_cmd = True
|
||||
|
||||
# Do the wanted notifications
|
||||
if do_popup:
|
||||
if event in ('contact_connected', 'contact_disconnected',
|
||||
|
@ -290,14 +222,7 @@ def notify(event, jid, account, parameters, advanced_notif_num=None):
|
|||
snd_file = None
|
||||
snd_event = None # If not snd_file, play the event
|
||||
if event == 'new_message':
|
||||
if advanced_notif_num is not None and gajim.config.get_per(
|
||||
'notifications', str(advanced_notif_num), 'sound') == 'yes':
|
||||
snd_file = gajim.config.get_per('notifications',
|
||||
str(advanced_notif_num), 'sound_file')
|
||||
elif advanced_notif_num is not None and gajim.config.get_per(
|
||||
'notifications', str(advanced_notif_num), 'sound') == 'no':
|
||||
pass # do not set snd_event
|
||||
elif is_first_message:
|
||||
if is_first_message:
|
||||
snd_event = 'first_message_received'
|
||||
elif focused:
|
||||
snd_event = 'next_message_received_focused'
|
||||
|
@ -310,14 +235,6 @@ def notify(event, jid, account, parameters, advanced_notif_num=None):
|
|||
if snd_event:
|
||||
helpers.play_sound(snd_event)
|
||||
|
||||
if do_cmd:
|
||||
command = gajim.config.get_per('notifications', str(advanced_notif_num),
|
||||
'command')
|
||||
try:
|
||||
helpers.exec_command(command)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def popup(event_type, jid, account, msg_type='', path_to_image=None, title=None,
|
||||
text=None):
|
||||
"""
|
||||
|
|
|
@ -217,6 +217,11 @@ class GajimPluginConfig(UserDict.DictMixin):
|
|||
self.data[key] = value
|
||||
self.save()
|
||||
|
||||
@log_calls('GajimPluginConfig')
|
||||
def __delitem__(self, key):
|
||||
del self.data[key]
|
||||
self.save()
|
||||
|
||||
def keys(self):
|
||||
return self.data.keys()
|
||||
|
||||
|
|
|
@ -262,8 +262,8 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
|||
gajim.events.add_event(self.conn.name, fjid, event)
|
||||
|
||||
def roster_message(self, jid, msg, tim, encrypted=False, msg_type='',
|
||||
subject=None, resource='', msg_id=None, user_nick='',
|
||||
advanced_notif_num=None, xhtml=None, form_node=None, displaymarking=None):
|
||||
subject=None, resource='', msg_id=None, user_nick='', xhtml=None,
|
||||
form_node=None, displaymarking=None):
|
||||
"""
|
||||
Display the message or show notification in the roster
|
||||
"""
|
||||
|
@ -322,7 +322,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
|||
# Do we have a queue?
|
||||
no_queue = len(gajim.events.get_events(self.conn.name, fjid)) == 0
|
||||
|
||||
popup = helpers.allow_popup_window(self.conn.name, advanced_notif_num)
|
||||
popup = helpers.allow_popup_window(self.conn.name)
|
||||
|
||||
if msg_type == 'normal' and popup: # it's single message to be autopopuped
|
||||
dialogs.SingleMessageWindow(self.conn.name, contact.jid,
|
||||
|
|
Loading…
Add table
Reference in a new issue