From 1126dc8ebac23f3d324858739080426091ecf9bf Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Sat, 31 Mar 2007 15:45:12 +0000 Subject: [PATCH] 2007-03-31 [colin] 2.8.1cvs79 * src/prefs_account.c Create signature file if it doesn't exist before editing * src/prefs_toolbar.c Maemo: Move "Use default" on the left so that people can find it * src/common/defs.h Maemo: make default editor "Maemopad", default signature file "MyDocs/signature.txt" --- ChangeLog | 12 ++++++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/common/defs.h | 8 ++++++++ src/prefs_account.c | 2 ++ src/prefs_toolbar.c | 9 +++++++++ 6 files changed, 33 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4352dc178..592188e5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-03-31 [colin] 2.8.1cvs79 + + * src/prefs_account.c + Create signature file if it doesn't exist + before editing + * src/prefs_toolbar.c + Maemo: Move "Use default" on the left so + that people can find it + * src/common/defs.h + Maemo: make default editor "Maemopad", + default signature file "MyDocs/signature.txt" + 2007-03-31 [colin] 2.8.1cvs78 * src/prefs_account.c diff --git a/PATCHSETS b/PATCHSETS index 4ad350f65..b64701541 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2495,3 +2495,4 @@ ( cvs diff -u -r 1.100.2.48 -r 1.100.2.49 AUTHORS; ) > 2.8.1cvs76.patchset ( cvs diff -u -r 1.207.2.158 -r 1.207.2.159 src/folderview.c; cvs diff -u -r 1.204.2.128 -r 1.204.2.129 src/prefs_common.c; cvs diff -u -r 1.103.2.78 -r 1.103.2.79 src/prefs_common.h; ) > 2.8.1cvs77.patchset ( cvs diff -u -r 1.105.2.89 -r 1.105.2.90 src/prefs_account.c; ) > 2.8.1cvs78.patchset +( cvs diff -u -r 1.105.2.90 -r 1.105.2.91 src/prefs_account.c; cvs diff -u -r 1.30.2.32 -r 1.30.2.33 src/prefs_toolbar.c; cvs diff -u -r 1.9.2.34 -r 1.9.2.35 src/common/defs.h; ) > 2.8.1cvs79.patchset diff --git a/configure.ac b/configure.ac index 8f41112ae..97d5f49fc 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=78 +EXTRA_VERSION=79 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/common/defs.h b/src/common/defs.h index 68da84320..67071429d 100644 --- a/src/common/defs.h +++ b/src/common/defs.h @@ -102,7 +102,11 @@ #else # define ACTIONS_RC "actionsrc" # define COMMAND_HISTORY "command_history" +# ifndef MAEMO # define DEFAULT_SIGNATURE ".signature" +# else +# define DEFAULT_SIGNATURE "MyDocs/signature.txt" +# endif #endif #define DEFAULT_INC_PATH "/usr/bin/mh/inc" @@ -111,7 +115,11 @@ /* #define DEFAULT_INC_PROGRAM "imget" */ #define DEFAULT_SENDMAIL_CMD "/usr/sbin/sendmail -t -i" #define DEFAULT_BROWSER_CMD "firefox '%s'" +#ifndef MAEMO #define DEFAULT_EDITOR_CMD "gedit '%s'" +#else +#define DEFAULT_EDITOR_CMD "maemopad '%s'" +#endif #define DEFAULT_MIME_CMD "metamail -d -b -x -c %s '%s'" #define DEFAULT_IMAGE_VIEWER_CMD "display '%s'" #define DEFAULT_AUDIO_PLAYER_CMD "play '%s'" diff --git a/src/prefs_account.c b/src/prefs_account.c index 724815315..59e5d9f64 100644 --- a/src/prefs_account.c +++ b/src/prefs_account.c @@ -2752,6 +2752,8 @@ static void prefs_account_signature_browse_cb(GtkWidget *widget, gpointer data) static void prefs_account_signature_edit_cb(GtkWidget *widget, gpointer data) { const gchar *sigpath = gtk_entry_get_text(GTK_ENTRY(data)); + if (!is_file_exist(sigpath)) + str_write_to_file(sigpath, ""); open_txt_editor(sigpath, prefs_common.ext_editor_cmd); } diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c index abaa7645e..db5252283 100644 --- a/src/prefs_toolbar.c +++ b/src/prefs_toolbar.c @@ -665,6 +665,9 @@ static void prefs_toolbar_create(ToolbarPage *prefs_toolbar) GtkWidget *reg_hbox; GtkWidget *arrow; GtkWidget *btn_hbox; +#ifdef MAEMO + GtkWidget *hbox; +#endif GtkWidget *reg_btn; GtkWidget *subst_btn; GtkWidget *del_btn; @@ -798,7 +801,13 @@ static void prefs_toolbar_create(ToolbarPage *prefs_toolbar) prefs_toolbar); default_btn = gtk_button_new_with_label(_(" Use default ")); +#ifndef MAEMO gtk_box_pack_end(GTK_BOX(reg_hbox), default_btn, FALSE, TRUE, 0); +#else + hbox = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(main_vbox), hbox, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(hbox), default_btn, FALSE, FALSE, 0); +#endif g_signal_connect(G_OBJECT(default_btn), "clicked", G_CALLBACK(prefs_toolbar_default), prefs_toolbar); -- 2.25.1