From: Colin Leroy Date: Mon, 12 Jun 2006 16:06:14 +0000 (+0000) Subject: 2006-06-12 [colin] 2.3.0cvs4 X-Git-Tag: rel_2_4_0~126 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=c593215544f2db28bdd92529798e04f516484ed0 2006-06-12 [colin] 2.3.0cvs4 * src/summaryview.c * src/prefs_common.c * src/prefs_common.h * src/gedit-print.c Allow to define a specific print font - patch by Bernhard Walle * src/prefs_fonts.c * manual/advanced.xml * manual/fr/advanced.xml Add a hidden pref to allow deletion without confirmation --- diff --git a/ChangeLog b/ChangeLog index d0c342e9a..46c2ade78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2006-06-12 [colin] 2.3.0cvs4 + + * src/summaryview.c + * src/prefs_common.c + * src/prefs_common.h + * src/gedit-print.c + Allow to define a specific print font - patch + by Bernhard Walle + * src/prefs_fonts.c + * manual/advanced.xml + * manual/fr/advanced.xml + Add a hidden pref to allow deletion without + confirmation + 2006-06-12 [wwp] 2.3.0cvs3 * .cvsignore diff --git a/PATCHSETS b/PATCHSETS index 4e2061883..73f85c9b0 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1578,3 +1578,4 @@ ( cvs diff -u -r 1.1.2.19 -r 1.1.2.20 manual/advanced.xml; cvs diff -u -r 1.1.2.10 -r 1.1.2.11 manual/fr/advanced.xml; ) > 2.3.0cvs1.patchset ( cvs diff -u -r 1.8.2.6 -r 1.8.2.7 src/quote_fmt.c; cvs diff -u -r 1.8.2.2 -r 1.8.2.3 src/quote_fmt_lex.l; cvs diff -u -r 1.22.2.20 -r 1.22.2.21 src/quote_fmt_parse.y; ) > 2.3.0cvs2.patchset ( cvs diff -u -r 1.8.2.3 -r 1.8.2.4 .cvsignore; ) > 2.3.0cvs3.patchset +( cvs diff -u -r 1.395.2.218 -r 1.395.2.219 src/summaryview.c; cvs diff -u -r 1.204.2.87 -r 1.204.2.88 src/prefs_common.c; cvs diff -u -r 1.103.2.50 -r 1.103.2.51 src/prefs_common.h; cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/gedit-print.c; cvs diff -u -r 1.4.2.15 -r 1.4.2.16 src/prefs_fonts.c; cvs diff -u -r 1.1.2.20 -r 1.1.2.21 manual/advanced.xml; cvs diff -u -r 1.1.2.11 -r 1.1.2.12 manual/fr/advanced.xml; ) > 2.3.0cvs4.patchset diff --git a/configure.ac b/configure.ac index 321be0062..f63955e1c 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=3 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=3 +EXTRA_VERSION=4 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/manual/advanced.xml b/manual/advanced.xml index 4fa16a66f..6bb705d04 100644 --- a/manual/advanced.xml +++ b/manual/advanced.xml @@ -203,6 +203,9 @@ hover_timeout time in milliseconds that will cause a folder tree to expand during drag 'n' drop when the mouse cursor is held over it + live_dangerously + Don't ask for confirmation before definitive deletion of emails + log_error_colorlog_in_colorlog_msg_colorlog_out_colorlog_warn_color colours used in log window diff --git a/manual/fr/advanced.xml b/manual/fr/advanced.xml index 74ab3ca0b..e7180ca40 100644 --- a/manual/fr/advanced.xml +++ b/manual/fr/advanced.xml @@ -205,6 +205,9 @@ hover_timeout Temps en millisecondes pendant lequel la souris doit rester sur l'arbre des dossiers afin qu'ils se déplient durant un glisser-déposer. + live_dangerously + Ne pas demander confirmation avant suppression définitive de messages + log_error_colorlog_in_colorlog_msg_colorlog_out_colorlog_warn_color Couleurs utilisées dans la fenêtre de traces diff --git a/src/gedit-print.c b/src/gedit-print.c index cef288edb..445bca120 100644 --- a/src/gedit-print.c +++ b/src/gedit-print.c @@ -457,9 +457,20 @@ gedit_print_job_info_new (GtkTextView* view) gtk_source_print_job_set_print_footer (pjob, TRUE); pango_context = gtk_widget_get_pango_context (GTK_WIDGET (view)); - font_desc = pango_context_get_font_description (pango_context); + if (prefs_common.use_different_print_font) + { + font_desc = pango_font_description_from_string (prefs_common.printfont); + } + else + { + font_desc = pango_context_get_font_description (pango_context); + } gtk_source_print_job_set_font_desc (pjob, font_desc); + if (prefs_common.use_different_print_font) + { + pango_font_description_free (font_desc); + } pji = g_new0 (GeditPrintJobInfo, 1); diff --git a/src/prefs_common.c b/src/prefs_common.c index 57f52982a..42bd4fdf3 100644 --- a/src/prefs_common.c +++ b/src/prefs_common.c @@ -95,6 +95,8 @@ static PrefParam param_os_specific[] = { &prefs_common.widgetfont, P_STRING, NULL, NULL, NULL}, {"message_font_gtk2", "Monospace 9", &prefs_common.textfont, P_STRING, NULL, NULL, NULL}, + {"print_font_gtk2", "Monospace 9" + &prefs_common.printfont {"small_font_gtk2", "Sans 9", &prefs_common.smallfont, P_STRING, NULL, NULL, NULL}, {"normal_font_gtk2", "Sans 9", @@ -280,6 +282,8 @@ static PrefParam param[] = { &SPECIFIC_PREFS.widgetfont, P_STRING, NULL, NULL, NULL}, {"message_font_gtk2", "Monospace 9", &SPECIFIC_PREFS.textfont, P_STRING, NULL, NULL, NULL}, + {"print_font_gtk2", "Monospace 9", + &SPECIFIC_PREFS.printfont, P_STRING, NULL, NULL, NULL}, {"small_font_gtk2", "Sans 9", &SPECIFIC_PREFS.smallfont, P_STRING, NULL, NULL, NULL}, {"normal_font_gtk2", "Sans 9", @@ -563,6 +567,9 @@ static PrefParam param[] = { {"show_other_header", "FALSE", &prefs_common.show_other_header, P_BOOL, NULL, NULL, NULL}, + {"use_different_print_font", "FALSE", &prefs_common.use_different_print_font, P_BOOL, + NULL, NULL, NULL}, + {"attach_desc", "TRUE", &prefs_common.attach_desc, P_BOOL, NULL, NULL, NULL}, {"attach_save_directory", NULL, @@ -768,6 +775,8 @@ static PrefParam param[] = { NULL, NULL, NULL}, {"skip_ssl_cert_check", "FALSE", &prefs_common.skip_ssl_cert_check, P_BOOL, NULL, NULL, NULL}, + {"live_dangerously", "FALSE", &prefs_common.live_dangerously, P_BOOL, + NULL, NULL, NULL}, {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL} }; diff --git a/src/prefs_common.h b/src/prefs_common.h index 1838da456..f4dfd2695 100644 --- a/src/prefs_common.h +++ b/src/prefs_common.h @@ -149,6 +149,7 @@ struct _PrefsCommon /* new fonts */ gchar *widgetfont; gchar *textfont; + gchar *printfont; gchar *normalfont; gchar *smallfont; gchar *titlefont; @@ -264,6 +265,7 @@ struct _PrefsCommon gboolean scroll_halfpage; gboolean show_other_header; + gboolean use_different_print_font; GSList *disphdr_list; gboolean attach_desc; @@ -372,6 +374,7 @@ struct _PrefsCommon gint warn_dnd; gint broken_are_utf8; gint skip_ssl_cert_check; + gint live_dangerously; }; extern PrefsCommon prefs_common; diff --git a/src/prefs_fonts.c b/src/prefs_fonts.c index 4dc50b06a..c02860f1b 100644 --- a/src/prefs_fonts.c +++ b/src/prefs_fonts.c @@ -44,6 +44,10 @@ typedef struct _FontsPage GtkWidget *entry_folderviewfont; GtkWidget *entry_messageviewfont; +#ifdef USE_GNOMEPRINT + GtkWidget *print_checkbutton; + GtkWidget *entry_messageprintfont; +#endif } FontsPage; void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window, @@ -55,6 +59,10 @@ void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *entry_folderviewfont; GtkWidget *entry_messageviewfont; GtkWidget *tmplabel; +#ifdef USE_GNOMEPRINT + GtkWidget *entry_messageprintfont; + GtkWidget *print_checkbutton; +#endif GtkWidget *vbox; table = gtk_table_new(7, 2, FALSE); @@ -97,15 +105,51 @@ void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); +#ifdef USE_GNOMEPRINT + /* print check button */ + print_checkbutton = gtk_check_button_new_with_label(_("Use different font for printing")); + gtk_widget_show(print_checkbutton); + gtk_table_attach (GTK_TABLE (table), print_checkbutton, 0, 2, 4, 5, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(print_checkbutton), + prefs_common.use_different_print_font); + + /* print font label */ + tmplabel = gtk_label_new (_("Message Printing")); + gtk_widget_show (tmplabel); + gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, 6, 7, + (GtkAttachOptions) GTK_FILL, + (GtkAttachOptions) (0), 0, 0); + gtk_label_set_justify(GTK_LABEL(tmplabel), GTK_JUSTIFY_RIGHT); + gtk_misc_set_alignment(GTK_MISC(tmplabel), 1, 0.5); + SET_TOGGLE_SENSITIVITY (print_checkbutton, tmplabel); + + /* print font button */ + entry_messageprintfont = gtk_font_button_new_with_font (prefs_common.printfont); + g_object_set(G_OBJECT(entry_messageprintfont), + "use-font", TRUE, + NULL); + gtk_widget_show (entry_messageprintfont); + gtk_table_attach (GTK_TABLE (table), entry_messageprintfont, 1, 2, 6, 7, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + SET_TOGGLE_SENSITIVITY (print_checkbutton, entry_messageprintfont); +#endif + vbox = gtk_vbox_new(FALSE, VSPACING_NARROW); gtk_widget_show(vbox); gtk_table_attach (GTK_TABLE (table), vbox, 0, 4, 4, 5, (GtkAttachOptions) GTK_FILL, (GtkAttachOptions) (0), 0, 0); - prefs_fonts->window = GTK_WIDGET(window); - prefs_fonts->entry_folderviewfont = entry_folderviewfont; - prefs_fonts->entry_messageviewfont = entry_messageviewfont; + prefs_fonts->window = GTK_WIDGET(window); + prefs_fonts->entry_folderviewfont = entry_folderviewfont; + prefs_fonts->entry_messageviewfont = entry_messageviewfont; +#ifdef USE_GNOMEPRINT + prefs_fonts->entry_messageprintfont = entry_messageprintfont; + prefs_fonts->print_checkbutton = print_checkbutton; +#endif prefs_fonts->page.widget = table; } @@ -126,6 +170,14 @@ void prefs_fonts_save(PrefsPage *_page) prefs_common.textfont = g_strdup(gtk_font_button_get_font_name (GTK_FONT_BUTTON(fonts->entry_messageviewfont))); +#ifdef USE_GNOMEPRINT + g_free(prefs_common.printfont); + prefs_common.printfont = g_strdup(gtk_font_button_get_font_name + (GTK_FONT_BUTTON(fonts->entry_messageprintfont))); + prefs_common.use_different_print_font = gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON(fonts->print_checkbutton)); +#endif + main_window_reflect_prefs_all(); } diff --git a/src/summaryview.c b/src/summaryview.c index 22af3bf96..edbddd874 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -3479,10 +3479,12 @@ void summary_delete(SummaryView *summaryview) if (!summaryview->folder_item) return; - aval = alertpanel(_("Delete message(s)"), - _("Do you really want to delete selected message(s)?"), - GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL); - if (aval != G_ALERTALTERNATE) return; + if (!prefs_common.live_dangerously) { + aval = alertpanel(_("Delete message(s)"), + _("Do you really want to delete selected message(s)?"), + GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL); + if (aval != G_ALERTALTERNATE) return; + } for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next) {