ruby-libnotify 0.4.1.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. data/CHANGELOG.rdoc +12 -0
  2. data/README.rdoc +5 -7
  3. data/doc/Notify/Notification.html +1123 -0
  4. data/doc/Notify.html +518 -0
  5. data/doc/created.rid +3 -1
  6. data/doc/ext/rnotify_c.html +52 -0
  7. data/doc/images/brick.png +0 -0
  8. data/doc/images/brick_link.png +0 -0
  9. data/doc/images/bug.png +0 -0
  10. data/doc/images/bullet_black.png +0 -0
  11. data/doc/images/bullet_toggle_minus.png +0 -0
  12. data/doc/images/bullet_toggle_plus.png +0 -0
  13. data/doc/images/date.png +0 -0
  14. data/doc/images/find.png +0 -0
  15. data/doc/images/loadingAnimation.gif +0 -0
  16. data/doc/images/macFFBgHack.png +0 -0
  17. data/doc/images/package.png +0 -0
  18. data/doc/images/page_green.png +0 -0
  19. data/doc/images/page_white_text.png +0 -0
  20. data/doc/images/page_white_width.png +0 -0
  21. data/doc/images/plugin.png +0 -0
  22. data/doc/images/ruby.png +0 -0
  23. data/doc/images/tag_green.png +0 -0
  24. data/doc/images/wrench.png +0 -0
  25. data/doc/images/wrench_orange.png +0 -0
  26. data/doc/images/zoom.png +0 -0
  27. data/doc/index.html +93 -17
  28. data/doc/js/darkfish.js +116 -0
  29. data/doc/js/jquery.js +32 -0
  30. data/doc/js/quicksearch.js +114 -0
  31. data/doc/js/thickbox-compressed.js +10 -0
  32. data/doc/lib/RNotify_rb.html +56 -0
  33. data/doc/rdoc.css +706 -0
  34. data/examples/action.rb +1 -1
  35. data/examples/base.rb +1 -5
  36. data/examples/icon.png +0 -0
  37. data/examples/info.rb +1 -1
  38. data/examples/markup.rb +1 -4
  39. data/examples/multi-actions.rb +1 -1
  40. data/examples/update.rb +1 -6
  41. data/examples/urgency.rb +3 -8
  42. data/examples/xy.rb +1 -6
  43. data/ext/extconf.rb +23 -34
  44. data/ext/rnotify.c +72 -145
  45. data/lib/RNotify.rb +1 -1
  46. metadata +33 -52
  47. data/doc/classes/Notify/Notification.html +0 -787
  48. data/doc/classes/Notify/Notification.src/M000007.html +0 -65
  49. data/doc/classes/Notify/Notification.src/M000008.html +0 -49
  50. data/doc/classes/Notify/Notification.src/M000009.html +0 -43
  51. data/doc/classes/Notify/Notification.src/M000010.html +0 -35
  52. data/doc/classes/Notify/Notification.src/M000011.html +0 -33
  53. data/doc/classes/Notify/Notification.src/M000012.html +0 -36
  54. data/doc/classes/Notify/Notification.src/M000013.html +0 -48
  55. data/doc/classes/Notify/Notification.src/M000014.html +0 -36
  56. data/doc/classes/Notify/Notification.src/M000015.html +0 -38
  57. data/doc/classes/Notify/Notification.src/M000016.html +0 -38
  58. data/doc/classes/Notify/Notification.src/M000017.html +0 -39
  59. data/doc/classes/Notify/Notification.src/M000018.html +0 -38
  60. data/doc/classes/Notify/Notification.src/M000019.html +0 -45
  61. data/doc/classes/Notify/Notification.src/M000020.html +0 -67
  62. data/doc/classes/Notify/Notification.src/M000021.html +0 -33
  63. data/doc/classes/Notify/Notification.src/M000022.html +0 -33
  64. data/doc/classes/Notify/Notification.src/M000023.html +0 -36
  65. data/doc/classes/Notify/Notification.src/M000024.html +0 -34
  66. data/doc/classes/Notify.html +0 -343
  67. data/doc/classes/Notify.src/M000001.html +0 -39
  68. data/doc/classes/Notify.src/M000002.html +0 -24
  69. data/doc/classes/Notify.src/M000003.html +0 -25
  70. data/doc/classes/Notify.src/M000004.html +0 -24
  71. data/doc/classes/Notify.src/M000005.html +0 -37
  72. data/doc/classes/Notify.src/M000006.html +0 -55
  73. data/doc/files/lib/RNotify_rb.html +0 -102
  74. data/doc/files/rnotify_c.html +0 -90
  75. data/doc/fr_class_index.html +0 -27
  76. data/doc/fr_file_index.html +0 -27
  77. data/doc/fr_method_index.html +0 -71
  78. data/doc/rdoc-style.css +0 -299
  79. data/examples/attach_to.rb +0 -43
  80. data/examples/attach_to_status_icon.rb +0 -47
  81. data/examples/geometry-hints.rb +0 -37
