Remove struct selection from gui_drag_save_selection, so gui.h doesn't need it now.

This commit is contained in:
Michael Drake 2013-05-10 11:54:26 +01:00
parent d2d04824cf
commit 9644d0594c
11 changed files with 18 additions and 14 deletions

View File

@ -89,7 +89,7 @@ void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
drag_save = type;
}
void gui_drag_save_selection(struct selection *s, struct gui_window *g)
void gui_drag_save_selection(struct gui_window *g, const char *selection)
{
ami_drag_icon_show(g->shared->win, "ascii");

View File

@ -661,7 +661,7 @@ void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
TODO();
}
void gui_drag_save_selection(struct selection *s, struct gui_window *w)
void gui_drag_save_selection(struct gui_window *g, const char *selection)
{
LOG((""));
TODO();

View File

@ -1297,7 +1297,7 @@ void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
}
void gui_drag_save_selection(struct selection *s, struct gui_window *g)
void gui_drag_save_selection(struct gui_window *g, const char *selection)
{
}

View File

@ -291,7 +291,7 @@ void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
{
}
void gui_drag_save_selection(struct selection *s, struct gui_window *g)
void gui_drag_save_selection(struct gui_window *g, const char *selection)
{
}

View File

@ -50,7 +50,6 @@ typedef enum {
struct gui_window;
struct gui_download_window;
struct browser_window;
struct selection;
struct form_control;
#include <stdbool.h>
@ -116,7 +115,7 @@ void gui_download_window_done(struct gui_download_window *dw);
void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
struct gui_window *g);
void gui_drag_save_selection(struct selection *s, struct gui_window *g);
void gui_drag_save_selection(struct gui_window *g, const char *selection);
void gui_start_selection(struct gui_window *g);
void gui_clear_selection(struct gui_window *g);

View File

@ -273,8 +273,9 @@ bool selection_click(struct selection *s, browser_mouse_state mouse,
((mouse & BROWSER_MOUSE_DRAG_1) ||
(modkeys && (mouse & BROWSER_MOUSE_DRAG_2)))) {
/* drag-saving selection */
gui_drag_save_selection(s, top->window);
char *sel = selection_get_copy(s);
gui_drag_save_selection(top->window, sel);
free(sel);
}
else if (!modkeys) {
if (pos && (mouse & BROWSER_MOUSE_PRESS_1)) {

View File

@ -1844,7 +1844,7 @@ gui_drag_save_object(gui_save_type type,
}
void
gui_drag_save_selection(struct selection *s, struct gui_window *g)
gui_drag_save_selection(struct gui_window *g, const char *selection)
{
}

View File

@ -1080,7 +1080,7 @@ void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
}
void gui_drag_save_selection(struct selection *s, struct gui_window *g)
void gui_drag_save_selection(struct gui_window *g, const char *selection)
{
}

View File

@ -314,7 +314,7 @@ gui_window_scroll_visible(struct gui_window *g, int x0, int y0,
}
void
gui_drag_save_selection(struct selection *s, struct gui_window *g)
gui_drag_save_selection(struct gui_window *g, const char *selection)
{
}

View File

@ -395,7 +395,7 @@ void gui_drag_save_object(gui_save_type save_type, hlcache_handle *c,
* \param g gui window
*/
void gui_drag_save_selection(struct selection *s, struct gui_window *g)
void gui_drag_save_selection(struct gui_window *g, const char *selection)
{
wimp_pointer pointer;
char icon_buf[20];
@ -421,7 +421,10 @@ void gui_drag_save_selection(struct selection *s, struct gui_window *g)
if (gui_save_selection == NULL)
free(gui_save_selection);
gui_save_selection = selection_get_copy(s);
if (selection == NULL)
gui_save_selection = strdup("");
else
gui_save_selection = strdup(selection);
ro_gui_save_set_state(NULL, GUI_SAVE_TEXT_SELECTION, NULL,
save_leafname, LEAFNAME_MAX,

View File

@ -1766,7 +1766,8 @@ void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
{
}
void gui_drag_save_selection(struct selection *s, struct gui_window *w)
void gui_drag_save_selection(struct gui_window *g, const char *selection)
{
}