Lines Matching refs:notification
107 GNotification *notification = G_NOTIFICATION (object); in g_notification_dispose() local
109 g_clear_object (¬ification->icon); in g_notification_dispose()
117 GNotification *notification = G_NOTIFICATION (object); in g_notification_finalize() local
119 g_free (notification->title); in g_notification_finalize()
120 g_free (notification->body); in g_notification_finalize()
121 g_free (notification->default_action); in g_notification_finalize()
122 if (notification->default_action_target) in g_notification_finalize()
123 g_variant_unref (notification->default_action_target); in g_notification_finalize()
124 g_ptr_array_free (notification->buttons, TRUE); in g_notification_finalize()
139 g_notification_init (GNotification *notification) in g_notification_init() argument
141 notification->buttons = g_ptr_array_new_full (2, button_free); in g_notification_init()
162 GNotification *notification; in g_notification_new() local
166 notification = g_object_new (G_TYPE_NOTIFICATION, NULL); in g_notification_new()
167 notification->title = g_strdup (title); in g_notification_new()
169 return notification; in g_notification_new()
183 g_notification_get_title (GNotification *notification) in g_notification_get_title() argument
185 g_return_val_if_fail (G_IS_NOTIFICATION (notification), NULL); in g_notification_get_title()
187 return notification->title; in g_notification_get_title()
200 g_notification_set_title (GNotification *notification, in g_notification_set_title() argument
203 g_return_if_fail (G_IS_NOTIFICATION (notification)); in g_notification_set_title()
206 g_free (notification->title); in g_notification_set_title()
208 notification->title = g_strdup (title); in g_notification_set_title()
222 g_notification_get_body (GNotification *notification) in g_notification_get_body() argument
224 g_return_val_if_fail (G_IS_NOTIFICATION (notification), NULL); in g_notification_get_body()
226 return notification->body; in g_notification_get_body()
239 g_notification_set_body (GNotification *notification, in g_notification_set_body() argument
242 g_return_if_fail (G_IS_NOTIFICATION (notification)); in g_notification_set_body()
245 g_free (notification->body); in g_notification_set_body()
247 notification->body = g_strdup (body); in g_notification_set_body()
261 g_notification_get_icon (GNotification *notification) in g_notification_get_icon() argument
263 g_return_val_if_fail (G_IS_NOTIFICATION (notification), NULL); in g_notification_get_icon()
265 return notification->icon; in g_notification_get_icon()
278 g_notification_set_icon (GNotification *notification, in g_notification_set_icon() argument
281 g_return_if_fail (G_IS_NOTIFICATION (notification)); in g_notification_set_icon()
283 if (notification->icon) in g_notification_set_icon()
284 g_object_unref (notification->icon); in g_notification_set_icon()
286 notification->icon = g_object_ref (icon); in g_notification_set_icon()
298 g_notification_get_priority (GNotification *notification) in g_notification_get_priority() argument
300 g_return_val_if_fail (G_IS_NOTIFICATION (notification), G_NOTIFICATION_PRIORITY_NORMAL); in g_notification_get_priority()
302 return notification->priority; in g_notification_get_priority()
317 g_notification_set_urgent (GNotification *notification, in g_notification_set_urgent() argument
320 g_return_if_fail (G_IS_NOTIFICATION (notification)); in g_notification_set_urgent()
322 notification->priority = urgent ? in g_notification_set_urgent()
336 g_notification_set_priority (GNotification *notification, in g_notification_set_priority() argument
339 g_return_if_fail (G_IS_NOTIFICATION (notification)); in g_notification_set_priority()
341 notification->priority = priority; in g_notification_set_priority()
362 g_notification_add_button (GNotification *notification, in g_notification_add_button() argument
379 g_notification_add_button_with_target_value (notification, label, action, target); in g_notification_add_button()
405 g_notification_add_button_with_target (GNotification *notification, in g_notification_add_button_with_target() argument
421 g_notification_add_button_with_target_value (notification, label, action, target); in g_notification_add_button_with_target()
440 g_notification_add_button_with_target_value (GNotification *notification, in g_notification_add_button_with_target_value() argument
447 g_return_if_fail (G_IS_NOTIFICATION (notification)); in g_notification_add_button_with_target_value()
464 g_ptr_array_add (notification->buttons, button); in g_notification_add_button_with_target_value()
474 g_notification_get_n_buttons (GNotification *notification) in g_notification_get_n_buttons() argument
476 return notification->buttons->len; in g_notification_get_n_buttons()
495 g_notification_get_button (GNotification *notification, in g_notification_get_button() argument
503 button = g_ptr_array_index (notification->buttons, index); in g_notification_get_button()
524 g_notification_get_button_with_action (GNotification *notification, in g_notification_get_button_with_action() argument
529 for (i = 0; i < notification->buttons->len; i++) in g_notification_get_button_with_action()
533 button = g_ptr_array_index (notification->buttons, i); in g_notification_get_button_with_action()
553 g_notification_get_default_action (GNotification *notification, in g_notification_get_default_action() argument
557 if (notification->default_action == NULL) in g_notification_get_default_action()
561 *action = g_strdup (notification->default_action); in g_notification_get_default_action()
565 if (notification->default_action_target) in g_notification_get_default_action()
566 *target = g_variant_ref (notification->default_action_target); in g_notification_get_default_action()
594 g_notification_set_default_action (GNotification *notification, in g_notification_set_default_action() argument
608 g_notification_set_default_action_and_target_value (notification, action, target); in g_notification_set_default_action()
637 g_notification_set_default_action_and_target (GNotification *notification, in g_notification_set_default_action_and_target() argument
652 g_notification_set_default_action_and_target_value (notification, action, target); in g_notification_set_default_action_and_target()
674 g_notification_set_default_action_and_target_value (GNotification *notification, in g_notification_set_default_action_and_target_value() argument
678 g_return_if_fail (G_IS_NOTIFICATION (notification)); in g_notification_set_default_action_and_target_value()
687 g_free (notification->default_action); in g_notification_set_default_action_and_target_value()
688 g_clear_pointer (¬ification->default_action_target, g_variant_unref); in g_notification_set_default_action_and_target_value()
690 notification->default_action = g_strdup (action); in g_notification_set_default_action_and_target_value()
693 notification->default_action_target = g_variant_ref_sink (target); in g_notification_set_default_action_and_target_value()
713 g_notification_get_priority_nick (GNotification *notification) in g_notification_get_priority_nick() argument
720 value = g_enum_get_value (enum_class, g_notification_get_priority (notification)); in g_notification_get_priority_nick()
736 g_notification_serialize (GNotification *notification) in g_notification_serialize() argument
742 if (notification->title) in g_notification_serialize()
743 g_variant_builder_add (&builder, "{sv}", "title", g_variant_new_string (notification->title)); in g_notification_serialize()
745 if (notification->body) in g_notification_serialize()
746 g_variant_builder_add (&builder, "{sv}", "body", g_variant_new_string (notification->body)); in g_notification_serialize()
748 if (notification->icon) in g_notification_serialize()
752 if ((serialized_icon = g_icon_serialize (notification->icon))) in g_notification_serialize()
759 …ariant_builder_add (&builder, "{sv}", "priority", g_notification_get_priority_nick (notification)); in g_notification_serialize()
761 if (notification->default_action) in g_notification_serialize()
764 g_variant_new_string (notification->default_action)); in g_notification_serialize()
766 if (notification->default_action_target) in g_notification_serialize()
768 notification->default_action_target); in g_notification_serialize()
771 if (notification->buttons->len > 0) in g_notification_serialize()
778 for (i = 0; i < notification->buttons->len; i++) in g_notification_serialize()
780 Button *button = g_ptr_array_index (notification->buttons, i); in g_notification_serialize()