data/examples/markup.rb CHANGED
@@ -20,10 +20,7 @@ end
20
20
 
21
21
  Notify.init("Test6")
22
22
 
23
- test = Notify::Notification.new("Test 6", "<b>Markup</b> <u>test</u>\n<i> ...savvy?</i>", nil, nil)
23
+ test = Notify::Notification.new("Test 6", "<b>Markup</b> <u>test</u>\n<i> ...savvy?</i>", nil)
24
24
  test.timeout= 5000 #5 seconds
25
25
  test.show
26
26
 
27
- sleep(2)
28
- test.close
29
- Notify.uninit
@@ -21,7 +21,7 @@ end
21
21
  Gtk.init
22
22
  Notify.init("Test4")
23
23
 
24
- test = Notify::Notification.new("Test 4", "multi actions test", nil, nil)
24
+ test = Notify::Notification.new("Test 4", "multi actions test", nil)
25
25
  test.timeout= Notify::Notification::EXPIRES_NEVER
26
26
  test.signal_connect("closed") { Gtk.main_quit }
27
27
 
data/examples/update.rb CHANGED
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  Notify.init("Test2")
22
22
 
23
- test = Notify::Notification.new("Test 2", "This is a test", nil, nil)
23
+ test = Notify::Notification.new("Test 2", "This is a test", nil)
24
24
  test.timeout= Notify::Notification::EXPIRES_NEVER
25
25
  test.show
26
26
 
@@ -29,8 +29,3 @@ sleep(3)
29
29
  test.update("Test 2", "Message replaced!", nil)
30
30
  test.timeout=5000 #5 seconds
31
31
  test.show
32
-
33
- sleep(6)
34
-
35
- test.close
36
- Notify.uninit
data/examples/urgency.rb CHANGED
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  Notify.init("Test5")
22
22
 
23
- test = Notify::Notification.new("Test 5", "urgency test - LOW", nil, nil)
23
+ test = Notify::Notification.new("Test 5", "urgency test - LOW", nil)
24
24
  test.urgency= Notify::Notification::URGENCY_LOW
25
25
  test.timeout= 3000 #3 seconds
26
26
  test.show
@@ -28,7 +28,7 @@ test.show
28
28
  sleep(3)
29
29
  test.close
30
30
 
31
- test = Notify::Notification.new("Test 5", "urgency test - NORMAL", nil, nil)
31
+ test = Notify::Notification.new("Test 5", "urgency test - NORMAL", nil)
32
32
  test.urgency= Notify::Notification::URGENCY_NORMAL
33
33
  test.timeout= 3000 #3 seconds
34
34
  test.show
@@ -36,12 +36,7 @@ test.show
36
36
  sleep(3)
37
37
  test.close
38
38
 
39
- test = Notify::Notification.new("Test 5", "urgency test - CRITICAL", nil, nil)
39
+ test = Notify::Notification.new("Test 5", "urgency test - CRITICAL", nil)
40
40
  test.urgency= Notify::Notification::URGENCY_CRITICAL
41
41
  test.timeout= 3000 #3 seconds
42
42
  test.show
43
-
44
- sleep(3)
45
- test.close
46
-
47
- Notify.uninit
data/examples/xy.rb CHANGED
@@ -20,13 +20,8 @@ end
20
20
 
