summaryrefslogtreecommitdiff
path: root/src/trg-cell-renderer-priority.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-12-21 00:32:54 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-12-21 00:32:54 +0000
commitec64e995ab1467596e75fb0aebda63bb047aefa5 (patch)
tree07d4d1f73b33085b8f87d9c0ae56a2548a1bc9be /src/trg-cell-renderer-priority.c
parent980ecb422cb29f93f5fe51b633be46cde36cedc6 (diff)
file trees :D may do cascading priority changes sometime, but this is a start. also use GTK_STOCK_FILE if mime/extension detection fails.
Diffstat (limited to 'src/trg-cell-renderer-priority.c')
-rw-r--r--src/trg-cell-renderer-priority.c11
1 files changed, 7 insertions, 4 deletions
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 |