2006-06-12 [colin] 2.3.0cvs4
authorColin Leroy <colin@colino.net>
Mon, 12 Jun 2006 16:06:14 +0000 (16:06 +0000)
committerColin Leroy <colin@colino.net>
Mon, 12 Jun 2006 16:06:14 +0000 (16:06 +0000)
* 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 <bernhard.walle@gmx.de>
* src/prefs_fonts.c
* manual/advanced.xml
* manual/fr/advanced.xml
Add a hidden pref to allow deletion without
confirmation

ChangeLog
PATCHSETS
configure.ac
manual/advanced.xml
manual/fr/advanced.xml
src/gedit-print.c
src/prefs_common.c
src/prefs_common.h
src/prefs_fonts.c
src/summaryview.c

index d0c342e..46c2ade 100644 (file)
--- 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 <bernhard.walle@gmx.de>
+       * 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
index 4e20618..73f85c9 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index 321be00..f63955e 100644 (file)
@@ -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=
 
index 4fa16a6..6bb705d 100644 (file)
            <varlistentry><term>hover_timeout</term>
                    <listitem><para>time in milliseconds that will cause a folder tree to expand during drag 'n' drop when the mouse cursor is held over it</para></listitem>
            </varlistentry>
+           <varlistentry><term>live_dangerously</term>
+                       <listitem><para>Don't ask for confirmation before definitive deletion of emails</para></listitem>
+           </varlistentry>
            <varlistentry><term>log_error_color</term><term>log_in_color</term><term>log_msg_color</term><term>log_out_color</term><term>log_warn_color</term>
                        <listitem><para>colours used in log window</para></listitem>
            </varlistentry>
index 74ab3ca..e7180ca 100644 (file)
            <varlistentry><term>hover_timeout</term>
                    <listitem><para>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.</para></listitem>
            </varlistentry>
+           <varlistentry><term>live_dangerously</term>
+                       <listitem><para>Ne pas demander confirmation avant suppression définitive de messages</para></listitem>
+           </varlistentry>
            <varlistentry><term>log_error_color</term><term>log_in_color</term><term>log_msg_color</term><term>log_out_color</term><term>log_warn_color</term>
                        <listitem><para>Couleurs utilisées dans la fenêtre de traces</para></listitem>
            </varlistentry>
index cef288e..445bca1 100644 (file)
@@ -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);
 
index 57f5298..42bd4fd 100644 (file)
@@ -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}
 };
index 1838da4..f4dfd26 100644 (file)
@@ -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;
index 4dc50b0..c02860f 100644 (file)
@@ -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();
 }
 
index 22af3bf..edbddd8 100644 (file)
@@ -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) {