21
21
  Notify.init("Test7")
22
22
 
23
- test = Notify::Notification.new("Test 7", "This notification point to 150,100", nil, nil)
23
+ test = Notify::Notification.new("Test 7", "This notification point to 150,100", nil)
24
24
  test.hint32("x", 150)
25
25
  test.hint32("y", 100)
26
26
  test.timeout= 5000 #5 seconds
27
27
  test.show
28
-
29
- sleep(6)
30
- test.clear_hints
31
- test.close
32
- Notify.uninit
data/ext/extconf.rb CHANGED
@@ -23,47 +23,36 @@ def find_gtk2_rb
23
23
  File.exist?("#{Config::CONFIG["rubylibdir"]}/gtk2.rb"))
24
24
  end
25
25
 
26
- def check_status_icon_gtk2
27
- if PKGConfig.check_version?("gtk+-2.0", 2, 9, 1) == true
28
- $CFLAGS << ' -DHAVE_STATUS_ICON'
29
- puts "with GtkStatusIcon.. yes"
26
+ def check_set_app_name_libnotify
27
+ if PKGConfig.check_version?("libnotify", 0, 7, 2) == true
28
+ $CFLAGS << ' -DHAVE_SET_APP_NAME'
29
+ puts "with set application name.. yes"
30
30
  else
31
- puts "with GtkStatusIcon.. no"
31
+ puts "with set application name.. no"
32
32
  end
33
33
  end
34
34
 
35
- def check_geometry_hints_libnotify
36
- if PKGConfig.check_version?("libnotify", 0, 4, 1) == true
37
- $CFLAGS << ' -DHAVE_GEOMETRY_HINTS'
38
- puts "with geometry hints.. yes"
39
- else
40
- puts "with geometry hints.. no"
41
- end
42
- end
43
-
44
- def check_closed_reason_libnotify
45
- if PKGConfig.check_version?("libnotify", 0, 4, 5) == true
46
- $CFLAGS << ' -DHAVE_CLOSED_REASON'
47
- puts "with closed reason.. yes"
48
- else
49
- puts "with closed reason.. no"
50
- end
35
+ def check_required_version(app, maj, min, mic)
36
+ PKGConfig.check_version?(app, maj, min, mic)
51
37
  end
52
38
 
53
- if find_gtk2_rb == true
54
- if have_library("notify", "notify_init") == true
55
- $CFLAGS << ' -DDEBUG' if type == 0
56
- $CFLAGS << ' -Wall' << " -I#{Config::CONFIG["sitearchdir"]} " << PKGConfig.cflags("libnotify")
57
- $LIBS << ' ' << PKGConfig.libs("libnotify")
58
- check_status_icon_gtk2
59
- check_geometry_hints_libnotify
60
- check_closed_reason_libnotify
61
- create_makefile("rnotify")
39
+ if check_required_version("libnotify", 0, 7, 0) == true
40
+ if find_gtk2_rb == true
41
+ if have_library("notify", "notify_init") == true
42
+ $CFLAGS << ' -DDEBUG' if type == 0
43
+ $CFLAGS << ' -Wall' << " -I#{Config::CONFIG["sitearchdir"]} " << PKGConfig.cflags("libnotify")
44
+ $LIBS << ' ' << PKGConfig.libs("libnotify")
45
+ check_set_app_name_libnotify
46
+ create_makefile("rnotify")
47
+ else
48
+ puts "ERROR: please install libnotify",
49
+ "[ http://www.galago-project.org/ ]"
50
+ end
62
51
  else
63
- puts "ERROR: please install libnotify",
64
- "[ http://www.galago-project.org/ ]"
52
+ puts "ERROR: no gtk2.rb found, please install Ruby/Gtk2",
53
+ "[ http://ruby-gnome2.sourceforge.jp/ ]"
65
54
  end
66
55
  else
67
- puts "ERROR: no gtk2.rb found, please install Ruby/Gtk2",
68
- "[ http://ruby-gnome2.sourceforge.jp/ ]"
56
+ puts "libnotify >= 0.7.0 is required in order to use this release."
57
+ puts "if you have libnotify <= 0.6.0 please install ruby-libnotify < 0.5.0"
69
58
  end
