Compare commits

..

No commits in common. "rawhide" and "f41" have entirely different histories.

3 changed files with 0 additions and 292 deletions

View file

@ -1,273 +0,0 @@
diff -up xsane-0.999/src/xsane.c.replace-gtk-timeout xsane-0.999/src/xsane.c
--- xsane-0.999/src/xsane.c.replace-gtk-timeout 2025-01-27 10:31:25.223795660 +0100
+++ xsane-0.999/src/xsane.c 2025-01-27 10:35:45.159120946 +0100
@@ -636,8 +636,10 @@ static void xsane_printer_callback(GtkWi
/* ---------------------------------------------------------------------------------------------------------------------- */
-static gint xsane_resolution_timer_callback(GtkAdjustment *adj)
+static gboolean xsane_resolution_timer_callback(gpointer data)
{
+ GtkAdjustment *adj = GTK_ADJUSTMENT(data);
+
if ((adj) && (!preferences.show_resolution_list)) /* make sure adjustment is valid */
{
float val = adj->value;
@@ -646,10 +648,10 @@ static gint xsane_resolution_timer_callb
gtk_adjustment_set_value(adj, val);
}
- gtk_timeout_remove(xsane_resolution_timer);
+ g_source_remove(xsane_resolution_timer);
xsane_resolution_timer = 0;
- return 0; /* stop timeout */
+ return FALSE; /* stop timeout */
}
/* ---------------------------------------------------------------------------------------------------------------------- */
@@ -676,10 +678,10 @@ static void xsane_resolution_scale_updat
/* the resolution slider gets almost unusable when we do this with win32 */
if (xsane_resolution_timer)
{
- gtk_timeout_remove(xsane_resolution_timer);
+ g_source_remove(xsane_resolution_timer);
xsane_resolution_timer = 0;
}
- xsane_resolution_timer = gtk_timeout_add(XSANE_HOLD_TIME, (GtkFunction) xsane_resolution_timer_callback, (gpointer) adj);
+ xsane_resolution_timer = g_timeout_add(XSANE_HOLD_TIME, xsane_resolution_timer_callback, (gpointer) adj);
#endif
}
else
diff -up xsane-0.999/src/xsane-email-project.c.replace-gtk-timeout xsane-0.999/src/xsane-email-project.c
--- xsane-0.999/src/xsane-email-project.c.replace-gtk-timeout 2025-01-27 10:31:25.215795681 +0100
+++ xsane-0.999/src/xsane-email-project.c 2025-01-27 10:31:25.226795652 +0100
@@ -586,7 +586,7 @@ static void xsane_email_project_display_
/* ---------------------------------------------------------------------------------------------------------------------- */
-static gint xsane_email_send_timer_callback(gpointer data)
+static gboolean xsane_email_send_timer_callback(gpointer data)
{
xsane_email_project_display_status();
@@ -599,7 +599,7 @@ static gint xsane_email_send_timer_callb
}
}
- return xsane_email_send_timer;
+ return (xsane_email_send_timer!=0);
}
/* ---------------------------------------------------------------------------------------------------------------------- */
@@ -819,9 +819,9 @@ static void xsane_email_project_load()
gtk_widget_set_sensitive(xsane.project_entry_box, TRUE);
gtk_widget_set_sensitive(GTK_WIDGET(xsane.start_button), FALSE);
- if (xsane_email_send_timer == 0)
+ if (xsane_email_send_timer)
{
- xsane_email_send_timer = gtk_timeout_add(100, (GtkFunction) xsane_email_send_timer_callback, NULL);
+ xsane_email_send_timer = g_timeout_add(100, xsane_email_send_timer_callback, NULL);
DBG(DBG_info, "enabling email send timer (%d)\n", xsane_email_send_timer);
}
}
@@ -1959,7 +1959,7 @@ static void xsane_email_send()
xsane_front_gtk_add_process_to_list(pid); /* add pid to child process list */
}
- xsane_email_send_timer = gtk_timeout_add(100, (GtkFunction) xsane_email_send_timer_callback, NULL);
+ xsane_email_send_timer = g_timeout_add(100, xsane_email_send_timer_callback, NULL);
DBG(DBG_info, "enabling email send timer (%d)\n", xsane_email_send_timer);
xsane_set_sensitivity(TRUE); /* allow changing xsane mode */
diff -up xsane-0.999/src/xsane-gamma.c.replace-gtk-timeout xsane-0.999/src/xsane-gamma.c
--- xsane-0.999/src/xsane-gamma.c.replace-gtk-timeout 2010-11-16 21:25:38.000000000 +0100
+++ xsane-0.999/src/xsane-gamma.c 2025-01-27 10:31:25.227795650 +0100
@@ -553,13 +553,13 @@ void xsane_update_sliders()
/* ---------------------------------------------------------------------------------------------------------------------- */
-static gint xsane_batch_scan_gamma_event()
+static gboolean xsane_batch_scan_gamma_event(gpointer user_data)
{
DBG(DBG_proc, "xsane_batch_scan_gamma_event\n");
xsane_batch_scan_update_icon_list(); /* update gamma of batch scan icons */
- gtk_timeout_remove(xsane.batch_scan_gamma_timer);
+ g_source_remove(xsane.batch_scan_gamma_timer);
xsane.batch_scan_gamma_timer = 0;
return FALSE;
@@ -567,18 +567,18 @@ static gint xsane_batch_scan_gamma_event
/* ---------------------------------------------------------------------------------------------------------------------- */
-static gint xsane_slider_hold_event()
+static gboolean xsane_slider_hold_event(gpointer user_data)
{
DBG(DBG_proc, "xsane_slider_hold_event\n");
xsane_enhancement_by_histogram(TRUE);
- gtk_timeout_remove(xsane.slider_timer);
+ g_source_remove(xsane.slider_timer);
xsane.slider_timer = 0;
if (xsane.slider_timer_restart)
{
- xsane.slider_timer = gtk_timeout_add(XSANE_CONTINUOUS_HOLD_TIME, xsane_slider_hold_event, 0);
+ xsane.slider_timer = g_timeout_add(XSANE_CONTINUOUS_HOLD_TIME, xsane_slider_hold_event, 0);
xsane.slider_timer_restart = FALSE;
}
@@ -676,7 +676,7 @@ static gint xsane_slider_callback(GtkWid
/* call xsane_enhancement_by_histogram by event handler */
if (!xsane.slider_timer)
{
- xsane.slider_timer = gtk_timeout_add(XSANE_CONTINUOUS_HOLD_TIME, xsane_slider_hold_event, 0);
+ xsane.slider_timer = g_timeout_add(XSANE_CONTINUOUS_HOLD_TIME, xsane_slider_hold_event, 0);
}
else
{
@@ -687,10 +687,10 @@ static gint xsane_slider_callback(GtkWid
{
if (xsane.slider_timer) /* hold timer active? then remove it, we had a motion */
{
- gtk_timeout_remove(xsane.slider_timer);
+ g_source_remove(xsane.slider_timer);
}
/* call xsane_slider_hold_event if mouse is not moved for ??? ms */
- xsane.slider_timer = gtk_timeout_add(XSANE_HOLD_TIME, xsane_slider_hold_event, 0);
+ xsane.slider_timer = g_timeout_add(XSANE_HOLD_TIME, xsane_slider_hold_event, 0);
}
}
@@ -1961,9 +1961,9 @@ void xsane_enhancement_by_gamma(void)
if (xsane.batch_scan_gamma_timer)
{
- gtk_timeout_remove(xsane.batch_scan_gamma_timer);
+ g_source_remove(xsane.batch_scan_gamma_timer);
}
- xsane.batch_scan_gamma_timer = gtk_timeout_add(XSANE_CONTINUOUS_HOLD_TIME * 4, xsane_batch_scan_gamma_event, 0);
+ xsane.batch_scan_gamma_timer = g_timeout_add(XSANE_CONTINUOUS_HOLD_TIME * 4, xsane_batch_scan_gamma_event, 0);
}
/* ---------------------------------------------------------------------------------------------------------------------- */
diff -up xsane-0.999/src/xsane-preview.c.replace-gtk-timeout xsane-0.999/src/xsane-preview.c
--- xsane-0.999/src/xsane-preview.c.replace-gtk-timeout 2025-01-27 10:31:25.216795678 +0100
+++ xsane-0.999/src/xsane-preview.c 2025-01-27 10:35:08.656216012 +0100
@@ -159,7 +159,7 @@ static int preview_make_image_path(Previ
static void preview_restore_image(Preview *p);
static gint preview_expose_event_handler_start(GtkWidget *window, GdkEvent *event, gpointer data);
static gint preview_expose_event_handler_end(GtkWidget *window, GdkEvent *event, gpointer data);
-static gint preview_hold_event_handler(gpointer data);
+static gboolean preview_hold_event_handler(gpointer data);
static gint preview_motion_event_handler(GtkWidget *window, GdkEvent *event, gpointer data);
static gint preview_button_press_event_handler(GtkWidget *window, GdkEvent *event, gpointer data);
static gint preview_button_release_event_handler(GtkWidget *window, GdkEvent *event, gpointer data);
@@ -2978,7 +2978,7 @@ static void preview_display_color_compon
/* ---------------------------------------------------------------------------------------------------------------------- */
-static gint preview_hold_event_handler(gpointer data)
+static gboolean preview_hold_event_handler(gpointer data)
{
Preview *p = data;
@@ -2989,7 +2989,7 @@ static gint preview_hold_event_handler(g
preview_establish_selection(p);
p->gamma_functions_interruptable = FALSE;
- gtk_timeout_remove(p->hold_timer);
+ g_source_remove(p->hold_timer);
p->hold_timer = 0;
return FALSE;
@@ -3192,7 +3192,7 @@ static gint preview_motion_event_handler
{
if (!p->hold_timer) /* hold timer active? then remove it, we had a motion */
{
- p->hold_timer = gtk_timeout_add(XSANE_CONTINUOUS_HOLD_TIME, preview_hold_event_handler, (gpointer *) p);
+ p->hold_timer = g_timeout_add(XSANE_CONTINUOUS_HOLD_TIME, preview_hold_event_handler, (gpointer) p);
}
preview_update_maximum_output_size(p);
preview_draw_selection(p);
@@ -3202,10 +3202,10 @@ static gint preview_motion_event_handler
/* call preview_hold_event_hanlder if mouse is not moved for ??? ms */
if (p->hold_timer) /* hold timer active? then remove it, we had a motion */
{
- gtk_timeout_remove(p->hold_timer);
+ g_source_remove(p->hold_timer);
p->hold_timer = 0;
}
- p->hold_timer = gtk_timeout_add(XSANE_HOLD_TIME, preview_hold_event_handler, (gpointer *) p);
+ p->hold_timer = g_timeout_add(XSANE_HOLD_TIME, preview_hold_event_handler, (gpointer) p);
preview_update_maximum_output_size(p);
preview_draw_selection(p);
}
@@ -3376,7 +3376,7 @@ static gint preview_motion_event_handler
{
if (!p->hold_timer) /* hold timer active? then remove it, we had a motion */
{
- p->hold_timer = gtk_timeout_add(XSANE_CONTINUOUS_HOLD_TIME, preview_hold_event_handler, (gpointer *) p);
+ p->hold_timer = g_timeout_add(XSANE_CONTINUOUS_HOLD_TIME, preview_hold_event_handler, (gpointer) p);
}
preview_update_maximum_output_size(p);
preview_draw_selection(p);
@@ -3385,10 +3385,10 @@ static gint preview_motion_event_handler
{
if (p->hold_timer) /* hold timer active? then remove it, we had a motion */
{
- gtk_timeout_remove(p->hold_timer);
+ g_source_remove(p->hold_timer);
p->hold_timer = 0;
}
- p->hold_timer = gtk_timeout_add (XSANE_HOLD_TIME, preview_hold_event_handler, (gpointer *) p);
+ p->hold_timer = g_timeout_add (XSANE_HOLD_TIME, preview_hold_event_handler, (gpointer) p);
preview_update_maximum_output_size(p);
preview_draw_selection(p);
}
diff -up xsane-0.999/src/xsane-scan.c.replace-gtk-timeout xsane-0.999/src/xsane-scan.c
--- xsane-0.999/src/xsane-scan.c.replace-gtk-timeout 2025-01-27 10:31:25.217795676 +0100
+++ xsane-0.999/src/xsane-scan.c 2025-01-27 10:31:25.227795650 +0100
@@ -53,7 +53,7 @@ static int xsane_test_multi_scan(void);
void xsane_scan_done(SANE_Status status);
void xsane_cancel(void);
static void xsane_start_scan(void);
-gint xsane_scan_dialog(gpointer *data);
+gboolean xsane_scan_dialog(gpointer data);
static void xsane_create_internal_gamma_tables(void);
/* ---------------------------------------------------------------------------------------------------------------------- */
@@ -1598,7 +1598,7 @@ void xsane_scan_done(SANE_Status status)
DBG(DBG_info, "ADF mode end of scan: increment page counter and restart scan\n");
xsane.adf_page_counter += 1;
- gtk_timeout_add(100, (GtkFunction)xsane_scan_dialog, NULL); /* wait 100ms then call xsane_scan_dialog(); */
+ g_timeout_add(100, xsane_scan_dialog, NULL); /* wait 100ms then call xsane_scan_dialog(); */
}
else if ( ( (status == SANE_STATUS_GOOD) || (status == SANE_STATUS_EOF) ) && (xsane.batch_loop == BATCH_MODE_LOOP) )
{
@@ -1876,7 +1876,7 @@ static void xsane_start_scan(void)
/* or by scan_done if automatic document feeder is selected */
/* always returns 0 beacause ADF function calls it as timeout function */
/* and return value 0 is used to tell the timeout handler to stop timer */
-gint xsane_scan_dialog(gpointer *data)
+gboolean xsane_scan_dialog(gpointer data)
{
char buf[TEXTBUFSIZE];
const SANE_Option_Descriptor *opt;
diff -up xsane-0.999/src/xsane-scan.h.replace-gtk-timeout xsane-0.999/src/xsane-scan.h
--- xsane-0.999/src/xsane-scan.h.replace-gtk-timeout 2007-01-05 19:15:25.000000000 +0100
+++ xsane-0.999/src/xsane-scan.h 2025-01-27 10:31:25.228795647 +0100
@@ -28,6 +28,6 @@
extern void xsane_scan_done(SANE_Status status);
extern void xsane_cancel(void);
-extern gint xsane_scan_dialog(gpointer *data);
+extern gboolean xsane_scan_dialog(gpointer data);
/* ---------------------------------------------------------------------------------------------------------------------- */

View file

@ -1,13 +0,0 @@
diff --git a/src/xsane-save.h b/src/xsane-save.h
index 64db676..0ebade7 100644
--- a/src/xsane-save.h
+++ b/src/xsane-save.h
@@ -50,7 +50,7 @@ struct pdf_xref
extern int xsane_create_secure_file(const char *filename);
-extern void xsane_cancel_save();
+extern void xsane_cancel_save(int *cancel_save);
extern void xsane_convert_text_to_filename(char **filename);
extern int xsane_get_filesize(char *filename);
extern void xsane_ensure_counter_in_filename(char **filename, int counter_len);

View file

@ -78,10 +78,6 @@ Patch14: xsane-0.999-snprintf-update.patch
Patch15: xsane-0.999-signal-handling.patch
# https://gitlab.com/sane-project/frontend/xsane/-/commit/96424e369f67
Patch16: 0001-Follow-new-convention-for-registering-gimp-plugin.patch
# https://gitlab.com/sane-project/frontend/xsane/-/commit/bf9ef48ab57
Patch17: 0001-replace-gtk_timeout-with-g_timeout.patch
# https://gitlab.com/sane-project/frontend/xsane/-/merge_requests/32
Patch18: xsane-gcc15-c23.patch
# autoconf-generated files
Patch100: xsane-0.999-7-autoconf.patch.bz2
@ -172,8 +168,6 @@ done
%patch -P 14 -p1 -b .snprintf-update
%patch -P 15 -p1 -b .signal-handling
%patch -P 16 -p1 -b .use-register
%patch -P 17 -p1 -b .replace-gtk-timeout
%patch -P 18 -p1 -b .gcc15-c23
%patch -P 100 -p1 -b .autoconf
%patch -P 101 -p1 -b .c99