Commit 7506f2ad authored by Erik Reider's avatar Erik Reider

Initial commit

parent 62c2140b
build
*.ui~
*.ui#
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
#!/usr/bin/env python3
from os import environ, path
from subprocess import call
prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = path.join(prefix, 'share')
destdir = environ.get('DESTDIR', '')
# Package managers set this so we don't need to run
if not destdir:
print('Updating icon cache...')
call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])
print('Updating desktop database...')
call(['update-desktop-database', '-q', path.join(datadir, 'applications')])
print('Compiling GSettings schemas...')
call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')])
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g color="#000" fill="#2e3436"><path d="M7.188 2.281c-.094.056-.192.125-.29.19L5.566 3.803a1.684 1.684 0 11-2.17 2.17L2.332 7.037c.506-.069 1.017-.136 1.2.026.242.214.139 1.031.155 1.656.213.088.427.171.657.219.04.008.085-.007.125 0 .337-.525.683-1.288 1-1.344.322-.057.905.562 1.406.937a3.67 3.67 0 00.656-.468c-.195-.595-.594-1.369-.437-1.657.158-.29 1.019-.37 1.625-.531.028-.183.062-.371.062-.562 0-.075-.027-.146-.031-.22-.587-.217-1.435-.385-1.562-.687-.128-.302.34-1.021.593-1.593a3.722 3.722 0 00-.593-.532zm3.875 3.25c-.165.475-.305 1.086-.47 1.563-.43.047-.84.14-1.218.312-.38-.322-.787-.773-1.156-1.093a5.562 5.562 0 00-.688.468c.177.46.453 1.001.625 1.469-.298.309-.531.67-.719 1.063-.494 0-1.102-.084-1.593-.094a5.68 5.68 0 00-.219.812c.435.24 1.006.468 1.438.72-.006.093-.032.185-.032.28 0 .333.049.66.125.97-.382.304-.898.63-1.28.937.015.044.04.083.058.127l.613.613c.417-.1.868-.223 1.266-.303.248.343.532.626.875.875-.027.135-.068.283-.104.428.174-.063.34-.155.482-.297l1.432-1.432a1.994 1.994 0 01.533-3.918c.919 0 1.684.623 1.918 1.467l1.338-1.338c.06-.06.11-.124.156-.191-.035-.062-.06-.13-.1-.188.096-.152.205-.31.315-.47.017-.348-.1-.7-.37-.971l-.177-.176c-.28.192-.561.387-.83.555-.345-.233-.746-.383-1.156-.5-.077-.507-.107-1.132-.187-1.625a5.44 5.44 0 00-.875-.063zm-9.247.608c-.087.068-.173.138-.254.205l.014.035z" style="marker:none" overflow="visible"/><path d="M8.707.293a1 1 0 00-1.415 0l-6.999 7a1 1 0 000 1.413l7 7.001a1 1 0 001.415 0l7-7a1 1 0 000-1.413zm-.708 2.121l5.587 5.587L8 13.586 2.414 7.999z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none" font-weight="400" font-family="sans-serif" overflow="visible"/></g></svg>
\ No newline at end of file
application_id = 'org.erikreider.sway-notification-center'
scalable_dir = join_paths('hicolor', 'scalable', 'apps')
install_data(
join_paths(scalable_dir, ('@0@.svg').format(application_id)),
install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir)
)
symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
install_data(
join_paths(symbolic_dir, ('@0@-symbolic.svg').format(application_id)),
install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir)
)
desktop_file = i18n.merge_file(
input: 'org.erikreider.sway-notification-center.desktop.in',
output: 'org.erikreider.sway-notification-center.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils,
args: [desktop_file]
)
endif
appstream_file = i18n.merge_file(
input: 'org.erikreider.sway-notification-center.appdata.xml.in',
output: 'org.erikreider.sway-notification-center.appdata.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'appdata')
)
appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
test('Validate appstream file', appstream_util,
args: ['validate', appstream_file]
)
endif
install_data('org.erikreider.sway-notification-center.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)
compile_schemas = find_program('glib-compile-schemas', required: false)
if compile_schemas.found()
test('Validate schema file', compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()]
)
endif
subdir('icons')
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>org.erikreider.sway-notification-center.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<description>
</description>
</component>
[Desktop Entry]
Name=sway-notificaton-center
Exec=sway-notificaton-center
Icon=org.erikreider.sway-notification-center
Terminal=false
Type=Application
Categories=GTK;
StartupNotify=true
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="sway-notificaton-center">
<schema id="org.erikreider.sway-notification-center" path="/org/erikreider/sway-notification-center/">
</schema>
</schemalist>
project('sway-notificaton-center', ['c', 'vala'],
version: '0.1.0',
meson_version: '>= 0.50.0',
default_options: [ 'warning_level=2',
],
)
i18n = import('i18n')
subdir('data')
subdir('src')
subdir('po')
meson.add_install_script('build-aux/meson/postinstall.py')
{
"app-id" : "org.erikreider.sway-notification-center",
"runtime" : "org.gnome.Platform",
"runtime-version" : "40",
"sdk" : "org.gnome.Sdk",
"command" : "sway-notificaton-center",
"finish-args" : [
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
"--socket=wayland"
],
"cleanup" : [
"/include",
"/lib/pkgconfig",
"/man",
"/share/doc",
"/share/gtk-doc",
"/share/man",
"/share/pkgconfig",
"/share/vala",
"*.la",
"*.a"
],
"modules" : [
{
"name" : "sway-notificaton-center",
"builddir" : true,
"buildsystem" : "meson",
"sources" : [
{
"type" : "git",
"url" : "file:///home/erikreider/GitHub/Sway-Notificaton-Center"
}
]
}
]
}
data/org.erikreider.sway-notification-center.desktop.in
data/org.erikreider.sway-notification-center.appdata.xml.in
data/org.erikreider.sway-notification-center.gschema.xml
src/window.ui
src/main.vala
src/window.vala
i18n.gettext('sway-notificaton-center', preset: 'glib')
[DBus (name = "org.erikreider.swaync.cc")]
interface CcDaemon : GLib.Object {
public abstract void toggle () throws DBusError, IOError;
}
public void main (string[] args) {
try {
CcDaemon controlCenter = Bus.get_proxy_sync (BusType.SESSION, "org.erikreider.swaync.cc",
"/org/erikreider/swaync/cc");
controlCenter.toggle ();
} catch (IOError e) {
stderr.printf ("Could not connect to CC service\n");
} catch (DBusError e) {
stderr.printf ("Could not connect to CC service\n");
}
}
namespace SwayNotificatonCenter {
public class Constants {
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<template class="SwayNotificatonCenterControlCenterWidget" parent="GtkApplicationWindow">
<property name="can-focus">False</property>
<property name="type">popup</property>
<property name="resizable">False</property>
<property name="default-width">500</property>
<property name="type-hint">popup-menu</property>
<property name="skip-taskbar-hint">True</property>
<property name="skip-pager-hint">True</property>
<property name="urgency-hint">True</property>
<property name="decorated">False</property>
<property name="gravity">north-east</property>
<property name="show-menubar">False</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="shadow-type">none</property>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<style>
<class name="cc"/>
</style>
</template>
</interface>
namespace SwayNotificatonCenter {
[DBus (name = "org.erikreider.swaync.cc")]
public class CcDaemon : Object {
private ControlCenterWidget cc = null;
private DBusInit dbusInit;
public CcDaemon (DBusInit dbusInit) {
this.dbusInit = dbusInit;
cc = new ControlCenterWidget ();
}
public bool get_visibility () throws DBusError, IOError {
return cc.visible;
}
public void toggle () throws DBusError, IOError {
if (cc.toggle_visibility ()) {
dbusInit.notiDaemon.set_noti_window_visibility (false);
}
}
public void update () throws DBusError, IOError {
cc.update (this.dbusInit.notifications);
}
}
[GtkTemplate (ui = "/org/erikreider/sway-notification-center/controlCenter/controlCenter.ui")]
private class ControlCenterWidget : Gtk.ApplicationWindow {
[GtkChild]
unowned Gtk.Box box;
public ControlCenterWidget () {
GtkLayerShell.init_for_window (this);
GtkLayerShell.set_layer (this, GtkLayerShell.Layer.OVERLAY);
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.TOP, true);
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.BOTTOM, true);
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.RIGHT, true);
}
public bool toggle_visibility () {
var vis = !this.visible;
this.set_visible (vis);
return vis;
}
public void update (List<NotifyParams ? > notifications) {
foreach (var child in box.get_children ()) {
box.remove (child);
}
foreach (var param in notifications) {
var noti = new Notification (param, true);
box.add (noti);
}
}
}
}
namespace SwayNotificatonCenter {
public class NotifyParams {
public uint32 applied_id { get; set; }
public string app_name { get; set; }
public uint32 replaces_id { get; set; }
public string app_icon { get; set; }
public string summary { get; set; }
public string body { get; set; }
public string[] actions { get; set; }
public HashTable<string, Variant> hints { get; set; }
public int expire_timeout { get; set; }
public NotifyParams (uint32 applied_id,
string app_name,
uint32 replaces_id,
string app_icon,
string summary,
string body,
string[] actions,
HashTable<string, Variant> hints,
int expire_timeout) {
this.applied_id = applied_id;
this.app_name = app_name;
this.replaces_id = replaces_id;
this.app_icon = app_icon;
this.summary = summary;
this.body = body;
this.actions = actions;
this.hints = hints;
this.expire_timeout = expire_timeout;
get_icon ();
}
private void get_icon () {
}
public void printParams () {
print ("----START---- \n");
// print (applied_id.to_string () + "\n");
print (app_name + "\n");
// print (replaces_id.to_string () + "\n");
// print (app_icon + "\n");
// print (summary + "\n");
// print (body + "\n");
print ("-----------\n");
foreach (var action in actions) {
print (action + "\n");
}
print ("-----------\n");
// print(hints.get ("icon_data").print (false) + "\n");
// hints.get ("icon_data")
// foreach (var hint in hints.get_values ()) {
// hint.print (false);
// }
print ("-----------\n");
foreach (var key in hints.get_keys ()) {
print (key + "\n");
}
print ("-----------\n");
print (expire_timeout.to_string () + "\n");
}
}
[DBus (name = "org.freedesktop.Notifications")]
public class NotiDaemon : Object {
private uint32 noti_id = 1;
private NotiWindow notiWin;
private DBusInit dbusInit;
public NotiDaemon (DBusInit dbusInit) {
this.dbusInit = dbusInit;
this.notiWin = new NotiWindow ();
}
public void set_noti_window_visibility (bool value)
throws DBusError, IOError {
notiWin.set_visible (value);
}
public uint32 Notify (string app_name,
uint32 replaces_id,
string app_icon,
string summary,
string body,
string[] actions,
HashTable<string, Variant> hints,
int expire_timeout)
throws DBusError, IOError {
uint32 id = replaces_id == 0 ? ++noti_id : replaces_id;
var param = new NotifyParams (
id,
app_name,
replaces_id,
app_icon,
summary,
body,
actions,
hints,
expire_timeout);
if (!dbusInit.ccDaemon.get_visibility ()) {
if (id == replaces_id) {
notiWin.replace_notification (param);
foreach (NotifyParams n in dbusInit.notifications) {
if (n.applied_id == replaces_id) {
dbusInit.notifications.remove (n);
break;
}
}
}
notiWin.add_notification (param);
}
dbusInit.notifications.append (param);
dbusInit.ccDaemon.update ();
return id;
}
public void CloseNotification (uint32 id) throws DBusError, IOError {
print ("yeet");
}
public void GetServerInformation (out string name,
out string vendor,
out string version,
out string spec_version)
throws DBusError, IOError {
name = "sway-notification-center";
vendor = "yeert";
version = "0.1";
spec_version = "1.0";
}
public signal void NotificationClosed (uint32 id, uint32 reason);
public signal void ActionInvoked (uint32 id, uint32 reason);
}
public class DBusInit {
public List<NotifyParams ? > notifications = new List<NotifyParams ? > ();
public NotiDaemon notiDaemon;
public CcDaemon ccDaemon;
public DBusInit () {
this.notiDaemon = new NotiDaemon (this);
this.ccDaemon = new CcDaemon (this);
Bus.own_name (BusType.SESSION, "org.freedesktop.Notifications",
BusNameOwnerFlags.NONE,
on_noti_bus_aquired,
() => {},
() => stderr.printf ("Could not aquire notification name\n"));
Bus.own_name (BusType.SESSION, "org.erikreider.swaync.cc",
BusNameOwnerFlags.NONE,
on_cc_bus_aquired,
() => {},
() => stderr.printf ("Could not aquire CC name\n"));
}
void on_noti_bus_aquired (DBusConnection conn) {
try {
conn.register_object ("/org/freedesktop/Notifications", notiDaemon);
} catch (IOError e) {
stderr.printf ("Could not register notification service\n");
}
}
void on_cc_bus_aquired (DBusConnection conn) {
try {
conn.register_object ("/org/erikreider/swaync/cc", ccDaemon);
} catch (IOError e) {
stderr.printf ("Could not register CC service\n");
}
}
}
public void main (string[] args) {
Gtk.init (ref args);
Hdy.init ();
try {
Gtk.CssProvider css_provider = new Gtk.CssProvider ();
css_provider.load_from_path ("src/style.css");
Gtk.StyleContext.
add_provider_for_screen (
Gdk.Screen.get_default (),
css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_USER);
} catch (Error e) {
print ("Error: %s\n", e.message);
}
new DBusInit ();
Gtk.main ();
}
}
sway_notificaton_center_sources = [
'main.vala',
'window/window.vala',
'notification/notification.vala',
'controlCenter/controlCenter.vala',
'constants.vala',
]
sway_notificaton_center_deps = [
dependency('gio-2.0', version: '>= 2.50'),
dependency('gtk+-3.0', version: '>= 3.22'),
dependency('libhandy-1', version: '>= 1.0.0'),
meson.get_compiler('c').find_library('gtk-layer-shell')
]
gnome = import('gnome')
sway_notificaton_center_sources += gnome.compile_resources('sway_notificaton_center-resources',
'sway_notificaton_center.gresource.xml',
c_name: 'sway_notificaton_center'
)
executable('sway-nc',
sway_notificaton_center_sources,
vala_args: [ '--target-glib=2.50', '--pkg=GtkLayerShell-0.1' ],
dependencies: sway_notificaton_center_deps,
install: true,
)
executable('sway-nc-client',
['client.vala', 'constants.vala'],
vala_args: [ '--target-glib=2.50', '--pkg=GtkLayerShell-0.1' ],
dependencies: sway_notificaton_center_deps,
install: true,
)
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<template class="SwayNotificatonCenterNotification" parent="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkOverlay">
<property name="width-request">400</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkEventBox" id="eventBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage" id="img">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">6</property>
<property name="margin-end">12</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</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="GtkLabel" id="summary">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="ellipsize">end</property>
<property name="xalign">0</property>
<attributes>
<attribute name="size" value="12288"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="body">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="notification"/>
</style>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<style>
<class name="notification-box"/>
</style>
</object>
<packing>
<property name="index">-1</property>
</packing>
</child>
<child type="overlay">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="valign">start</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkEventBox" id="close_button">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage" id="close_button_img">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">12</property>
<property name="icon-name">close-symbolic</property>
<property name="icon_size">0</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<style>
<class name="notification-close-button"/>
</style>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<style>
<class name="notification-parent"/>
</style>
</template>
</interface>
namespace SwayNotificatonCenter {
[GtkTemplate (ui = "/org/erikreider/sway-notification-center/notification/notification.ui")]
private class Notification : Gtk.Box {
[GtkChild]
unowned Gtk.EventBox eventBox;
[GtkChild]
unowned Gtk.EventBox close_button;
[GtkChild]
unowned Gtk.Label summary;
[GtkChild]
unowned Gtk.Label body;
[GtkChild]
unowned Gtk.Image img;
private int open_timeout = 0;
private int seconds = 5;
public NotifyParams param;
public Notification (NotifyParams param, bool show = false) {
this.param = param;
this.summary.set_text (param.summary);
this.body.set_text (param.body);
eventBox.button_press_event.connect ((widget, event_button) => {
print (widget.get_name ());
return false;
});
close_button.button_press_event.connect ((widget, event_button) => {
print (widget.get_name ());
return false;
});
set_icon ();
if (show) this.show_all ();
}
private void set_icon () {
if (param.app_icon != "") {
img.set_from_icon_name (param.app_icon, Gtk.IconSize.DIALOG);
} else {
foreach (var app in AppInfo.get_all ()) {
if (app.get_name ().down () == param.app_name.down ()) {
img.set_from_gicon (app.get_icon (), Gtk.IconSize.DIALOG);
break;
}
}
}
}
public delegate void On_hide_cb (Notification noti);
public void show_notification (On_hide_cb on_hide_cb) {
this.show ();
open_timeout = 1;
Timeout.add ((int) (seconds * 1000), () => {
open_timeout--;
if (open_timeout == 0) on_hide_cb (this);
return false;
});
}
}
}
.notification-parent:first-child {
margin-top: 6px;
}
.notification-parent:last-child {
margin-bottom: 12px;
}
.notification {
background: rgb(58, 58, 58);
padding: 6px;
border-radius: 10px;
}
.notification-box {
border-radius: 10px;
margin: 6px 12px;
box-shadow: 0px 2px 4px 2px rgba(0, 0, 0, 0.5);
}
.notification-close-button {
background-color: black;
box-shadow: 0px 2px 4px 2px rgba(0, 0, 0, 0.3);
margin: 0 4px;
padding: 6px;
border-radius: 100%;
}
.cc {
background-color: rgba(0, 0, 0, 0.7);
}
.noti-base {
background-color: transparent;
}
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/erikreider/sway-notification-center">
<file>window/window.ui</file>
<file>notification/notification.ui</file>
<file>controlCenter/controlCenter.ui</file>
</gresource>
</gresources>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<template class="SwayNotificatonCenterNotiWindow" parent="GtkApplicationWindow">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="decorated">False</property>
<property name="deletable">False</property>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<style>
<class name="noti-base"/>
</style>
</template>
</interface>
namespace SwayNotificatonCenter {
[GtkTemplate (ui = "/org/erikreider/sway-notification-center/window/window.ui")]
public class NotiWindow : Gtk.ApplicationWindow {
[GtkChild]
unowned Gtk.Box box;
public NotiWindow () {
GtkLayerShell.init_for_window (this);
GtkLayerShell.set_layer (this, GtkLayerShell.Layer.OVERLAY);
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.TOP, true);
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.RIGHT, true);
}
public void replace_notification (NotifyParams param) {
foreach (var w in box.get_children ()) {
if (((Notification) w).param.applied_id == param.replaces_id) {
box.remove (w);
break;
}
}
}
public void add_notification (NotifyParams param) {
var noti = new Notification (param);
param.printParams ();
box.pack_end (noti, false, false, 0);
noti.show_notification ((v_noti) => {
box.remove (v_noti);
if (box.get_children ().length () == 0) this.hide ();
});
this.show_all ();
}
}
}
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