data/ext/rnotify.c CHANGED
@@ -111,7 +111,7 @@ _wrap_notify_is_initted(VALUE self)
111
111
 
112
112
  /*
113
113
  * call-seq:
114
- * app_name
114
+ * name
115
115
  *
116
116
  * Returns the application name passed to Notify.init
117
117
  */
@@ -123,6 +123,28 @@ _wrap_notify_get_app_name(VALUE self)
123
123
  return rb_str_new2(name);
124
124
  }
125
125
 
126
+ #ifdef HAVE_SET_APP_NAME
127
+ /*
128
+ * call-seq:
129
+ * name= new_name
130
+ *
131
+ * if new_name is a valid string, change the application name to new_name
132
+ * otherwise nothing will be changed
133
+ *
134
+ * ** ONLY WHEN COMPILED AGAINST LIBNOTIFY >= 0.7.2 **
135
+ */
136
+ static VALUE
137
+ _wrap_notify_set_app_name(VALUE self, VALUE app_name)
138
+ {
139
+ char *name = NIL_P(app_name) ? NULL : StringValuePtr(app_name);
140
+
141
+ if(name != NULL || *name != '\0')
142
+ notify_set_app_name(name);
143
+
144
+ return Qnil;
145
+ }
146
+ #endif
147
+
126
148
  /*
127
149
  * call-seq:
128
150
  * server_caps
@@ -197,7 +219,7 @@ _wrap_notify_get_server_info(VALUE self)
197
219
 
198
220
  /*
199
221
  * call-seq:
200
- * new(summ, msg, icon, widget)
222
+ * new(summ, msg, icon)
201
223
  *
202
224
  * summ = The summary text (required)
203
225
  *
@@ -205,38 +227,20 @@ _wrap_notify_get_server_info(VALUE self)
205
227
  *
206
228
  * icon = The icon or nil
207
229
  *
208
- * widget = The widget (or a Gtk::StatusIcon, when compiled against GTK+ >= 2.9.2 and libnotify >= 0.4.1) to attach to or nil
209
- *
210
230
  * Creates and returns a new notification, throw an exception on error
211
231
  */
212
232
  static VALUE
213
- _wrap_notification_init(VALUE self, VALUE summ, VALUE msg,
214
- VALUE icon, VALUE widget)
233
+ _wrap_notification_init(VALUE self, VALUE summ, VALUE msg, VALUE icon)
215
234
  {
216
- GObject *obj = G_OBJECT(RVAL2GOBJ(widget));
217
235
  char *nsumm = NIL_P(summ) ? NULL : StringValuePtr(summ);
218
236
  NotifyNotification *n = NULL;
219
237
 
220
238
  if(nsumm == NULL || *nsumm == '\0')
221
- rb_raise( rb_eArgError, "REQUIRED: the `summ` field" );
222
-
223
- #ifdef HAVE_STATUS_ICON
224
- if(GTK_IS_STATUS_ICON(obj))
225
- n = notify_notification_new_with_status_icon(nsumm,
226
- NIL_P(msg) ? NULL : StringValuePtr(msg),
227
- NIL_P(icon) ? NULL : StringValuePtr(icon),
228
- GTK_STATUS_ICON(obj));
229
- else
230
- n = notify_notification_new(nsumm,
231
- NIL_P(msg) ? NULL : StringValuePtr(msg),
232
- NIL_P(icon) ? NULL : StringValuePtr(icon),
233
- GTK_WIDGET(obj));
234
- #else
239
+ rb_raise(rb_eArgError, "You need to supply a valid summary string");
240
+
235
241
  n = notify_notification_new(nsumm,
236
242
  NIL_P(msg) ? NULL : StringValuePtr(msg),
237
- NIL_P(icon) ? NULL : StringValuePtr(icon),
238
- GTK_WIDGET(obj));
239
- #endif
243
+ NIL_P(icon) ? NULL : StringValuePtr(icon));
240
244
 
241
245
  if(n == NULL)
242
246
  rb_raise(rb_eRuntimeError, "Can not create a new notification");
