mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
Added "look_save_on_exit" option (patch from Emanuele Giaquinta)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2006-07-16
|
||||
ChangeLog - 2006-07-18
|
||||
|
||||
Version 0.2.0 (under dev!):
|
||||
* added "look_save_on_exit" option (patch from Emanuele Giaquinta)
|
||||
* fixed crash on DCC buffer under Darwin 8 (bug #17115)
|
||||
* added configure option for doc XSL prefix (bug #16991)
|
||||
* fixed bug with spaces in script names (bug #16957)
|
||||
|
||||
+314
-303
File diff suppressed because it is too large
Load Diff
@@ -3458,7 +3458,6 @@ weechat_cmd_set (t_irc_server *server, t_irc_channel *channel,
|
||||
{
|
||||
if (config_option_set_value (ptr_option, value) == 0)
|
||||
{
|
||||
(void) (ptr_option->handler_change());
|
||||
gui_printf (NULL, "\n");
|
||||
gui_printf (NULL, "%s[%s%s%s]\n",
|
||||
GUI_COLOR(COLOR_WIN_CHAT_DARK),
|
||||
@@ -3466,6 +3465,7 @@ weechat_cmd_set (t_irc_server *server, t_irc_channel *channel,
|
||||
config_get_section (ptr_option),
|
||||
GUI_COLOR(COLOR_WIN_CHAT_DARK));
|
||||
weechat_cmd_set_display_option (ptr_option, NULL, NULL);
|
||||
(void) (ptr_option->handler_change());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3982,7 +3982,8 @@ weechat_cmd_upgrade (t_irc_server *server, t_irc_channel *channel,
|
||||
#ifdef PLUGINS
|
||||
plugin_end ();
|
||||
#endif
|
||||
(void) config_write (NULL);
|
||||
if (cfg_look_save_on_exit)
|
||||
(void) config_write (NULL);
|
||||
gui_main_end ();
|
||||
fifo_remove ();
|
||||
weechat_log_close ();
|
||||
|
||||
@@ -1102,7 +1102,8 @@ main (int argc, char *argv[])
|
||||
plugin_end (); /* end plugin interface(s) */
|
||||
#endif
|
||||
server_disconnect_all (); /* disconnect from all servers */
|
||||
(void) config_write (NULL); /* save config file */
|
||||
if (cfg_look_save_on_exit)
|
||||
(void) config_write (NULL); /* save config file */
|
||||
command_index_free (); /* free commands index */
|
||||
dcc_end (); /* remove all DCC */
|
||||
server_free_all (); /* free all servers */
|
||||
|
||||
+22
-1
@@ -64,6 +64,7 @@ t_config_section config_sections[CONFIG_NUMBER_SECTIONS] =
|
||||
|
||||
/* config, look & feel section */
|
||||
|
||||
int cfg_look_save_on_exit;
|
||||
int cfg_look_set_title;
|
||||
int cfg_look_startup_logo;
|
||||
int cfg_look_startup_version;
|
||||
@@ -111,7 +112,11 @@ char *cfg_look_read_marker;
|
||||
char *cfg_look_input_format;
|
||||
|
||||
t_config_option weechat_options_look[] =
|
||||
{ { "look_set_title", N_("set title for window (terminal for Curses GUI) with name and version"),
|
||||
{ { "look_save_on_exit", N_("save config file on exit"),
|
||||
N_("save config file on exit"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_save_on_exit, NULL, config_change_save_on_exit },
|
||||
{ "look_set_title", N_("set title for window (terminal for Curses GUI) with name and version"),
|
||||
N_("set title for window (terminal for Curses GUI) with name and version"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_set_title, NULL, config_change_title },
|
||||
@@ -1102,6 +1107,22 @@ config_change_noop ()
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
/*
|
||||
* config_change_save_on_exit: called when "save_on_exit" flag is changed
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_save_on_exit ()
|
||||
{
|
||||
if (!cfg_look_save_on_exit)
|
||||
{
|
||||
gui_printf (NULL, "\n");
|
||||
gui_printf (NULL, _("%s you should now issue /save to write "
|
||||
"\"save_on_exit\" option in config file.\n"),
|
||||
WEECHAT_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* config_change_title: called when title is changed
|
||||
*/
|
||||
|
||||
@@ -87,6 +87,7 @@ struct t_config_option
|
||||
void (*handler_change)();
|
||||
};
|
||||
|
||||
extern int cfg_look_save_on_exit;
|
||||
extern int cfg_look_set_title;
|
||||
extern int cfg_look_startup_logo;
|
||||
extern int cfg_look_startup_version;
|
||||
@@ -246,6 +247,7 @@ extern t_config_option * weechat_options [CONFIG_NUMBER_SECTIONS];
|
||||
|
||||
extern char *config_get_section ();
|
||||
extern void config_change_noop ();
|
||||
extern void config_change_save_on_exit ();
|
||||
extern void config_change_title ();
|
||||
extern void config_change_buffers ();
|
||||
extern void config_change_buffer_content ();
|
||||
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2006-07-16
|
||||
ChangeLog - 2006-07-18
|
||||
|
||||
Version 0.2.0 (under dev!):
|
||||
* added "look_save_on_exit" option (patch from Emanuele Giaquinta)
|
||||
* fixed crash on DCC buffer under Darwin 8 (bug #17115)
|
||||
* added configure option for doc XSL prefix (bug #16991)
|
||||
* fixed bug with spaces in script names (bug #16957)
|
||||
|
||||
+315
-303
File diff suppressed because it is too large
Load Diff
+315
-303
File diff suppressed because it is too large
Load Diff
+315
-303
File diff suppressed because it is too large
Load Diff
+317
-304
File diff suppressed because it is too large
Load Diff
+315
-303
File diff suppressed because it is too large
Load Diff
+315
-303
File diff suppressed because it is too large
Load Diff
+314
-303
File diff suppressed because it is too large
Load Diff
@@ -3458,7 +3458,6 @@ weechat_cmd_set (t_irc_server *server, t_irc_channel *channel,
|
||||
{
|
||||
if (config_option_set_value (ptr_option, value) == 0)
|
||||
{
|
||||
(void) (ptr_option->handler_change());
|
||||
gui_printf (NULL, "\n");
|
||||
gui_printf (NULL, "%s[%s%s%s]\n",
|
||||
GUI_COLOR(COLOR_WIN_CHAT_DARK),
|
||||
@@ -3466,6 +3465,7 @@ weechat_cmd_set (t_irc_server *server, t_irc_channel *channel,
|
||||
config_get_section (ptr_option),
|
||||
GUI_COLOR(COLOR_WIN_CHAT_DARK));
|
||||
weechat_cmd_set_display_option (ptr_option, NULL, NULL);
|
||||
(void) (ptr_option->handler_change());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3982,7 +3982,8 @@ weechat_cmd_upgrade (t_irc_server *server, t_irc_channel *channel,
|
||||
#ifdef PLUGINS
|
||||
plugin_end ();
|
||||
#endif
|
||||
(void) config_write (NULL);
|
||||
if (cfg_look_save_on_exit)
|
||||
(void) config_write (NULL);
|
||||
gui_main_end ();
|
||||
fifo_remove ();
|
||||
weechat_log_close ();
|
||||
|
||||
@@ -1102,7 +1102,8 @@ main (int argc, char *argv[])
|
||||
plugin_end (); /* end plugin interface(s) */
|
||||
#endif
|
||||
server_disconnect_all (); /* disconnect from all servers */
|
||||
(void) config_write (NULL); /* save config file */
|
||||
if (cfg_look_save_on_exit)
|
||||
(void) config_write (NULL); /* save config file */
|
||||
command_index_free (); /* free commands index */
|
||||
dcc_end (); /* remove all DCC */
|
||||
server_free_all (); /* free all servers */
|
||||
|
||||
@@ -64,6 +64,7 @@ t_config_section config_sections[CONFIG_NUMBER_SECTIONS] =
|
||||
|
||||
/* config, look & feel section */
|
||||
|
||||
int cfg_look_save_on_exit;
|
||||
int cfg_look_set_title;
|
||||
int cfg_look_startup_logo;
|
||||
int cfg_look_startup_version;
|
||||
@@ -111,7 +112,11 @@ char *cfg_look_read_marker;
|
||||
char *cfg_look_input_format;
|
||||
|
||||
t_config_option weechat_options_look[] =
|
||||
{ { "look_set_title", N_("set title for window (terminal for Curses GUI) with name and version"),
|
||||
{ { "look_save_on_exit", N_("save config file on exit"),
|
||||
N_("save config file on exit"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_save_on_exit, NULL, config_change_save_on_exit },
|
||||
{ "look_set_title", N_("set title for window (terminal for Curses GUI) with name and version"),
|
||||
N_("set title for window (terminal for Curses GUI) with name and version"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_set_title, NULL, config_change_title },
|
||||
@@ -1102,6 +1107,22 @@ config_change_noop ()
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
/*
|
||||
* config_change_save_on_exit: called when "save_on_exit" flag is changed
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_save_on_exit ()
|
||||
{
|
||||
if (!cfg_look_save_on_exit)
|
||||
{
|
||||
gui_printf (NULL, "\n");
|
||||
gui_printf (NULL, _("%s you should now issue /save to write "
|
||||
"\"save_on_exit\" option in config file.\n"),
|
||||
WEECHAT_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* config_change_title: called when title is changed
|
||||
*/
|
||||
|
||||
@@ -87,6 +87,7 @@ struct t_config_option
|
||||
void (*handler_change)();
|
||||
};
|
||||
|
||||
extern int cfg_look_save_on_exit;
|
||||
extern int cfg_look_set_title;
|
||||
extern int cfg_look_startup_logo;
|
||||
extern int cfg_look_startup_version;
|
||||
@@ -246,6 +247,7 @@ extern t_config_option * weechat_options [CONFIG_NUMBER_SECTIONS];
|
||||
|
||||
extern char *config_get_section ();
|
||||
extern void config_change_noop ();
|
||||
extern void config_change_save_on_exit ();
|
||||
extern void config_change_title ();
|
||||
extern void config_change_buffers ();
|
||||
extern void config_change_buffer_content ();
|
||||
|
||||
Reference in New Issue
Block a user