don't show EULA, mention bugzilla in about dialog (#504344)
This commit is contained in:
parent
d24cf6b18a
commit
0b9249cb32
@ -1,421 +0,0 @@
|
||||
diff -up xsane-0.995/src/xsane-front-gtk.c.eula-license-size xsane-0.995/src/xsane-front-gtk.c
|
||||
--- xsane-0.995/src/xsane-front-gtk.c.eula-license-size 2007-05-17 15:35:06.000000000 +0200
|
||||
+++ xsane-0.995/src/xsane-front-gtk.c 2007-11-29 16:57:15.000000000 +0100
|
||||
@@ -1881,6 +1881,73 @@ void xsane_change_working_directory(void
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
+static GtkWidget *xsane_eula_license_textbox (gchar *text)
|
||||
+{
|
||||
+ GtkWidget *hbox = gtk_hbox_new(FALSE, 2);
|
||||
+
|
||||
+#ifdef HAVE_GTK_TEXT_VIEW_H
|
||||
+ GtkWidget *scrolled_window, *text_view;
|
||||
+ GtkTextBuffer *text_buffer;
|
||||
+
|
||||
+ /* create a scrolled window to get a vertical scrollbar */
|
||||
+ scrolled_window = gtk_scrolled_window_new(NULL, NULL);
|
||||
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
|
||||
+ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
+ gtk_container_add(GTK_CONTAINER(hbox), scrolled_window);
|
||||
+ gtk_widget_show(scrolled_window);
|
||||
+
|
||||
+ /* create the gtk_text_view widget */
|
||||
+ text_view = gtk_text_view_new();
|
||||
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE);
|
||||
+ gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view), GTK_WRAP_WORD);
|
||||
+ gtk_container_add(GTK_CONTAINER(scrolled_window), text_view);
|
||||
+ gtk_widget_show(text_view);
|
||||
+
|
||||
+ /* get the text_buffer widget and insert the text from file */
|
||||
+ text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view));
|
||||
+
|
||||
+ gtk_text_buffer_insert_at_cursor(text_buffer, text, strlen (text));
|
||||
+
|
||||
+#else /* we do not have gtk_text_view, so we use gtk_text */
|
||||
+ GtkWidget *text, *vscrollbar;
|
||||
+
|
||||
+ /* Create the gtk_text widget */
|
||||
+ text = gtk_text_new(NULL, NULL);
|
||||
+ gtk_text_set_editable(GTK_TEXT(text), FALSE); /* text is not editable */
|
||||
+ gtk_text_set_word_wrap(GTK_TEXT(text), TRUE); /* wrap complete words */
|
||||
+ gtk_box_pack_start(GTK_BOX(hbox), text, TRUE, TRUE, 0);
|
||||
+ gtk_widget_show(text);
|
||||
+
|
||||
+ /* Add a vertical scrollbar to the GtkText widget */
|
||||
+ vscrollbar = gtk_vscrollbar_new(GTK_TEXT(text)->vadj);
|
||||
+ gtk_box_pack_start(GTK_BOX(hbox), vscrollbar, FALSE, FALSE, 0);
|
||||
+ gtk_widget_show(vscrollbar);
|
||||
+
|
||||
+ /* Freeze the text widget, ready for multiple updates */
|
||||
+ gtk_text_freeze(GTK_TEXT(text));
|
||||
+
|
||||
+ gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, text, strlen (text));
|
||||
+
|
||||
+ /* Thaw the text widget, allowing the updates to become visible */
|
||||
+ gtk_text_thaw(GTK_TEXT(text));
|
||||
+#endif
|
||||
+
|
||||
+ return hbox;
|
||||
+}
|
||||
+
|
||||
+/* ---------------------------------------------------------------------------------------------------------------------- */
|
||||
+
|
||||
+static void center_pane_callback (GtkWidget *pane, gpointer data)
|
||||
+{
|
||||
+ gint max_pos;
|
||||
+
|
||||
+ /* Center pane handle */
|
||||
+ g_object_get (G_OBJECT (pane), "max-position", &max_pos, NULL);
|
||||
+ gtk_paned_set_position (GTK_PANED (pane), (gint)(max_pos / 2));
|
||||
+};
|
||||
+
|
||||
+/* ---------------------------------------------------------------------------------------------------------------------- */
|
||||
+
|
||||
static int eula_accept_flag;
|
||||
static GtkWidget *eula_dialog = NULL;
|
||||
|
||||
@@ -1911,11 +1978,13 @@ static void xsane_eula_button_callback(G
|
||||
int xsane_display_eula(int ask_for_accept)
|
||||
/* returns FALSE if accepted, TRUE if not accepted */
|
||||
{
|
||||
- GtkWidget *vbox, *hbox, *button, *label, *frame;
|
||||
+ GtkWidget *vbox, *hbox, *button, *frame, *pane;
|
||||
GtkAccelGroup *accelerator_group;
|
||||
char buf[1024];
|
||||
char filename[PATH_MAX];
|
||||
FILE *infile;
|
||||
+ gint width, height;
|
||||
+ GString *text;
|
||||
|
||||
DBG(DBG_proc, "xsane_display_eula(%d)\n", ask_for_accept);
|
||||
|
||||
@@ -1925,7 +1994,8 @@ int xsane_display_eula(int ask_for_accep
|
||||
}
|
||||
|
||||
eula_dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
- gtk_widget_set_size_request(eula_dialog, 550, 580);
|
||||
+ gdk_window_get_geometry (gdk_get_default_root_window (), NULL, NULL, &width, &height, NULL);
|
||||
+ gtk_widget_set_size_request(eula_dialog, MIN (550, (int)(0.9 * width)), MIN (580, (int)(0.9 * height)));
|
||||
gtk_window_set_position(GTK_WINDOW(eula_dialog), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_resizable(GTK_WINDOW(eula_dialog), TRUE);
|
||||
g_signal_connect(GTK_OBJECT(eula_dialog), "delete_event", GTK_SIGNAL_FUNC(xsane_eula_delete_event), (void *) -1); /* -1 = cancel */
|
||||
@@ -1955,6 +2025,11 @@ int xsane_display_eula(int ask_for_accep
|
||||
xsane_set_window_icon(eula_dialog, 0);
|
||||
#endif
|
||||
|
||||
+ pane = gtk_vpaned_new ();
|
||||
+ g_signal_connect_after (G_OBJECT (pane), "realize", (GCallback)center_pane_callback, NULL);
|
||||
+ gtk_box_pack_start(GTK_BOX(vbox), pane, TRUE, TRUE, 0);
|
||||
+ gtk_widget_show (pane);
|
||||
+
|
||||
/* display XSane copyright message */
|
||||
snprintf(buf, sizeof(buf), "XSane %s %s\n"
|
||||
"%s %s\n"
|
||||
@@ -1968,109 +2043,42 @@ int xsane_display_eula(int ask_for_accep
|
||||
TEXT_HOMEPAGE, XSANE_HOMEPAGE,
|
||||
TEXT_EMAIL_ADR, XSANE_EMAIL_ADR);
|
||||
|
||||
- label = gtk_label_new(buf);
|
||||
- gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
|
||||
- gtk_widget_show(label);
|
||||
-
|
||||
- /* add hbox with text and scrollbar to display the eula text */
|
||||
- hbox = gtk_hbox_new(FALSE, 2);
|
||||
+ hbox = xsane_eula_license_textbox (buf);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
|
||||
- gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
|
||||
+ gtk_paned_add1 (GTK_PANED (pane), hbox);
|
||||
gtk_widget_show(hbox);
|
||||
|
||||
-#ifdef HAVE_GTK_TEXT_VIEW_H
|
||||
- {
|
||||
- GtkWidget *scrolled_window, *text_view;
|
||||
- GtkTextBuffer *text_buffer;
|
||||
-
|
||||
- /* create a scrolled window to get a vertical scrollbar */
|
||||
- scrolled_window = gtk_scrolled_window_new(NULL, NULL);
|
||||
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
|
||||
- GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
- gtk_container_add(GTK_CONTAINER(hbox), scrolled_window);
|
||||
- gtk_widget_show(scrolled_window);
|
||||
-
|
||||
- /* create the gtk_text_view widget */
|
||||
- text_view = gtk_text_view_new();
|
||||
- gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE);
|
||||
- gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view), GTK_WRAP_WORD);
|
||||
- gtk_container_add(GTK_CONTAINER(scrolled_window), text_view);
|
||||
- gtk_widget_show(text_view);
|
||||
-
|
||||
- /* get the text_buffer widget and insert the text from file */
|
||||
- text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view));
|
||||
-
|
||||
- xsane_back_gtk_make_path(sizeof(filename), filename, "xsane", 0, "xsane-eula", 0, ".txt", XSANE_PATH_SYSTEM);
|
||||
- infile = fopen(filename, "r");
|
||||
-
|
||||
- if (infile)
|
||||
- {
|
||||
- char buffer[4096];
|
||||
- int nchars;
|
||||
-
|
||||
- while (!feof(infile))
|
||||
- {
|
||||
- nchars = fread(buffer, 1, 4096, infile);
|
||||
- gtk_text_buffer_insert_at_cursor(text_buffer, buffer, nchars);
|
||||
- }
|
||||
+ /* Load the EULA text */
|
||||
+ xsane_back_gtk_make_path(sizeof(filename), filename, "xsane", 0, "xsane-eula", 0, ".txt", XSANE_PATH_SYSTEM);
|
||||
+ infile = fopen(filename, "r");
|
||||
|
||||
- fclose(infile);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- DBG(DBG_error0, "ERROR: eula text not found. Looks like xsane is not installed correct.\n");
|
||||
- return TRUE;
|
||||
- }
|
||||
-
|
||||
- }
|
||||
-#else /* we do not have gtk_text_view, so we use gtk_text */
|
||||
+ text = g_string_new (NULL);
|
||||
+ if (infile)
|
||||
{
|
||||
- GtkWidget *text, *vscrollbar;
|
||||
-
|
||||
- /* Create the gtk_text widget */
|
||||
- text = gtk_text_new(NULL, NULL);
|
||||
- gtk_text_set_editable(GTK_TEXT(text), FALSE); /* text is not editable */
|
||||
- gtk_text_set_word_wrap(GTK_TEXT(text), TRUE); /* wrap complete words */
|
||||
- gtk_box_pack_start(GTK_BOX(hbox), text, TRUE, TRUE, 0);
|
||||
- gtk_widget_show(text);
|
||||
+ char buffer[4096];
|
||||
+ int nchars;
|
||||
|
||||
- /* Add a vertical scrollbar to the GtkText widget */
|
||||
- vscrollbar = gtk_vscrollbar_new(GTK_TEXT(text)->vadj);
|
||||
- gtk_box_pack_start(GTK_BOX(hbox), vscrollbar, FALSE, FALSE, 0);
|
||||
- gtk_widget_show(vscrollbar);
|
||||
-
|
||||
- /* Freeze the text widget, ready for multiple updates */
|
||||
- gtk_text_freeze(GTK_TEXT(text));
|
||||
-
|
||||
- /* Load the file text.c into the text window */
|
||||
- xsane_back_gtk_make_path(sizeof(filename), filename, "xsane", 0, "xsane-eula", 0, ".txt", XSANE_PATH_SYSTEM);
|
||||
- infile = fopen(filename, "r");
|
||||
-
|
||||
- if (infile)
|
||||
+ while (!feof(infile))
|
||||
{
|
||||
- char buffer[4096];
|
||||
- int nchars;
|
||||
-
|
||||
- while (!feof(infile))
|
||||
- {
|
||||
- nchars = fread(buffer, 1, 4096, infile);
|
||||
- gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, buffer, nchars);
|
||||
- }
|
||||
-
|
||||
- fclose(infile);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- DBG(DBG_error0, "ERROR: eula text not found. Looks like xsane is not installed correct.\n");
|
||||
- return TRUE;
|
||||
+ nchars = fread(buffer, 1, 4096, infile);
|
||||
+ text = g_string_append_len (text, buffer, nchars);
|
||||
}
|
||||
|
||||
- /* Thaw the text widget, allowing the updates to become visible */
|
||||
- gtk_text_thaw(GTK_TEXT(text));
|
||||
+ fclose(infile);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ DBG(DBG_error0, "ERROR: eula text not found. Looks like xsane is not installed correct.\n");
|
||||
+ g_string_free (text, TRUE);
|
||||
+ return TRUE;
|
||||
}
|
||||
-#endif
|
||||
-
|
||||
|
||||
+ /* add hbox with text and scrollbar to display the eula text */
|
||||
+ hbox = xsane_eula_license_textbox (text->str);
|
||||
+ g_string_free (text, TRUE);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
|
||||
+ gtk_paned_add2 (GTK_PANED (pane), hbox);
|
||||
+ gtk_widget_show(hbox);
|
||||
|
||||
hbox = gtk_hbox_new(FALSE, 2);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
|
||||
@@ -2157,11 +2165,13 @@ static gboolean xsane_license_dialog_del
|
||||
|
||||
void xsane_display_gpl(void)
|
||||
{
|
||||
- GtkWidget *vbox, *hbox, *button, *label, *frame;
|
||||
+ GtkWidget *vbox, *hbox, *button, *frame, *pane;
|
||||
GtkAccelGroup *accelerator_group;
|
||||
char buf[1024];
|
||||
char filename[PATH_MAX];
|
||||
FILE *infile;
|
||||
+ gint width, height;
|
||||
+ GString *text;
|
||||
|
||||
if (license_dialog) /* make sure the dialog is only opend once */
|
||||
{
|
||||
@@ -2169,7 +2179,8 @@ void xsane_display_gpl(void)
|
||||
}
|
||||
|
||||
license_dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
- gtk_widget_set_size_request(license_dialog, 550, 580);
|
||||
+ gdk_window_get_geometry (gdk_get_default_root_window (), NULL, NULL, &width, &height, NULL);
|
||||
+ gtk_widget_set_size_request(license_dialog, MIN (550, (int)(0.9 * width)), MIN (580, (int)(0.9 * height)));
|
||||
gtk_window_set_position(GTK_WINDOW(license_dialog), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_resizable(GTK_WINDOW(license_dialog), TRUE);
|
||||
g_signal_connect(GTK_OBJECT(license_dialog), "delete_event", GTK_SIGNAL_FUNC(xsane_license_dialog_delete_event), NULL);
|
||||
@@ -2199,6 +2210,11 @@ void xsane_display_gpl(void)
|
||||
xsane_set_window_icon(license_dialog, 0);
|
||||
#endif
|
||||
|
||||
+ pane = gtk_vpaned_new ();
|
||||
+ g_signal_connect_after (G_OBJECT (pane), "realize", (GCallback)center_pane_callback, NULL);
|
||||
+ gtk_box_pack_start(GTK_BOX(vbox), pane, TRUE, TRUE, 0);
|
||||
+ gtk_widget_show (pane);
|
||||
+
|
||||
/* display XSane copyright message */
|
||||
snprintf(buf, sizeof(buf), "XSane %s %s\n"
|
||||
"%s %s\n"
|
||||
@@ -2212,109 +2228,42 @@ void xsane_display_gpl(void)
|
||||
TEXT_HOMEPAGE, XSANE_HOMEPAGE,
|
||||
TEXT_EMAIL_ADR, XSANE_EMAIL_ADR);
|
||||
|
||||
- label = gtk_label_new(buf);
|
||||
- gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
|
||||
- gtk_widget_show(label);
|
||||
-
|
||||
- /* add hbox with text and scrollbar to display the license text */
|
||||
- hbox = gtk_hbox_new(FALSE, 2);
|
||||
+ hbox = xsane_eula_license_textbox (buf);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
|
||||
- gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
|
||||
+ gtk_paned_add1 (GTK_PANED (pane), hbox);
|
||||
gtk_widget_show(hbox);
|
||||
|
||||
-#ifdef HAVE_GTK_TEXT_VIEW_H
|
||||
- {
|
||||
- GtkWidget *scrolled_window, *text_view;
|
||||
- GtkTextBuffer *text_buffer;
|
||||
+ /* Load the license text */
|
||||
+ xsane_back_gtk_make_path(sizeof(filename), filename, "xsane", 0, "xsane-gpl", 0, ".txt", XSANE_PATH_SYSTEM);
|
||||
+ infile = fopen(filename, "r");
|
||||
|
||||
- /* create a scrolled window to get a vertical scrollbar */
|
||||
- scrolled_window = gtk_scrolled_window_new(NULL, NULL);
|
||||
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
|
||||
- GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
- gtk_container_add(GTK_CONTAINER(hbox), scrolled_window);
|
||||
- gtk_widget_show(scrolled_window);
|
||||
-
|
||||
- /* create the gtk_text_view widget */
|
||||
- text_view = gtk_text_view_new();
|
||||
- gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE);
|
||||
- gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view), GTK_WRAP_WORD);
|
||||
- gtk_container_add(GTK_CONTAINER(scrolled_window), text_view);
|
||||
- gtk_widget_show(text_view);
|
||||
-
|
||||
- /* get the text_buffer widget and insert the text from file */
|
||||
- text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view));
|
||||
-
|
||||
- xsane_back_gtk_make_path(sizeof(filename), filename, "xsane", 0, "xsane-gpl", 0, ".txt", XSANE_PATH_SYSTEM);
|
||||
- infile = fopen(filename, "r");
|
||||
-
|
||||
- if (infile)
|
||||
- {
|
||||
- char buffer[4096];
|
||||
- int nchars;
|
||||
-
|
||||
- while (!feof(infile))
|
||||
- {
|
||||
- nchars = fread(buffer, 1, 4096, infile);
|
||||
- gtk_text_buffer_insert_at_cursor(text_buffer, buffer, nchars);
|
||||
- }
|
||||
-
|
||||
- fclose(infile);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- DBG(DBG_error0, "ERROR: license text not found. Looks like xsane is not installed correct.\n");
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- }
|
||||
-#else /* we do not have gtk_text_view, so we use gtk_text */
|
||||
+ text = g_string_new (NULL);
|
||||
+ if (infile)
|
||||
{
|
||||
- GtkWidget *text, *vscrollbar;
|
||||
-
|
||||
- /* Create the gtk_text widget */
|
||||
- text = gtk_text_new(NULL, NULL);
|
||||
- gtk_text_set_editable(GTK_TEXT(text), FALSE); /* text is not editable */
|
||||
- gtk_text_set_word_wrap(GTK_TEXT(text), TRUE); /* wrap complete words */
|
||||
- gtk_box_pack_start(GTK_BOX(hbox), text, TRUE, TRUE, 0);
|
||||
- gtk_widget_show(text);
|
||||
-
|
||||
- /* Add a vertical scrollbar to the GtkText widget */
|
||||
- vscrollbar = gtk_vscrollbar_new(GTK_TEXT(text)->vadj);
|
||||
- gtk_box_pack_start(GTK_BOX(hbox), vscrollbar, FALSE, FALSE, 0);
|
||||
- gtk_widget_show(vscrollbar);
|
||||
-
|
||||
- /* Freeze the text widget, ready for multiple updates */
|
||||
- gtk_text_freeze(GTK_TEXT(text));
|
||||
-
|
||||
- /* Load the file text.c into the text window */
|
||||
- xsane_back_gtk_make_path(sizeof(filename), filename, "xsane", 0, "xsane-gpl", 0, ".txt", XSANE_PATH_SYSTEM);
|
||||
- infile = fopen(filename, "r");
|
||||
+ char buffer[4096];
|
||||
+ int nchars;
|
||||
|
||||
- if (infile)
|
||||
+ while (!feof(infile))
|
||||
{
|
||||
- char buffer[4096];
|
||||
- int nchars;
|
||||
-
|
||||
- while (!feof(infile))
|
||||
- {
|
||||
- nchars = fread(buffer, 1, 4096, infile);
|
||||
- gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, buffer, nchars);
|
||||
- }
|
||||
-
|
||||
- fclose(infile);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- DBG(DBG_error0, "ERROR: license text not found. Looks like xsane is not installed correct.\n");
|
||||
- return;
|
||||
+ nchars = fread(buffer, 1, 4096, infile);
|
||||
+ text = g_string_append_len (text, buffer, nchars);
|
||||
}
|
||||
|
||||
- /* Thaw the text widget, allowing the updates to become visible */
|
||||
- gtk_text_thaw(GTK_TEXT(text));
|
||||
+ fclose(infile);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ DBG(DBG_error0, "ERROR: license text not found. Looks like xsane is not installed correct.\n");
|
||||
+ g_string_free (text, TRUE);
|
||||
+ return;
|
||||
}
|
||||
-#endif
|
||||
-
|
||||
|
||||
+ /* add hbox with text and scrollbar to display the license text */
|
||||
+ hbox = xsane_eula_license_textbox (text->str);
|
||||
+ g_string_free (text, TRUE);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
|
||||
+ gtk_paned_add2 (GTK_PANED (pane), hbox);
|
||||
+ gtk_widget_show(hbox);
|
||||
|
||||
hbox = gtk_hbox_new(FALSE, 2);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(hbox), 4);
|
70
xsane-0.996-no-eula.patch
Normal file
70
xsane-0.996-no-eula.patch
Normal file
@ -0,0 +1,70 @@
|
||||
diff -up xsane-0.996/src/xsane.c.no-eula xsane-0.996/src/xsane.c
|
||||
--- xsane-0.996/src/xsane.c.no-eula 2009-07-21 15:33:00.927455229 +0200
|
||||
+++ xsane-0.996/src/xsane.c 2009-07-21 15:39:28.661456472 +0200
|
||||
@@ -3524,10 +3524,13 @@ static void xsane_about_dialog(GtkWidget
|
||||
snprintf(buf, sizeof(buf), "XSane %s %s\n"
|
||||
"%s %s\n"
|
||||
"\n"
|
||||
+ "%s\n%s"
|
||||
+ "\n\n"
|
||||
"%s %s\n"
|
||||
"%s %s\n",
|
||||
TEXT_VERSION, XSANE_VERSION,
|
||||
XSANE_COPYRIGHT_SIGN, XSANE_COPYRIGHT_TXT,
|
||||
+ TEXT_MODIFIED_BLURB, XSANE_BUGTRACKER_URL,
|
||||
TEXT_HOMEPAGE, XSANE_HOMEPAGE,
|
||||
TEXT_EMAIL_ADR, XSANE_EMAIL_ADR);
|
||||
|
||||
@@ -5714,6 +5717,7 @@ static int xsane_init(int argc, char **a
|
||||
|
||||
case 'v': /* --version */
|
||||
g_print("%s-%s %s %s\n", xsane.prog_name, XSANE_VERSION, XSANE_COPYRIGHT_SIGN, XSANE_COPYRIGHT_TXT);
|
||||
+ g_print("\n%s\n%s\n\n", TEXT_MODIFIED_BLURB, XSANE_BUGTRACKER_URL);
|
||||
g_print(" %s %s\n", TEXT_EMAIL_ADR, XSANE_EMAIL_ADR);
|
||||
g_print(" %s %s\n", TEXT_PACKAGE, XSANE_PACKAGE_VERSION);
|
||||
g_print(" %s%d.%d.%d\n", TEXT_GTK_VERSION, GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||
@@ -5840,17 +5844,9 @@ static int xsane_init(int argc, char **a
|
||||
}
|
||||
|
||||
|
||||
- if (xsane_pref_restore()) /* restore preferences, returns TRUE if license is not accpted yet */
|
||||
+ if (xsane_pref_restore()) /* restore preferences, returns TRUE if the version is different from the last run */
|
||||
{
|
||||
- if (xsane_display_eula(1)) /* show license and ask for accept/not accept */
|
||||
- {
|
||||
- DBG(DBG_info, "user did not accept eula, we abort\n");
|
||||
- return 1; /* User did not accept eula */
|
||||
- }
|
||||
- else /* User did accept eula */
|
||||
- {
|
||||
- xsane_pref_save();
|
||||
- }
|
||||
+ xsane_pref_save();
|
||||
}
|
||||
|
||||
xsane_pref_restore_media();
|
||||
diff -up xsane-0.996/src/xsane.h.no-eula xsane-0.996/src/xsane.h
|
||||
--- xsane-0.996/src/xsane.h.no-eula 2009-07-21 15:33:00.921470546 +0200
|
||||
+++ xsane-0.996/src/xsane.h 2009-07-21 16:08:01.398707123 +0200
|
||||
@@ -98,6 +98,9 @@
|
||||
#define XSANE_EMAIL_ADR "Oliver.Rauch@xsane.org"
|
||||
#define XSANE_HOMEPAGE "http://www.xsane.org"
|
||||
#define XSANE_COPYRIGHT_TXT XSANE_DATE " " XSANE_COPYRIGHT
|
||||
+#ifndef XSANE_BUGTRACKER_URL
|
||||
+#define XSANE_BUGTRACKER_URL "(no bug tracker configured)"
|
||||
+#endif
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
diff -up xsane-0.996/src/xsane-text.h.no-eula xsane-0.996/src/xsane-text.h
|
||||
--- xsane-0.996/src/xsane-text.h.no-eula 2007-08-13 09:16:43.000000000 +0200
|
||||
+++ xsane-0.996/src/xsane-text.h 2009-07-21 15:42:00.609707360 +0200
|
||||
@@ -230,6 +230,8 @@
|
||||
"This program is distributed in the hope that it will be useful, but\n" \
|
||||
"WITHOUT ANY WARRANTY; without even the implied warranty of\n" \
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n")
|
||||
+#define TEXT_MODIFIED_BLURB _("This package is modified from the original version.\n" \
|
||||
+ "Please contact your vendor or report problems at")
|
||||
#define TEXT_EMAIL_ADR _("E-mail:")
|
||||
#define TEXT_HOMEPAGE _("Homepage:")
|
||||
#define TEXT_FILE _("File:")
|
23
xsane.spec
23
xsane.spec
@ -1,16 +1,18 @@
|
||||
%define desktop_vendor fedora
|
||||
# if you rebuild, please change bugtracker_url accordingly:
|
||||
%global bugtracker_url http://bugzilla.redhat.com
|
||||
%global desktop_vendor fedora
|
||||
|
||||
Name: xsane
|
||||
Summary: X Window System front-end for the SANE scanner interface
|
||||
Version: 0.996
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz
|
||||
Source1: xsane.desktop
|
||||
Source2: xsane.conf.in
|
||||
Patch0: xsane-0.995-xdg-open.patch
|
||||
Patch1: xsane-0.995-eula-license-size.patch
|
||||
Patch2: xsane-0.995-close-fds.patch
|
||||
Patch3: xsane-0.996-sane-backends-1.0.20.patch
|
||||
Patch1: xsane-0.995-close-fds.patch
|
||||
Patch2: xsane-0.996-sane-backends-1.0.20.patch
|
||||
Patch3: xsane-0.996-no-eula.patch
|
||||
License: GPLv2+
|
||||
URL: http://www.xsane.org/
|
||||
Group: Applications/Multimedia
|
||||
@ -53,11 +55,13 @@ for doc in xsane.{CHANGES,PROBLEMS,INSTALL}; do
|
||||
done
|
||||
|
||||
%patch0 -p1 -b .xdg-open
|
||||
%patch1 -p1 -b .eula-license-size
|
||||
%patch2 -p1 -b .close-fds
|
||||
%patch3 -p1 -b .sane-backends-1.0.20
|
||||
%patch1 -p1 -b .close-fds
|
||||
%patch2 -p1 -b .sane-backends-1.0.20
|
||||
%patch3 -p1 -b .no-eula
|
||||
|
||||
%build
|
||||
CC='gcc -DXSANE_BUGTRACKER_URL=\"%{bugtracker_url}\"'
|
||||
export CC
|
||||
%configure --enable-gimp
|
||||
make LDFLAGS=
|
||||
|
||||
@ -119,6 +123,9 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/gimp/plugins.d/xsane.conf
|
||||
|
||||
%changelog
|
||||
* Tue Jul 21 2009 Nils Philippsen <nils@redhat.com> 0.996-9
|
||||
- don't show EULA, mention bugzilla in about dialog (#504344)
|
||||
|
||||
* Mon Jul 20 2009 Nils Philippsen <nils@redhat.com> 0.996-8
|
||||
- don't use obsolete SANE_CAP_ALWAYS_SETTABLE macro (#507823)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user