@@ -281,7 +285,7 @@ _wrap_notification_update(VALUE self, VALUE summ, VALUE msg, VALUE icon)
281
285
  #endif
282
286
 
283
287
  if(nsumm == NULL || *nsumm == '\0')
284
- rb_raise(rb_eArgError, "REQUIRED: the `summ` field");
288
+ rb_raise(rb_eArgError, "You need to supply a valid summary string");
285
289
 
286
290
  if(notify_notification_update(n, nsumm, nmsg, nicon) == TRUE)
287
291
  return Qtrue;
@@ -289,39 +293,6 @@ _wrap_notification_update(VALUE self, VALUE summ, VALUE msg, VALUE icon)
289
293
  return Qfalse;
290
294
  }
291
295
 
292
- /*
293
- * call-seq:
294
- * attach_to(widget)
295
- *
296
- * widget = The widget (or a Gtk::StatusIcon, when compiled against GTK+ >= 2.9.2 and libnotify >= 0.4.1) to attach to
297
- *
298
- * Attaches the notification to a Gtk::Widget or Gtk::StatusIcon
299
- */
300
- static VALUE
301
- _wrap_notification_attach_to(VALUE self, VALUE widget)
302
- {
303
- GObject *obj = G_OBJECT(RVAL2GOBJ(widget));
304
- NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
305
-
306
- #ifdef DEBUG
307
- if(NOTIFY_IS_NOTIFICATION(n))
308
- rb_warn("attach_to, ok");
309
- else
310
- rb_warn("attach_to, no ok");
311
- #endif
312
-
313
- #ifdef HAVE_STATUS_ICON
314
- if(GTK_IS_STATUS_ICON(obj))
315
- notify_notification_attach_to_status_icon(n, GTK_STATUS_ICON(obj));
316
- else
317
- notify_notification_attach_to_widget(n, GTK_WIDGET(obj));
318
- #else
319
- notify_notification_attach_to_widget(n, GTK_WIDGET(obj));
320
- #endif
321
-
322
- return Qnil;
323
- }
324
-
325
296
  /*
326
297
  * call-seq:
327
298
  * show
@@ -455,21 +426,21 @@ _wrap_notification_set_pixbuf_icon(VALUE self, VALUE icon)
455
426
  rb_warn("pixbuf_icon, no ok");
456
427
  #endif
457
428
 
458
- notify_notification_set_icon_from_pixbuf(n, pix);
429
+ notify_notification_set_image_from_pixbuf(n, pix);
459
430
 
460
431
  return Qnil;
461
432
  }
462
433
 
463
434
  /*
464
- * call-seq:
465
- * hint32(key, value)
466
- *
467
- * key = The hint
468
- *
469
- * value = The hint's value
470
- *
471
- * Sets a hint with a 32-bit integer value
472
- */
435
+ * call-seq:
436
+ * hint32(key, value)
437
+ *
438
+ * key = The hint
439
+ *
440
+ * value = The hint's value
441
+ *
442
+ * Sets a hint with a 32-bit integer value
443
+ */
473
444
  static VALUE
474
445
  _wrap_notification_set_hint32(VALUE self, VALUE key, VALUE value)
475
446
  {
@@ -489,15 +460,15 @@ _wrap_notification_set_hint32(VALUE self, VALUE key, VALUE value)
489
460
  }
490
461
 
491
462
  /*
492
- * call-seq:
493
- * hint_double(key, value)
494
- *
495
- * key = The hint
496
- *
497
- * value = The hint's value
498
- *
499
- * Sets a hint with a double value
500
- */
463
+ * call-seq:
464
+ * hint_double(key, value)
465
+ *
466
+ * key = The hint
467
+ *
468
+ * value = The hint's value
469
+ *
470
+ * Sets a hint with a double value
471
+ */
501
472
  static VALUE
502
473
  _wrap_notification_set_hint_double(VALUE self, VALUE key, VALUE value)
503
474
  {
@@ -517,15 +488,15 @@ _wrap_notification_set_hint_double(VALUE self, VALUE key, VALUE value)
517
488
  }
518
489
 
