diff options
author | Timo Sirainen <cras@irssi.org> | 2001-08-08 18:05:50 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-08-08 18:05:50 +0000 |
commit | c86333393c717a5bda07422f1b5a1b5fe2697da5 (patch) | |
tree | 8cc0f656946a2fcb3f60025f9060e659f79adf14 /src/fe-common/core | |
parent | 072a4c774f625a46e65f8ea95f0902aca55286a0 (diff) | |
download | irssi-c86333393c717a5bda07422f1b5a1b5fe2697da5.zip |
Changed signal / function names for /LAYOUT stuff. /LAYOUT RESET now resets
the split windows too.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1725 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core')
-rw-r--r-- | src/fe-common/core/windows-layout.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 1a06fdd3..dbd51d41 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -44,7 +44,7 @@ static void signal_query_created_curwin(QUERY_REC *query) window_item_add(restore_win, (WI_ITEM_REC *) query, FALSE); } -static void sig_window_restore_item(WINDOW_REC *window, const char *type, +static void sig_layout_restore_item(WINDOW_REC *window, const char *type, CONFIG_NODE *node) { char *name, *tag, *chat_type; @@ -86,7 +86,7 @@ static void window_add_items(WINDOW_REC *window, CONFIG_NODE *node) type = config_node_get_str(node, "type", NULL); if (type != NULL) { - signal_emit("window restore item", 3, + signal_emit("layout restore item", 3, window, type, node); } } @@ -94,10 +94,10 @@ static void window_add_items(WINDOW_REC *window, CONFIG_NODE *node) void windows_layout_restore(void) { - signal_emit("windows restored", 0); + signal_emit("layout restore", 0); } -static void sig_windows_restored(void) +static void sig_layout_restore(void) { WINDOW_REC *window; CONFIG_NODE *node; @@ -124,7 +124,7 @@ static void sig_windows_restored(void) window->theme = theme_load(window->theme_name); window_add_items(window, config_node_section(node, "items", -1)); - signal_emit("window restore", 2, window, node); + signal_emit("layout restore window", 2, window, node); } } @@ -183,7 +183,7 @@ static void window_save(WINDOW_REC *window, CONFIG_NODE *node) if (window->items != NULL) window_save_items(window, node); - signal_emit("window save", 2, window, node); + signal_emit("layout save window", 2, window, node); } void windows_layout_save(void) @@ -194,7 +194,7 @@ void windows_layout_save(void) node = iconfig_node_traverse("windows", TRUE); g_slist_foreach(windows, (GFunc) window_save, node); - signal_emit("windows saved", 0); + signal_emit("layout save", 0); printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_WINDOWS_LAYOUT_SAVED); @@ -203,18 +203,20 @@ void windows_layout_save(void) void windows_layout_reset(void) { iconfig_set_str(NULL, "windows", NULL); + signal_emit("layout reset", 0); + printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_WINDOWS_LAYOUT_RESET); } void windows_layout_init(void) { - signal_add("window restore item", (SIGNAL_FUNC) sig_window_restore_item); - signal_add("windows restored", (SIGNAL_FUNC) sig_windows_restored); + signal_add("layout restore item", (SIGNAL_FUNC) sig_layout_restore_item); + signal_add("layout restore", (SIGNAL_FUNC) sig_layout_restore); } void windows_layout_deinit(void) { - signal_remove("window restore item", (SIGNAL_FUNC) sig_window_restore_item); - signal_remove("windows restored", (SIGNAL_FUNC) sig_windows_restored); + signal_remove("layout restore item", (SIGNAL_FUNC) sig_layout_restore_item); + signal_remove("layout restore", (SIGNAL_FUNC) sig_layout_restore); } |