diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-03-29 04:55:52 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-03-29 04:55:52 +0000 |
commit | 4c2aee3cf95ec99d367b9e003cf7ee0da42f1ccb (patch) | |
tree | cd54167ae32f112fb9d9a34ae173cc65ac3ec88d | |
parent | 308d6594df4088ed00e41a7c533377521da8928a (diff) |
disable --compose, --receive, --send remote commands when a modal dialog exists.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1584 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 6 | ||||
-rw-r--r-- | src/inc.c | 3 | ||||
-rw-r--r-- | src/main.c | 35 |
4 files changed, 38 insertions, 12 deletions
@@ -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(): 復号に失敗した場合、 @@ -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; @@ -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; |