*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* 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.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#include "image_viewer.h"
#include <glib/gi18n.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtktextview.h>
+#include <gtk/gtk.h>
#include <libgnomeprint/gnome-print-pango.h>
#ifdef ENABLE_PROFILE
}
while (pango_layout_iter_next_line (iter));
-
job->priv->available_height -= max - page_skip;
-
pango_layout_iter_free (iter);
g_object_unref (layout);
} else {
job->priv->text_width,
job->priv->text_height,
&scaled_width, &scaled_height);
-
if (scaled_height > max_height) {
job->priv->page_count++;
- job->priv->available_height = job->priv->text_height;
+ job->priv->available_height = job->priv->text_height - scaled_height;
} else {
job->priv->available_height -= scaled_height;
}
const struct tm *tm;
time_t now;
gunichar ch;
-
+ struct tm lt;
+
/* get time */
time (&now);
- tm = localtime (&now);
+ tm = localtime_r(&now, <);
/* analyze format string and replace the codes we know */
eval = g_string_new_len (NULL, strlen (format));