519
490
  /*
520
- * call-seq:
521
- * hint_string(key, value)
522
- *
523
- * key = The hint
524
- *
525
- * value = The hint's value
526
- *
527
- * Sets a hint with a string value
528
- */
491
+ * call-seq:
492
+ * hint_string(key, value)
493
+ *
494
+ * key = The hint
495
+ *
496
+ * value = The hint's value
497
+ *
498
+ * Sets a hint with a string value
499
+ */
529
500
  static VALUE
530
501
  _wrap_notification_set_hint_string(VALUE self, VALUE key, VALUE value)
531
502
  {
@@ -546,15 +517,15 @@ _wrap_notification_set_hint_string(VALUE self, VALUE key, VALUE value)
546
517
  }
547
518
 
548
519
  /*
549
- * call-seq:
550
- * hint_byte(key, value)
551
- *
552
- * key = The hint
553
- *
554
- * value = The hint's value
555
- *
556
- * Sets a hint with a byte value
557
- */
520
+ * call-seq:
521
+ * hint_byte(key, value)
522
+ *
523
+ * key = The hint
524
+ *
525
+ * value = The hint's value
526
+ *
527
+ * Sets a hint with a byte value
528
+ */
558
529
  static VALUE
559
530
  _wrap_notification_set_hint_byte(VALUE self, VALUE key, VALUE value)
560
531
  {
@@ -596,43 +567,6 @@ _wrap_notification_clear_hints(VALUE self)
596
567
  return Qnil;
597
568
  }
598
569
 
599
- #ifdef HAVE_GEOMETRY_HINTS
600
- /*
601
- * call-seq:
602
- * geometry_hints(screen, x, y)
603
- *
604
- * ** WHEN COMPILED AGAINST LIBNOTIFY 0.4.1 OR HIGHER **
605
- *
606
- * screen = The Gdk::Screen the notification should appear on
607
- *
608
- * x = The X coordinate to point to
609
- *
610
- * y = The Y coordinate to point to
611
- *
612
- * Sets the geometry hints on the notification
613
- */
614
- static VALUE
615
- _wrap_notification_set_geometry_hints(VALUE self, VALUE screen, VALUE x, VALUE y)
616
- {
617
- GdkScreen *sc = GDK_SCREEN(RVAL2GOBJ(screen));
618
- NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
619
-
620
- if(sc == NULL)
621
- rb_raise(rb_eArgError, "REQUIRED: the `screen` field");
622
-
623
- #ifdef DEBUG
624
- if(NOTIFY_IS_NOTIFICATION(n) && GDK_IS_SCREEN(sc))
625
- rb_warn("set_geometry_hints, ok");
626
- else
627
- rb_warn("set_geometry_hints, no ok");
628
- #endif
629
-
630
- notify_notification_set_geometry_hints(n, sc, FIX2INT(x), FIX2INT(y));
631
-
632
- return Qnil;
633
- }
634
- #endif
635
-
636
570
  /*
637
571
  * call-seq:
638
572
  * add_action(action, label, user_data) { |action, user_data| ... }
@@ -684,7 +618,7 @@ _wrap_notification_add_action(int argc, VALUE *argv, VALUE self)
684
618
  notify_notification_add_action(n,
685
619
  NIL_P(action) ? NULL : StringValuePtr(action),
686
620
  NIL_P(label) ? NULL : StringValuePtr(label),
687
- (NotifyActionCallback) _notification_action_cb,
621
+ NOTIFY_ACTION_CALLBACK(_notification_action_cb),
688
622
  actionData, (GFreeFunc)_notification_action_free);
689
623
 
690
624
  return Qnil;
@@ -737,13 +671,10 @@ _wrap_notification_close(VALUE self)
737
671
  return Qfalse;
738
672
  }
739
673
 
740
- #ifdef HAVE_CLOSED_REASON
741
674
  /*
742
675
  * call-seq:
743
676
  * closed_reason
744
677
  *
745
- * ** WHEN COMPILED AGAINST LIBNOTIFY 0.4.5 OR HIGHER **
746
- *
747
678
  * Returns the reason code why the notification was closed
748
679
  */
749
680
  static VALUE
@@ -763,7 +694,6 @@ _wrap_notification_get_closed_reason(VALUE self)
763
694
 
