diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2014-10-03 16:20:34 +0200 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2014-10-03 16:20:34 +0200 |
commit | 595e641cf7fa72e091aff56f9eab360a9d9b636b (patch) | |
tree | 44c530cb010308f37e42fa60622a3ffd1dd80a29 /src | |
parent | f3a24cbe91087e885e469b77fe733d7c83437aa8 (diff) | |
parent | 23337be110e44acd2f922fed0c92c5130abc1bba (diff) |
Merge tag 'upstream/0.999'
Upstream version 0.999
# gpg: Signature made Fri 03 Oct 2014 04:20:30 PM CEST using RSA key ID B9444540
# gpg: Good signature from "Mattia Rizzolo <mattia@mapreri.org>"
# gpg: aka "Mattia Rizzolo <mapreri@ubuntu.com>"
# gpg: aka "Mattia Rizzolo <mapreri@ubuntu-it.org>"
# gpg: aka "Mattia Rizzolo <mapreri@gmail.com>"
# gpg: aka "[jpeg image of size 4456]"
# gpg: aka "[jpeg image of size 4218]"
Diffstat (limited to 'src')
-rw-r--r-- | src/xsane-back-gtk.c | 4 | ||||
-rw-r--r-- | src/xsane-front-gtk.c | 7 | ||||
-rw-r--r-- | src/xsane-preview.c | 20 | ||||
-rw-r--r-- | src/xsane-setup.c | 4 | ||||
-rw-r--r-- | src/xsane.h | 6 |
5 files changed, 34 insertions, 7 deletions
diff --git a/src/xsane-back-gtk.c b/src/xsane-back-gtk.c index 4701dc6..bca9eb2 100644 --- a/src/xsane-back-gtk.c +++ b/src/xsane-back-gtk.c @@ -1130,6 +1130,10 @@ static void xsane_back_gtk_filetype2_callback(GtkWidget *widget, gpointer data) } snprintf(filename, sizeof(filename), "%s%s", chooser_filename, new_filetype); } + else + { + snprintf(filename, sizeof(filename), "%s", chooser_filename); + } if (filechooser_filetype) { diff --git a/src/xsane-front-gtk.c b/src/xsane-front-gtk.c index 35aa89d..4c973fb 100644 --- a/src/xsane-front-gtk.c +++ b/src/xsane-front-gtk.c @@ -1709,7 +1709,7 @@ void xsane_update_param(void *arg) gtk_label_set(GTK_LABEL(xsane.info_label), buf); - if (xsane.preview->surface_unit == SANE_UNIT_MM) + if (xsane.preview && xsane.preview->surface_unit == SANE_UNIT_MM) { double dx, dy; @@ -1724,7 +1724,10 @@ void xsane_update_param(void *arg) xsane_update_histogram(TRUE /* update raw */); - preview_display_valid(xsane.preview); + if (xsane.preview) + { + preview_display_valid(xsane.preview); + } } /* ---------------------------------------------------------------------------------------------------------------------- */ diff --git a/src/xsane-preview.c b/src/xsane-preview.c index f089dd1..3eb6479 100644 --- a/src/xsane-preview.c +++ b/src/xsane-preview.c @@ -4666,6 +4666,9 @@ void preview_update_surface(Preview *p, int surface_changed) SANE_Unit unit; double min, max; int expand_surface = 0; + gint min_width, min_height; + GdkScreen *screen; + GdkRectangle geometry; DBG(DBG_proc, "preview_update_surface\n"); @@ -4849,8 +4852,25 @@ void preview_update_surface(Preview *p, int surface_changed) { DBG(DBG_info, "preview_update_surface: defining size of preview window\n"); +/* p->preview_window_width = 0.3 * gdk_screen_width(); p->preview_window_height = 0.5 * gdk_screen_height(); +*/ + /* ensure preview window fits on displays, account for multi-head */ + min_width = gdk_screen_width(); + min_height = gdk_screen_height(); + + screen = gdk_screen_get_default(); + for (i = 0; i < gdk_screen_get_n_monitors(screen); i++) + { + gdk_screen_get_monitor_geometry(screen, i, &geometry); + min_width = MIN(min_width, geometry.width); + min_height = MIN(min_height, geometry.height); + } + + p->preview_window_width = 0.3 * min_width; + p->preview_window_height = 0.5 * min_height; + preview_area_correct(p); /* calculate preview_width and height */ gtk_widget_set_size_request(GTK_WIDGET(p->window), p->preview_width, p->preview_height); } diff --git a/src/xsane-setup.c b/src/xsane-setup.c index f047584..a61833a 100644 --- a/src/xsane-setup.c +++ b/src/xsane-setup.c @@ -729,7 +729,7 @@ static void xsane_setup_email_apply_changes(GtkWidget *widget, gpointer data) /* this is very simple but better than nothing */ for (i=0; i<strlen(preferences.email_auth_pass); i++) { - preferences.email_auth_pass[i] ^= 0x53; + preferences.email_auth_pass[i] ^= 0xa3; } xsane_update_int(xsane_setup.email_smtp_port_entry, &preferences.email_smtp_port); @@ -2593,7 +2593,7 @@ static void xsane_email_notebook(GtkWidget *notebook) for (i=0; i<strlen(password); i++) { - password[i] ^= 0x53; + password[i] ^= 0xa3; } hbox = gtk_hbox_new(/* homogeneous */ FALSE, 0); diff --git a/src/xsane.h b/src/xsane.h index cf6111f..67f06d4 100644 --- a/src/xsane.h +++ b/src/xsane.h @@ -3,7 +3,7 @@ xsane.h Oliver Rauch <Oliver.Rauch@rauch-domain.de> - Copyright (C) 1998-2007 Oliver Rauch + Copyright (C) 1998-2013 Oliver Rauch This file is part of the XSANE package. This program is free software; you can redistribute it and/or modify @@ -91,10 +91,10 @@ /* ---------------------------------------------------------------------------------------------------------------------- */ -#define XSANE_VERSION "0.998" +#define XSANE_VERSION "0.999" #define XSANE_AUTHOR "Oliver Rauch" #define XSANE_COPYRIGHT "Oliver Rauch" -#define XSANE_DATE "1998-2010" +#define XSANE_DATE "1998-2013" #define XSANE_EMAIL_ADR "Oliver.Rauch@xsane.org" #define XSANE_HOMEPAGE "http://www.xsane.org" #define XSANE_COPYRIGHT_TXT XSANE_DATE " " XSANE_COPYRIGHT |