core: add signal "window_opened" (task #12464)
parent
0cb84638dc
commit
10820c7336
|
@ -1,12 +1,13 @@
|
|||
WeeChat ChangeLog
|
||||
=================
|
||||
Sébastien Helleu <flashcode@flashtux.org>
|
||||
v0.4.1-dev, 2013-02-10
|
||||
v0.4.1-dev, 2013-02-12
|
||||
|
||||
|
||||
Version 0.4.1 (under dev!)
|
||||
--------------------------
|
||||
|
||||
* core: add signal "window_opened" (task #12464)
|
||||
* core: fix structures before buffer data when a buffer is closed
|
||||
* core: fix refresh of line after changes with hdata_update (update flag
|
||||
"displayed" according to filters)
|
||||
|
|
|
@ -7951,6 +7951,11 @@ Arguments:
|
|||
pointer: window |
|
||||
window closed
|
||||
|
||||
| weechat | window_opened +
|
||||
(_new in version 0.4.1_) |
|
||||
pointer: window |
|
||||
window opened
|
||||
|
||||
| weechat | window_scrolled |
|
||||
pointer: window |
|
||||
scroll in window
|
||||
|
|
|
@ -8064,6 +8064,11 @@ Paramètres :
|
|||
pointeur : fenêtre |
|
||||
fenêtre fermée
|
||||
|
||||
| weechat | window_opened +
|
||||
(_nouveau dans la version 0.4.1_) |
|
||||
pointeur : fenêtre |
|
||||
fenêtre ouverte
|
||||
|
||||
| weechat | window_scrolled |
|
||||
pointeur : fenêtre |
|
||||
défilement dans la fenêtre
|
||||
|
|
|
@ -8034,6 +8034,12 @@ Argomenti:
|
|||
puntatore: finestra |
|
||||
window closed
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| weechat | window_opened +
|
||||
(_novità nella versione 0.4.1_) |
|
||||
puntatore: finestra |
|
||||
window opened
|
||||
|
||||
| weechat | window_scrolled |
|
||||
puntatore: finestra |
|
||||
scroll nella finestra
|
||||
|
|
|
@ -588,86 +588,89 @@ gui_window_new (struct t_gui_window *parent_window, struct t_gui_buffer *buffer,
|
|||
ptr_leaf = gui_windows_tree;
|
||||
}
|
||||
|
||||
if ((new_window = (malloc (sizeof (*new_window)))))
|
||||
{
|
||||
/* create scroll structure */
|
||||
new_window->scroll = malloc (sizeof (*new_window->scroll));
|
||||
if (!new_window->scroll)
|
||||
{
|
||||
free (new_window);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* create window objects */
|
||||
if (!gui_window_objects_init (new_window))
|
||||
{
|
||||
free (new_window->scroll);
|
||||
free (new_window);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* number */
|
||||
new_window->number = (last_gui_window) ? last_gui_window->number + 1 : 1;
|
||||
|
||||
/* position & size */
|
||||
new_window->win_x = x;
|
||||
new_window->win_y = y;
|
||||
new_window->win_width = width;
|
||||
new_window->win_height = height;
|
||||
new_window->win_width_pct = width_pct;
|
||||
new_window->win_height_pct = height_pct;
|
||||
|
||||
/* chat window */
|
||||
new_window->win_chat_x = 0;
|
||||
new_window->win_chat_y = 0;
|
||||
new_window->win_chat_width = 0;
|
||||
new_window->win_chat_height = 0;
|
||||
new_window->win_chat_cursor_x = 0;
|
||||
new_window->win_chat_cursor_y = 0;
|
||||
|
||||
/* bar windows */
|
||||
new_window->bar_windows = NULL;
|
||||
new_window->last_bar_window = NULL;
|
||||
|
||||
/* refresh */
|
||||
new_window->refresh_needed = 0;
|
||||
|
||||
/* buffer and layout infos */
|
||||
new_window->buffer = buffer;
|
||||
new_window->layout_plugin_name = NULL;
|
||||
new_window->layout_buffer_name = NULL;
|
||||
|
||||
/* scroll */
|
||||
gui_window_scroll_init (new_window->scroll, buffer);
|
||||
|
||||
/* coordinates */
|
||||
new_window->coords_size = 0;
|
||||
new_window->coords = NULL;
|
||||
new_window->coords_x_message = 0;
|
||||
|
||||
/* tree */
|
||||
new_window->ptr_tree = ptr_leaf;
|
||||
ptr_leaf->window = new_window;
|
||||
|
||||
/* add window to windows queue */
|
||||
new_window->prev_window = last_gui_window;
|
||||
if (gui_windows)
|
||||
last_gui_window->next_window = new_window;
|
||||
else
|
||||
gui_windows = new_window;
|
||||
last_gui_window = new_window;
|
||||
new_window->next_window = NULL;
|
||||
|
||||
/* create bar windows */
|
||||
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
|
||||
{
|
||||
if (CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) != GUI_BAR_TYPE_ROOT)
|
||||
gui_bar_window_new (ptr_bar, new_window);
|
||||
}
|
||||
}
|
||||
else
|
||||
new_window = (malloc (sizeof (*new_window)));
|
||||
if (!new_window)
|
||||
return NULL;
|
||||
|
||||
/* create scroll structure */
|
||||
new_window->scroll = malloc (sizeof (*new_window->scroll));
|
||||
if (!new_window->scroll)
|
||||
{
|
||||
free (new_window);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* create window objects */
|
||||
if (!gui_window_objects_init (new_window))
|
||||
{
|
||||
free (new_window->scroll);
|
||||
free (new_window);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* number */
|
||||
new_window->number = (last_gui_window) ? last_gui_window->number + 1 : 1;
|
||||
|
||||
/* position & size */
|
||||
new_window->win_x = x;
|
||||
new_window->win_y = y;
|
||||
new_window->win_width = width;
|
||||
new_window->win_height = height;
|
||||
new_window->win_width_pct = width_pct;
|
||||
new_window->win_height_pct = height_pct;
|
||||
|
||||
/* chat window */
|
||||
new_window->win_chat_x = 0;
|
||||
new_window->win_chat_y = 0;
|
||||
new_window->win_chat_width = 0;
|
||||
new_window->win_chat_height = 0;
|
||||
new_window->win_chat_cursor_x = 0;
|
||||
new_window->win_chat_cursor_y = 0;
|
||||
|
||||
/* bar windows */
|
||||
new_window->bar_windows = NULL;
|
||||
new_window->last_bar_window = NULL;
|
||||
|
||||
/* refresh */
|
||||
new_window->refresh_needed = 0;
|
||||
|
||||
/* buffer and layout infos */
|
||||
new_window->buffer = buffer;
|
||||
new_window->layout_plugin_name = NULL;
|
||||
new_window->layout_buffer_name = NULL;
|
||||
|
||||
/* scroll */
|
||||
gui_window_scroll_init (new_window->scroll, buffer);
|
||||
|
||||
/* coordinates */
|
||||
new_window->coords_size = 0;
|
||||
new_window->coords = NULL;
|
||||
new_window->coords_x_message = 0;
|
||||
|
||||
/* tree */
|
||||
new_window->ptr_tree = ptr_leaf;
|
||||
ptr_leaf->window = new_window;
|
||||
|
||||
/* add window to windows queue */
|
||||
new_window->prev_window = last_gui_window;
|
||||
if (gui_windows)
|
||||
last_gui_window->next_window = new_window;
|
||||
else
|
||||
gui_windows = new_window;
|
||||
last_gui_window = new_window;
|
||||
new_window->next_window = NULL;
|
||||
|
||||
/* create bar windows */
|
||||
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
|
||||
{
|
||||
if (CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) != GUI_BAR_TYPE_ROOT)
|
||||
gui_bar_window_new (ptr_bar, new_window);
|
||||
}
|
||||
|
||||
/* send signal */
|
||||
hook_signal_send ("window_opened",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_window);
|
||||
|
||||
return new_window;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue