X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=properties%2Fev-properties-view.c;h=fdf5cf7397b5dd6eb360fa929de91ba933af516b;hb=35d62ea876842860caba5afe60898681d4d7dbbd;hp=297cbc5d5cf115bef2af3f3bb5a9cd5a96a9baa7;hpb=19be09f257f9250cb45fa96e05ab16d6e9ff7ba9;p=evince.git diff --git a/properties/ev-properties-view.c b/properties/ev-properties-view.c index 297cbc5d..fdf5cf73 100644 --- a/properties/ev-properties-view.c +++ b/properties/ev-properties-view.c @@ -110,7 +110,7 @@ ev_properties_view_format_date (GTime utime) const char *fmt_hack = "%c"; size_t len; - if (!localtime_r (&time, &t)) return NULL; + if (time == 0 || !localtime_r (&time, &t)) return NULL; len = strftime (s, sizeof (s), fmt_hack, &t); if (len == 0 || s[0] == '\0') return NULL; @@ -222,6 +222,7 @@ ev_properties_view_set_info (EvPropertiesView *properties, const EvDocumentInfo if (info->fields_mask & EV_DOCUMENT_INFO_FORMAT) { text = g_strdup_printf ("%s", info->format); set_property (xml, FORMAT_PROPERTY, text); + g_free (text); } if (info->fields_mask & EV_DOCUMENT_INFO_N_PAGES) { text = g_strdup_printf ("%d", info->n_pages); @@ -242,7 +243,7 @@ ev_properties_view_init (EvPropertiesView *properties) GladeXML *xml; /* Create a new GladeXML object from XML file glade_file */ - xml = glade_xml_new (DATADIR "/evince-properties.glade", "general_page_root", NULL); + xml = glade_xml_new (DATADIR "/evince-properties.glade", "general_page_root", GETTEXT_PACKAGE); properties->xml = xml; g_assert (xml != NULL); @@ -251,6 +252,12 @@ ev_properties_view_init (EvPropertiesView *properties) TRUE, TRUE, 0); } +void +ev_properties_view_register_type (GTypeModule *module) +{ + ev_properties_view_get_type (); +} + GtkWidget * ev_properties_view_new (void) {