diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-01-13 22:54:19 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-01-13 22:54:19 +0000 |
commit | d18c8ed4521714c3fff3cca64685b8192ca0e075 (patch) | |
tree | 292ebb4a9f4f39ed8a61a33de4c8b169416214e5 /gtk | |
parent | e82d83f1847ebc369a5f48a18217a8f5fecf3824 (diff) | |
download | netsurf-d18c8ed4521714c3fff3cca64685b8192ca0e075.tar.gz netsurf-d18c8ed4521714c3fff3cca64685b8192ca0e075.tar.bz2 |
move teh final optional window operations into the table
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/selection.c | 11 | ||||
-rw-r--r-- | gtk/window.c | 28 |
2 files changed, 12 insertions, 27 deletions
diff --git a/gtk/selection.c b/gtk/selection.c index b0978b385..8bdc0f8c8 100644 --- a/gtk/selection.c +++ b/gtk/selection.c @@ -30,17 +30,6 @@ static GString *current_selection = NULL; static GtkClipboard *clipboard; - - -void gui_start_selection(struct gui_window *g) -{ - gtk_widget_grab_focus(GTK_WIDGET(nsgtk_window_get_layout(g))); -} - -void gui_clear_selection(struct gui_window *g) -{ -} - /** * Core asks front end for clipboard contents. * diff --git a/gtk/window.c b/gtk/window.c index f7a348230..8b66be60d 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -28,6 +28,7 @@ #include "content/hlcache.h" #include "gtk/window.h" +#include "gtk/selection.h" #include "desktop/browser_private.h" #include "desktop/mouse.h" #include "utils/nsoption.h" @@ -1110,18 +1111,6 @@ static void gui_window_place_caret(struct gui_window *g, int x, int y, int heigh } - -void gui_drag_save_object(gui_save_type type, hlcache_handle *c, - struct gui_window *g) -{ - -} - -void gui_drag_save_selection(struct gui_window *g, const char *selection) -{ - -} - static void gui_window_get_dimensions(struct gui_window *g, int *width, int *height, bool scaled) { @@ -1141,13 +1130,18 @@ static void gui_window_get_dimensions(struct gui_window *g, int *width, int *hei LOG(("height: %i", *height)); } -void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl, - struct form_control *gadget) +static void gui_window_start_selection(struct gui_window *g) +{ + gtk_widget_grab_focus(GTK_WIDGET(g->layout)); +} + +static void +gui_window_file_gadget_open(struct gui_window *g, + hlcache_handle *hl, + struct form_control *gadget) { GtkWidget *dialog; - LOG(("Awooga.")); - dialog = gtk_file_chooser_dialog_new("Select File", nsgtk_scaffolding_window(g->scaffold), GTK_FILE_CHOOSER_ACTION_OPEN, @@ -1188,6 +1182,8 @@ static struct gui_window_table gui_window_table = { .set_pointer = gui_window_set_pointer, .place_caret = gui_window_place_caret, .remove_caret = gui_window_remove_caret, + .file_gadget_open = gui_window_file_gadget_open, + .start_selection = gui_window_start_selection, /* from scaffold */ .set_title = gui_window_set_title, |