36 |
#include "gui.h" |
#include "gui.h" |
37 |
#include "../common/command.h" |
#include "../common/command.h" |
38 |
#include "../common/weeconfig.h" |
#include "../common/weeconfig.h" |
39 |
|
#include "../common/history.h" |
40 |
#include "../common/hotlist.h" |
#include "../common/hotlist.h" |
41 |
#include "../common/log.h" |
#include "../common/log.h" |
42 |
#include "../irc/irc.h" |
#include "../irc/irc.h" |
1329 |
} |
} |
1330 |
|
|
1331 |
/* |
/* |
1332 |
|
* gui_input_up_global: recall last command in global history |
1333 |
|
*/ |
1334 |
|
|
1335 |
|
void |
1336 |
|
gui_input_up_global () |
1337 |
|
{ |
1338 |
|
if (gui_current_window->buffer->has_input) |
1339 |
|
{ |
1340 |
|
if (history_global_ptr) |
1341 |
|
{ |
1342 |
|
history_global_ptr = history_global_ptr->next_history; |
1343 |
|
if (!history_global_ptr) |
1344 |
|
history_global_ptr = history_global; |
1345 |
|
} |
1346 |
|
else |
1347 |
|
history_global_ptr = history_global; |
1348 |
|
if (history_global_ptr) |
1349 |
|
{ |
1350 |
|
gui_current_window->buffer->input_buffer_size = |
1351 |
|
strlen (history_global_ptr->text); |
1352 |
|
gui_input_optimize_buffer_size (gui_current_window->buffer); |
1353 |
|
gui_current_window->buffer->input_buffer_pos = |
1354 |
|
gui_current_window->buffer->input_buffer_size; |
1355 |
|
strcpy (gui_current_window->buffer->input_buffer, |
1356 |
|
history_global_ptr->text); |
1357 |
|
gui_draw_buffer_input (gui_current_window->buffer, 0); |
1358 |
|
} |
1359 |
|
} |
1360 |
|
} |
1361 |
|
|
1362 |
|
/* |
1363 |
* gui_input_down: recall next command or move to next DCC in list |
* gui_input_down: recall next command or move to next DCC in list |
1364 |
*/ |
*/ |
1365 |
|
|
1415 |
gui_draw_buffer_input (gui_current_window->buffer, 0); |
gui_draw_buffer_input (gui_current_window->buffer, 0); |
1416 |
} |
} |
1417 |
} |
} |
1418 |
|
} |
1419 |
|
|
1420 |
|
/* |
1421 |
|
* gui_input_down_global: recall next command in global history |
1422 |
|
*/ |
1423 |
|
|
1424 |
|
void |
1425 |
|
gui_input_down_global () |
1426 |
|
{ |
1427 |
|
if (gui_current_window->buffer->has_input) |
1428 |
|
{ |
1429 |
|
if (history_global_ptr) |
1430 |
|
{ |
1431 |
|
history_global_ptr = history_global_ptr->prev_history; |
1432 |
|
if (history_global_ptr) |
1433 |
|
gui_current_window->buffer->input_buffer_size = |
1434 |
|
strlen (history_global_ptr->text); |
1435 |
|
else |
1436 |
|
gui_current_window->buffer->input_buffer_size = 0; |
1437 |
|
gui_input_optimize_buffer_size (gui_current_window->buffer); |
1438 |
|
gui_current_window->buffer->input_buffer_pos = |
1439 |
|
gui_current_window->buffer->input_buffer_size; |
1440 |
|
if (history_global_ptr) |
1441 |
|
strcpy (gui_current_window->buffer->input_buffer, |
1442 |
|
history_global_ptr->text); |
1443 |
|
gui_draw_buffer_input (gui_current_window->buffer, 0); |
1444 |
|
} |
1445 |
|
} |
1446 |
} |
} |
1447 |
|
|
1448 |
/* |
/* |