core: add signal "window_switch"
parent
3ecd3d7a26
commit
8ea2b93a28
|
@ -16,7 +16,7 @@ Version 0.3.7 (under dev!)
|
|||
* core: save current mouse state in option weechat.look.mouse (set option when
|
||||
mouse state is changed with command /mouse)
|
||||
* core: add type "hashtable" for hdata
|
||||
* core: add signal "buffer_line_added"
|
||||
* core: add signals "buffer_line_added" and "window_switch"
|
||||
* core: add default keys "meta2-1;5D" and "meta2-1;5C" (ctrl+left/right) for
|
||||
gnome-terminal
|
||||
* core: add option "hooks" for command /debug
|
||||
|
|
|
@ -7471,6 +7471,9 @@ Arguments:
|
|||
| weechat | window_scrolled | pointer: window |
|
||||
scroll in window
|
||||
|
||||
| weechat | window_switch | pointer: window |
|
||||
switching window
|
||||
|
||||
| weechat | window_unzooming | pointer: current window |
|
||||
unzooming window
|
||||
|
||||
|
|
|
@ -7581,6 +7581,9 @@ Paramètres :
|
|||
| weechat | window_scrolled | pointeur : fenêtre |
|
||||
défilement dans la fenêtre
|
||||
|
||||
| weechat | window_switch | pointeur : fenêtre |
|
||||
basculement vers une autre fenêtre
|
||||
|
||||
| weechat | window_unzooming | pointeur : fenêtre courante |
|
||||
fin du zoom en cours sur la fenêtre
|
||||
|
||||
|
|
|
@ -7516,6 +7516,10 @@ Argomenti:
|
|||
| weechat | window_scrolled | puntatore: finestra |
|
||||
scroll nella finestra
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| weechat | window_switch | pointer: window |
|
||||
switching window
|
||||
|
||||
| weechat | window_unzooming | puntatore: finestra corrente |
|
||||
minimizzazione della finestra
|
||||
|
||||
|
|
|
@ -1178,6 +1178,9 @@ gui_window_switch (struct t_gui_window *window)
|
|||
old_window->refresh_needed = 1;
|
||||
|
||||
gui_input_move_to_buffer (old_window->buffer, window->buffer);
|
||||
|
||||
hook_signal_send ("window_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
|
||||
#include "../../core/weechat.h"
|
||||
#include "../../core/wee-config.h"
|
||||
#include "../../core/wee-hook.h"
|
||||
#include "../../core/wee-log.h"
|
||||
#include "../../plugins/plugin.h"
|
||||
#include "../gui-window.h"
|
||||
#include "../gui-bar.h"
|
||||
#include "../gui-buffer.h"
|
||||
|
@ -185,6 +187,9 @@ gui_window_switch (struct t_gui_window *window)
|
|||
gui_window_switch_to_buffer (gui_current_window, gui_current_window->buffer, 1);
|
||||
|
||||
gui_window_redraw_buffer (gui_current_window->buffer);
|
||||
|
||||
hook_signal_send ("window_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -889,9 +889,11 @@ gui_window_coords_alloc (struct t_gui_window *window)
|
|||
void
|
||||
gui_window_free (struct t_gui_window *window)
|
||||
{
|
||||
struct t_gui_window *ptr_win;
|
||||
struct t_gui_window *ptr_win, *old_current_window;
|
||||
int i;
|
||||
|
||||
old_current_window = gui_current_window;
|
||||
|
||||
hook_signal_send ("window_closing", WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
|
||||
if (window->buffer)
|
||||
|
@ -946,6 +948,12 @@ gui_window_free (struct t_gui_window *window)
|
|||
hook_signal_send ("window_closed", WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
|
||||
free (window);
|
||||
|
||||
if (gui_current_window != old_current_window)
|
||||
{
|
||||
hook_signal_send ("window_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue