コード例 #1
0
static void
gtk_notification_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
  GtkNotification *notification;

  g_return_if_fail (GTK_IS_NOTIFICATION (object));
  notification  = GTK_NOTIFICATION (object);

  switch (prop_id) {
  case PROP_TIMEOUT:
    g_value_set_uint (value, notification->priv->timeout);
    break;
  default:
    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
    break;
  }
}
コード例 #2
0
ファイル: gd-notification.c プロジェクト: Udit93/gnome-music
static void
gd_notification_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
  g_return_if_fail (GTK_IS_NOTIFICATION (object));
  GdNotification *notification = GD_NOTIFICATION (object);

  switch (prop_id) {
  case PROP_TIMEOUT:
    g_value_set_int (value, notification->priv->timeout);
    break;
  case PROP_SHOW_CLOSE_BUTTON:
    g_value_set_boolean (value,
                         notification->priv->show_close_button);
    break;
  default:
    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
    break;
  }
}
コード例 #3
0
ファイル: gd-notification.c プロジェクト: Udit93/gnome-music
static void
gd_notification_finalize (GObject *object)
{
  GdNotification *notification;
  GdNotificationPrivate *priv;

  g_return_if_fail (GTK_IS_NOTIFICATION (object));

  notification = GD_NOTIFICATION (object);
  priv = notification->priv;

  if (priv->animate_timeout != 0)
    g_source_remove (priv->animate_timeout);

  if (priv->timeout_source_id != 0)
    g_source_remove (priv->timeout_source_id);

  G_OBJECT_CLASS (gd_notification_parent_class)->finalize (object);
}
コード例 #4
0
static void
gtk_notification_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
  GtkNotification *notification = GTK_NOTIFICATION (object);

  g_return_if_fail (GTK_IS_NOTIFICATION (object));

  switch (prop_id) {
  case PROP_TIMEOUT:
    gtk_notification_set_timeout (notification,
                                  g_value_get_uint (value));
    break;
  case PROP_SHOW_CLOSE_BUTTON:
    gtk_notification_set_show_close_button (notification,
                                            g_value_get_boolean (value));
    break;
  default:
    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
    break;
  }
}