aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.ja11
-rw-r--r--src/filesel.c20
-rw-r--r--src/mimeview.c5
-rw-r--r--src/textview.c7
5 files changed, 47 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 861c298f..4bdf5780 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-03-14
+
+ * src/filesel.c:
+ filesel_select_file_full(): remember directories for each operations.
+ filesel_create(): set default response.
+ * src/textview.c: textview_key_pressed()
+ src/mimeview.c: mimeview_key_pressed(): move focus to upper view
+ if Esc key is pressed.
+ * Thanks to Sergey Pinaev for the above.
+
2005-03-11
* src/compose.[ch]: use GtkTextTag for signature replacement to
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 3fb88d41..cd8316c7 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,14 @@
+2005-03-14
+
+ * src/filesel.c:
+ filesel_select_file_full(): それぞれの操作に対してディレクトリを
+ 記憶。
+ filesel_create(): デフォルトの応答を指定。
+ * src/textview.c: textview_key_pressed()
+ src/mimeview.c: mimeview_key_pressed(): Esc キーが押されたら上位の
+ ビューにフォーカスを移動。
+ * 上記に関して Sergey Pinaev さん thanks。
+
2005-03-11
* src/compose.[ch]: 署名の置換に GtkTextTag を使用して安定化した。
diff --git a/src/filesel.c b/src/filesel.c
index 67db7881..be1b1cb6 100644
--- a/src/filesel.c
+++ b/src/filesel.c
@@ -64,16 +64,22 @@ static GSList *filesel_select_file_full(const gchar *title, const gchar *file,
GtkFileChooserAction action,
gboolean multiple)
{
- static gchar *cwd = NULL;
+ static GHashTable *path_table = NULL;
+ gchar *cwd;
GtkWidget *dialog;
gchar *prev_dir;
GSList *list = NULL;
- if (!cwd)
- cwd = g_strdup(startup_dir);
+ if (!path_table)
+ path_table = g_hash_table_new_full(g_str_hash, g_str_equal,
+ g_free, g_free);
prev_dir = g_get_current_dir();
- change_dir(cwd);
+
+ if ((cwd = g_hash_table_lookup(path_table, title)) != NULL)
+ change_dir(cwd);
+ else
+ change_dir(startup_dir);
dialog = filesel_create(title, action);
@@ -94,9 +100,11 @@ static GSList *filesel_select_file_full(const gchar *title, const gchar *file,
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
list = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog));
if (list) {
- g_free(cwd);
cwd = gtk_file_chooser_get_current_folder
(GTK_FILE_CHOOSER(dialog));
+ if (cwd)
+ g_hash_table_replace
+ (path_table, g_strdup(title), cwd);
}
}
@@ -143,6 +151,8 @@ static GtkWidget *filesel_create(const gchar *title,
gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
gtk_window_set_wmclass
(GTK_WINDOW(dialog), "file_selection", "Sylpheed");
+ gtk_dialog_set_default_response
+ (GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
MANAGE_WINDOW_SIGNALS_CONNECT(dialog);
diff --git a/src/mimeview.c b/src/mimeview.c
index d6529f8e..00288090 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -837,8 +837,11 @@ static gint mimeview_key_pressed(GtkWidget *widget, GdkEventKey *event,
KEY_PRESS_EVENT_STOP();
mimeview_display_as_text(mimeview);
return TRUE;
- case GDK_Left:
case GDK_Escape:
+ if (summaryview)
+ gtk_widget_grab_focus(summaryview->ctree);
+ break;
+ case GDK_Left:
case GDK_Delete:
if (summaryview)
summary_pass_key_press_event(summaryview, event);
diff --git a/src/textview.c b/src/textview.c
index 5e575945..8ad0eff1 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1546,6 +1546,13 @@ static gboolean textview_key_pressed(GtkWidget *widget, GdkEventKey *event,
if (summaryview)
summary_pass_key_press_event(summaryview, event);
break;
+ case GDK_Escape:
+ if (summaryview && textview == messageview->textview)
+ gtk_widget_grab_focus(summaryview->ctree);
+ else if (messageview->type == MVIEW_MIME &&
+ textview == messageview->mimeview->textview)
+ gtk_widget_grab_focus(messageview->mimeview->ctree);
+ break;
case GDK_n:
case GDK_N:
case GDK_p: