summaryrefslogtreecommitdiff
path: root/src/xsane.c
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2014-10-03 14:05:51 +0000
committerMattia Rizzolo <mattia@mapreri.org>2014-10-03 14:05:51 +0000
commited1d7afab34d41b155ac701ee9db87c3f057b99b (patch)
treeda1f7a34e4eabf92200a567910f9470d10b78e0c /src/xsane.c
parentdc7150ada6000f0c8e6ee61da9598573d3b63b7f (diff)
Imported Upstream version 0.997upstream/0.997
Diffstat (limited to 'src/xsane.c')
-rw-r--r--src/xsane.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/xsane.c b/src/xsane.c
index 8c65e33..66072a4 100644
--- a/src/xsane.c
+++ b/src/xsane.c
@@ -1214,6 +1214,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
pixmapwidget = gtk_image_new_from_pixmap(pixmap, mask);
gtk_box_pack_start(GTK_BOX(hbox), pixmapwidget, FALSE, FALSE, 2);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
gtk_widget_show(pixmapwidget);
/* adf pages maximum */
@@ -1283,6 +1284,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
pixmapwidget = gtk_image_new_from_pixmap(pixmap, mask);
gtk_box_pack_end(GTK_BOX(hbox), pixmapwidget, FALSE, FALSE, 2);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
gtk_widget_show(pixmapwidget);
xsane.xsanemode_widget = xsane_modus_option_menu;
@@ -1310,6 +1312,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
pixmapwidget = gtk_image_new_from_pixmap(pixmap, mask);
gtk_box_pack_start(GTK_BOX(hbox), pixmapwidget, FALSE, FALSE, 2);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
gtk_widget_show(pixmapwidget);
@@ -1388,6 +1391,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
gtk_container_add(GTK_CONTAINER(paper_orientation_item), pixmapwidget);
gtk_widget_show(pixmapwidget);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
gtk_container_add(GTK_CONTAINER(paper_orientation_menu), paper_orientation_item);
@@ -1456,6 +1460,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
pixmapwidget = gtk_image_new_from_pixmap(pixmap, mask);
gtk_box_pack_start(GTK_BOX(hbox), pixmapwidget, FALSE, FALSE, 2);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
gtk_widget_show(pixmapwidget);
xsane.cms_function_option_menu = xsane_back_gtk_cms_function_menu_new(preferences.cms_function, (GtkSignalFunc) xsane_cms_function_menu_callback);
@@ -1477,6 +1482,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
pixmapwidget = gtk_image_new_from_pixmap(pixmap, mask);
gtk_box_pack_start(GTK_BOX(hbox), pixmapwidget, FALSE, FALSE, 2);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
gtk_widget_show(pixmapwidget);
switch (opt->constraint_type)
@@ -1516,6 +1522,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
pixmapwidget = gtk_image_new_from_pixmap(pixmap, mask);
gtk_box_pack_start(GTK_BOX(hbox), pixmapwidget, FALSE, FALSE, 2);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
gtk_widget_show(pixmapwidget);
switch (opt->constraint_type)
@@ -1561,6 +1568,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
pixmapwidget = gtk_image_new_from_pixmap(pixmap, mask);
gtk_box_pack_start(GTK_BOX(hbox), pixmapwidget, FALSE, FALSE, 2);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
gtk_widget_show(pixmapwidget);
xsane_medium_menu = gtk_menu_new();
@@ -3514,6 +3522,7 @@ static void xsane_about_dialog(GtkWidget *widget, gpointer data)
gtk_box_pack_start(GTK_BOX(vbox), pixmapwidget, FALSE, FALSE, 2);
gtk_widget_show(pixmapwidget);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
xsane_separator_new(vbox, 5);
@@ -3618,6 +3627,7 @@ static void xsane_about_translation_dialog(GtkWidget *widget, gpointer data)
gtk_box_pack_start(GTK_BOX(vbox), pixmapwidget, FALSE, FALSE, 2);
gtk_widget_show(pixmapwidget);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
xsane_separator_new(vbox, 5);
@@ -4754,6 +4764,14 @@ void xsane_panel_build()
break;
}
+ if (!opt->size)
+ {
+ DBG(DBG_error, "xsane_panel_build: Option %d, type SANE_TYPE_STRING\n", i);
+ DBG(DBG_error, "=> %s\n", ERR_OPTION_ZERO_SIZE);
+ DBG(DBG_error, "=> %s\n", ERR_BACKEND_BUG);
+ break;
+ }
+
buf = malloc(opt->size);
status = xsane_control_option(xsane.dev, i, SANE_ACTION_GET_VALUE, buf, 0);
if (status != SANE_STATUS_GOOD)
@@ -5459,6 +5477,7 @@ static void xsane_choose_device(void)
gtk_box_pack_start(GTK_BOX(vbox), pixmapwidget, FALSE, FALSE, 0);
gtk_widget_show(pixmapwidget);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
xsane_set_window_icon(xsane.choose_device_dialog, (gchar **) 0);
@@ -5874,6 +5893,7 @@ static int xsane_init(int argc, char **argv)
gtk_box_pack_start(GTK_BOX(hbox), pixmapwidget, FALSE, FALSE, 10);
gtk_widget_show(pixmapwidget);
gdk_drawable_unref(pixmap);
+ gdk_drawable_unref(mask);
/* add text */
snprintf(buf, sizeof(buf), " %s ", TEXT_SCANNING_DEVICES);