diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-01-09 18:26:17 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-01-09 18:26:17 +0100 |
commit | 9f2fc59569d03d660e2108e21ae5d7b6fb7c1469 (patch) | |
tree | 794efb76225b4cc1e5e89f94d0cfc4e4e9fa79fb /src/gui | |
parent | f94b679a4a97365de29bb99ede3b2bc5c44cd93f (diff) | |
download | weechat-9f2fc59569d03d660e2108e21ae5d7b6fb7c1469.zip |
Partial migration of Perl plugin to new API
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 14 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-window.c | 10 | ||||
-rw-r--r-- | src/gui/gui-buffer.c | 36 | ||||
-rw-r--r-- | src/gui/gui-completion.c | 54 | ||||
-rw-r--r-- | src/gui/gui-hotlist.c | 8 | ||||
-rw-r--r-- | src/gui/gui-window.c | 18 |
6 files changed, 71 insertions, 69 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index 951de91db..3742a857f 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -1426,11 +1426,11 @@ gui_window_title_reset () void gui_window_objects_print_log (struct t_gui_window *window) { - log_printf (" win_title . . . . . : 0x%X", GUI_CURSES(window)->win_title); - log_printf (" win_chat. . . . . . : 0x%X", GUI_CURSES(window)->win_chat); - log_printf (" win_nick. . . . . . : 0x%X", GUI_CURSES(window)->win_nick); - log_printf (" win_status. . . . . : 0x%X", GUI_CURSES(window)->win_status); - log_printf (" win_infobar . . . . : 0x%X", GUI_CURSES(window)->win_infobar); - log_printf (" win_input . . . . . : 0x%X", GUI_CURSES(window)->win_input); - log_printf (" win_separator . . . : 0x%X", GUI_CURSES(window)->win_separator); + log_printf (" win_title . . . . . : 0x%x", GUI_CURSES(window)->win_title); + log_printf (" win_chat. . . . . . : 0x%x", GUI_CURSES(window)->win_chat); + log_printf (" win_nick. . . . . . : 0x%x", GUI_CURSES(window)->win_nick); + log_printf (" win_status. . . . . : 0x%x", GUI_CURSES(window)->win_status); + log_printf (" win_infobar . . . . : 0x%x", GUI_CURSES(window)->win_infobar); + log_printf (" win_input . . . . . : 0x%x", GUI_CURSES(window)->win_input); + log_printf (" win_separator . . . : 0x%x", GUI_CURSES(window)->win_separator); } diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c index f59021ba2..12526333c 100644 --- a/src/gui/gtk/gui-gtk-window.c +++ b/src/gui/gtk/gui-gtk-window.c @@ -919,9 +919,9 @@ gui_window_title_reset () void gui_window_objects_print_log (struct t_gui_window *window) { - log_printf (" textview_chat . . . : 0x%X", GUI_GTK(window)->textview_chat); - log_printf (" textbuffer_chat . . : 0x%X", GUI_GTK(window)->textbuffer_chat); - log_printf (" texttag_chat. . . . : 0x%X", GUI_GTK(window)->texttag_chat); - log_printf (" textview_nicklist . : 0x%X", GUI_GTK(window)->textview_nicklist); - log_printf (" textbuffer_nicklist : 0x%X", GUI_GTK(window)->textbuffer_nicklist); + log_printf (" textview_chat . . . : 0x%x", GUI_GTK(window)->textview_chat); + log_printf (" textbuffer_chat . . : 0x%x", GUI_GTK(window)->textbuffer_chat); + log_printf (" texttag_chat. . . . : 0x%x", GUI_GTK(window)->texttag_chat); + log_printf (" textview_nicklist . : 0x%x", GUI_GTK(window)->textview_nicklist); + log_printf (" textbuffer_nicklist : 0x%x", GUI_GTK(window)->textbuffer_nicklist); } diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 4423c67bb..444bf3f46 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -178,7 +178,8 @@ gui_buffer_new (struct t_weechat_plugin *plugin, char *category, char *name, gui_window_redraw_buffer (new_buffer); } - hook_signal_send ("buffer_open", new_buffer); + hook_signal_send ("buffer_open", + WEECHAT_HOOK_SIGNAL_POINTER, new_buffer); } else return NULL; @@ -619,7 +620,8 @@ gui_buffer_close (struct t_gui_buffer *buffer, int switch_to_another) struct t_gui_buffer *ptr_buffer; struct t_gui_line *ptr_line; - hook_signal_send ("buffer_close", buffer); + hook_signal_send ("buffer_close", + WEECHAT_HOOK_SIGNAL_POINTER, buffer); if (switch_to_another) { @@ -942,7 +944,7 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer) char hexa[(16 * 3) + 1], ascii[(16 * 2) + 1]; int hexa_pos, ascii_pos; - log_printf ("[buffer dump hexa (addr:0x%X)]", buffer); + log_printf ("[buffer dump hexa (addr:0x%x)]", buffer); num_line = 1; for (ptr_line = buffer->lines; ptr_line; ptr_line = ptr_line->next_line) { @@ -1007,8 +1009,8 @@ gui_buffer_print_log () ptr_buffer = ptr_buffer->next_buffer) { log_printf (""); - log_printf ("[buffer (addr:0x%X)]", ptr_buffer); - log_printf (" plugin . . . . . . . . : 0x%X", ptr_buffer->plugin); + log_printf ("[buffer (addr:0x%x)]", ptr_buffer); + log_printf (" plugin . . . . . . . . : 0x%x", ptr_buffer->plugin); log_printf (" number . . . . . . . . : %d", ptr_buffer->number); log_printf (" category . . . . . . . : '%s'", ptr_buffer->category); log_printf (" name . . . . . . . . . : '%s'", ptr_buffer->name); @@ -1016,21 +1018,21 @@ gui_buffer_print_log () log_printf (" notify_level . . . . . : %d", ptr_buffer->notify_level); log_printf (" num_displayed. . . . . : %d", ptr_buffer->num_displayed); log_printf (" title. . . . . . . . . : '%s'", ptr_buffer->title); - log_printf (" lines. . . . . . . . . : 0x%X", ptr_buffer->lines); - log_printf (" last_line. . . . . . . : 0x%X", ptr_buffer->last_line); - log_printf (" last_read_line . . . . : 0x%X", ptr_buffer->last_read_line); + log_printf (" lines. . . . . . . . . : 0x%x", ptr_buffer->lines); + log_printf (" last_line. . . . . . . : 0x%x", ptr_buffer->last_line); + log_printf (" last_read_line . . . . : 0x%x", ptr_buffer->last_read_line); log_printf (" lines_count. . . . . . : %d", ptr_buffer->lines_count); log_printf (" prefix_max_length. . . : %d", ptr_buffer->prefix_max_length); log_printf (" chat_refresh_needed. . : %d", ptr_buffer->chat_refresh_needed); log_printf (" nicklist . . . . . . . : %d", ptr_buffer->nicklist); log_printf (" nicklist_case_sensitive: %d", ptr_buffer->nicklist_case_sensitive); - log_printf (" nicklist_root. . . . . : 0x%X", ptr_buffer->nicklist_root); + log_printf (" nicklist_root. . . . . : 0x%x", ptr_buffer->nicklist_root); log_printf (" nicklist_max_length. . : %d", ptr_buffer->nicklist_max_length); log_printf (" nicklist_display_groups: %d", ptr_buffer->nicklist_display_groups); log_printf (" nicklist_visible_count.: %d", ptr_buffer->nicklist_visible_count); log_printf (" nicklist_refresh_needed: %d", ptr_buffer->nicklist_refresh_needed); log_printf (" input. . . . . . . . . : %d", ptr_buffer->input); - log_printf (" input_data_cb. . . . . : 0x%X", ptr_buffer->input_data_cb); + log_printf (" input_data_cb. . . . . : 0x%x", ptr_buffer->input_data_cb); log_printf (" input_nick . . . . . . : '%s'", ptr_buffer->input_nick); log_printf (" input_buffer . . . . . : '%s'", ptr_buffer->input_buffer); log_printf (" input_buffer_color_mask: '%s'", ptr_buffer->input_buffer_color_mask); @@ -1039,20 +1041,20 @@ gui_buffer_print_log () log_printf (" input_buffer_length. . : %d", ptr_buffer->input_buffer_length); log_printf (" input_buffer_pos . . . : %d", ptr_buffer->input_buffer_pos); log_printf (" input_buffer_1st_disp. : %d", ptr_buffer->input_buffer_1st_display); - log_printf (" completion . . . . . . : 0x%X", ptr_buffer->completion); - log_printf (" history. . . . . . . . : 0x%X", ptr_buffer->history); - log_printf (" last_history . . . . . : 0x%X", ptr_buffer->last_history); - log_printf (" ptr_history. . . . . . : 0x%X", ptr_buffer->ptr_history); + log_printf (" completion . . . . . . : 0x%x", ptr_buffer->completion); + log_printf (" history. . . . . . . . : 0x%x", ptr_buffer->history); + log_printf (" last_history . . . . . : 0x%x", ptr_buffer->last_history); + log_printf (" ptr_history. . . . . . : 0x%x", ptr_buffer->ptr_history); log_printf (" num_history. . . . . . : %d", ptr_buffer->num_history); log_printf (" text_search. . . . . . : %d", ptr_buffer->text_search); log_printf (" text_search_exact. . . : %d", ptr_buffer->text_search_exact); log_printf (" text_search_found. . . : %d", ptr_buffer->text_search_found); log_printf (" text_search_input. . . : '%s'", ptr_buffer->text_search_input); - log_printf (" prev_buffer. . . . . . : 0x%X", ptr_buffer->prev_buffer); - log_printf (" next_buffer. . . . . . : 0x%X", ptr_buffer->next_buffer); + log_printf (" prev_buffer. . . . . . : 0x%x", ptr_buffer->prev_buffer); + log_printf (" next_buffer. . . . . . : 0x%x", ptr_buffer->next_buffer); log_printf (""); - log_printf (" => nicklist_root (addr:0x%X):", ptr_buffer->nicklist_root); + log_printf (" => nicklist_root (addr:0x%x):", ptr_buffer->nicklist_root); gui_nicklist_print_log (ptr_buffer->nicklist_root, 0); log_printf (""); diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index bef3970c7..fde152aef 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -256,7 +256,7 @@ gui_completion_list_add_buffers_names (struct t_gui_completion *completion) ptr_buffer = ptr_buffer->next_buffer) { gui_completion_list_add (completion, ptr_buffer->name, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } @@ -274,7 +274,7 @@ gui_completion_list_add_buffers_categories (struct t_gui_completion *completion) ptr_buffer = ptr_buffer->next_buffer) { gui_completion_list_add (completion, ptr_buffer->category, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } @@ -359,7 +359,7 @@ gui_completion_list_add_filename (struct t_gui_completion *completion) S_ISDIR(statbuf.st_mode) ? DIR_SEPARATOR : ""); gui_completion_list_add (completion, buffer, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } } @@ -389,7 +389,7 @@ gui_completion_list_add_command_hooks (struct t_gui_completion *completion) && (HOOK_COMMAND(ptr_hook, command)[0])) gui_completion_list_add (completion, HOOK_COMMAND(ptr_hook, command), - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } @@ -406,7 +406,7 @@ gui_completion_list_add_key_cmd (struct t_gui_completion *completion) for (i = 0; gui_key_functions[i].function_name; i++) { gui_completion_list_add (completion, gui_key_functions[i].function_name, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } @@ -420,7 +420,7 @@ gui_completion_list_add_self_nick (struct t_gui_completion *completion) if (completion->buffer->input_nick) gui_completion_list_add (completion, completion->buffer->input_nick, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } /* @@ -441,7 +441,7 @@ gui_completion_list_add_option (struct t_gui_completion *completion) { gui_completion_list_add (completion, ptr_option->name, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } } @@ -459,7 +459,7 @@ gui_completion_list_add_plugin_option (struct t_gui_completion *completion) ptr_option = ptr_option->next_option) { gui_completion_list_add (completion, ptr_option->name, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } @@ -476,7 +476,7 @@ gui_completion_list_add_plugin (struct t_gui_completion *completion) ptr_plugin = ptr_plugin->next_plugin) { gui_completion_list_add (completion, ptr_plugin->name, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } @@ -491,7 +491,7 @@ gui_completion_list_add_quit (struct t_gui_completion *completion) && CONFIG_STRING(config_look_default_msg_quit)[0]) gui_completion_list_add (completion, CONFIG_STRING(config_look_default_msg_quit), - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } /* @@ -519,10 +519,10 @@ gui_completion_list_add_option_value (struct t_gui_completion *completion) case CONFIG_OPTION_BOOLEAN: if (CONFIG_BOOLEAN(ptr_option) == CONFIG_BOOLEAN_TRUE) gui_completion_list_add (completion, "on", - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); else gui_completion_list_add (completion, "off", - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); break; case CONFIG_OPTION_INTEGER: if (ptr_option->string_values) @@ -533,21 +533,21 @@ gui_completion_list_add_option_value (struct t_gui_completion *completion) snprintf (option_string, sizeof (option_string) - 1, "%d", CONFIG_INTEGER(ptr_option)); gui_completion_list_add (completion, option_string, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); break; case CONFIG_OPTION_STRING: snprintf (option_string, sizeof (option_string) - 1, "\"%s\"", CONFIG_STRING(ptr_option)); gui_completion_list_add (completion, option_string, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); break; case CONFIG_OPTION_COLOR: color_name = gui_color_get_name (CONFIG_INTEGER(ptr_option)); if (color_name) gui_completion_list_add (completion, color_name, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); break; } } @@ -575,7 +575,7 @@ gui_completion_list_add_plugin_option_value (struct t_gui_completion *completion ptr_option = plugin_config_search_internal (completion->args); if (ptr_option) gui_completion_list_add (completion, ptr_option->value, - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); if (pos) pos[0] = ' '; @@ -601,7 +601,7 @@ gui_completion_list_add_weechat_cmd (struct t_gui_completion *completion) { gui_completion_list_add (completion, HOOK_COMMAND(ptr_hook, command), - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } } @@ -647,7 +647,7 @@ gui_completion_build_list_template (struct t_gui_completion *completion, { word[word_offset] = '\0'; weelist_add (completion->completion_list, - word, WEELIST_POS_SORT); + word, WEECHAT_LIST_POS_SORT); } word_offset = 0; break; @@ -948,7 +948,7 @@ gui_completion_command (struct t_gui_completion *completion) { gui_completion_list_add (completion, HOOK_COMMAND(ptr_hook, command), - 0, WEELIST_POS_SORT); + 0, WEECHAT_LIST_POS_SORT); } } } @@ -1108,10 +1108,10 @@ gui_completion_nick (struct t_gui_completion *completion) { weelist_add (completion->completion_list, ((t_irc_channel *)(completion->channel))->name, - WEELIST_POS_SORT); + WEECHAT_LIST_POS_SORT); weelist_add (completion->completion_list, ((t_irc_server *)(completion->server))->nick, - WEELIST_POS_SORT); + WEECHAT_LIST_POS_SORT); } gui_completion_command_arg (completion, 1); return; @@ -1135,7 +1135,7 @@ gui_completion_nick (struct t_gui_completion *completion) { weelist_add (completion->completion_list, ptr_nick->nick, - WEELIST_POS_SORT); + WEECHAT_LIST_POS_SORT); } // add nicks speaking recently on this channel @@ -1148,7 +1148,7 @@ gui_completion_nick (struct t_gui_completion *completion) ptr_item->data)) weelist_add (completion->completion_list, ptr_item->data, - WEELIST_POS_BEGINNING); + WEECHAT_LIST_POS_BEGINNING); } } @@ -1156,7 +1156,7 @@ gui_completion_nick (struct t_gui_completion *completion) if (completion->server) weelist_add (completion->completion_list, ((t_irc_server *)(completion->server))->nick, - WEELIST_POS_END); + WEECHAT_LIST_POS_END); ((t_irc_channel *)(completion->channel))->nick_completion_reset = 0; } @@ -1343,8 +1343,8 @@ gui_completion_search (struct t_gui_completion *completion, int direction, void gui_completion_print_log (struct t_gui_completion *completion) { - log_printf ("[completion (addr:0x%X)]", completion); - log_printf (" buffer . . . . . . . . : 0x%X", completion->buffer); + log_printf ("[completion (addr:0x%x)]", completion); + log_printf (" buffer . . . . . . . . : 0x%x", completion->buffer); log_printf (" context. . . . . . . . : %d", completion->context); log_printf (" base_command . . . . . : '%s'", completion->base_command); log_printf (" base_command_arg . . . : %d", completion->base_command_arg); @@ -1355,7 +1355,7 @@ gui_completion_print_log (struct t_gui_completion *completion) log_printf (" args . . . . . . . . . : '%s'", completion->args); log_printf (" direction. . . . . . . : %d", completion->direction); log_printf (" add_space. . . . . . . : %d", completion->add_space); - log_printf (" completion_list. . . . : 0x%X", completion->completion_list); + log_printf (" completion_list. . . . : 0x%x", completion->completion_list); log_printf (" word_found . . . . . . : '%s'", completion->word_found); log_printf (" position_replace . . . : %d", completion->position_replace); log_printf (" diff_size. . . . . . . : %d", completion->diff_size); diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index 5843236e2..a24adec88 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -355,13 +355,13 @@ gui_hotlist_print_log () for (ptr_hotlist = gui_hotlist; ptr_hotlist; ptr_hotlist = ptr_hotlist->next_hotlist) { - log_printf ("[hotlist (addr:0x%X)]", ptr_hotlist); + log_printf ("[hotlist (addr:0x%x)]", ptr_hotlist); log_printf (" priority . . . . . . . : %d", ptr_hotlist->priority); log_printf (" creation_time. . . . . : tv_sec:%d, tv_usec:%d", ptr_hotlist->creation_time.tv_sec, ptr_hotlist->creation_time.tv_usec); - log_printf (" buffer . . . . . . . . : 0x%X", ptr_hotlist->buffer); - log_printf (" prev_hotlist . . . . . : 0x%X", ptr_hotlist->prev_hotlist); - log_printf (" next_hotlist . . . . . : 0x%X", ptr_hotlist->next_hotlist); + log_printf (" buffer . . . . . . . . : 0x%x", ptr_hotlist->buffer); + log_printf (" prev_hotlist . . . . . : 0x%x", ptr_hotlist->prev_hotlist); + log_printf (" next_hotlist . . . . . : 0x%x", ptr_hotlist->next_hotlist); } } diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index 33f8edb66..a07329d82 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -772,12 +772,12 @@ gui_window_print_log () struct t_gui_window *ptr_window; log_printf (""); - log_printf ("current window = 0x%X", gui_current_window); + log_printf ("current window = 0x%x", gui_current_window); for (ptr_window = gui_windows; ptr_window; ptr_window = ptr_window->next_window) { log_printf (""); - log_printf ("[window (addr:0x%X)]", ptr_window); + log_printf ("[window (addr:0x%x)]", ptr_window); log_printf (" win_x . . . . . . . : %d", ptr_window->win_x); log_printf (" win_y . . . . . . . : %d", ptr_window->win_y); log_printf (" win_width . . . . . : %d", ptr_window->win_width); @@ -814,14 +814,14 @@ gui_window_print_log () log_printf (" win_input_height. . : %d", ptr_window->win_input_height); log_printf (" win_input_cursor_x. : %d", ptr_window->win_input_cursor_x); gui_window_objects_print_log (ptr_window); - log_printf (" dcc_first . . . . . : 0x%X", ptr_window->dcc_first); - log_printf (" dcc_selected. . . . : 0x%X", ptr_window->dcc_selected); - log_printf (" dcc_last_displayed. : 0x%X", ptr_window->dcc_last_displayed); - log_printf (" buffer. . . . . . . : 0x%X", ptr_window->buffer); + log_printf (" dcc_first . . . . . : 0x%x", ptr_window->dcc_first); + log_printf (" dcc_selected. . . . : 0x%x", ptr_window->dcc_selected); + log_printf (" dcc_last_displayed. : 0x%x", ptr_window->dcc_last_displayed); + log_printf (" buffer. . . . . . . : 0x%x", ptr_window->buffer); log_printf (" first_line_displayed: %d", ptr_window->first_line_displayed); - log_printf (" start_line. . . . . : 0x%X", ptr_window->start_line); + log_printf (" start_line. . . . . : 0x%x", ptr_window->start_line); log_printf (" start_line_pos. . . : %d", ptr_window->start_line_pos); - log_printf (" prev_window . . . . : 0x%X", ptr_window->prev_window); - log_printf (" next_window . . . . : 0x%X", ptr_window->next_window); + log_printf (" prev_window . . . . : 0x%x", ptr_window->prev_window); + log_printf (" next_window . . . . : 0x%x", ptr_window->next_window); } } |