aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja6
-rw-r--r--src/inc.c3
-rw-r--r--src/main.c35
4 files changed, 38 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 8808371e..9855b68c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-29
+
+ * src/inc.c
+ src/main.c: disable --compose, --receive, --send remote commands
+ when a modal dialog exists.
+
2007-03-28
* src/textview.c: textview_show_message(): put error message when
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 76d6601c..0a261e20 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,9 @@
+2007-03-29
+
+ * src/inc.c
+ src/main.c: モーダルダイアログが存在する場合は --compose,
+ --receive, --send リモートコマンドを無効にした。
+
2007-03-28
* src/textview.c: textview_show_message(): 復号に失敗した場合、
diff --git a/src/inc.c b/src/inc.c
index 4d791a68..78e47675 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -204,6 +204,7 @@ void inc_mail(MainWindow *mainwin)
gint new_msgs = 0;
if (inc_lock_count) return;
+ if (inc_is_active()) return;
if (!main_window_toggle_online_if_offline(mainwin))
return;
@@ -378,6 +379,7 @@ gint inc_account_mail(MainWindow *mainwin, PrefsAccount *account)
gint new_msgs;
if (inc_lock_count) return 0;
+ if (inc_is_active()) return 0;
if (!main_window_toggle_online_if_offline(mainwin))
return 0;
@@ -402,6 +404,7 @@ void inc_all_account_mail(MainWindow *mainwin, gboolean autocheck)
gint new_msgs = 0;
if (inc_lock_count) return;
+ if (inc_is_active()) return;
if (!main_window_toggle_online_if_offline(mainwin))
return;
diff --git a/src/main.c b/src/main.c
index b3b8c552..04020cd0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1063,10 +1063,12 @@ static gboolean lock_socket_input_cb(GIOChannel *source, GIOCondition condition,
#endif
} else if (!strncmp(buf, "receive_all", 11)) {
main_window_popup(mainwin);
- inc_all_account_mail(mainwin, FALSE);
+ if (!gtkut_window_modal_exist())
+ inc_all_account_mail(mainwin, FALSE);
} else if (!strncmp(buf, "receive", 7)) {
main_window_popup(mainwin);
- inc_mail(mainwin);
+ if (!gtkut_window_modal_exist())
+ inc_mail(mainwin);
} else if (!strncmp(buf, "compose_attach", 14)) {
GPtrArray *files;
gchar *mailto;
@@ -1121,22 +1123,26 @@ static void remote_command_exec(void)
folderview_select(mainwin->folderview, item);
}
- if (cmd.receive_all)
- inc_all_account_mail(mainwin, FALSE);
- else if (prefs_common.chk_on_startup)
- inc_all_account_mail(mainwin, TRUE);
- else if (cmd.receive)
- inc_mail(mainwin);
+ if (!gtkut_window_modal_exist()) {
+ if (cmd.receive_all)
+ inc_all_account_mail(mainwin, FALSE);
+ else if (prefs_common.chk_on_startup)
+ inc_all_account_mail(mainwin, TRUE);
+ else if (cmd.receive)
+ inc_mail(mainwin);
+
+ if (cmd.compose)
+ open_compose_new(cmd.compose_mailto, cmd.attach_files);
+
+ if (cmd.send)
+ send_queue();
+ }
- if (cmd.compose)
- open_compose_new(cmd.compose_mailto, cmd.attach_files);
if (cmd.attach_files) {
ptr_array_free_strings(cmd.attach_files);
g_ptr_array_free(cmd.attach_files, TRUE);
cmd.attach_files = NULL;
}
- if (cmd.send)
- send_queue();
if (cmd.status_folders) {
g_ptr_array_free(cmd.status_folders, TRUE);
cmd.status_folders = NULL;
@@ -1236,6 +1242,9 @@ static void open_compose_new(const gchar *address, GPtrArray *attach_files)
GPtrArray *utf8files = NULL;
#endif
+ if (gtkut_window_modal_exist())
+ return;
+
if (address) {
utf8addr = g_locale_to_utf8(address, -1, NULL, NULL, NULL);
if (utf8addr)
@@ -1272,6 +1281,8 @@ static void send_queue(void)
{
GList *list;
+ if (gtkut_window_modal_exist())
+ return;
if (!main_window_toggle_online_if_offline(main_window_get()))
return;