mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 02:03:13 +02:00
Splited GUI sources
This commit is contained in:
@@ -1381,8 +1381,8 @@ weechat_cmd_buffer (t_irc_server *server, t_irc_channel *channel,
|
||||
ptr_channel = CHANNEL(buffer);
|
||||
gui_buffer_free (ptr_channel->buffer, 1);
|
||||
channel_free (SERVER(buffer), ptr_channel);
|
||||
gui_draw_buffer_status (buffer, 1);
|
||||
gui_draw_buffer_input (buffer, 1);
|
||||
gui_status_draw (buffer, 1);
|
||||
gui_input_draw (buffer, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1414,7 +1414,7 @@ weechat_cmd_buffer (t_irc_server *server, t_irc_channel *channel,
|
||||
gui_buffer_free (buffer, 1);
|
||||
}
|
||||
}
|
||||
gui_draw_buffer_status (buffer, 1);
|
||||
gui_status_draw (buffer, 1);
|
||||
}
|
||||
else if (ascii_strcasecmp (argv[0], "notify") == 0)
|
||||
{
|
||||
@@ -1563,8 +1563,8 @@ weechat_cmd_buffer (t_irc_server *server, t_irc_channel *channel,
|
||||
}
|
||||
if (ptr_buffer)
|
||||
{
|
||||
gui_switch_to_buffer (window, ptr_buffer);
|
||||
gui_redraw_buffer (ptr_buffer);
|
||||
gui_window_switch_to_buffer (window, ptr_buffer);
|
||||
gui_window_redraw_buffer (ptr_buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2093,7 +2093,7 @@ weechat_cmd_disconnect (t_irc_server *server, t_irc_channel *channel,
|
||||
_("Auto-reconnection is cancelled\n"));
|
||||
}
|
||||
server_disconnect (ptr_server, 0);
|
||||
gui_draw_buffer_status (buffer, 1);
|
||||
gui_status_draw (buffer, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2879,7 +2879,7 @@ weechat_cmd_server (t_irc_server *server, t_irc_channel *channel,
|
||||
if (server_name)
|
||||
free (server_name);
|
||||
|
||||
gui_redraw_buffer (buffer);
|
||||
gui_window_redraw_buffer (buffer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3088,7 +3088,7 @@ weechat_cmd_set_display_option (t_config_option *option, char *prefix, void *val
|
||||
option->array_values[*((int *)value)]);
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
color_name = gui_get_color_name (*((int *)value));
|
||||
color_name = gui_color_get_name (*((int *)value));
|
||||
gui_printf (NULL, "%s%s\n",
|
||||
GUI_COLOR(COLOR_WIN_CHAT_HOST),
|
||||
(color_name) ? color_name : _("(unknown)"));
|
||||
@@ -3798,7 +3798,7 @@ weechat_cmd_upgrade (t_irc_server *server, t_irc_channel *channel,
|
||||
plugin_end ();
|
||||
#endif
|
||||
(void) config_write (NULL);
|
||||
gui_end ();
|
||||
gui_main_end ();
|
||||
fifo_remove ();
|
||||
if (weechat_log_file)
|
||||
fclose (weechat_log_file);
|
||||
|
||||
@@ -644,7 +644,7 @@ completion_list_add_option_value (t_completion *completion)
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
(option_value) ?
|
||||
gui_get_color_name (*((int *)(option_value))) :
|
||||
gui_color_get_name (*((int *)(option_value))) :
|
||||
option->default_string);
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
|
||||
@@ -472,7 +472,7 @@ session_crash (FILE *file, char *message, ...)
|
||||
va_end (argptr);
|
||||
|
||||
fclose (file);
|
||||
gui_end ();
|
||||
gui_main_end ();
|
||||
fprintf (stderr, "%s %s\n",
|
||||
WEECHAT_ERROR, buffer);
|
||||
fprintf (stderr,
|
||||
@@ -1464,7 +1464,7 @@ session_load_line (FILE *file)
|
||||
}
|
||||
|
||||
/* allocate line */
|
||||
line = gui_line_new (session_current_buffer);
|
||||
line = gui_buffer_line_new (session_current_buffer);
|
||||
if (!line)
|
||||
{
|
||||
session_crash (file, _("can't create new line"));
|
||||
@@ -1685,8 +1685,8 @@ session_load (char *filename)
|
||||
ptr_server->buffer = gui_buffers;
|
||||
}
|
||||
|
||||
gui_switch_to_buffer (gui_windows, gui_buffers);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
gui_window_switch_to_buffer (gui_windows, gui_buffers);
|
||||
gui_window_redraw_buffer (gui_current_window->buffer);
|
||||
|
||||
fclose (file);
|
||||
|
||||
|
||||
@@ -1062,7 +1062,7 @@ weechat_sigsegv ()
|
||||
weechat_dump (1);
|
||||
dcc_end ();
|
||||
server_free_all ();
|
||||
gui_end ();
|
||||
gui_main_end ();
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, "*** Very bad! WeeChat has crashed (SIGSEGV received)\n");
|
||||
fprintf (stderr, "*** Full crash dump was saved to %s/weechat.log file\n", weechat_home);
|
||||
@@ -1093,7 +1093,7 @@ main (int argc, char *argv[])
|
||||
signal (SIGQUIT, SIG_IGN); /* ignore SIGQUIT signal */
|
||||
signal (SIGPIPE, SIG_IGN); /* ignore SIGPIPE signal */
|
||||
signal (SIGSEGV, weechat_sigsegv); /* crash dump when SIGSEGV received */
|
||||
gui_pre_init (&argc, &argv); /* pre-initiliaze interface */
|
||||
gui_main_pre_init (&argc, &argv); /* pre-initiliaze interface */
|
||||
weechat_init_vars (); /* initialize some variables */
|
||||
gui_key_init (); /* init keyb. (default key bindings)*/
|
||||
weechat_parse_args (argc, argv); /* parse command line args */
|
||||
@@ -1103,7 +1103,7 @@ main (int argc, char *argv[])
|
||||
weechat_config_read (); /* read configuration */
|
||||
weechat_create_config_dirs (); /* create config directories */
|
||||
utf8_init (); /* init UTF-8 in WeeChat */
|
||||
gui_init (); /* init WeeChat interface */
|
||||
gui_main_init (); /* init WeeChat interface */
|
||||
fifo_create (); /* FIFO pipe for remote control */
|
||||
if (weechat_session)
|
||||
session_load (weechat_session); /* load previous session if asked */
|
||||
@@ -1125,7 +1125,7 @@ main (int argc, char *argv[])
|
||||
command_index_free (); /* free commands index */
|
||||
dcc_end (); /* remove all DCC */
|
||||
server_free_all (); /* free all servers */
|
||||
gui_end (); /* shut down WeeChat GUI */
|
||||
gui_main_end (); /* shut down WeeChat GUI */
|
||||
weechat_shutdown (EXIT_SUCCESS, 0); /* quit WeeChat (oh no, why?) */
|
||||
|
||||
return EXIT_SUCCESS; /* make gcc happy (never executed) */
|
||||
|
||||
+16
-16
@@ -1110,9 +1110,9 @@ void
|
||||
config_change_title ()
|
||||
{
|
||||
if (cfg_look_set_title)
|
||||
gui_set_window_title ();
|
||||
gui_window_set_title ();
|
||||
else
|
||||
gui_reset_window_title ();
|
||||
gui_window_reset_title ();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1122,8 +1122,8 @@ config_change_title ()
|
||||
void
|
||||
config_change_buffers ()
|
||||
{
|
||||
gui_switch_to_buffer (gui_current_window, gui_current_window->buffer);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
gui_window_switch_to_buffer (gui_current_window, gui_current_window->buffer);
|
||||
gui_window_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1133,7 +1133,7 @@ config_change_buffers ()
|
||||
void
|
||||
config_change_buffer_content ()
|
||||
{
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
gui_window_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1146,7 +1146,7 @@ config_change_read_marker ()
|
||||
t_gui_window *ptr_win;
|
||||
|
||||
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
|
||||
gui_redraw_buffer (ptr_win->buffer);
|
||||
gui_window_redraw_buffer (ptr_win->buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1157,7 +1157,7 @@ void
|
||||
config_change_charset ()
|
||||
{
|
||||
utf8_init ();
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
gui_window_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1169,9 +1169,9 @@ void
|
||||
config_change_one_server_buffer ()
|
||||
{
|
||||
if (cfg_look_one_server_buffer)
|
||||
gui_merge_servers (gui_current_window);
|
||||
gui_buffer_merge_servers (gui_current_window);
|
||||
else
|
||||
gui_split_server (gui_current_window);
|
||||
gui_buffer_split_server (gui_current_window);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1181,9 +1181,9 @@ config_change_one_server_buffer ()
|
||||
void
|
||||
config_change_color ()
|
||||
{
|
||||
gui_init_color_pairs ();
|
||||
gui_rebuild_weechat_colors ();
|
||||
gui_refresh_windows ();
|
||||
gui_color_init_pairs ();
|
||||
gui_color_rebuild_weechat ();
|
||||
gui_window_refresh_windows ();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1338,7 +1338,7 @@ config_option_set_value (t_config_option *option, char *value)
|
||||
*(option->ptr_int) = int_value;
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
if (!gui_assign_color (option->ptr_int, value))
|
||||
if (!gui_color_assign (option->ptr_int, value))
|
||||
return -1;
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
@@ -1574,7 +1574,7 @@ config_set_server_value (t_irc_server *server, char *option_name,
|
||||
*((int *)(ptr_data)) = int_value;
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
if (!gui_assign_color ((int *)ptr_data, value))
|
||||
if (!gui_color_assign ((int *)ptr_data, value))
|
||||
return -2;
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
@@ -1792,7 +1792,7 @@ config_default_values ()
|
||||
int_value;
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
if (!gui_assign_color (
|
||||
if (!gui_color_assign (
|
||||
weechat_options[i][j].ptr_int,
|
||||
weechat_options[i][j].default_string))
|
||||
gui_printf (NULL,
|
||||
@@ -2377,7 +2377,7 @@ config_write (char *config_name)
|
||||
fprintf (file, "%s = %s\n",
|
||||
weechat_options[i][j].option_name,
|
||||
(weechat_options[i][j].ptr_int) ?
|
||||
gui_get_color_name (*weechat_options[i][j].ptr_int) :
|
||||
gui_color_get_name (*weechat_options[i][j].ptr_int) :
|
||||
weechat_options[i][j].default_string);
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
|
||||
Reference in New Issue
Block a user