Commit Graph

48 Commits

Author SHA1 Message Date
Julian Ospald 843fb0c731
Fix build against latest glib 2017-07-19 19:47:08 +02:00
Julian Ospald afcf7a7581
Fix build against latest gtk-rs 2017-07-14 00:47:21 +02:00
Ospald, Julian fc8ca1af63 Fix documentation 2017-07-11 16:33:31 +02:00
Ospald, Julian 091ee97b70 Remove BoolError occurences
Because currently depends on unpublished glib binding.
2017-07-11 15:53:01 +02:00
Ospald, Julian d939bee7ea Cargo fmt 2017-07-11 15:24:10 +02:00
Ospald, Julian 557ebbc93f Fix examples 2017-07-11 15:18:40 +02:00
Ospald, Julian a75ae6a1fe Fix documentation 2017-07-11 14:48:23 +02:00
Ospald, Julian 6a96044a68 Fix examples 2017-07-11 14:36:21 +02:00
Julian Ospald 13850652a7 Switch to gir 2017-07-11 13:58:06 +02:00
Ospald, Julian 965a64aa55 Drop use of gtypes 2017-07-10 11:57:41 +02:00
Ospald, Julian 9f6e3f5d31 Add Drop impl for Notification
The notification is now unrefed via the GObject system.
2017-07-10 11:53:22 +02:00
Julian Ospald 437f2cc756
Rename new_notification() to new() 2017-07-10 01:09:21 +02:00
Julian Ospald fe4d803efe
Small rewrite:
* Use error-chain for errors and expose them
* Don't use Context object, since the lifetimes get us in trouble
  when used with gtk-rs, which has callback closures with static
  lifetime. Instead we just expose notify_init()/notify_uninit() and
  panic when functions are called before notify_init().
2017-07-10 01:01:36 +02:00
Julian Ospald 172cbd5143
Add lifetime specifiers to &self 2017-07-09 21:46:44 +02:00
Julian Ospald f351cc15e2
Add Notification::close() 2017-07-09 19:33:53 +02:00
Julian Ospald b77584e0a0
Add Notification::clear_hints() 2017-07-09 19:33:32 +02:00
Julian Ospald c3897b7c0e
Add Notification::set_image_from_pixbuf() 2017-07-09 19:33:13 +02:00
Julian Ospald 6166c861e4
Add Notification::set_urgency() 2017-07-09 19:31:25 +02:00
Julian Ospald c2efdd0842
Add Notification::set_category() 2017-07-09 19:30:49 +02:00
Julian Ospald 73eb0cc68d
Cosmetics 2017-07-09 14:25:30 +02:00
Julian Ospald 95263c33f8
Add Notification::set_hint() 2017-07-09 14:23:37 +02:00
Julian Ospald cdc4af3be1
Add Notification::update() 2017-07-09 14:22:36 +02:00
Julian Ospald 8c66220a4e
Add Notification::set_notification_timeout() 2017-07-09 14:22:06 +02:00
Julian Ospald 6e5a9ab5d4
Switch to using glib-sys
We need GVariant and to_glib_none() later,
which must be from the crate glib_sys.
2017-07-09 14:19:48 +02:00
Julian Ospald 7d80600657
Fix body/icon pointing to garbage
The pattern matching moves 'body' and drops it after
creation of the pointer. We must avoid the move, by using 'ref'.
2017-07-09 12:51:55 +02:00
Mika Attila a74f4c9888 Add convenience method to context for showing a notification 2015-11-03 10:06:33 +01:00
Mika Attila c698097ffd Remove unnecessary return statement 2015-11-03 09:17:20 +01:00
Mika Attila 8daef60a03 Implement From<ffi::NulError> for error types that have this variant 2015-11-03 09:15:16 +01:00
Mika Attila d282d2cd50 Add remaining missing documentation 2015-11-03 01:04:22 +01:00
Mika Attila 6251e0ad5c Expose ffi::NulError in nul errors 2015-11-03 01:01:49 +01:00
Mika Attila db2578ea92 Use fmt::Result 2015-11-03 00:55:09 +01:00
Mika Attila ba947a35f8 Rename InitFailure to InitError and add documentation 2015-11-03 00:54:03 +01:00
Mika Attila 503eee4441 Warn about missing documentation 2015-11-03 00:51:20 +01:00
Mika Attila 4b0aaab709 Update doc example 2015-11-03 00:50:27 +01:00
Mika Attila 94bb46164f Add NotificationShowError 2015-11-03 00:49:12 +01:00
Mika Attila 3dfc03aebd Format source code with rustfmt 2015-11-02 23:55:35 +01:00
Mika Attila ffd99b67e2 Depend on gtypes 2015-09-19 09:42:17 +02:00
Mika Attila dac1075025 Update to new crate naming rules 2015-03-25 19:04:43 +01:00
Mika Attila d3ad5323fb Update doc example 2015-03-10 19:18:44 +01:00
Mika Attila 445f0b6d13 Implement std::fmt::Display for the error types 2015-03-10 19:14:18 +01:00
Mika Attila a0955acabd Add example to the documentation 2015-03-10 08:46:54 +01:00
Mika Attila 4fa9d1d959 Add info to doc that there can only be one context at a time 2015-03-08 17:11:44 +01:00
Mika Attila 2e317752c2 Add some documentation 2015-03-08 17:07:50 +01:00
Mika Attila 0e83385a01 Context::new_notification: Make body arg optional, add icon arg 2015-03-08 16:59:15 +01:00
Mika Attila a0a98a6521 Remove `std_misc` feature attribute
Apparently, it's not needed anymore
2015-03-08 16:35:46 +01:00
Mika Attila 68b3d02ba2 Make sure Notification cannot outlive Context 2015-03-07 14:21:17 +01:00
Mika Attila 2d06fb7cc3 Implement a rudimentary API for showing a message. 2015-03-07 13:55:19 +01:00
Mika Attila 67a9f17d0e Add skeleton 2015-03-06 20:25:55 +01:00