Some more gtk+ style indentation fixes

This commit is contained in:
Alexander Larsson 2011-12-20 14:24:37 +01:00
parent e932b802c1
commit 0c1867b129

View file

@ -160,15 +160,14 @@ gtk_notification_finalize (GObject *object)
g_return_if_fail (GTK_IS_NOTIFICATION (object));
GtkNotification *notification = GTK_NOTIFICATION (object);
if (notification->priv->message_label) {
if (notification->priv->message_label)
g_free (notification->priv->message_label);
}
if (notification->priv->button_label) {
if (notification->priv->button_label)
g_free (notification->priv->button_label);
}
if (notification->priv->timeout_source_id != 0) {
if (notification->priv->timeout_source_id != 0)
g_source_remove(notification->priv->timeout_source_id);
}
G_OBJECT_CLASS (gtk_notification_parent_class)->finalize(object);
}
@ -176,15 +175,18 @@ gtk_notification_finalize (GObject *object)
static void
gtk_notification_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
g_return_if_fail(GTK_IS_NOTIFICATION (object));
GtkNotification *notification = GTK_NOTIFICATION (object);
g_return_if_fail (GTK_IS_NOTIFICATION (object));
switch (prop_id) {
case PROP_MESSAGE:
gtk_notification_update_message(notification, g_value_get_string(value));
gtk_notification_update_message (notification,
g_value_get_string (value));
break;
case PROP_BUTTON_LABEL:
gtk_notification_update_button(notification, g_value_get_string(value));
gtk_notification_update_button (notification,
g_value_get_string (value));
break;
case PROP_TIMEOUT:
notification->priv->timeout = g_value_get_uint (value);
@ -273,7 +275,8 @@ gtk_notification_class_init (GtkNotificationClass *klass)
*/
g_object_class_install_property (object_class,
PROP_TIMEOUT,
g_param_spec_uint("timeout", "timeout", "The time it takes to hide the widget, in seconds", 0, G_MAXUINT, 5,
g_param_spec_uint("timeout", "timeout", "The time it takes to hide the widget, in seconds",
0, G_MAXUINT, 5,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
notification_signals[ACTIONED] = g_signal_new ("actioned",
@ -290,8 +293,8 @@ gtk_notification_class_init (GtkNotificationClass *klass)
}
static void
draw_shadow_box (cairo_t *cr, GdkRectangle rect, int left_border, int right_border, int bottom_border,
double inner_alpha)
draw_shadow_box (cairo_t *cr, GdkRectangle rect, int left_border, int right_border,
int bottom_border, double inner_alpha)
{
cairo_pattern_t *pattern;
cairo_matrix_t matrix;
@ -461,7 +464,9 @@ gtk_notification_get_preferred_height (GtkWidget *widget, gint *minimum_size, gi
{
gint parent_minimum_size, parent_natural_size;
GTK_WIDGET_CLASS(gtk_notification_parent_class)->get_preferred_height(widget, &parent_minimum_size, &parent_natural_size);
GTK_WIDGET_CLASS (gtk_notification_parent_class)->get_preferred_height (widget,
&parent_minimum_size,
&parent_natural_size);
*minimum_size = parent_minimum_size + SHADOW_OFFSET_Y + 2 * INNER_BORDER;
*natural_size = parent_natural_size + SHADOW_OFFSET_Y + 2 * INNER_BORDER;
@ -507,7 +512,8 @@ gtk_notification_update_message (GtkNotification * notification, const gchar * n
notification->priv->message_label = g_strdup (new_message);
g_object_notify (G_OBJECT (notification), "message");
gtk_label_set_text(GTK_LABEL(notification->priv->message), notification->priv->message_label);
gtk_label_set_text (GTK_LABEL (notification->priv->message),
notification->priv->message_label);
}
static void
@ -517,8 +523,10 @@ gtk_notification_update_button (GtkNotification * notification, const gchar * ne
notification->priv->button_label = g_strdup (new_button_label);
g_object_notify (G_OBJECT (notification), "button-label");
gtk_button_set_label(GTK_BUTTON(notification->priv->action_button), notification->priv->button_label);
gtk_button_set_use_stock(GTK_BUTTON(notification->priv->action_button), TRUE);
gtk_button_set_label (GTK_BUTTON (notification->priv->action_button),
notification->priv->button_label);
gtk_button_set_use_stock (GTK_BUTTON (notification->priv->action_button),
TRUE);
}
static gboolean