764
695
  return INT2FIX(reason);
765
696
  }
766
- #endif
767
697
 
768
698
  /*
769
699
  * libnotify ruby interface
@@ -785,13 +715,15 @@ Init_rnotify()
785
715
  rb_define_module_function(mNotify, "init", _wrap_notify_init, 1);
786
716
  rb_define_module_function(mNotify, "uninit", _wrap_notify_uninit, 0);
787
717
  rb_define_module_function(mNotify, "init?", _wrap_notify_is_initted, 0);
788
- rb_define_module_function(mNotify, "app_name", _wrap_notify_get_app_name, 0);
718
+ rb_define_module_function(mNotify, "name", _wrap_notify_get_app_name, 0);
719
+ #ifdef HAVE_SET_APP_NAME
720
+ rb_define_module_function(mNotify, "name=", _wrap_notify_set_app_name, 1);
721
+ #endif
789
722
  rb_define_module_function(mNotify, "server_caps", _wrap_notify_get_server_caps, 0);
790
723
  rb_define_module_function(mNotify, "server_info", _wrap_notify_get_server_info, 0);
791
724
 
792
- rb_define_method(cNotification, "initialize", _wrap_notification_init, 4);
725
+ rb_define_method(cNotification, "initialize", _wrap_notification_init, 3);
793
726
  rb_define_method(cNotification, "update", _wrap_notification_update, 3);
794
- rb_define_method(cNotification, "attach_to", _wrap_notification_attach_to, 1);
795
727
  rb_define_method(cNotification, "show", _wrap_notification_show, 0);
796
728
  rb_define_method(cNotification, "timeout=", _wrap_notification_set_timeout, 1);
797
729
  rb_define_method(cNotification, "category=", _wrap_notification_set_category, 1);
@@ -801,14 +733,9 @@ Init_rnotify()
801
733
  rb_define_method(cNotification, "hint_double", _wrap_notification_set_hint_double, 2);
802
734
  rb_define_method(cNotification, "hint_string", _wrap_notification_set_hint_string, 2);
803
735
  rb_define_method(cNotification, "hint_byte", _wrap_notification_set_hint_byte, 2);
804
- #ifdef HAVE_GEOMETRY_HINTS
805
- rb_define_method(cNotification, "geometry_hints", _wrap_notification_set_geometry_hints, 3);
806
- #endif
807
736
  rb_define_method(cNotification, "add_action", _wrap_notification_add_action, -1);
808
737
  rb_define_method(cNotification, "clear_actions", _wrap_notification_clear_actions, 0);
809
738
  rb_define_method(cNotification, "clear_hints", _wrap_notification_clear_hints, 0);
810
- #ifdef HAVE_CLOSED_REASON
811
739
  rb_define_method(cNotification, "closed_reason", _wrap_notification_get_closed_reason, 0);
812
- #endif
813
740
  rb_define_method(cNotification, "close", _wrap_notification_close, 0);
814
741
  }
data/lib/RNotify.rb CHANGED
@@ -11,5 +11,5 @@ require 'gtk2'
11
11
  require 'rnotify.so'
12
12
 
13
13
  module Notify
14
- VERSION = "0.4.1.1"
14
+ VERSION = "0.5.0"
15
15
  end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-libnotify
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 4
8
- - 1
9
- - 1
10
- version: 0.4.1.1
4
+ prerelease:
5
+ version: 0.5.0
11
6
  platform: ruby
12
7
  authors:
13
8
  - Luca Russo
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-01-27 00:00:00 +01:00
13
+ date: 2011-04-03 00:00:00 +02:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -26,10 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- segments:
30
- - 1
31
- - 0
32
- - 7
33
24
  version: 1.0.7
34
25
  type: :runtime
35
26
  version_requirements: *id001
@@ -42,49 +33,43 @@ extensions:
42
33
  extra_rdoc_files: []
43
34
 
44
35
  files:
36
+ - doc/ext/rnotify_c.html
45
37
  - doc/created.rid
46
- - doc/fr_file_index.html
47
- - doc/files/lib/RNotify_rb.html
48
- - doc/files/rnotify_c.html
49
- - doc/classes/Notify/Notification.html
50
- - doc/classes/Notify/Notification.src/M000024.html
51
- - doc/classes/Notify/Notification.src/M000020.html
52
- - doc/classes/Notify/Notification.src/M000014.html
53
- - doc/classes/Notify/Notification.src/M000022.html
54
- - doc/classes/Notify/Notification.src/M000012.html
55
- - doc/classes/Notify/Notification.src/M000018.html
56
- - doc/classes/Notify/Notification.src/M000019.html
57
- - doc/classes/Notify/Notification.src/M000016.html
58
- - doc/classes/Notify/Notification.src/M000010.html
59
- - doc/classes/Notify/Notification.src/M000017.html
60
- - doc/classes/Notify/Notification.src/M000007.html
61
- - doc/classes/Notify/Notification.src/M000013.html
62
- - doc/classes/Notify/Notification.src/M000023.html
63
- - doc/classes/Notify/Notification.src/M000015.html
64
- - doc/classes/Notify/Notification.src/M000021.html
65
- - doc/classes/Notify/Notification.src/M000011.html
66
- - doc/classes/Notify/Notification.src/M000009.html
67
- - doc/classes/Notify/Notification.src/M000008.html
68
- - doc/classes/Notify.html
69
- - doc/classes/Notify.src/M000002.html
70
- - doc/classes/Notify.src/M000004.html
71
- - doc/classes/Notify.src/M000005.html
72
- - doc/classes/Notify.src/M000006.html
73
- - doc/classes/Notify.src/M000001.html
74
- - doc/classes/Notify.src/M000003.html
75
- - doc/fr_method_index.html
76
- - doc/rdoc-style.css
77
- - doc/fr_class_index.html
38
+ - doc/Notify/Notification.html
39
+ - doc/lib/RNotify_rb.html
78
40
  - doc/index.html
41
+ - doc/js/thickbox-compressed.js
42
+ - doc/js/darkfish.js
43
+ - doc/js/quicksearch.js
44
+ - doc/js/jquery.js
45
+ - doc/Notify.html
46
+ - doc/rdoc.css
47
+ - doc/images/find.png
48
+ - doc/images/plugin.png
49
+ - doc/images/bug.png
50
+ - doc/images/bullet_toggle_plus.png
51
+ - doc/images/loadingAnimation.gif
52
+ - doc/images/wrench.png
53
+ - doc/images/date.png
54
+ - doc/images/page_white_text.png
55
+ - doc/images/tag_green.png
56
+ - doc/images/bullet_toggle_minus.png
57
+ - doc/images/wrench_orange.png
58
+ - doc/images/macFFBgHack.png
59
+ - doc/images/brick_link.png
60
+ - doc/images/page_white_width.png
61
+ - doc/images/brick.png
62
+ - doc/images/ruby.png
63
+ - doc/images/bullet_black.png
64
+ - doc/images/zoom.png
65
+ - doc/images/package.png
66
+ - doc/images/page_green.png
79
67
  - examples/multi-actions.rb
80
68
  - examples/markup.rb
81
69
  - examples/action.rb
82
70
  - examples/base.rb
83
71
  - examples/update.rb
84
- - examples/geometry-hints.rb
85
- - examples/attach_to.rb
86
72
  - examples/info.rb
87
- - examples/attach_to_status_icon.rb
88
73
  - examples/icon.png
89
74
  - examples/xy.rb
90
75
  - examples/urgency.rb
@@ -110,21 +95,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
95
  requirements:
111
96
  - - ">="
112
97
  - !ruby/object:Gem::Version
113
- segments:
114
- - 0
115
98
  version: "0"
116
99
  required_rubygems_version: !ruby/object:Gem::Requirement
117
100
  none: false
118
101
  requirements:
119
102
  - - ">="
120
103
  - !ruby/object:Gem::Version
121
- segments:
122
- - 0
123
104
  version: "0"
124
105
  requirements: []
125
106
 
126
107
  rubyforge_project:
127
- rubygems_version: 1.3.7
108
+ rubygems_version: 1.5.0
128
109
  signing_key:
129
110
  specification_version: 3
130
111
  summary: ruby-libnotify is a ruby binding for libnotify