[goffice] Graphs: another minor cleanup.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Graphs: another minor cleanup.
- Date: Sun, 13 Apr 2014 21:30:22 +0000 (UTC)
commit 04eee3bf6f0d3bc1ecfa8244f1232dc776ce0680
Author: Morten Welinder <terra gnome org>
Date: Sun Apr 13 17:30:01 2014 -0400
Graphs: another minor cleanup.
ChangeLog | 1 +
goffice/graph/gog-object.c | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index abf0d52..b0f725c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
* goffice/graph/gog-object.c (cb_manual_size_changed): Use a
canonical gboolean as argument to gtk_widget_set_visible.
+ (cb_update_editor): Ditto.
2014-04-13 Morten Welinder <terra gnome org>
diff --git a/goffice/graph/gog-object.c b/goffice/graph/gog-object.c
index 0a22ffd..38c4e05 100644
--- a/goffice/graph/gog-object.c
+++ b/goffice/graph/gog-object.c
@@ -527,20 +527,19 @@ static void
cb_update_editor (GogObject *gobj, ObjectPrefState *state)
{
GogObjectPosition manual_size = gog_object_get_position_flags (gobj, GOG_POSITION_ANY_MANUAL_SIZE);
- gboolean visible;
if (state->x_spin != NULL)
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->x_spin), gobj->manual_position.x * 100.0);
if (state->y_spin != NULL)
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->y_spin), gobj->manual_position.y * 100.0);
if (state->w_spin != NULL) {
- visible = manual_size & GOG_POSITION_MANUAL_W;
+ gboolean visible = (manual_size & GOG_POSITION_MANUAL_W) != 0;
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->w_spin), gobj->manual_position.w * 100.0);
gtk_widget_set_visible (go_gtk_builder_get_widget (state->gui, "width_label"), visible);
gtk_widget_set_visible (go_gtk_builder_get_widget (state->gui, "width_spin"), visible);
gtk_widget_set_visible (go_gtk_builder_get_widget (state->gui, "width-pc-lbl"), visible);
}
if (state->h_spin != NULL) {
- visible = manual_size & GOG_POSITION_MANUAL_H;
+ gboolean visible = (manual_size & GOG_POSITION_MANUAL_H) != 0;
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->h_spin), gobj->manual_position.h * 100.0);
gtk_widget_set_visible (go_gtk_builder_get_widget (state->gui, "height_label"), visible);
gtk_widget_set_visible (go_gtk_builder_get_widget (state->gui, "height_spin"), visible);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]