diff options
Diffstat (limited to 'properties')
-rw-r--r-- | properties/ev-properties-main.c | 6 | ||||
-rw-r--r-- | properties/ev-properties-view.c | 34 |
2 files changed, 20 insertions, 20 deletions
diff --git a/properties/ev-properties-main.c b/properties/ev-properties-main.c index 9235c86a..1fee3037 100644 --- a/properties/ev-properties-main.c +++ b/properties/ev-properties-main.c @@ -102,7 +102,7 @@ ev_properties_get_pages (CajaPropertyPageProvider *provider, /* okay, make the page */ uri = caja_file_info_get_uri (file); mime_type = caja_file_info_get_mime_type (file); - + document = ev_backends_manager_get_document (mime_type); if (!document) goto end; @@ -112,7 +112,7 @@ ev_properties_get_pages (CajaPropertyPageProvider *provider, g_error_free (error); goto end; } - + label = gtk_label_new (_("Document")); page = ev_properties_view_new (uri); ev_properties_view_set_info (EV_PROPERTIES_VIEW (page), @@ -127,7 +127,7 @@ ev_properties_get_pages (CajaPropertyPageProvider *provider, end: g_free (uri); g_free (mime_type); - + return pages; } diff --git a/properties/ev-properties-view.c b/properties/ev-properties-view.c index 2209c8ba..709b7c27 100644 --- a/properties/ev-properties-view.c +++ b/properties/ev-properties-view.c @@ -92,12 +92,12 @@ static void ev_properties_view_dispose (GObject *object) { EvPropertiesView *properties = EV_PROPERTIES_VIEW (object); - + if (properties->uri) { g_free (properties->uri); properties->uri = NULL; } - + G_OBJECT_CLASS (ev_properties_view_parent_class)->dispose (object); } @@ -118,34 +118,34 @@ make_valid_utf8 (const gchar *name) GString *string; const gchar *remainder, *invalid; gint remaining_bytes, valid_bytes; - + string = NULL; remainder = name; remaining_bytes = strlen (name); - - while (remaining_bytes != 0) + + while (remaining_bytes != 0) { - if (g_utf8_validate (remainder, remaining_bytes, &invalid)) + if (g_utf8_validate (remainder, remaining_bytes, &invalid)) break; valid_bytes = invalid - remainder; - - if (string == NULL) + + if (string == NULL) string = g_string_sized_new (remaining_bytes); g_string_append_len (string, remainder, valid_bytes); g_string_append_c (string, '?'); - + remaining_bytes -= valid_bytes + 1; remainder = invalid + 1; } - + if (string == NULL) return g_strdup (name); - + g_string_append (string, remainder); g_assert (g_utf8_validate (string->str, -1, NULL)); - + return g_string_free (string, FALSE); } @@ -222,7 +222,7 @@ get_default_user_units (void) #ifdef HAVE__NL_MEASUREMENT_MEASUREMENT gchar *imperial = NULL; - + imperial = nl_langinfo (_NL_MEASUREMENT_MEASUREMENT); if (imperial && imperial[0] == 2) return GTK_UNIT_INCH; /* imperial */ @@ -234,9 +234,9 @@ get_default_user_units (void) return GTK_UNIT_MM; if (strcmp (e, "default:inch") == 0) return GTK_UNIT_INCH; - + g_warning ("Whoever translated default:mm did so wrongly.\n"); - + return GTK_UNIT_MM; } @@ -272,7 +272,7 @@ ev_regular_paper_size (const EvDocumentInfo *info) } paper_sizes = gtk_paper_size_get_paper_sizes (FALSE); - + for (l = paper_sizes; l && l->data; l = g_list_next (l)) { GtkPaperSize *size = (GtkPaperSize *) l->data; gdouble paper_width; @@ -310,7 +310,7 @@ ev_regular_paper_size (const EvDocumentInfo *info) g_free (exact_size); return str; } - + return exact_size; } |