From ec64e995ab1467596e75fb0aebda63bb047aefa5 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Wed, 21 Dec 2011 00:32:54 +0000 Subject: file trees :D may do cascading priority changes sometime, but this is a start. also use GTK_STOCK_FILE if mime/extension detection fails. --- src/trg-cell-renderer-priority.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/trg-cell-renderer-priority.c') diff --git a/src/trg-cell-renderer-priority.c b/src/trg-cell-renderer-priority.c index 14d4763..3a80322 100644 --- a/src/trg-cell-renderer-priority.c +++ b/src/trg-cell-renderer-priority.c @@ -55,6 +55,7 @@ trg_cell_renderer_priority_get_property(GObject * object, break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); + break; } } @@ -68,13 +69,15 @@ trg_cell_renderer_priority_set_property(GObject * object, TRG_CELL_RENDERER_PRIORITY_GET_PRIVATE(object); if (property_id == PROP_PRIORITY_VALUE) { - priv->priority_value = g_value_get_int64(value); + priv->priority_value = g_value_get_int(value); if (priv->priority_value == TR_PRI_LOW) { g_object_set(object, "text", _("Low"), NULL); } else if (priv->priority_value == TR_PRI_HIGH) { g_object_set(object, "text", _("High"), NULL); - } else { + } else if (priv->priority_value == TR_PRI_NORMAL){ g_object_set(object, "text", _("Normal"), NULL); + } else { + g_object_set(object, "text", "", NULL); } } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); @@ -91,10 +94,10 @@ trg_cell_renderer_priority_class_init(TrgCellRendererPriorityClass * klass) g_object_class_install_property(object_class, PROP_PRIORITY_VALUE, - g_param_spec_int64 + g_param_spec_int ("priority-value", "Priority Value", - "Priority Value", TR_PRI_LOW, + "Priority Value", -2, TR_PRI_HIGH, TR_PRI_NORMAL, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | -- cgit v1.2.3