summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-12-10 10:40:44 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-12-10 10:40:44 +0000
commitd5a8c169eca1b0186135178e0e039f7fc2f4d415 (patch)
tree5cb9e54998948c26f7c959cede9881f9a85208b6
parent587a540c425d1927da2452ede351637f72c58cd1 (diff)
downloadnautilus-d5a8c169eca1b0186135178e0e039f7fc2f4d415.tar.gz
Update the 2GB and 4GB thumbnail limits to the new prefs API and make sure
2008-12-10 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file.c: * libnautilus-private/nautilus-global-preferences.c: * src/nautilus-file-management-properties.c: * src/nautilus-file-management-properties.ui: Update the 2GB and 4GB thumbnail limits to the new prefs API and make sure they actually work. svn path=/trunk/; revision=14806
-rw-r--r--ChangeLog9
-rw-r--r--libnautilus-private/nautilus-file.c6
-rw-r--r--libnautilus-private/nautilus-global-preferences.c4
-rw-r--r--src/nautilus-file-management-properties.c14
-rw-r--r--src/nautilus-file-management-properties.ui6
5 files changed, 28 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index a08c6d7c2..c27122476 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-12-10 Alexander Larsson <alexl@redhat.com>
+
+ * libnautilus-private/nautilus-file.c:
+ * libnautilus-private/nautilus-global-preferences.c:
+ * src/nautilus-file-management-properties.c:
+ * src/nautilus-file-management-properties.ui:
+ Update the 2GB and 4GB thumbnail limits to the new prefs API and
+ make sure they actually work.
+
2008-12-09 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c (copy_move_file):
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index e57f6af55..d369e280b 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -3341,7 +3341,7 @@ get_custom_icon (NautilusFile *file)
}
-static int cached_thumbnail_limit;
+static guint cached_thumbnail_limit;
int cached_thumbnail_size;
static int show_image_thumbs;
@@ -3380,7 +3380,7 @@ nautilus_file_should_show_thumbnail (NautilusFile *file)
*/
if (nautilus_thumbnail_is_mimetype_limited_by_size (mime_type) &&
file->details->thumbnail_path == NULL &&
- nautilus_file_get_size (file) > (unsigned int)cached_thumbnail_limit) {
+ nautilus_file_get_size (file) > cached_thumbnail_limit) {
return FALSE;
}
@@ -7086,7 +7086,7 @@ nautilus_extract_top_left_text (const char *text,
static void
thumbnail_limit_changed_callback (gpointer user_data)
{
- cached_thumbnail_limit = eel_preferences_get_integer (NAUTILUS_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT);
+ cached_thumbnail_limit = eel_preferences_get_uint (NAUTILUS_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT);
/* Tell the world that icons might have changed. We could invent a narrower-scope
* signal to mean only "thumbnails might have changed" if this ends up being slow
diff --git a/libnautilus-private/nautilus-global-preferences.c b/libnautilus-private/nautilus-global-preferences.c
index 034900f57..0bf526407 100644
--- a/libnautilus-private/nautilus-global-preferences.c
+++ b/libnautilus-private/nautilus-global-preferences.c
@@ -96,8 +96,8 @@ static EelEnumerationEntry file_size_enum_entries[] = {
{ "10485760", N_("10 MB"), 10485760 },
{ "104857600", N_("100 MB"), 104857600 },
{ "1073741824", N_("1 GB"), 1073741824 },
- { "2147483648", N_("2 GB"), 2147483648 },
- { "4294967295", N_("4 GB"), 4294967295 }
+ { "2147483648", N_("2 GB"), 2147483648U },
+ { "4294967295", N_("4 GB"), 4294967295U }
};
static EelEnumerationEntry click_policy_enum_entries[] = {
diff --git a/src/nautilus-file-management-properties.c b/src/nautilus-file-management-properties.c
index a3be3858a..0e6d8dd57 100644
--- a/src/nautilus-file-management-properties.c
+++ b/src/nautilus-file-management-properties.c
@@ -141,7 +141,7 @@ static const char * const executable_text_values[] = {
NULL
};
-static const int thumbnail_limit_values[] = {
+static const guint thumbnail_limit_values[] = {
102400,
512000,
1048576,
@@ -150,7 +150,8 @@ static const int thumbnail_limit_values[] = {
10485760,
104857600,
1073741824,
- -1
+ 2147483648U,
+ 4294967295U
};
static const char * const icon_captions_components[] = {
@@ -782,10 +783,11 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow
NAUTILUS_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION,
(const char **) executable_text_values);
- eel_preferences_builder_connect_int_enum (builder,
- NAUTILUS_FILE_MANAGEMENT_PROPERTIES_THUMBNAIL_LIMIT_WIDGET,
- NAUTILUS_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT,
- (const int *) thumbnail_limit_values);
+ eel_preferences_builder_connect_uint_enum (builder,
+ NAUTILUS_FILE_MANAGEMENT_PROPERTIES_THUMBNAIL_LIMIT_WIDGET,
+ NAUTILUS_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT,
+ (const guint *) thumbnail_limit_values,
+ G_N_ELEMENTS (thumbnail_limit_values));
nautilus_file_management_properties_dialog_setup_icon_caption_page (builder);
nautilus_file_management_properties_dialog_setup_list_column_page (builder);
diff --git a/src/nautilus-file-management-properties.ui b/src/nautilus-file-management-properties.ui
index 3e1820a7f..3a57ebaeb 100644
--- a/src/nautilus-file-management-properties.ui
+++ b/src/nautilus-file-management-properties.ui
@@ -184,6 +184,12 @@
<row>
<col id="0">1 GB</col>
</row>
+ <row>
+ <col id="0">2 GB</col>
+ </row>
+ <row>
+ <col id="0">4 GB</col>
+ </row>
</data>
</object>
<object class="GtkListStore" id="model9">