From 1cca1ad87b660f2e968af500abfc095ed832132f Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 19 Nov 2002 00:14:40 +0000 Subject: remove the cast to (int) - column_width is a double. 2002-11-18 Chris Toshok * gui/widgets/gal-view-minicard.c (gal_view_minicard_attach): remove the cast to (int) - column_width is a double. * gui/widgets/e-minicard.c (e_minicard_class_init): the height property is only readable, not readwrite. * gui/widgets/e-minicard-view-widget.c (e_minicard_view_widget_class_init): make column_width a double property. (e_minicard_view_widget_set_property): don't cast to (int). column_width is double in the e-minicard-view. (e_minicard_view_widget_realize): same. (e_minicard_view_widget_get_property): use g_value_set_double for column_width. svn path=/trunk/; revision=18831 --- addressbook/gui/widgets/e-minicard-view-widget.c | 18 +++++++++--------- addressbook/gui/widgets/e-minicard.c | 2 +- addressbook/gui/widgets/gal-view-minicard.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c index 03166005e2..8113eb3c59 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -121,11 +121,11 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass) G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_COLUMN_WIDTH, - g_param_spec_int ("column_width", - _("Column Width"), - /*_( */"XXX blurb" /*)*/, - 0, 0, 0, - G_PARAM_READWRITE | G_PARAM_LAX_VALIDATION)); + g_param_spec_double ("column_width", + _("Column Width"), + /*_( */"XXX blurb" /*)*/, + 0.0, G_MAXDOUBLE, 150.0, + G_PARAM_READWRITE)); signals [SELECTION_CHANGE] = g_signal_new ("selection_change", @@ -226,10 +226,10 @@ e_minicard_view_widget_set_property (GObject *object, NULL); break; case PROP_COLUMN_WIDTH: - emvw->column_width = g_value_get_int (value); + emvw->column_width = g_value_get_double (value); if (emvw->emv) { g_object_set (emvw->emv, - "column_width", (int) emvw->column_width, + "column_width", emvw->column_width, NULL); } break; @@ -260,7 +260,7 @@ e_minicard_view_widget_get_property (GObject *object, g_value_set_boolean (value, emvw->editable); break; case PROP_COLUMN_WIDTH: - g_value_set_int (value, emvw->column_width); + g_value_set_double (value, emvw->column_width); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -331,7 +331,7 @@ e_minicard_view_widget_realize (GtkWidget *widget) "height", (double) 100, "minimum_width", (double) 100, "adapter", view->adapter, - "column_width", (int) view->column_width, + "column_width", view->column_width, NULL ); g_signal_connect (E_REFLOW(view->emv)->selection, diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 38e7b6d3c9..6c8c9a630b 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -145,7 +145,7 @@ e_minicard_class_init (EMinicardClass *klass) _("Height"), /*_( */"XXX blurb" /*)*/, 0.0, G_MAXDOUBLE, 10.0, - G_PARAM_READWRITE)); + G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_HAS_FOCUS, /* XXX should be _enum */ diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c index 95a81c7607..4265af25ba 100644 --- a/addressbook/gui/widgets/gal-view-minicard.c +++ b/addressbook/gui/widgets/gal-view-minicard.c @@ -197,7 +197,7 @@ gal_view_minicard_attach (GalViewMinicard *view, EMinicardViewWidget *emvw) g_object_ref (view->emvw); g_object_set (view->emvw, - "column_width", (int) view->column_width, + "column_width", view->column_width, NULL); view->emvw_column_width_changed_id = -- cgit