diff options
author | Benedikt Meurer <benny@xfce.org> | 2006-03-22 16:02:26 +0000 |
---|---|---|
committer | Benedikt Meurer <benny@xfce.org> | 2006-03-22 16:02:26 +0000 |
commit | b743df152cc3129ad80fc65ca36bcd24d1244501 (patch) | |
tree | 20ee09fca25ea025456b490a887b77276e87a98a /thunar/thunar-gobject-extensions.c | |
parent | 0f7c4340d85a8dde1c42f2b9579b69e9c0ad117d (diff) | |
download | thunar-b743df152cc3129ad80fc65ca36bcd24d1244501.tar.gz |
2006-03-22 Benedikt Meurer <benny@xfce.org>
* docs/reference/thunarx/tmpl/thunarx-renamer.sgml: Fix a typo.
* thunar/thunar-renamer-model.c: Only invalidate items on "file-changed"
signals if the file changed on the disk, to avoid invalidating items
constantly while generating thumbnails.
* thunar/thunar-gobject-extensions.c: Register a transformation func-
tion string->uint.
* plugins/thunar-sbr/thunar-sbr-case-renamer.c
(thunar_sbr_case_renamer_new): More consistent naming scheme for the
renamer titles.
* plugins/thunar-sbr/: Import additional renamers "Insert / Overwrite"
and "Remove Characters". Bug #1599.
* po/POTFILES.in: Add new files.
* po/Thunar.pot, po/*.po: Merge new strings.
* po/de.po: Update german translations.
(Old svn revision: 20520)
Diffstat (limited to 'thunar/thunar-gobject-extensions.c')
-rw-r--r-- | thunar/thunar-gobject-extensions.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/thunar/thunar-gobject-extensions.c b/thunar/thunar-gobject-extensions.c index 54d6a7ac..51f05f52 100644 --- a/thunar/thunar-gobject-extensions.c +++ b/thunar/thunar-gobject-extensions.c @@ -42,6 +42,7 @@ static void transform_string_to_boolean (const GValue *src, GValue *dst); static void transform_string_to_enum (const GValue *src, GValue *dst); static void transform_string_to_int (const GValue *src, GValue *dst); +static void transform_string_to_uint (const GValue *src, GValue *dst); @@ -82,7 +83,16 @@ static void transform_string_to_int (const GValue *src, GValue *dst) { - g_value_set_int (dst, strtol (g_value_get_string (src), NULL, 10)); + g_value_set_int (dst, (gint) strtol (g_value_get_string (src), NULL, 10)); +} + + + +static void +transform_string_to_uint (const GValue *src, + GValue *dst) +{ + g_value_set_uint (dst, (guint) strtoul (g_value_get_string (src), NULL, 10)); } @@ -101,6 +111,8 @@ thunar_g_initialize_transformations (void) g_value_register_transform_func (G_TYPE_STRING, G_TYPE_BOOLEAN, transform_string_to_boolean); if (!g_value_type_transformable (G_TYPE_STRING, G_TYPE_INT)) g_value_register_transform_func (G_TYPE_STRING, G_TYPE_INT, transform_string_to_int); + if (!g_value_type_transformable (G_TYPE_STRING, G_TYPE_UINT)) + g_value_register_transform_func (G_TYPE_STRING, G_TYPE_UINT, transform_string_to_uint); /* register a transformation function string->enum unconditionally */ g_value_register_transform_func (G_TYPE_STRING, G_TYPE_ENUM, transform_string_to_enum); |