]> www.fi.muni.cz Git - evince.git/blobdiff - properties/ev-properties-view.c
[l10n] Updated Italian translation
[evince.git] / properties / ev-properties-view.c
index 0b73100212b659dd6b9d0f522b1108c1a89458f1..dba2bb0c3d410e2b0b0e6cd32260e99e80672834 100644 (file)
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #include "config.h"
@@ -108,29 +108,6 @@ ev_properties_view_class_init (EvPropertiesViewClass *properties_class)
        g_object_class->dispose = ev_properties_view_dispose;
 }
 
-/* Returns a locale specific date and time representation */
-static char *
-ev_properties_view_format_date (GTime utime)
-{
-       time_t time = (time_t) utime;
-       char s[256];
-       const char fmt_hack[] = "%c";
-       size_t len;
-#ifdef HAVE_LOCALTIME_R
-       struct tm t;
-       if (time == 0 || !localtime_r (&time, &t)) return NULL;
-       len = strftime (s, sizeof (s), fmt_hack, &t);
-#else
-       struct tm *t;
-       if (time == 0 || !(t = localtime (&time)) ) return NULL;
-       len = strftime (s, sizeof (s), fmt_hack, t);
-#endif
-
-       if (len == 0 || s[0] == '\0') return NULL;
-
-       return g_locale_to_utf8 (s, -1, NULL, NULL, NULL);
-}
-
 /* This is cut out of gconvert.c from glib (and mildly modified).  Not all
    backends give valid UTF-8 for properties, so we make sure that is.
  */
@@ -281,11 +258,11 @@ ev_regular_paper_size (const EvDocumentInfo *info)
        units = get_default_user_units ();
 
        if (units == GTK_UNIT_MM) {
-               exact_size = g_strdup_printf(_("%.0f x %.0f mm"),
+               exact_size = g_strdup_printf(_("%.0f × %.0f mm"),
                                             info->paper_width,
                                             info->paper_height);
        } else {
-               exact_size = g_strdup_printf (_("%.2f x %.2f inch"),
+               exact_size = g_strdup_printf (_("%.2f × %.2f inch"),
                                              info->paper_width  / 25.4f,
                                              info->paper_height / 25.4f);
        }
@@ -362,12 +339,12 @@ ev_properties_view_set_info (EvPropertiesView *properties, const EvDocumentInfo
                set_property (properties, GTK_TABLE (table), CREATOR_PROPERTY, info->creator, &row);
        }
        if (info->fields_mask & EV_DOCUMENT_INFO_CREATION_DATE) {
-               text = ev_properties_view_format_date (info->creation_date);
+               text = ev_document_misc_format_date (info->creation_date);
                set_property (properties, GTK_TABLE (table), CREATION_DATE_PROPERTY, text, &row);
                g_free (text);
        }
        if (info->fields_mask & EV_DOCUMENT_INFO_MOD_DATE) {
-               text = ev_properties_view_format_date (info->modified_date);
+               text = ev_document_misc_format_date (info->modified_date);
                set_property (properties, GTK_TABLE (table), MOD_DATE_PROPERTY, text, &row);
                g_free (text);
        }