Commit dffa54f7 authored by Philipp Hörist's avatar Philipp Hörist

Refactor Windows Notifications

- Only show one notification at a time
- Fix pylint errors
parent fedc00eb
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.1 -->
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.12"/>
<object class="GtkWindow" id="popup_notification_window">
<property name="width_request">312</property>
<property name="height_request">95</property>
<object class="GtkEventBox" id="eventbox">
<property name="name">PopupNotificationEventBox</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">1</property>
<property name="type">popup</property>
<property name="resizable">False</property>
<property name="skip_taskbar_hint">True</property>
<property name="skip_pager_hint">True</property>
<property name="decorated">False</property>
<property name="gravity">south-east</property>
<signal name="button-press-event" handler="on_popup_notification_window_button_press_event" swapped="no"/>
<child>
<object class="GtkEventBox" id="eventbox">
<property name="name">PopupNotificationEventBox</property>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">4</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox" id="hbox3019">
<object class="GtkImage" id="image">
<property name="width_request">68</property>
<property name="height_request">86</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">4</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage" id="notification_image">
<property name="width_request">68</property>
<property name="height_request">86</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</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="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="vbox111">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="hbox3020">
<object class="GtkLabel" id="event_type_label">
<property name="width_request">196</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="event_type_label">
<property name="width_request">196</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Event Type</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="close_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="relief">none</property>
<signal name="clicked" handler="on_close_button_clicked" swapped="no"/>
<child>
<object class="GtkImage" id="image496">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-close</property>
<property name="icon_size">1</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<property name="label" translatable="yes">Event Type</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -92,21 +51,46 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="event_description_label">
<property name="width_request">218</property>
<property name="height_request">64</property>
<object class="GtkButton" id="close_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Event desc</property>
<property name="wrap">True</property>
<property name="receives_default">False</property>
<property name="relief">none</property>
<signal name="clicked" handler="_on_close_button_clicked" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-close</property>
<property name="icon_size">1</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="event_description_label">
<property name="width_request">218</property>
<property name="height_request">64</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Event desc</property>
<property name="wrap">True</property>
<property name="ellipsize">end</property>
<property name="max_width_chars">30</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
......@@ -114,11 +98,13 @@
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<placeholder/>
</child>
</object>
</interface>
This diff is collapsed.
......@@ -5668,9 +5668,6 @@ class RosterWindow:
app.config.get('roster_x-position'),
app.config.get('roster_y-position'))
self.popups_notification_height = 0
self.popup_notification_windows = []
# Remove contact from roster when last event opened
# { (contact, account): { backend: boolean }
self.contacts_to_be_removed = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment