2004-06-22 22:48:33 +04:00
|
|
|
/*
|
2006-11-27 20:13:24 +03:00
|
|
|
* Copyright 2006 Daniel Silverstone <dsilvers@digital-scurf.org>
|
2006-08-16 01:29:20 +04:00
|
|
|
* Copyright 2006 Rob Kendrick <rjek@rjek.com>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2010-04-08 18:36:09 +04:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2007-08-08 20:16:03 +04:00
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2004-06-22 22:48:33 +04:00
|
|
|
*/
|
|
|
|
|
2015-04-12 23:42:33 +03:00
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
* Implementation of gtk windowing.
|
|
|
|
*/
|
|
|
|
|
2016-04-22 00:36:21 +03:00
|
|
|
#include <stdlib.h>
|
2009-04-21 00:31:13 +04:00
|
|
|
#include <string.h>
|
2010-12-16 23:46:13 +03:00
|
|
|
#include <limits.h>
|
2011-01-30 02:40:22 +03:00
|
|
|
#include <assert.h>
|
2015-05-21 15:04:29 +03:00
|
|
|
#include <math.h>
|
2012-05-16 23:57:43 +04:00
|
|
|
#include <gtk/gtk.h>
|
2011-01-30 02:40:22 +03:00
|
|
|
#include <gdk/gdkkeysyms.h>
|
2012-05-16 23:57:43 +04:00
|
|
|
#include <gdk-pixbuf/gdk-pixdata.h>
|
2011-01-30 02:40:22 +03:00
|
|
|
|
2019-09-06 22:42:23 +03:00
|
|
|
#include "utils/utils.h"
|
2014-02-01 17:06:51 +04:00
|
|
|
#include "utils/log.h"
|
2014-02-17 04:21:49 +04:00
|
|
|
#include "utils/utf8.h"
|
2014-02-01 17:06:51 +04:00
|
|
|
#include "utils/nsoption.h"
|
2019-08-16 01:02:04 +03:00
|
|
|
#include "utils/messages.h"
|
2019-09-06 22:42:23 +03:00
|
|
|
#include "utils/nsurl.h"
|
|
|
|
#include "netsurf/inttypes.h"
|
2016-06-06 10:59:23 +03:00
|
|
|
#include "netsurf/content.h"
|
2016-05-30 19:32:57 +03:00
|
|
|
#include "netsurf/browser_window.h"
|
2016-05-30 14:07:16 +03:00
|
|
|
#include "netsurf/mouse.h"
|
2016-05-30 13:01:40 +03:00
|
|
|
#include "netsurf/window.h"
|
2016-05-30 23:05:57 +03:00
|
|
|
#include "netsurf/plotters.h"
|
2016-06-14 14:39:54 +03:00
|
|
|
#include "netsurf/form.h"
|
2016-07-01 16:27:04 +03:00
|
|
|
#include "netsurf/keypress.h"
|
2016-06-06 10:59:23 +03:00
|
|
|
#include "desktop/searchweb.h"
|
|
|
|
#include "desktop/textinput.h"
|
2014-02-01 17:06:51 +04:00
|
|
|
|
2016-06-06 10:59:23 +03:00
|
|
|
#include "gtk/selection.h"
|
2016-04-26 23:51:47 +03:00
|
|
|
#include "gtk/warn.h"
|
2011-01-30 02:40:22 +03:00
|
|
|
#include "gtk/compat.h"
|
|
|
|
#include "gtk/gui.h"
|
|
|
|
#include "gtk/scaffolding.h"
|
2019-08-28 01:46:40 +03:00
|
|
|
#include "gtk/toolbar_items.h"
|
2019-08-20 18:13:00 +03:00
|
|
|
#include "gtk/toolbar.h"
|
2017-02-17 01:15:49 +03:00
|
|
|
#include "gtk/local_history.h"
|
2011-01-30 02:40:22 +03:00
|
|
|
#include "gtk/plotters.h"
|
|
|
|
#include "gtk/schedule.h"
|
|
|
|
#include "gtk/tabs.h"
|
2012-02-22 00:54:31 +04:00
|
|
|
#include "gtk/bitmap.h"
|
|
|
|
#include "gtk/gdk.h"
|
2015-06-05 00:43:11 +03:00
|
|
|
#include "gtk/resources.h"
|
2019-09-17 02:48:57 +03:00
|
|
|
#include "gtk/search.h"
|
2019-10-09 01:06:01 +03:00
|
|
|
#include "gtk/throbber.h"
|
2019-08-28 01:46:40 +03:00
|
|
|
#include "gtk/window.h"
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2019-10-09 01:06:01 +03:00
|
|
|
/**
|
|
|
|
* time (in ms) between throbber animation frame updates
|
|
|
|
*/
|
|
|
|
#define THROBBER_FRAME_TIME (100)
|
|
|
|
|
2014-10-24 23:45:21 +04:00
|
|
|
static GtkWidget *select_menu;
|
|
|
|
static struct form_control *select_menu_control;
|
|
|
|
|
2009-12-18 02:55:02 +03:00
|
|
|
struct gui_window {
|
2015-04-12 23:42:33 +03:00
|
|
|
/**
|
|
|
|
* The gtk scaffold object containing menu, buttons, url bar, [tabs],
|
2011-02-09 02:40:14 +03:00
|
|
|
* drawing area, etc that may contain one or more gui_windows.
|
|
|
|
*/
|
2014-07-27 21:06:07 +04:00
|
|
|
struct nsgtk_scaffolding *scaffold;
|
2011-02-09 02:40:14 +03:00
|
|
|
|
|
|
|
/** The 'content' window that is rendered in the gui_window */
|
2010-03-28 23:21:47 +04:00
|
|
|
struct browser_window *bw;
|
2010-04-07 17:53:43 +04:00
|
|
|
|
2011-02-09 02:40:14 +03:00
|
|
|
/** mouse state and events. */
|
2010-04-07 17:53:43 +04:00
|
|
|
struct {
|
|
|
|
struct gui_window *gui;
|
|
|
|
|
|
|
|
gdouble pressed_x;
|
|
|
|
gdouble pressed_y;
|
|
|
|
gboolean waiting;
|
|
|
|
browser_mouse_state state;
|
2011-02-09 02:40:14 +03:00
|
|
|
} mouse;
|
|
|
|
|
|
|
|
/** caret dimension and location for rendering */
|
|
|
|
int caretx, carety, careth;
|
|
|
|
|
|
|
|
/** caret shape for rendering */
|
|
|
|
gui_pointer_shape current_pointer;
|
|
|
|
|
|
|
|
/** previous event location */
|
|
|
|
int last_x, last_y;
|
|
|
|
|
2019-08-19 01:45:19 +03:00
|
|
|
/** controls toolbar context */
|
|
|
|
struct nsgtk_toolbar *toolbar;
|
|
|
|
|
2019-09-17 02:48:57 +03:00
|
|
|
/** search toolbar context */
|
|
|
|
struct gtk_search *search;
|
|
|
|
|
2019-08-19 01:45:19 +03:00
|
|
|
/** The top level container (tabBox) */
|
2013-06-28 15:13:02 +04:00
|
|
|
GtkWidget *container;
|
|
|
|
|
2011-02-09 02:40:14 +03:00
|
|
|
/** display widget for this page or frame */
|
|
|
|
GtkLayout *layout;
|
|
|
|
|
2020-02-23 00:41:17 +03:00
|
|
|
/** The container for the layout etc */
|
|
|
|
GtkWidget *grid;
|
|
|
|
|
2011-02-09 02:40:14 +03:00
|
|
|
/** handle to the the visible tab */
|
|
|
|
GtkWidget *tab;
|
|
|
|
|
|
|
|
/** statusbar */
|
|
|
|
GtkLabel *status_bar;
|
|
|
|
|
2013-06-25 22:01:41 +04:00
|
|
|
/** status pane */
|
2011-02-09 02:40:14 +03:00
|
|
|
GtkPaned *paned;
|
|
|
|
|
2013-06-25 22:01:41 +04:00
|
|
|
/** has the status pane had its first size operation yet? */
|
|
|
|
bool paned_sized;
|
|
|
|
|
2012-02-22 00:54:31 +04:00
|
|
|
/** The icon this window should have */
|
|
|
|
GdkPixbuf *icon;
|
|
|
|
|
2014-02-17 04:21:49 +04:00
|
|
|
/** The input method to use with this window */
|
|
|
|
GtkIMContext *input_method;
|
|
|
|
|
2019-10-09 01:06:01 +03:00
|
|
|
/** current frame of throbber */
|
|
|
|
int throb_frame;
|
|
|
|
|
2011-02-09 02:40:14 +03:00
|
|
|
/** list for cleanup */
|
|
|
|
struct gui_window *next, *prev;
|
2009-12-18 02:55:02 +03:00
|
|
|
};
|
|
|
|
|
2015-04-12 23:42:33 +03:00
|
|
|
/**< first entry in window list */
|
|
|
|
struct gui_window *window_list = NULL;
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
static void
|
|
|
|
nsgtk_select_menu_clicked(GtkCheckMenuItem *checkmenuitem,
|
|
|
|
gpointer user_data)
|
2014-10-24 23:45:21 +04:00
|
|
|
{
|
|
|
|
form_select_process_selection(select_menu_control,
|
2019-09-04 21:23:06 +03:00
|
|
|
(intptr_t)user_data);
|
2014-10-24 23:45:21 +04:00
|
|
|
}
|
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
#if GTK_CHECK_VERSION(3,0,0)
|
|
|
|
|
2013-06-25 22:01:41 +04:00
|
|
|
static gboolean
|
2012-05-16 23:57:43 +04:00
|
|
|
nsgtk_window_draw_event(GtkWidget *widget, cairo_t *cr, gpointer data)
|
2006-03-26 18:58:15 +04:00
|
|
|
{
|
2012-05-16 23:57:43 +04:00
|
|
|
struct gui_window *gw = data;
|
2011-02-11 01:35:41 +03:00
|
|
|
struct gui_window *z;
|
2011-02-11 22:36:33 +03:00
|
|
|
struct rect clip;
|
2011-06-30 19:48:07 +04:00
|
|
|
struct redraw_context ctx = {
|
|
|
|
.interactive = true,
|
2011-12-24 02:39:25 +04:00
|
|
|
.background_images = true,
|
2011-06-30 19:48:07 +04:00
|
|
|
.plot = &nsgtk_plotters
|
|
|
|
};
|
2007-04-30 06:31:38 +04:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
double x1;
|
|
|
|
double y1;
|
|
|
|
double x2;
|
|
|
|
double y2;
|
|
|
|
|
|
|
|
assert(gw);
|
|
|
|
assert(gw->bw);
|
|
|
|
|
|
|
|
for (z = window_list; z && z != gw; z = z->next)
|
|
|
|
continue;
|
|
|
|
assert(z);
|
|
|
|
assert(GTK_WIDGET(gw->layout) == widget);
|
|
|
|
|
|
|
|
current_cr = cr;
|
|
|
|
|
2013-04-17 17:16:32 +04:00
|
|
|
GtkAdjustment *vscroll = nsgtk_layout_get_vadjustment(gw->layout);
|
|
|
|
GtkAdjustment *hscroll = nsgtk_layout_get_hadjustment(gw->layout);
|
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
|
|
|
|
|
|
|
|
clip.x0 = x1;
|
|
|
|
clip.y0 = y1;
|
|
|
|
clip.x1 = x2;
|
|
|
|
clip.y1 = y2;
|
|
|
|
|
2013-04-17 17:16:32 +04:00
|
|
|
browser_window_redraw(gw->bw,
|
|
|
|
-gtk_adjustment_get_value(hscroll),
|
|
|
|
-gtk_adjustment_get_value(vscroll),
|
|
|
|
&clip,
|
|
|
|
&ctx);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
if (gw->careth != 0) {
|
|
|
|
nsgtk_plot_caret(gw->caretx, gw->carety, gw->careth);
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2013-06-25 22:01:41 +04:00
|
|
|
static gboolean
|
2012-05-16 23:57:43 +04:00
|
|
|
nsgtk_window_draw_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
|
|
|
{
|
|
|
|
struct gui_window *gw = data;
|
|
|
|
struct gui_window *z;
|
|
|
|
struct rect clip;
|
|
|
|
struct redraw_context ctx = {
|
|
|
|
.interactive = true,
|
|
|
|
.background_images = true,
|
|
|
|
.plot = &nsgtk_plotters
|
|
|
|
};
|
2007-04-30 06:31:38 +04:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
assert(gw);
|
|
|
|
assert(gw->bw);
|
|
|
|
|
|
|
|
for (z = window_list; z && z != gw; z = z->next)
|
2007-04-30 06:31:38 +04:00
|
|
|
continue;
|
|
|
|
assert(z);
|
2012-05-16 23:57:43 +04:00
|
|
|
assert(GTK_WIDGET(gw->layout) == widget);
|
2007-04-30 06:31:38 +04:00
|
|
|
|
2012-05-17 20:48:20 +04:00
|
|
|
current_cr = gdk_cairo_create(nsgtk_layout_get_bin_window(gw->layout));
|
2006-08-16 01:29:20 +04:00
|
|
|
|
2011-02-11 22:36:33 +03:00
|
|
|
clip.x0 = event->area.x;
|
|
|
|
clip.y0 = event->area.y;
|
|
|
|
clip.x1 = event->area.x + event->area.width;
|
|
|
|
clip.y1 = event->area.y + event->area.height;
|
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
browser_window_redraw(gw->bw, 0, 0, &clip, &ctx);
|
2011-02-11 01:35:41 +03:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
if (gw->careth != 0) {
|
|
|
|
nsgtk_plot_caret(gw->caretx, gw->carety, gw->careth);
|
2011-12-30 04:58:35 +04:00
|
|
|
}
|
2006-08-16 01:29:20 +04:00
|
|
|
|
|
|
|
cairo_destroy(current_cr);
|
|
|
|
|
|
|
|
return FALSE;
|
2006-03-26 18:58:15 +04:00
|
|
|
}
|
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
#endif
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
static gboolean
|
|
|
|
nsgtk_window_motion_notify_event(GtkWidget *widget,
|
|
|
|
GdkEventMotion *event,
|
|
|
|
gpointer data)
|
2006-03-26 18:58:15 +04:00
|
|
|
{
|
2006-03-26 21:22:29 +04:00
|
|
|
struct gui_window *g = data;
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
bool shift = event->state & GDK_SHIFT_MASK;
|
|
|
|
bool ctrl = event->state & GDK_CONTROL_MASK;
|
2010-12-16 23:46:13 +03:00
|
|
|
|
2015-05-21 15:04:29 +03:00
|
|
|
if ((fabs(event->x - g->last_x) < 5.0) &&
|
|
|
|
(fabs(event->y - g->last_y) < 5.0)) {
|
|
|
|
/* Mouse hasn't moved far enough from press coordinate
|
|
|
|
* for this to be considered a drag.
|
|
|
|
*/
|
2009-12-18 02:55:02 +03:00
|
|
|
return FALSE;
|
2010-12-16 23:46:13 +03:00
|
|
|
} else {
|
2015-05-21 15:04:29 +03:00
|
|
|
/* This is a drag, ensure it's always treated as such,
|
|
|
|
* even if we drag back over the press location.
|
|
|
|
*/
|
2010-12-16 23:46:13 +03:00
|
|
|
g->last_x = INT_MIN;
|
|
|
|
g->last_y = INT_MIN;
|
|
|
|
}
|
|
|
|
|
2011-02-09 02:40:14 +03:00
|
|
|
if (g->mouse.state & BROWSER_MOUSE_PRESS_1) {
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
/* Start button 1 drag */
|
|
|
|
browser_window_mouse_click(g->bw, BROWSER_MOUSE_DRAG_1,
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.pressed_x, g->mouse.pressed_y);
|
2011-02-09 02:40:14 +03:00
|
|
|
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
/* Replace PRESS with HOLDING and declare drag in progress */
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.state ^= (BROWSER_MOUSE_PRESS_1 |
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
BROWSER_MOUSE_HOLDING_1);
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.state |= BROWSER_MOUSE_DRAG_ON;
|
2011-02-09 02:40:14 +03:00
|
|
|
} else if (g->mouse.state & BROWSER_MOUSE_PRESS_2) {
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
/* Start button 2 drag */
|
|
|
|
browser_window_mouse_click(g->bw, BROWSER_MOUSE_DRAG_2,
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.pressed_x, g->mouse.pressed_y);
|
2011-02-09 02:40:14 +03:00
|
|
|
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
/* Replace PRESS with HOLDING and declare drag in progress */
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.state ^= (BROWSER_MOUSE_PRESS_2 |
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
BROWSER_MOUSE_HOLDING_2);
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.state |= BROWSER_MOUSE_DRAG_ON;
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
}
|
2011-02-09 02:40:14 +03:00
|
|
|
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
/* Handle modifiers being removed */
|
2010-04-08 18:36:09 +04:00
|
|
|
if (g->mouse.state & BROWSER_MOUSE_MOD_1 && !shift)
|
|
|
|
g->mouse.state ^= BROWSER_MOUSE_MOD_1;
|
|
|
|
if (g->mouse.state & BROWSER_MOUSE_MOD_2 && !ctrl)
|
|
|
|
g->mouse.state ^= BROWSER_MOUSE_MOD_2;
|
2009-03-03 22:26:58 +03:00
|
|
|
|
2019-08-03 12:49:07 +03:00
|
|
|
browser_window_mouse_track(g->bw, g->mouse.state, event->x, event->y);
|
2009-03-03 22:26:58 +03:00
|
|
|
|
2006-08-16 01:29:20 +04:00
|
|
|
return TRUE;
|
2006-03-26 18:58:15 +04:00
|
|
|
}
|
|
|
|
|
2019-11-28 02:45:14 +03:00
|
|
|
/**
|
|
|
|
* GTK signal handler for focus-out-event on layout
|
|
|
|
*
|
|
|
|
* when focus leaves the layout widget ensure the caret is cleared
|
|
|
|
*/
|
|
|
|
static gboolean
|
|
|
|
nsgtk_window_focus_out_event(GtkWidget *widget,
|
|
|
|
GdkEvent *event,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
struct gui_window *g = data;
|
|
|
|
|
|
|
|
browser_window_remove_caret(g->bw, true);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-08-03 00:07:59 +03:00
|
|
|
/**
|
|
|
|
* GTK signal handler for button-press-event on layout
|
|
|
|
*/
|
|
|
|
static gboolean
|
|
|
|
nsgtk_window_button_press_event(GtkWidget *widget,
|
|
|
|
GdkEventButton *event,
|
|
|
|
gpointer data)
|
2006-03-26 19:07:25 +04:00
|
|
|
{
|
|
|
|
struct gui_window *g = data;
|
2009-01-31 00:59:01 +03:00
|
|
|
|
2014-02-17 04:21:49 +04:00
|
|
|
gtk_im_context_reset(g->input_method);
|
2010-04-07 20:52:45 +04:00
|
|
|
gtk_widget_grab_focus(GTK_WIDGET(g->layout));
|
2017-02-17 01:15:49 +03:00
|
|
|
nsgtk_local_history_hide();
|
2009-01-31 00:23:10 +03:00
|
|
|
|
2019-08-03 00:07:59 +03:00
|
|
|
g->mouse.pressed_x = event->x;
|
|
|
|
g->mouse.pressed_y = event->y;
|
2009-01-31 00:23:10 +03:00
|
|
|
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
switch (event->button) {
|
2011-02-09 02:40:14 +03:00
|
|
|
case 1: /* Left button, usually. Pass to core as BUTTON 1. */
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.state = BROWSER_MOUSE_PRESS_1;
|
2009-12-18 02:55:02 +03:00
|
|
|
break;
|
2011-02-09 02:40:14 +03:00
|
|
|
|
|
|
|
case 2: /* Middle button, usually. Pass to core as BUTTON 2 */
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.state = BROWSER_MOUSE_PRESS_2;
|
2010-03-28 23:21:47 +04:00
|
|
|
break;
|
2011-02-09 02:40:14 +03:00
|
|
|
|
|
|
|
case 3: /* Right button, usually. Action button, context menu. */
|
2017-08-12 10:16:33 +03:00
|
|
|
/** \todo determine if hiding the caret here is necessary */
|
2013-02-22 16:19:35 +04:00
|
|
|
browser_window_remove_caret(g->bw, true);
|
2014-07-08 02:29:06 +04:00
|
|
|
nsgtk_scaffolding_context_menu(g->scaffold,
|
|
|
|
g->mouse.pressed_x,
|
|
|
|
g->mouse.pressed_y);
|
2010-03-28 23:21:47 +04:00
|
|
|
return TRUE;
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2009-12-18 02:55:02 +03:00
|
|
|
default:
|
|
|
|
return FALSE;
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
}
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2013-02-12 17:20:36 +04:00
|
|
|
/* Modify for double & triple clicks */
|
|
|
|
if (event->type == GDK_3BUTTON_PRESS)
|
|
|
|
g->mouse.state |= BROWSER_MOUSE_TRIPLE_CLICK;
|
|
|
|
else if (event->type == GDK_2BUTTON_PRESS)
|
|
|
|
g->mouse.state |= BROWSER_MOUSE_DOUBLE_CLICK;
|
|
|
|
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
/* Handle the modifiers too */
|
|
|
|
if (event->state & GDK_SHIFT_MASK)
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.state |= BROWSER_MOUSE_MOD_1;
|
2009-03-03 22:26:58 +03:00
|
|
|
if (event->state & GDK_CONTROL_MASK)
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.state |= BROWSER_MOUSE_MOD_2;
|
2009-03-03 22:26:58 +03:00
|
|
|
|
2010-12-16 23:13:44 +03:00
|
|
|
/* Record where we pressed, for use when determining whether to start
|
|
|
|
* a drag in motion notify events. */
|
|
|
|
g->last_x = event->x;
|
|
|
|
g->last_y = event->y;
|
|
|
|
|
2019-08-03 00:07:59 +03:00
|
|
|
browser_window_mouse_click(g->bw,
|
|
|
|
g->mouse.state,
|
|
|
|
g->mouse.pressed_x,
|
|
|
|
g->mouse.pressed_y);
|
2009-03-03 22:26:58 +03:00
|
|
|
|
2008-10-10 03:14:00 +04:00
|
|
|
return TRUE;
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
}
|
2006-08-16 01:29:20 +04:00
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
|
|
|
static gboolean
|
|
|
|
nsgtk_window_button_release_event(GtkWidget *widget,
|
|
|
|
GdkEventButton *event,
|
|
|
|
gpointer data)
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
{
|
|
|
|
struct gui_window *g = data;
|
|
|
|
bool shift = event->state & GDK_SHIFT_MASK;
|
|
|
|
bool ctrl = event->state & GDK_CONTROL_MASK;
|
2009-03-03 22:26:58 +03:00
|
|
|
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
/* If the mouse state is PRESS then we are waiting for a release to emit
|
2011-02-09 02:40:14 +03:00
|
|
|
* a click event, otherwise just reset the state to nothing */
|
2010-04-07 17:53:43 +04:00
|
|
|
if (g->mouse.state & BROWSER_MOUSE_PRESS_1)
|
|
|
|
g->mouse.state ^= (BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_CLICK_1);
|
|
|
|
else if (g->mouse.state & BROWSER_MOUSE_PRESS_2)
|
|
|
|
g->mouse.state ^= (BROWSER_MOUSE_PRESS_2 | BROWSER_MOUSE_CLICK_2);
|
2009-03-03 22:26:58 +03:00
|
|
|
|
Merged revisions 4114-4265,4267-4272,4275-4285,4287-4325 via svnmerge from
svn://source.netsurf-browser.org/branches/mikeL/netsurf
........
r4116 | mikeL | 2008-05-01 22:15:12 +0100 (Thu, 01 May 2008) | 2 lines
Redesigned right-click menu: added back, forward, and reload, previously default menu items are now hidden unless view->toolbars->menu bar is disabled
........
r4117 | mikeL | 2008-05-02 03:54:10 +0100 (Fri, 02 May 2008) | 2 lines
Added a Current Page button to Preferences next to the url entry for setting the home page
........
r4118 | mikeL | 2008-05-02 04:27:37 +0100 (Fri, 02 May 2008) | 1 line
Cleanup
........
r4119 | mikeL | 2008-05-02 21:09:44 +0100 (Fri, 02 May 2008) | 1 line
Preferences window is now initialized the first time edit->preferences is clicked instead of during nsgtk initialization. Expedites start-up time because preferences is a non-essential dialog.
........
r4123 | mikeL | 2008-05-04 15:43:20 +0100 (Sun, 04 May 2008) | 1 line
Converted Preferences window to a dialog. Fixed spacing and naming in Preferences dialog. Split Preferences section of the Glade file into its own gtk_options.glade file. Moved all Preferences related files to gtk/dialogs.
........
r4127 | mikeL | 2008-05-05 20:45:44 +0100 (Mon, 05 May 2008) | 1 line
Fixed a glaring error in directory structure. All glade files are now stored in the res directory.
........
r4128 | mikeL | 2008-05-05 20:52:08 +0100 (Mon, 05 May 2008) | 1 line
Added directory 'dialogs' to revision control
........
r4129 | mikeL | 2008-05-05 20:58:53 +0100 (Mon, 05 May 2008) | 1 line
Cleaned up gtk folder by removing gtk_options.c and gtk_options.h (Moved to dialogs folder)
........
r4130 | mikeL | 2008-05-05 23:42:15 +0100 (Mon, 05 May 2008) | 1 line
Huzzah\! Preferences dialog is now instant apply\!
........
r4131 | mikeL | 2008-05-06 20:43:26 +0100 (Tue, 06 May 2008) | 1 line
nsgtk_reflow_all_windows() is now called whenever an option that requires redrawing of the current page is changed. Preferences dialog is now *completely* instant apply
........
r4132 | mikeL | 2008-05-06 20:55:05 +0100 (Tue, 06 May 2008) | 1 line
Renamed macros to better reflect their purpose
........
r4133 | mikeL | 2008-05-06 21:30:44 +0100 (Tue, 06 May 2008) | 1 line
Added gtk/res/options.glade to svn control
........
r4134 | mikeL | 2008-05-06 21:39:12 +0100 (Tue, 06 May 2008) | 1 line
Preferences window is now resizable
........
r4135 | mikeL | 2008-05-06 21:42:00 +0100 (Tue, 06 May 2008) | 1 line
Fixed reload menu item in popup menu
........
r4136 | mikeL | 2008-05-07 00:24:35 +0100 (Wed, 07 May 2008) | 1 line
Proxy configurations are now insensitive if proxy type is set to no proxy. Changing the home page with the Current Page button is now saved. Moved Current Page button in Preferences window and added Default Page.
........
r4137 | mikeL | 2008-05-07 00:41:29 +0100 (Wed, 07 May 2008) | 1 line
Solved a problem with all options being saved prematurely on initialization
........
r4145 | mikeL | 2008-05-11 18:07:06 +0100 (Sun, 11 May 2008) | 1 line
Optimized prefences window signal handling, entry signals are now caught on focus-out-event and checked for changes
........
r4146 | mikeL | 2008-05-11 18:16:04 +0100 (Sun, 11 May 2008) | 1 line
Fixed regression where 'Set Current Page' button stopped working
........
r4147 | mikeL | 2008-05-11 18:32:10 +0100 (Sun, 11 May 2008) | 1 line
Added 'Default Page' button functionality
........
r4148 | mikeL | 2008-05-11 18:33:03 +0100 (Sun, 11 May 2008) | 1 line
Updated TODO list
........
r4149 | mikeL | 2008-05-12 01:04:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Hide Advertisement' functionality
........
r4150 | mikeL | 2008-05-12 01:30:40 +0100 (Mon, 12 May 2008) | 1 line
Re-activated the option 'Disable Animation' and fixed bug where it would actually enable animation
........
r4151 | mikeL | 2008-05-12 01:42:43 +0100 (Mon, 12 May 2008) | 1 line
Added 'Send site referral information' functionality
........
r4152 | mikeL | 2008-05-12 02:01:00 +0100 (Mon, 12 May 2008) | 1 line
Added 'Disc cache age' functionality
........
r4154 | mikeL | 2008-05-13 20:35:29 +0100 (Tue, 13 May 2008) | 1 line
Fixed regression where preferences were not written to file in some cases and preferences dialog could not be reopened.
........
r4158 | mikeL | 2008-05-14 21:57:50 +0100 (Wed, 14 May 2008) | 1 line
Added 'preview' button to fonts tab of preferences dialog. nsgtk_reflow_all_windows is now called only when that button is clicked.
........
r4162 | mikeL | 2008-05-15 20:09:30 +0100 (Thu, 15 May 2008) | 1 line
Possible fix to segfault due to invalid test
........
r4163 | mikeL | 2008-05-15 20:25:28 +0100 (Thu, 15 May 2008) | 1 line
Fixed typo that caused preferences dialog to be unopenable
........
r4164 | mikeL | 2008-05-15 20:57:49 +0100 (Thu, 15 May 2008) | 1 line
Added initialization statement for preferences_dialog to make sure that
........
r4169 | mikeL | 2008-05-17 00:30:54 +0100 (Sat, 17 May 2008) | 1 line
Added a 'parent_window' initialization parameter to the preferences dialog so that it may center itself on parent. This also optimizes the closing code as destroy is now called on the dialog when the main window is closed
........
r4174 | mikeL | 2008-05-18 15:46:43 +0100 (Sun, 18 May 2008) | 1 line
Animation speed option is now insensitive when 'Disable animations' is true
........
r4175 | mikeL | 2008-05-18 15:50:06 +0100 (Sun, 18 May 2008) | 1 line
Added tooltip to preview button
........
r4176 | mikeL | 2008-05-18 16:04:05 +0100 (Sun, 18 May 2008) | 1 line
Animation speed is now always sensitive
........
r4177 | mikeL | 2008-05-19 02:32:21 +0100 (Mon, 19 May 2008) | 1 line
Redesigned about dialog as a GtkAboutDialog and removed the respective section from netsurf.glade (May need string revision)
........
r4178 | mikeL | 2008-05-19 02:36:15 +0100 (Mon, 19 May 2008) | 1 line
Fixed compile warning relating to improper cast of netsurf_version
........
r4180 | mikeL | 2008-05-19 21:42:04 +0100 (Mon, 19 May 2008) | 1 line
Updated credits
........
r4181 | mikeL | 2008-05-19 21:43:16 +0100 (Mon, 19 May 2008) | 1 line
launch_url is no longer static
........
r4182 | mikeL | 2008-05-19 21:50:03 +0100 (Mon, 19 May 2008) | 1 line
netsurf_version is now const in function which addresses jmb's concern
........
r4183 | mikeL | 2008-05-19 21:59:55 +0100 (Mon, 19 May 2008) | 1 line
Updated header
........
r4184 | mikeL | 2008-05-19 22:03:28 +0100 (Mon, 19 May 2008) | 1 line
local variables are now static
........
r4186 | mikeL | 2008-05-21 22:03:43 +0100 (Wed, 21 May 2008) | 1 line
Removed 'Main Development Team' from the beginning of all credits
........
r4219 | mikeL | 2008-05-28 18:17:12 +0100 (Wed, 28 May 2008) | 1 line
Removed wndOpenFile from glade file.
........
r4236 | mikeL | 2008-05-31 23:25:32 +0100 (Sat, 31 May 2008) | 1 line
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
........
r4275 | mikeL | 2008-06-06 17:16:29 +0100 (Fri, 06 Jun 2008) | 1 line
Added support for dragging, clicks are now emited on button release
........
r4276 | mikeL | 2008-06-06 17:18:18 +0100 (Fri, 06 Jun 2008) | 1 line
gtk_window.c now sets the current_redraw_browser. Text selection now highlights properly
........
r4277 | mikeL | 2008-06-06 17:47:35 +0100 (Fri, 06 Jun 2008) | 1 line
Cleaned up the button detection code
........
r4278 | mikeL | 2008-06-06 17:58:51 +0100 (Fri, 06 Jun 2008) | 1 line
Removed leftover variables
........
r4279 | mikeL | 2008-06-06 18:13:58 +0100 (Fri, 06 Jun 2008) | 1 line
Enabled 'Select All'
........
r4280 | mikeL | 2008-06-06 18:31:56 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed bug where mouse state would always remain as PRESS even if dragging
........
r4281 | mikeL | 2008-06-06 18:45:16 +0100 (Fri, 06 Jun 2008) | 1 line
Fixed regression where mouse state was cleared improperly
........
r4287 | mikeL | 2008-06-07 00:21:32 +0100 (Sat, 07 Jun 2008) | 1 line
Mouse code can now handle modifiers. Fixed bug where end of drag was not detected until mouse moved after being released. Improved mouse handling.
........
r4294 | mikeL | 2008-06-07 03:21:03 +0100 (Sat, 07 Jun 2008) | 1 line
Added ability to handle modifiers pressed during a drag event. Mouse movement handling now uses switch statements (Thanks tlsa)
........
r4295 | mikeL | 2008-06-07 03:40:11 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where modifier keys were being detected incorrectly
........
r4296 | mikeL | 2008-06-07 03:42:31 +0100 (Sat, 07 Jun 2008) | 1 line
Reversed accidental file modification
........
r4299 | mikeL | 2008-06-07 21:32:15 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed inclusion of gtk_about source file instead of header
........
r4300 | mikeL | 2008-06-07 22:27:39 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed problem with about.h not linking properly.
........
r4301 | mikeL | 2008-06-07 22:37:28 +0100 (Sat, 07 Jun 2008) | 1 line
Moved definitions of gui_window and browser_mouse to gtk_window.h. Moved all selection related functions to gtk_selection.c. Implemented copy functionality.
........
r4302 | mikeL | 2008-06-07 22:48:18 +0100 (Sat, 07 Jun 2008) | 1 line
Implemented paste functionality
........
r4303 | mikeL | 2008-06-07 22:48:40 +0100 (Sat, 07 Jun 2008) | 1 line
Removed old test case
........
r4304 | mikeL | 2008-06-07 22:53:56 +0100 (Sat, 07 Jun 2008) | 1 line
Fixed bug where click would be sent at the end of a button 2 drag (Thanks tlsa)
........
r4305 | mikeL | 2008-06-07 23:48:01 +0100 (Sat, 07 Jun 2008) | 1 line
Prevented gui_copy_to_clipboard from overwriting clipboard with a NULL string.
........
r4306 | mikeL | 2008-06-08 00:00:55 +0100 (Sun, 08 Jun 2008) | 1 line
Fixed regression where the state of the modifier keys would alternate as the mouse moved. Fixed bug that prevented drags from being registered if a modifier key was pressed
........
r4308 | mikeL | 2008-06-08 00:53:26 +0100 (Sun, 08 Jun 2008) | 1 line
Changed 'Select All' menu item to stock
........
r4314 | mikeL | 2008-06-09 19:09:23 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4315 | mikeL | 2008-06-09 19:14:14 +0100 (Mon, 09 Jun 2008) | 1 line
Added function nsgtk_scaffolding_set_sensitive
........
r4316 | mikeL | 2008-06-09 19:20:16 +0100 (Mon, 09 Jun 2008) | 1 line
Removed option 'Use Cairo for anti-aliased rendering'
........
r4317 | mikeL | 2008-06-09 20:10:55 +0100 (Mon, 09 Jun 2008) | 1 line
Fixed bug where text would be selected in all windows instead of only the active one
........
r4318 | mikeL | 2008-06-09 20:29:42 +0100 (Mon, 09 Jun 2008) | 1 line
(Drastically) Improved redraw handling. (Thanks jmb)
........
r4319 | mikeL | 2008-06-09 21:10:17 +0100 (Mon, 09 Jun 2008) | 1 line
Removed old test case
........
r4320 | mikeL | 2008-06-10 07:27:32 +0100 (Tue, 10 Jun 2008) | 1 line
Implemented (almost) the rest of the clipboard functionality. Clipboard functions now handle the url bar correctly. Clipboard menu items are now appropriately sensitive.
........
r4321 | mikeL | 2008-06-10 19:08:05 +0100 (Tue, 10 Jun 2008) | 1 line
Added clipboard functions to contextual right click menu
........
r4323 | mikeL | 2008-06-10 23:57:43 +0100 (Tue, 10 Jun 2008) | 1 line
Fixed regression where modifiers key states would be cleared on button release. Modifier keys are now set only on button press and can only be removed during motion or upon release. Fixed spacing (thanks tlsa)
........
svn path=/trunk/netsurf/; revision=4326
2008-06-11 14:57:44 +04:00
|
|
|
/* Handle modifiers being removed */
|
2010-04-08 18:36:09 +04:00
|
|
|
if (g->mouse.state & BROWSER_MOUSE_MOD_1 && !shift)
|
|
|
|
g->mouse.state ^= BROWSER_MOUSE_MOD_1;
|
|
|
|
if (g->mouse.state & BROWSER_MOUSE_MOD_2 && !ctrl)
|
|
|
|
g->mouse.state ^= BROWSER_MOUSE_MOD_2;
|
2009-03-03 22:26:58 +03:00
|
|
|
|
2013-02-12 17:20:36 +04:00
|
|
|
if (g->mouse.state & (BROWSER_MOUSE_CLICK_1 | BROWSER_MOUSE_CLICK_2)) {
|
2019-08-03 12:49:07 +03:00
|
|
|
browser_window_mouse_click(g->bw, g->mouse.state, event->x, event->y);
|
2011-02-09 02:40:14 +03:00
|
|
|
} else {
|
2019-08-03 12:49:07 +03:00
|
|
|
browser_window_mouse_track(g->bw, 0, event->x, event->y);
|
2011-02-09 02:40:14 +03:00
|
|
|
}
|
2009-03-03 22:26:58 +03:00
|
|
|
|
2010-04-07 17:53:43 +04:00
|
|
|
g->mouse.state = 0;
|
2006-08-16 01:29:20 +04:00
|
|
|
return TRUE;
|
2006-03-26 19:07:25 +04:00
|
|
|
}
|
2004-06-22 22:48:33 +04:00
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2013-05-04 22:40:11 +04:00
|
|
|
static gboolean
|
|
|
|
nsgtk_window_scroll_event(GtkWidget *widget,
|
|
|
|
GdkEventScroll *event,
|
|
|
|
gpointer data)
|
2010-04-08 18:36:09 +04:00
|
|
|
{
|
|
|
|
struct gui_window *g = data;
|
|
|
|
double value;
|
2013-05-04 22:40:11 +04:00
|
|
|
double deltax = 0;
|
|
|
|
double deltay = 0;
|
2012-05-16 23:57:43 +04:00
|
|
|
GtkAdjustment *vscroll = nsgtk_layout_get_vadjustment(g->layout);
|
|
|
|
GtkAdjustment *hscroll = nsgtk_layout_get_hadjustment(g->layout);
|
|
|
|
GtkAllocation alloc;
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2010-04-08 18:36:09 +04:00
|
|
|
switch (event->direction) {
|
|
|
|
case GDK_SCROLL_LEFT:
|
2013-05-04 22:40:11 +04:00
|
|
|
deltax = -1.0;
|
2010-04-08 18:36:09 +04:00
|
|
|
break;
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2010-04-08 18:36:09 +04:00
|
|
|
case GDK_SCROLL_UP:
|
2013-05-04 22:40:11 +04:00
|
|
|
deltay = -1.0;
|
|
|
|
break;
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2013-05-04 22:40:11 +04:00
|
|
|
case GDK_SCROLL_RIGHT:
|
|
|
|
deltax = 1.0;
|
|
|
|
break;
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2013-05-04 22:40:11 +04:00
|
|
|
case GDK_SCROLL_DOWN:
|
|
|
|
deltay = 1.0;
|
|
|
|
break;
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2013-05-04 22:40:11 +04:00
|
|
|
#if GTK_CHECK_VERSION(3,4,0)
|
|
|
|
case GDK_SCROLL_SMOOTH:
|
|
|
|
gdk_event_get_scroll_deltas((GdkEvent *)event, &deltax, &deltay);
|
2010-04-08 18:36:09 +04:00
|
|
|
break;
|
2013-05-04 22:40:11 +04:00
|
|
|
#endif
|
|
|
|
default:
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Unhandled mouse scroll direction");
|
2013-05-04 22:40:11 +04:00
|
|
|
return TRUE;
|
|
|
|
}
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2013-05-04 22:40:11 +04:00
|
|
|
deltax *= nsgtk_adjustment_get_step_increment(hscroll);
|
|
|
|
deltay *= nsgtk_adjustment_get_step_increment(vscroll);
|
|
|
|
|
|
|
|
if (browser_window_scroll_at_point(g->bw,
|
2019-08-03 13:58:44 +03:00
|
|
|
event->x, event->y,
|
|
|
|
deltax, deltay) != true) {
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2013-05-04 22:40:11 +04:00
|
|
|
/* core did not handle event so change adjustments */
|
|
|
|
|
|
|
|
/* Horizontal */
|
|
|
|
if (deltax != 0) {
|
|
|
|
value = gtk_adjustment_get_value(hscroll) + deltax;
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
/* @todo consider gtk_widget_get_allocated_width() */
|
2012-05-17 20:48:20 +04:00
|
|
|
nsgtk_widget_get_allocation(GTK_WIDGET(g->layout), &alloc);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2012-05-17 20:48:20 +04:00
|
|
|
if (value > nsgtk_adjustment_get_upper(hscroll) - alloc.width) {
|
2013-05-04 22:40:11 +04:00
|
|
|
value = nsgtk_adjustment_get_upper(hscroll) - alloc.width;
|
|
|
|
}
|
|
|
|
if (value < nsgtk_adjustment_get_lower(hscroll)) {
|
|
|
|
value = nsgtk_adjustment_get_lower(hscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
gtk_adjustment_set_value(hscroll, value);
|
|
|
|
}
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2013-05-04 22:40:11 +04:00
|
|
|
/* Vertical */
|
|
|
|
if (deltay != 0) {
|
|
|
|
value = gtk_adjustment_get_value(vscroll) + deltay;
|
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
/* @todo consider gtk_widget_get_allocated_height */
|
2012-05-17 20:48:20 +04:00
|
|
|
nsgtk_widget_get_allocation(GTK_WIDGET(g->layout), &alloc);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2013-05-04 22:40:11 +04:00
|
|
|
if (value > (nsgtk_adjustment_get_upper(vscroll) - alloc.height)) {
|
|
|
|
value = nsgtk_adjustment_get_upper(vscroll) - alloc.height;
|
|
|
|
}
|
|
|
|
if (value < nsgtk_adjustment_get_lower(vscroll)) {
|
|
|
|
value = nsgtk_adjustment_get_lower(vscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
gtk_adjustment_set_value(vscroll, value);
|
|
|
|
}
|
2010-04-08 18:36:09 +04:00
|
|
|
}
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2010-04-08 18:36:09 +04:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
|
|
|
static gboolean
|
|
|
|
nsgtk_window_keypress_event(GtkWidget *widget,
|
|
|
|
GdkEventKey *event,
|
|
|
|
gpointer data)
|
2004-10-18 01:51:06 +04:00
|
|
|
{
|
|
|
|
struct gui_window *g = data;
|
2014-02-17 04:21:49 +04:00
|
|
|
uint32_t nskey;
|
2019-08-20 02:16:52 +03:00
|
|
|
|
2014-02-17 04:21:49 +04:00
|
|
|
if (gtk_im_context_filter_keypress(g->input_method, event))
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
nskey = gtk_gui_gdkkey_to_nskey(event);
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2007-03-07 00:29:51 +03:00
|
|
|
if (browser_window_key_press(g->bw, nskey))
|
|
|
|
return TRUE;
|
|
|
|
|
2013-06-25 22:01:41 +04:00
|
|
|
if ((event->state & 0x7) != 0)
|
2012-05-16 23:57:43 +04:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
double value;
|
|
|
|
GtkAdjustment *vscroll = nsgtk_layout_get_vadjustment(g->layout);
|
|
|
|
GtkAdjustment *hscroll = nsgtk_layout_get_hadjustment(g->layout);
|
|
|
|
GtkAllocation alloc;
|
|
|
|
|
|
|
|
/* @todo consider gtk_widget_get_allocated_width() */
|
2012-05-17 20:48:20 +04:00
|
|
|
nsgtk_widget_get_allocation(GTK_WIDGET(g->layout), &alloc);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
switch (event->keyval) {
|
|
|
|
|
|
|
|
case GDK_KEY(Home):
|
|
|
|
case GDK_KEY(KP_Home):
|
2012-05-17 20:48:20 +04:00
|
|
|
value = nsgtk_adjustment_get_lower(vscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
gtk_adjustment_set_value(vscroll, value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_KEY(End):
|
|
|
|
case GDK_KEY(KP_End):
|
2012-05-17 20:48:20 +04:00
|
|
|
value = nsgtk_adjustment_get_upper(vscroll) - alloc.height;
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2012-05-17 20:48:20 +04:00
|
|
|
if (value < nsgtk_adjustment_get_lower(vscroll))
|
|
|
|
value = nsgtk_adjustment_get_lower(vscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
gtk_adjustment_set_value(vscroll, value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_KEY(Left):
|
|
|
|
case GDK_KEY(KP_Left):
|
|
|
|
value = gtk_adjustment_get_value(hscroll) -
|
2012-05-17 20:48:20 +04:00
|
|
|
nsgtk_adjustment_get_step_increment(hscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2012-05-17 20:48:20 +04:00
|
|
|
if (value < nsgtk_adjustment_get_lower(hscroll))
|
|
|
|
value = nsgtk_adjustment_get_lower(hscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
gtk_adjustment_set_value(hscroll, value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_KEY(Up):
|
|
|
|
case GDK_KEY(KP_Up):
|
|
|
|
value = gtk_adjustment_get_value(vscroll) -
|
2012-05-17 20:48:20 +04:00
|
|
|
nsgtk_adjustment_get_step_increment(vscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2012-05-17 20:48:20 +04:00
|
|
|
if (value < nsgtk_adjustment_get_lower(vscroll))
|
|
|
|
value = nsgtk_adjustment_get_lower(vscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
gtk_adjustment_set_value(vscroll, value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_KEY(Right):
|
|
|
|
case GDK_KEY(KP_Right):
|
|
|
|
value = gtk_adjustment_get_value(hscroll) +
|
2012-05-17 20:48:20 +04:00
|
|
|
nsgtk_adjustment_get_step_increment(hscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2012-05-17 20:48:20 +04:00
|
|
|
if (value > nsgtk_adjustment_get_upper(hscroll) - alloc.width)
|
|
|
|
value = nsgtk_adjustment_get_upper(hscroll) - alloc.width;
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
gtk_adjustment_set_value(hscroll, value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_KEY(Down):
|
|
|
|
case GDK_KEY(KP_Down):
|
|
|
|
value = gtk_adjustment_get_value(vscroll) +
|
2012-05-17 20:48:20 +04:00
|
|
|
nsgtk_adjustment_get_step_increment(vscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2012-05-17 20:48:20 +04:00
|
|
|
if (value > nsgtk_adjustment_get_upper(vscroll) - alloc.height)
|
|
|
|
value = nsgtk_adjustment_get_upper(vscroll) - alloc.height;
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
gtk_adjustment_set_value(vscroll, value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_KEY(Page_Up):
|
|
|
|
case GDK_KEY(KP_Page_Up):
|
|
|
|
value = gtk_adjustment_get_value(vscroll) -
|
2012-05-17 20:48:20 +04:00
|
|
|
nsgtk_adjustment_get_page_increment(vscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2012-05-17 20:48:20 +04:00
|
|
|
if (value < nsgtk_adjustment_get_lower(vscroll))
|
|
|
|
value = nsgtk_adjustment_get_lower(vscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
gtk_adjustment_set_value(vscroll, value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_KEY(Page_Down):
|
|
|
|
case GDK_KEY(KP_Page_Down):
|
|
|
|
value = gtk_adjustment_get_value(vscroll) +
|
2012-05-17 20:48:20 +04:00
|
|
|
nsgtk_adjustment_get_page_increment(vscroll);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2012-05-17 20:48:20 +04:00
|
|
|
if (value > nsgtk_adjustment_get_upper(vscroll) - alloc.height)
|
|
|
|
value = nsgtk_adjustment_get_upper(vscroll) - alloc.height;
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
gtk_adjustment_set_value(vscroll, value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
2007-03-07 00:29:51 +03:00
|
|
|
|
|
|
|
}
|
2006-08-16 01:29:20 +04:00
|
|
|
|
|
|
|
return TRUE;
|
2004-10-18 01:51:06 +04:00
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
|
|
|
static gboolean
|
|
|
|
nsgtk_window_keyrelease_event(GtkWidget *widget,
|
|
|
|
GdkEventKey *event,
|
|
|
|
gpointer data)
|
2014-02-17 04:21:49 +04:00
|
|
|
{
|
|
|
|
struct gui_window *g = data;
|
2019-08-20 02:16:52 +03:00
|
|
|
|
2014-02-17 04:21:49 +04:00
|
|
|
return gtk_im_context_filter_keypress(g->input_method, event);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
static void
|
|
|
|
nsgtk_window_input_method_commit(GtkIMContext *ctx,
|
|
|
|
const gchar *str,
|
|
|
|
gpointer data)
|
2014-02-17 04:21:49 +04:00
|
|
|
{
|
|
|
|
struct gui_window *g = data;
|
|
|
|
size_t len = strlen(str), offset = 0;
|
|
|
|
|
|
|
|
while (offset < len) {
|
|
|
|
uint32_t nskey = utf8_to_ucs4(str + offset, len - offset);
|
|
|
|
|
|
|
|
browser_window_key_press(g->bw, nskey);
|
|
|
|
|
|
|
|
offset = utf8_next(str, len, offset);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
static gboolean
|
|
|
|
nsgtk_window_size_allocate_event(GtkWidget *widget,
|
|
|
|
GtkAllocation *allocation,
|
|
|
|
gpointer data)
|
2006-11-27 20:13:24 +03:00
|
|
|
{
|
|
|
|
struct gui_window *g = data;
|
2007-08-08 20:16:03 +04:00
|
|
|
|
2014-06-30 19:40:56 +04:00
|
|
|
browser_window_schedule_reformat(g->bw);
|
2013-06-25 22:01:41 +04:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-01 01:53:51 +03:00
|
|
|
/**
|
|
|
|
* when the pane position is changed update the user option
|
2013-06-25 22:01:41 +04:00
|
|
|
*
|
|
|
|
* The slightly awkward implementation with the first allocation flag
|
|
|
|
* is necessary because the initial window creation does not cause an
|
|
|
|
* allocate-event signal so the position value in the pane is incorrect
|
|
|
|
* and we cannot know what it should be until after the allocation
|
|
|
|
* (which did not generate a signal) is done as the user position is a
|
|
|
|
* percentage of pane total width not an absolute value.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
nsgtk_paned_notify__position(GObject *gobject, GParamSpec *pspec, gpointer data)
|
|
|
|
{
|
|
|
|
struct gui_window *g = data;
|
|
|
|
GtkAllocation pane_alloc;
|
|
|
|
|
|
|
|
gtk_widget_get_allocation(GTK_WIDGET(g->paned), &pane_alloc);
|
|
|
|
|
|
|
|
if (g->paned_sized == false)
|
|
|
|
{
|
|
|
|
g->paned_sized = true;
|
|
|
|
gtk_paned_set_position(g->paned,
|
|
|
|
(nsoption_int(toolbar_status_size) * pane_alloc.width) / 10000);
|
|
|
|
return;
|
2010-04-09 00:17:57 +04:00
|
|
|
}
|
|
|
|
|
2013-06-25 22:01:41 +04:00
|
|
|
nsoption_set_int(toolbar_status_size,
|
|
|
|
((gtk_paned_get_position(g->paned) * 10000) / (pane_alloc.width - 1)));
|
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set status bar / scroll bar proportion according to user option
|
|
|
|
* when pane is resized.
|
2013-06-25 22:01:41 +04:00
|
|
|
*/
|
2019-09-04 21:23:06 +03:00
|
|
|
static gboolean
|
|
|
|
nsgtk_paned_size_allocate_event(GtkWidget *widget,
|
|
|
|
GtkAllocation *allocation,
|
|
|
|
gpointer data)
|
2013-06-25 22:01:41 +04:00
|
|
|
{
|
|
|
|
gtk_paned_set_position(GTK_PANED(widget),
|
|
|
|
(nsoption_int(toolbar_status_size) * allocation->width) / 10000);
|
|
|
|
|
2006-08-16 01:29:20 +04:00
|
|
|
return TRUE;
|
2006-03-26 19:34:33 +04:00
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
|
|
|
/**
|
2019-10-09 01:06:01 +03:00
|
|
|
* handler for gtk destroy signal on window container
|
|
|
|
*
|
|
|
|
* destroy the browsing context as there is will be nothing to display it now
|
2019-09-04 21:23:06 +03:00
|
|
|
*/
|
2013-06-28 15:13:02 +04:00
|
|
|
static void window_destroy(GtkWidget *widget, gpointer data)
|
|
|
|
{
|
|
|
|
struct gui_window *gw = data;
|
|
|
|
|
|
|
|
browser_window_destroy(gw->bw);
|
2014-02-17 04:21:49 +04:00
|
|
|
|
|
|
|
g_object_unref(gw->input_method);
|
2019-10-09 01:06:01 +03:00
|
|
|
|
|
|
|
/* free any existing icon */
|
|
|
|
if (gw->icon != NULL) {
|
|
|
|
g_object_unref(gw->icon);
|
|
|
|
gw->icon = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
free(gw);
|
2013-06-28 15:13:02 +04:00
|
|
|
}
|
|
|
|
|
2014-07-25 19:29:18 +04:00
|
|
|
|
2019-08-21 17:29:10 +03:00
|
|
|
static struct browser_window *bw_from_gw(void *data)
|
|
|
|
{
|
|
|
|
struct gui_window *gw = data;
|
|
|
|
return gw->bw;
|
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2019-09-21 03:07:32 +03:00
|
|
|
static bool get_tool_bar_show(void)
|
|
|
|
{
|
|
|
|
const char *cur_bar_show;
|
|
|
|
|
|
|
|
cur_bar_show = nsoption_charp(bar_show);
|
|
|
|
if (cur_bar_show != NULL) {
|
|
|
|
if (strcmp(cur_bar_show, "menu/tool") == 0) {
|
|
|
|
return true;
|
|
|
|
} else if (strcmp(cur_bar_show, "tool") == 0) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-10-09 01:06:01 +03:00
|
|
|
/**
|
|
|
|
* Make the throbber advance to next frame.
|
|
|
|
*
|
|
|
|
* scheduled callback to update the throbber
|
|
|
|
*
|
|
|
|
* \param p The context passed when scheduled.
|
|
|
|
*/
|
|
|
|
static void next_throbber_frame(void *p)
|
|
|
|
{
|
|
|
|
struct gui_window *gw = p;
|
|
|
|
nserror res;
|
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
|
|
|
|
gw->throb_frame++; /* advance to next frame */
|
|
|
|
|
|
|
|
res = nsgtk_throbber_get_frame(gw->throb_frame, &pixbuf);
|
|
|
|
if (res == NSERROR_BAD_SIZE) {
|
|
|
|
gw->throb_frame = 1;
|
|
|
|
res = nsgtk_throbber_get_frame(gw->throb_frame, &pixbuf);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (res == NSERROR_OK) {
|
|
|
|
nsgtk_tab_set_icon(gw->container, pixbuf);
|
|
|
|
/* only schedule next frame if there are no errors */
|
|
|
|
nsgtk_schedule(THROBBER_FRAME_TIME, next_throbber_frame, p);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-07-25 19:29:18 +04:00
|
|
|
/**
|
|
|
|
* Create and open a gtk container (window or tab) for a browsing context.
|
|
|
|
*
|
|
|
|
* \param bw The browsing context to create gui_window for.
|
|
|
|
* \param existing An existing gui_window, may be NULL
|
|
|
|
* \param flags flags to control the container creation
|
|
|
|
* \return gui window, or NULL on error
|
|
|
|
*
|
|
|
|
* If GW_CREATE_CLONE flag is set existing is non-NULL.
|
|
|
|
*
|
|
|
|
* Front end's gui_window must include a reference to the
|
|
|
|
* browser window passed in the bw param.
|
|
|
|
*/
|
2014-01-12 21:07:34 +04:00
|
|
|
static struct gui_window *
|
2014-01-12 02:34:12 +04:00
|
|
|
gui_window_create(struct browser_window *bw,
|
2019-08-16 01:02:04 +03:00
|
|
|
struct gui_window *existing,
|
|
|
|
gui_window_create_flags flags)
|
2011-02-09 02:40:14 +03:00
|
|
|
{
|
2015-06-13 13:31:23 +03:00
|
|
|
struct gui_window *g; /* what is being created to return */
|
2020-02-22 14:51:10 +03:00
|
|
|
bool open_in_background = !(nsoption_bool(focus_new));
|
2015-06-13 13:31:23 +03:00
|
|
|
GtkBuilder* tab_builder;
|
|
|
|
|
2020-02-22 14:51:10 +03:00
|
|
|
/* If there is a foreground request, override user preference */
|
|
|
|
if (flags & GW_CREATE_FOREGROUND)
|
|
|
|
open_in_background = false;
|
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
nserror res;
|
|
|
|
|
|
|
|
res = nsgtk_builder_new_from_resname("tabcontents", &tab_builder);
|
|
|
|
if (res != NSERROR_OK) {
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Tab contents UI builder init failed");
|
2013-11-03 20:30:34 +04:00
|
|
|
return NULL;
|
|
|
|
}
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
gtk_builder_connect_signals(tab_builder, NULL);
|
|
|
|
|
2011-02-09 02:40:14 +03:00
|
|
|
g = calloc(1, sizeof(*g));
|
|
|
|
if (!g) {
|
2016-04-26 23:51:47 +03:00
|
|
|
nsgtk_warning("NoMemory", 0);
|
2015-06-13 13:31:23 +03:00
|
|
|
g_object_unref(tab_builder);
|
2013-11-03 20:30:34 +04:00
|
|
|
return NULL;
|
2011-02-09 02:40:14 +03:00
|
|
|
}
|
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Creating gui window %p for browser window %p",
|
|
|
|
g, bw);
|
2011-02-09 02:40:14 +03:00
|
|
|
|
|
|
|
g->bw = bw;
|
|
|
|
g->mouse.state = 0;
|
|
|
|
g->current_pointer = GUI_POINTER_DEFAULT;
|
|
|
|
|
2013-06-25 22:01:41 +04:00
|
|
|
/* attach scaffold */
|
2014-02-09 17:07:39 +04:00
|
|
|
if (flags & GW_CREATE_TAB) {
|
2015-06-30 14:09:45 +03:00
|
|
|
/* open in new tab, attach to existing scaffold */
|
2014-07-25 19:29:18 +04:00
|
|
|
if (existing != NULL) {
|
|
|
|
g->scaffold = existing->scaffold;
|
|
|
|
} else {
|
|
|
|
g->scaffold = nsgtk_current_scaffolding();
|
|
|
|
}
|
2011-05-17 02:11:18 +04:00
|
|
|
} else {
|
2015-06-30 14:09:45 +03:00
|
|
|
/* open in new window, create and attach to scaffold */
|
2011-02-09 02:40:14 +03:00
|
|
|
g->scaffold = nsgtk_new_scaffolding(g);
|
2011-05-17 02:11:18 +04:00
|
|
|
}
|
2011-02-09 02:40:14 +03:00
|
|
|
if (g->scaffold == NULL) {
|
2016-04-26 23:51:47 +03:00
|
|
|
nsgtk_warning("NoMemory", 0);
|
2011-02-09 02:40:14 +03:00
|
|
|
free(g);
|
2015-06-13 13:31:23 +03:00
|
|
|
g_object_unref(tab_builder);
|
2011-02-09 02:40:14 +03:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Construct our primary elements */
|
2019-08-19 01:45:19 +03:00
|
|
|
g->container = GTK_WIDGET(gtk_builder_get_object(tab_builder, "tabBox"));
|
2015-06-13 13:31:23 +03:00
|
|
|
g->layout = GTK_LAYOUT(gtk_builder_get_object(tab_builder, "layout"));
|
2020-02-23 00:41:17 +03:00
|
|
|
g->grid = GTK_WIDGET(gtk_builder_get_object(tab_builder, "tabContents"));
|
2015-06-13 13:31:23 +03:00
|
|
|
g->status_bar = GTK_LABEL(gtk_builder_get_object(tab_builder, "status_bar"));
|
|
|
|
g->paned = GTK_PANED(gtk_builder_get_object(tab_builder, "hpaned1"));
|
2014-02-17 04:21:49 +04:00
|
|
|
g->input_method = gtk_im_multicontext_new();
|
2011-09-05 14:52:37 +04:00
|
|
|
|
2019-08-19 01:45:19 +03:00
|
|
|
|
2019-09-17 02:48:57 +03:00
|
|
|
/* create toolbar */
|
2020-02-22 18:33:17 +03:00
|
|
|
res = nsgtk_toolbar_create(tab_builder, bw_from_gw, g,
|
|
|
|
!!(flags & GW_CREATE_FOCUS_LOCATION),
|
|
|
|
&g->toolbar);
|
2019-08-19 01:45:19 +03:00
|
|
|
if (res != NSERROR_OK) {
|
|
|
|
free(g);
|
|
|
|
g_object_unref(tab_builder);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2019-09-17 02:48:57 +03:00
|
|
|
/* local page text search toolbar */
|
2019-09-18 00:28:43 +03:00
|
|
|
res = nsgtk_search_create(tab_builder, g->bw, &g->search);
|
2019-09-17 02:48:57 +03:00
|
|
|
if (res != NSERROR_OK) {
|
|
|
|
free(g);
|
|
|
|
g_object_unref(tab_builder);
|
|
|
|
return NULL;
|
|
|
|
}
|
2019-09-01 01:53:51 +03:00
|
|
|
|
2015-06-30 14:09:45 +03:00
|
|
|
/* set a default favicon */
|
|
|
|
g_object_ref(favicon_pixbuf);
|
|
|
|
g->icon = favicon_pixbuf;
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2013-06-28 15:13:02 +04:00
|
|
|
/* add new gui window to global list (push_top) */
|
|
|
|
if (window_list) {
|
2011-02-09 02:40:14 +03:00
|
|
|
window_list->prev = g;
|
2013-06-28 15:13:02 +04:00
|
|
|
}
|
2011-02-09 02:40:14 +03:00
|
|
|
g->next = window_list;
|
|
|
|
g->prev = NULL;
|
|
|
|
window_list = g;
|
|
|
|
|
|
|
|
/* set the events we're interested in receiving from the browser's
|
|
|
|
* drawing area.
|
|
|
|
*/
|
|
|
|
gtk_widget_add_events(GTK_WIDGET(g->layout),
|
|
|
|
GDK_EXPOSURE_MASK |
|
|
|
|
GDK_LEAVE_NOTIFY_MASK |
|
|
|
|
GDK_BUTTON_PRESS_MASK |
|
|
|
|
GDK_BUTTON_RELEASE_MASK |
|
|
|
|
GDK_POINTER_MOTION_MASK |
|
|
|
|
GDK_POINTER_MOTION_HINT_MASK |
|
|
|
|
GDK_KEY_PRESS_MASK |
|
|
|
|
GDK_KEY_RELEASE_MASK |
|
|
|
|
GDK_SCROLL_MASK);
|
|
|
|
nsgtk_widget_set_can_focus(GTK_WIDGET(g->layout), TRUE);
|
|
|
|
|
|
|
|
/* set the default background colour of the drawing area to white. */
|
2013-06-25 22:01:41 +04:00
|
|
|
nsgtk_widget_override_background_color(GTK_WIDGET(g->layout),
|
2020-02-22 21:13:22 +03:00
|
|
|
GTK_STATE_FLAG_NORMAL,
|
2013-06-28 15:13:02 +04:00
|
|
|
0, 0xffff, 0xffff, 0xffff);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2019-09-19 15:26:46 +03:00
|
|
|
nsgtk_connect_draw_event(GTK_WIDGET(g->layout),
|
2015-04-12 00:32:08 +03:00
|
|
|
G_CALLBACK(nsgtk_window_draw_event), g);
|
|
|
|
|
|
|
|
/* helper macro to conect signals to callbacks */
|
|
|
|
#define CONNECT(obj, sig, callback, ptr) \
|
|
|
|
g_signal_connect(G_OBJECT(obj), (sig), G_CALLBACK(callback), (ptr))
|
2011-02-09 02:40:14 +03:00
|
|
|
|
2013-06-25 22:01:41 +04:00
|
|
|
/* layout signals */
|
|
|
|
CONNECT(g->layout, "motion-notify-event",
|
2011-02-09 02:40:14 +03:00
|
|
|
nsgtk_window_motion_notify_event, g);
|
2019-09-19 15:26:46 +03:00
|
|
|
CONNECT(g->layout, "button-press-event",
|
2011-02-09 02:40:14 +03:00
|
|
|
nsgtk_window_button_press_event, g);
|
2013-06-25 22:01:41 +04:00
|
|
|
CONNECT(g->layout, "button-release-event",
|
2011-02-09 02:40:14 +03:00
|
|
|
nsgtk_window_button_release_event, g);
|
2013-06-25 22:01:41 +04:00
|
|
|
CONNECT(g->layout, "key-press-event",
|
2011-02-09 02:40:14 +03:00
|
|
|
nsgtk_window_keypress_event, g);
|
2014-02-17 04:21:49 +04:00
|
|
|
CONNECT(g->layout, "key-release-event",
|
|
|
|
nsgtk_window_keyrelease_event, g);
|
2013-06-25 22:01:41 +04:00
|
|
|
CONNECT(g->layout, "size-allocate",
|
2011-02-09 02:40:14 +03:00
|
|
|
nsgtk_window_size_allocate_event, g);
|
2013-04-16 01:22:16 +04:00
|
|
|
CONNECT(g->layout, "scroll-event",
|
2011-02-09 02:40:14 +03:00
|
|
|
nsgtk_window_scroll_event, g);
|
2019-11-28 02:45:14 +03:00
|
|
|
CONNECT(g->layout, "focus-out-event",
|
|
|
|
nsgtk_window_focus_out_event, g);
|
2013-06-25 22:01:41 +04:00
|
|
|
|
|
|
|
/* status pane signals */
|
|
|
|
CONNECT(g->paned, "size-allocate",
|
|
|
|
nsgtk_paned_size_allocate_event, g);
|
|
|
|
|
|
|
|
CONNECT(g->paned, "notify::position",
|
|
|
|
nsgtk_paned_notify__position, g);
|
|
|
|
|
2013-06-28 15:13:02 +04:00
|
|
|
/* gtk container destructor */
|
2015-06-30 14:09:45 +03:00
|
|
|
CONNECT(g->container, "destroy", window_destroy, g);
|
2013-06-28 15:13:02 +04:00
|
|
|
|
2014-02-17 04:21:49 +04:00
|
|
|
/* input method */
|
|
|
|
gtk_im_context_set_client_window(g->input_method,
|
|
|
|
nsgtk_layout_get_bin_window(g->layout));
|
|
|
|
gtk_im_context_set_use_preedit(g->input_method, FALSE);
|
2015-06-30 14:09:45 +03:00
|
|
|
|
2014-02-17 04:21:49 +04:00
|
|
|
/* input method signals */
|
|
|
|
CONNECT(g->input_method, "commit",
|
|
|
|
nsgtk_window_input_method_commit, g);
|
|
|
|
|
2013-06-28 15:13:02 +04:00
|
|
|
/* add the tab container to the scaffold notebook */
|
2020-02-22 14:51:10 +03:00
|
|
|
nsgtk_tab_add(g, g->container,
|
|
|
|
open_in_background,
|
|
|
|
messages_get("NewTab"), g->icon);
|
2013-06-28 15:13:02 +04:00
|
|
|
|
2019-09-17 23:18:28 +03:00
|
|
|
/* initialy should not be visible */
|
|
|
|
nsgtk_search_toggle_visibility(g->search);
|
2019-08-19 01:45:19 +03:00
|
|
|
|
2019-09-21 03:07:32 +03:00
|
|
|
/* set toolbar visibility from user option */
|
|
|
|
nsgtk_toolbar_show(g->toolbar, get_tool_bar_show());
|
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
/* safe to drop the reference to the tab_builder as the container is
|
2013-06-28 15:13:02 +04:00
|
|
|
* referenced by the notebook now.
|
|
|
|
*/
|
2015-06-13 13:31:23 +03:00
|
|
|
g_object_unref(tab_builder);
|
2013-06-28 15:13:02 +04:00
|
|
|
|
2020-02-22 18:12:22 +03:00
|
|
|
/* Finally we need to focus the location bar if requested */
|
|
|
|
if (flags & GW_CREATE_FOCUS_LOCATION) {
|
|
|
|
if (nsgtk_window_item_activate(g, OPENLOCATION_BUTTON) != NSERROR_OK) {
|
|
|
|
NSLOG(netsurf, WARNING, "Unable to focus location input");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-09 02:40:14 +03:00
|
|
|
return g;
|
|
|
|
}
|
|
|
|
|
2007-06-20 23:43:09 +04:00
|
|
|
|
2019-10-09 01:06:01 +03:00
|
|
|
static void gui_window_destroy(struct gui_window *gw)
|
2006-08-16 01:29:20 +04:00
|
|
|
{
|
2019-10-09 01:06:01 +03:00
|
|
|
NSLOG(netsurf, INFO, "gui_window: %p", gw);
|
|
|
|
assert(gw != NULL);
|
|
|
|
assert(gw->bw != NULL);
|
|
|
|
NSLOG(netsurf, INFO, "scaffolding: %p", gw->scaffold);
|
|
|
|
|
|
|
|
/* kill off any throbber that might be running */
|
|
|
|
nsgtk_schedule(-1, next_throbber_frame, gw);
|
2013-06-28 15:13:02 +04:00
|
|
|
|
2019-10-09 01:06:01 +03:00
|
|
|
/* remove from window list */
|
|
|
|
if (gw->prev) {
|
|
|
|
gw->prev->next = gw->next;
|
2013-06-28 15:13:02 +04:00
|
|
|
} else {
|
2019-10-09 01:06:01 +03:00
|
|
|
window_list = gw->next;
|
2013-06-28 15:13:02 +04:00
|
|
|
}
|
2006-08-18 00:03:28 +04:00
|
|
|
|
2019-10-09 01:06:01 +03:00
|
|
|
if (gw->next) {
|
|
|
|
gw->next->prev = gw->prev;
|
2013-06-28 15:13:02 +04:00
|
|
|
}
|
2007-08-08 20:16:03 +04:00
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "window list head: %p", window_list);
|
2012-02-22 00:54:31 +04:00
|
|
|
}
|
2012-02-21 01:28:24 +04:00
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2012-02-22 00:54:31 +04:00
|
|
|
/**
|
2015-06-30 14:09:45 +03:00
|
|
|
* favicon setting for gtk gui window.
|
|
|
|
*
|
|
|
|
* \param gw gtk gui window to set favicon on.
|
|
|
|
* \param icon A handle to the new favicon content.
|
2012-02-22 00:54:31 +04:00
|
|
|
*/
|
2019-08-16 01:02:04 +03:00
|
|
|
static void
|
|
|
|
gui_window_set_icon(struct gui_window *gw, struct hlcache_handle *icon)
|
2012-02-22 00:54:31 +04:00
|
|
|
{
|
|
|
|
struct bitmap *icon_bitmap = NULL;
|
|
|
|
|
|
|
|
/* free any existing icon */
|
|
|
|
if (gw->icon != NULL) {
|
|
|
|
g_object_unref(gw->icon);
|
|
|
|
gw->icon = NULL;
|
2007-06-10 18:59:47 +04:00
|
|
|
}
|
2007-08-08 20:16:03 +04:00
|
|
|
|
2012-02-22 00:54:31 +04:00
|
|
|
if (icon != NULL) {
|
|
|
|
icon_bitmap = content_get_bitmap(icon);
|
|
|
|
if (icon_bitmap != NULL) {
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Using %p bitmap", icon_bitmap);
|
2012-02-22 00:54:31 +04:00
|
|
|
gw->icon = nsgdk_pixbuf_get_from_surface(icon_bitmap->surface, 16, 16);
|
2013-06-25 22:01:41 +04:00
|
|
|
}
|
|
|
|
}
|
2012-02-22 00:54:31 +04:00
|
|
|
|
|
|
|
if (gw->icon == NULL) {
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Using default favicon");
|
2012-02-22 00:54:31 +04:00
|
|
|
g_object_ref(favicon_pixbuf);
|
|
|
|
gw->icon = favicon_pixbuf;
|
|
|
|
}
|
2006-08-18 00:03:28 +04:00
|
|
|
|
2019-10-09 01:06:01 +03:00
|
|
|
/* only set icon if throbber not running */
|
|
|
|
if (gw->throb_frame == 0) {
|
|
|
|
nsgtk_tab_set_icon(gw->container, gw->icon);
|
|
|
|
}
|
2006-08-16 01:29:20 +04:00
|
|
|
}
|
2004-07-22 16:03:37 +04:00
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2014-01-13 05:08:15 +04:00
|
|
|
static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
|
|
|
|
{
|
|
|
|
GtkAdjustment *vadj = nsgtk_layout_get_vadjustment(g->layout);
|
|
|
|
GtkAdjustment *hadj = nsgtk_layout_get_hadjustment(g->layout);
|
|
|
|
|
|
|
|
assert(vadj);
|
|
|
|
assert(hadj);
|
|
|
|
|
|
|
|
*sy = (int)(gtk_adjustment_get_value(vadj));
|
|
|
|
*sx = (int)(gtk_adjustment_get_value(hadj));
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2011-02-09 02:40:14 +03:00
|
|
|
static void nsgtk_redraw_caret(struct gui_window *g)
|
2004-07-22 16:03:37 +04:00
|
|
|
{
|
2011-03-01 17:31:54 +03:00
|
|
|
int sx, sy;
|
|
|
|
|
2006-11-27 20:13:24 +03:00
|
|
|
if (g->careth == 0)
|
|
|
|
return;
|
2006-09-06 15:29:14 +04:00
|
|
|
|
2011-03-01 17:31:54 +03:00
|
|
|
gui_window_get_scroll(g, &sx, &sy);
|
|
|
|
|
|
|
|
gtk_widget_queue_draw_area(GTK_WIDGET(g->layout),
|
|
|
|
g->caretx - sx, g->carety - sy, 1, g->careth + 1);
|
|
|
|
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2014-01-13 18:51:27 +04:00
|
|
|
static void gui_window_remove_caret(struct gui_window *g)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
2010-04-11 16:13:53 +04:00
|
|
|
int sx, sy;
|
2011-03-01 17:31:54 +03:00
|
|
|
int oh = g->careth;
|
|
|
|
|
|
|
|
if (oh == 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
g->careth = 0;
|
2010-04-11 16:13:53 +04:00
|
|
|
|
|
|
|
gui_window_get_scroll(g, &sx, &sy);
|
|
|
|
|
2010-04-07 20:52:45 +04:00
|
|
|
gtk_widget_queue_draw_area(GTK_WIDGET(g->layout),
|
2011-03-01 17:31:54 +03:00
|
|
|
g->caretx - sx, g->carety - sy, 1, oh + 1);
|
|
|
|
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2017-04-19 18:34:56 +03:00
|
|
|
/**
|
|
|
|
* Invalidates an area of a GTK browser window
|
|
|
|
*
|
|
|
|
* \param g gui_window
|
|
|
|
* \param rect area to redraw or NULL for the entire window area
|
|
|
|
* \return NSERROR_OK on success or appropriate error code
|
|
|
|
*/
|
|
|
|
static nserror
|
|
|
|
nsgtk_window_invalidate_area(struct gui_window *g, const struct rect *rect)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
2010-04-11 16:13:53 +04:00
|
|
|
int sx, sy;
|
2006-03-10 04:42:53 +03:00
|
|
|
|
2017-04-19 18:34:56 +03:00
|
|
|
if (rect == NULL) {
|
|
|
|
gtk_widget_queue_draw(GTK_WIDGET(g->layout));
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!browser_window_has_content(g->bw)) {
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
2006-03-10 04:42:53 +03:00
|
|
|
|
2010-04-11 16:13:53 +04:00
|
|
|
gui_window_get_scroll(g, &sx, &sy);
|
|
|
|
|
2010-04-07 20:52:45 +04:00
|
|
|
gtk_widget_queue_draw_area(GTK_WIDGET(g->layout),
|
2019-08-01 22:32:20 +03:00
|
|
|
rect->x0 - sx,
|
|
|
|
rect->y0 - sy,
|
|
|
|
rect->x1 - rect->x0,
|
|
|
|
rect->y1 - rect->y0);
|
2017-04-19 18:34:56 +03:00
|
|
|
|
|
|
|
return NSERROR_OK;
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2014-01-13 18:51:27 +04:00
|
|
|
static void gui_window_set_status(struct gui_window *g, const char *text)
|
2010-04-07 20:52:45 +04:00
|
|
|
{
|
|
|
|
assert(g);
|
|
|
|
assert(g->status_bar);
|
|
|
|
gtk_label_set_text(g->status_bar, text);
|
|
|
|
}
|
|
|
|
|
2005-04-15 09:52:17 +04:00
|
|
|
|
2017-04-27 00:24:57 +03:00
|
|
|
/**
|
|
|
|
* Set the scroll position of a gtk browser window.
|
|
|
|
*
|
|
|
|
* Scrolls the viewport to ensure the specified rectangle of the
|
|
|
|
* content is shown. The GTK implementation scrolls the contents so
|
|
|
|
* the specified point in the content is at the top of the viewport.
|
|
|
|
*
|
2017-06-09 19:28:55 +03:00
|
|
|
* \param g gui window to scroll
|
2017-04-27 00:24:57 +03:00
|
|
|
* \param rect The rectangle to ensure is shown.
|
|
|
|
* \return NSERROR_OK on success or apropriate error code.
|
|
|
|
*/
|
|
|
|
static nserror
|
|
|
|
gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
2012-05-16 23:57:43 +04:00
|
|
|
GtkAdjustment *vadj = nsgtk_layout_get_vadjustment(g->layout);
|
|
|
|
GtkAdjustment *hadj = nsgtk_layout_get_hadjustment(g->layout);
|
2017-04-27 00:24:57 +03:00
|
|
|
gdouble vlower, vpage, vupper, hlower, hpage, hupper;
|
|
|
|
gdouble x = (gdouble)rect->x0;
|
|
|
|
gdouble y = (gdouble)rect->y0;
|
2010-04-08 18:36:09 +04:00
|
|
|
|
|
|
|
assert(vadj);
|
|
|
|
assert(hadj);
|
|
|
|
|
|
|
|
g_object_get(vadj, "page-size", &vpage, "lower", &vlower, "upper", &vupper, NULL);
|
|
|
|
g_object_get(hadj, "page-size", &hpage, "lower", &hlower, "upper", &hupper, NULL);
|
|
|
|
|
2017-04-27 00:24:57 +03:00
|
|
|
if (x < hlower) {
|
2010-04-08 18:36:09 +04:00
|
|
|
x = hlower;
|
2017-04-27 00:24:57 +03:00
|
|
|
}
|
|
|
|
if (x > (hupper - hpage)) {
|
2010-04-08 18:36:09 +04:00
|
|
|
x = hupper - hpage;
|
2017-04-27 00:24:57 +03:00
|
|
|
}
|
|
|
|
if (y < vlower) {
|
2010-04-08 18:36:09 +04:00
|
|
|
y = vlower;
|
2017-04-27 00:24:57 +03:00
|
|
|
}
|
|
|
|
if (y > (vupper - vpage)) {
|
2010-04-08 18:36:09 +04:00
|
|
|
y = vupper - vpage;
|
2017-04-27 00:24:57 +03:00
|
|
|
}
|
2010-04-08 18:36:09 +04:00
|
|
|
|
|
|
|
gtk_adjustment_set_value(vadj, y);
|
|
|
|
gtk_adjustment_set_value(hadj, x);
|
2017-04-27 00:24:57 +03:00
|
|
|
|
|
|
|
return NSERROR_OK;
|
2006-08-16 01:29:20 +04:00
|
|
|
}
|
2004-06-22 22:48:33 +04:00
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2014-01-13 15:38:35 +04:00
|
|
|
static void gui_window_update_extent(struct gui_window *g)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
2014-02-08 20:05:58 +04:00
|
|
|
int w, h;
|
2006-09-06 15:29:14 +04:00
|
|
|
|
2014-02-08 20:05:58 +04:00
|
|
|
if (browser_window_get_extents(g->bw, true, &w, &h) == NSERROR_OK) {
|
|
|
|
gtk_layout_set_size(g->layout, w, h);
|
2020-02-23 00:41:17 +03:00
|
|
|
gtk_widget_queue_resize(g->grid);
|
2014-02-08 20:05:58 +04:00
|
|
|
}
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
|
|
|
static void
|
|
|
|
gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
2010-04-08 18:36:09 +04:00
|
|
|
GdkCursor *cursor = NULL;
|
|
|
|
GdkCursorType cursortype;
|
|
|
|
bool nullcursor = false;
|
2006-09-06 15:29:14 +04:00
|
|
|
|
2006-08-16 01:29:20 +04:00
|
|
|
if (g->current_pointer == shape)
|
|
|
|
return;
|
2006-09-06 15:29:14 +04:00
|
|
|
|
2006-03-10 12:46:26 +03:00
|
|
|
g->current_pointer = shape;
|
2006-09-06 15:29:14 +04:00
|
|
|
|
2006-03-10 12:46:26 +03:00
|
|
|
switch (shape) {
|
2010-04-08 18:36:09 +04:00
|
|
|
case GUI_POINTER_POINT:
|
|
|
|
cursortype = GDK_HAND2;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_CARET:
|
|
|
|
cursortype = GDK_XTERM;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_UP:
|
|
|
|
cursortype = GDK_TOP_SIDE;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_DOWN:
|
|
|
|
cursortype = GDK_BOTTOM_SIDE;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_LEFT:
|
|
|
|
cursortype = GDK_LEFT_SIDE;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_RIGHT:
|
|
|
|
cursortype = GDK_RIGHT_SIDE;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_LD:
|
|
|
|
cursortype = GDK_BOTTOM_LEFT_CORNER;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_RD:
|
|
|
|
cursortype = GDK_BOTTOM_RIGHT_CORNER;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_LU:
|
|
|
|
cursortype = GDK_TOP_LEFT_CORNER;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_RU:
|
|
|
|
cursortype = GDK_TOP_RIGHT_CORNER;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_CROSS:
|
|
|
|
cursortype = GDK_CROSS;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_MOVE:
|
|
|
|
cursortype = GDK_FLEUR;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_WAIT:
|
|
|
|
cursortype = GDK_WATCH;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_HELP:
|
|
|
|
cursortype = GDK_QUESTION_ARROW;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_MENU:
|
|
|
|
cursor = nsgtk_create_menu_cursor();
|
|
|
|
nullcursor = true;
|
|
|
|
break;
|
|
|
|
case GUI_POINTER_PROGRESS:
|
|
|
|
/* In reality, this needs to be the funky left_ptr_watch
|
2006-08-16 01:29:20 +04:00
|
|
|
* which we can't do easily yet.
|
|
|
|
*/
|
2010-04-08 18:36:09 +04:00
|
|
|
cursortype = GDK_WATCH;
|
|
|
|
break;
|
|
|
|
/* The following we're not sure about */
|
|
|
|
case GUI_POINTER_NO_DROP:
|
|
|
|
case GUI_POINTER_NOT_ALLOWED:
|
|
|
|
case GUI_POINTER_DEFAULT:
|
|
|
|
default:
|
|
|
|
nullcursor = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!nullcursor)
|
|
|
|
cursor = gdk_cursor_new_for_display(
|
2006-08-16 01:29:20 +04:00
|
|
|
gtk_widget_get_display(
|
2010-04-07 20:52:45 +04:00
|
|
|
GTK_WIDGET(g->layout)),
|
2006-08-16 01:29:20 +04:00
|
|
|
cursortype);
|
2013-06-25 22:01:41 +04:00
|
|
|
gdk_window_set_cursor(nsgtk_widget_get_window(GTK_WIDGET(g->layout)),
|
2012-05-16 23:57:43 +04:00
|
|
|
cursor);
|
2006-09-06 15:29:14 +04:00
|
|
|
|
2006-03-10 12:46:26 +03:00
|
|
|
if (!nullcursor)
|
2012-05-16 23:57:43 +04:00
|
|
|
nsgdk_cursor_unref(cursor);
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
2005-07-21 03:27:28 +04:00
|
|
|
|
2019-09-01 01:53:51 +03:00
|
|
|
static void
|
|
|
|
gui_window_place_caret(struct gui_window *g,
|
|
|
|
int x, int y, int height,
|
|
|
|
const struct rect *clip)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
2006-08-16 01:29:20 +04:00
|
|
|
nsgtk_redraw_caret(g);
|
2006-04-20 20:26:26 +04:00
|
|
|
|
2014-03-21 21:27:41 +04:00
|
|
|
y += 1;
|
2014-03-28 02:05:35 +04:00
|
|
|
height -= 1;
|
2014-03-21 21:27:41 +04:00
|
|
|
|
|
|
|
if (y < clip->y0) {
|
2014-03-28 02:05:35 +04:00
|
|
|
height -= clip->y0 - y;
|
|
|
|
y = clip->y0;
|
2014-03-21 21:27:41 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (y + height > clip->y1) {
|
|
|
|
height = clip->y1 - y + 1;
|
|
|
|
}
|
|
|
|
|
2006-04-20 20:26:26 +04:00
|
|
|
g->caretx = x;
|
2014-03-21 21:27:41 +04:00
|
|
|
g->carety = y;
|
|
|
|
g->careth = height;
|
2006-04-20 20:26:26 +04:00
|
|
|
|
2006-08-16 01:29:20 +04:00
|
|
|
nsgtk_redraw_caret(g);
|
2006-04-20 20:26:26 +04:00
|
|
|
|
2010-04-07 20:52:45 +04:00
|
|
|
gtk_widget_grab_focus(GTK_WIDGET(g->layout));
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
2005-04-15 09:52:17 +04:00
|
|
|
|
2017-04-26 11:47:55 +03:00
|
|
|
/**
|
|
|
|
* Find the current dimensions of a GTK browser window content area.
|
|
|
|
*
|
|
|
|
* \param gw The gui window to measure content area of.
|
|
|
|
* \param width receives width of window
|
|
|
|
* \param height receives height of window
|
|
|
|
* \return NSERROR_OK on sucess and width and height updated
|
|
|
|
* else error code.
|
|
|
|
*/
|
|
|
|
static nserror
|
2019-08-02 14:25:35 +03:00
|
|
|
gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
|
2006-09-06 15:29:14 +04:00
|
|
|
{
|
2012-05-16 23:57:43 +04:00
|
|
|
GtkAllocation alloc;
|
|
|
|
|
2017-04-26 11:47:55 +03:00
|
|
|
/** @todo consider gtk_widget_get_allocated_width() */
|
|
|
|
nsgtk_widget_get_allocation(GTK_WIDGET(gw->layout), &alloc);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
*width = alloc.width;
|
|
|
|
*height = alloc.height;
|
2006-09-08 00:27:59 +04:00
|
|
|
|
2017-04-26 11:47:55 +03:00
|
|
|
return NSERROR_OK;
|
2006-09-06 15:29:14 +04:00
|
|
|
}
|
2014-01-05 20:45:32 +04:00
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2014-01-14 02:54:19 +04:00
|
|
|
static void gui_window_start_selection(struct gui_window *g)
|
|
|
|
{
|
|
|
|
gtk_widget_grab_focus(GTK_WIDGET(g->layout));
|
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
|
|
|
static void
|
|
|
|
gui_window_create_form_select_menu(struct gui_window *g,
|
|
|
|
struct form_control *control)
|
2014-10-24 23:45:21 +04:00
|
|
|
{
|
2014-11-14 00:52:08 +03:00
|
|
|
intptr_t item;
|
2014-10-24 23:45:21 +04:00
|
|
|
struct form_option *option;
|
|
|
|
|
|
|
|
GtkWidget *menu_item;
|
|
|
|
|
|
|
|
/* control->data.select.multiple is true if multiple selections
|
|
|
|
* are allowable. We ignore this, as the core handles it for us.
|
|
|
|
* Yay. \o/
|
|
|
|
*/
|
|
|
|
|
2014-11-14 00:52:08 +03:00
|
|
|
if (select_menu != NULL) {
|
2014-10-24 23:45:21 +04:00
|
|
|
gtk_widget_destroy(select_menu);
|
2014-11-14 00:52:08 +03:00
|
|
|
}
|
2014-10-24 23:45:21 +04:00
|
|
|
|
|
|
|
select_menu = gtk_menu_new();
|
|
|
|
select_menu_control = control;
|
|
|
|
|
2014-11-14 00:52:08 +03:00
|
|
|
item = 0;
|
|
|
|
option = form_select_get_option(control, item);
|
|
|
|
while (option != NULL) {
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Item %"PRIdPTR" option %p text %s",
|
|
|
|
item, option, option->text);
|
2014-10-24 23:45:21 +04:00
|
|
|
menu_item = gtk_check_menu_item_new_with_label(option->text);
|
2015-05-28 18:08:46 +03:00
|
|
|
if (option->selected) {
|
2014-10-24 23:45:21 +04:00
|
|
|
gtk_check_menu_item_set_active(
|
|
|
|
GTK_CHECK_MENU_ITEM(menu_item), TRUE);
|
2015-05-28 18:08:46 +03:00
|
|
|
}
|
2014-10-24 23:45:21 +04:00
|
|
|
|
2015-05-28 18:08:46 +03:00
|
|
|
/*
|
|
|
|
* This casts the item index integer into an integer
|
|
|
|
* the size of a pointer. This allows the callback
|
|
|
|
* parameter to be passed avoiding allocating memory
|
|
|
|
* for a context with a single integer in it.
|
|
|
|
*/
|
2014-10-24 23:45:21 +04:00
|
|
|
g_signal_connect(menu_item, "toggled",
|
2014-11-14 00:52:08 +03:00
|
|
|
G_CALLBACK(nsgtk_select_menu_clicked), (gpointer)item);
|
2014-10-24 23:45:21 +04:00
|
|
|
|
|
|
|
gtk_menu_shell_append(GTK_MENU_SHELL(select_menu), menu_item);
|
2014-11-14 00:52:08 +03:00
|
|
|
|
|
|
|
item++;
|
|
|
|
option = form_select_get_option(control, item);
|
2014-10-24 23:45:21 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_show_all(select_menu);
|
|
|
|
|
2018-08-26 12:12:35 +03:00
|
|
|
nsgtk_menu_popup_at_pointer(GTK_MENU(select_menu), NULL);
|
2014-10-24 23:45:21 +04:00
|
|
|
}
|
|
|
|
|
2019-09-01 01:53:51 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GTK window UI callback when core needs a file selection gadget
|
|
|
|
*
|
|
|
|
* \param g The gui window on which the gadget has been requested
|
|
|
|
*/
|
2014-01-14 02:54:19 +04:00
|
|
|
static void
|
|
|
|
gui_window_file_gadget_open(struct gui_window *g,
|
2016-06-06 10:59:23 +03:00
|
|
|
struct hlcache_handle *hl,
|
2014-01-14 02:54:19 +04:00
|
|
|
struct form_control *gadget)
|
2014-01-05 20:45:32 +04:00
|
|
|
{
|
|
|
|
GtkWidget *dialog;
|
|
|
|
|
|
|
|
dialog = gtk_file_chooser_dialog_new("Select File",
|
|
|
|
nsgtk_scaffolding_window(g->scaffold),
|
|
|
|
GTK_FILE_CHOOSER_ACTION_OPEN,
|
2015-04-09 00:21:30 +03:00
|
|
|
NSGTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
|
|
|
NSGTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
2014-01-05 20:45:32 +04:00
|
|
|
NULL);
|
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "*** open dialog: %p", dialog);
|
2019-08-20 02:16:52 +03:00
|
|
|
|
2014-01-05 20:45:32 +04:00
|
|
|
int ret = gtk_dialog_run(GTK_DIALOG(dialog));
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "*** return value: %d", ret);
|
2014-01-05 20:45:32 +04:00
|
|
|
if (ret == GTK_RESPONSE_ACCEPT) {
|
|
|
|
char *filename;
|
|
|
|
|
|
|
|
filename = gtk_file_chooser_get_filename(
|
|
|
|
GTK_FILE_CHOOSER(dialog));
|
2019-08-20 02:16:52 +03:00
|
|
|
|
2014-01-05 20:45:32 +04:00
|
|
|
browser_window_set_gadget_filename(g->bw, gadget, filename);
|
2017-04-19 18:34:56 +03:00
|
|
|
|
2014-01-05 20:45:32 +04:00
|
|
|
g_free(filename);
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_destroy(dialog);
|
|
|
|
}
|
2014-01-12 21:07:34 +04:00
|
|
|
|
2019-08-20 02:16:52 +03:00
|
|
|
|
2019-10-09 01:06:01 +03:00
|
|
|
/**
|
|
|
|
* handle throbber changing state
|
|
|
|
*/
|
|
|
|
static nserror throbber(struct gui_window *gw, bool active)
|
|
|
|
{
|
|
|
|
nsgtk_toolbar_throbber(gw->toolbar, active);
|
|
|
|
nsgtk_scaffolding_throbber(gw, active);
|
|
|
|
if (active) {
|
|
|
|
nsgtk_schedule(THROBBER_FRAME_TIME, next_throbber_frame, gw);
|
|
|
|
} else {
|
|
|
|
nsgtk_schedule(-1, next_throbber_frame, gw);
|
|
|
|
gw->throb_frame = 0;
|
|
|
|
/* set tab back to favicon */
|
|
|
|
nsgtk_tab_set_icon(gw->container, gw->icon);
|
|
|
|
}
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-12-02 00:43:32 +03:00
|
|
|
/**
|
|
|
|
* handle page info changing
|
|
|
|
*/
|
|
|
|
static nserror page_info_change(struct gui_window *gw)
|
|
|
|
{
|
|
|
|
nsgtk_toolbar_page_info_change(gw->toolbar);
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
2019-08-20 02:16:52 +03:00
|
|
|
/**
|
2019-09-01 01:53:51 +03:00
|
|
|
* GTK window UI callback to process miscellaneous events
|
2019-08-20 02:16:52 +03:00
|
|
|
*
|
|
|
|
* \param gw The window receiving the event.
|
|
|
|
* \param event The event code.
|
|
|
|
* \return NSERROR_OK when processed ok
|
|
|
|
*/
|
|
|
|
static nserror
|
|
|
|
gui_window_event(struct gui_window *gw, enum gui_window_event event)
|
|
|
|
{
|
|
|
|
switch (event) {
|
|
|
|
case GW_EVENT_UPDATE_EXTENT:
|
|
|
|
gui_window_update_extent(gw);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GW_EVENT_REMOVE_CARET:
|
|
|
|
gui_window_remove_caret(gw);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GW_EVENT_START_SELECTION:
|
|
|
|
gui_window_start_selection(gw);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GW_EVENT_START_THROBBER:
|
2019-10-09 01:06:01 +03:00
|
|
|
throbber(gw, true);
|
2019-08-20 02:16:52 +03:00
|
|
|
break;
|
|
|
|
|
|
|
|
case GW_EVENT_STOP_THROBBER:
|
2019-10-09 01:06:01 +03:00
|
|
|
throbber(gw, false);
|
2019-08-20 02:16:52 +03:00
|
|
|
break;
|
|
|
|
|
2019-12-02 00:43:32 +03:00
|
|
|
case GW_EVENT_PAGE_INFO_CHANGE:
|
|
|
|
page_info_change(gw);
|
|
|
|
break;
|
|
|
|
|
2019-08-20 02:16:52 +03:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
2019-09-01 01:53:51 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GTK window UI callback when core changes the current url
|
|
|
|
*
|
|
|
|
* \param gw The gui window on which the url has been set.
|
|
|
|
* \param url The new url.
|
|
|
|
*/
|
2019-08-21 01:33:38 +03:00
|
|
|
static nserror gui_window_set_url(struct gui_window *gw, nsurl *url)
|
|
|
|
{
|
|
|
|
return nsgtk_toolbar_set_url(gw->toolbar, url);
|
|
|
|
}
|
|
|
|
|
2019-09-01 01:53:51 +03:00
|
|
|
|
2019-09-06 22:42:23 +03:00
|
|
|
/**
|
|
|
|
* GTK window UI callback when core changes the current title
|
|
|
|
*
|
|
|
|
* \param gw The gui window on which the url has been set.
|
|
|
|
* \param url The new url.
|
|
|
|
*/
|
|
|
|
static void gui_window_set_title(struct gui_window *gw, const char *title)
|
|
|
|
{
|
|
|
|
|
|
|
|
if ((title != NULL) && (title[0] != '\0')) {
|
|
|
|
nsgtk_tab_set_title(gw->container, title);
|
|
|
|
}
|
|
|
|
nsgtk_scaffolding_set_title(gw, title);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-01 01:53:51 +03:00
|
|
|
/**
|
|
|
|
* GTK UI callback when search provider details are updated.
|
|
|
|
*
|
|
|
|
* \param name The providers name.
|
|
|
|
* \param bitmap The bitmap representing the provider.
|
|
|
|
* \return NSERROR_OK on success else error code.
|
|
|
|
*/
|
|
|
|
static nserror
|
|
|
|
gui_search_web_provider_update(const char *name, struct bitmap *bitmap)
|
|
|
|
{
|
|
|
|
struct gui_window *gw;
|
|
|
|
GdkPixbuf *pixbuf = NULL;
|
|
|
|
|
|
|
|
if (bitmap != NULL) {
|
2019-09-16 01:45:06 +03:00
|
|
|
pixbuf = nsgdk_pixbuf_get_from_surface(bitmap->surface, 32, 32);
|
2019-09-01 01:53:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
for (gw = window_list; gw != NULL; gw = gw->next) {
|
|
|
|
nsgtk_toolbar_set_websearch_image(gw->toolbar, pixbuf);
|
|
|
|
}
|
|
|
|
|
2019-09-16 01:45:06 +03:00
|
|
|
if (pixbuf != NULL) {
|
|
|
|
g_object_unref(pixbuf);
|
|
|
|
}
|
|
|
|
|
2019-09-01 01:53:51 +03:00
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
|
2019-09-01 01:53:51 +03:00
|
|
|
/**
|
|
|
|
* GTK frontend web search operation table
|
|
|
|
*/
|
|
|
|
static struct gui_search_web_table search_web_table = {
|
|
|
|
.provider_update = gui_search_web_provider_update,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct gui_search_web_table *nsgtk_search_web_table = &search_web_table;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GTK frontend browser window operation table
|
|
|
|
*/
|
2014-01-15 23:37:05 +04:00
|
|
|
static struct gui_window_table window_table = {
|
2014-01-12 21:07:34 +04:00
|
|
|
.create = gui_window_create,
|
|
|
|
.destroy = gui_window_destroy,
|
2017-04-19 18:34:56 +03:00
|
|
|
.invalidate = nsgtk_window_invalidate_area,
|
2014-01-13 05:08:15 +04:00
|
|
|
.get_scroll = gui_window_get_scroll,
|
|
|
|
.set_scroll = gui_window_set_scroll,
|
2014-01-13 15:38:35 +04:00
|
|
|
.get_dimensions = gui_window_get_dimensions,
|
2019-08-20 02:16:52 +03:00
|
|
|
.event = gui_window_event,
|
2014-01-12 21:07:34 +04:00
|
|
|
|
|
|
|
.set_icon = gui_window_set_icon,
|
2019-09-06 22:42:23 +03:00
|
|
|
.set_title = gui_window_set_title,
|
2014-01-13 18:51:27 +04:00
|
|
|
.set_status = gui_window_set_status,
|
|
|
|
.set_pointer = gui_window_set_pointer,
|
|
|
|
.place_caret = gui_window_place_caret,
|
2014-10-24 23:45:21 +04:00
|
|
|
.create_form_select_menu = gui_window_create_form_select_menu,
|
2014-01-14 02:54:19 +04:00
|
|
|
.file_gadget_open = gui_window_file_gadget_open,
|
2019-09-01 01:53:51 +03:00
|
|
|
.set_url = gui_window_set_url,
|
2014-01-12 21:07:34 +04:00
|
|
|
|
2019-09-06 22:42:23 +03:00
|
|
|
|
2014-01-12 21:07:34 +04:00
|
|
|
};
|
|
|
|
|
2014-01-15 23:37:05 +04:00
|
|
|
struct gui_window_table *nsgtk_window_table = &window_table;
|
2019-09-04 21:23:06 +03:00
|
|
|
|
|
|
|
|
|
|
|
/* exported interface documented in window.h */
|
|
|
|
struct nsgtk_scaffolding *nsgtk_get_scaffold(struct gui_window *g)
|
|
|
|
{
|
|
|
|
return g->scaffold;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* exported interface documented in window.h */
|
|
|
|
struct browser_window *nsgtk_get_browser_window(struct gui_window *g)
|
|
|
|
{
|
|
|
|
return g->bw;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* exported interface documented in window.h */
|
|
|
|
GtkLayout *nsgtk_window_get_layout(struct gui_window *g)
|
|
|
|
{
|
|
|
|
return g->layout;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-17 02:48:57 +03:00
|
|
|
/* exported interface documented in window.h */
|
|
|
|
nserror
|
|
|
|
nsgtk_window_search_toggle(struct gui_window *gw)
|
|
|
|
{
|
|
|
|
return nsgtk_search_toggle_visibility(gw->search);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-04 21:23:06 +03:00
|
|
|
/* exported interface documented in window.h */
|
|
|
|
nserror
|
|
|
|
nsgtk_window_item_activate(struct gui_window *gw, nsgtk_toolbar_button itemid)
|
|
|
|
{
|
|
|
|
return nsgtk_toolbar_item_activate(gw->toolbar, itemid);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* exported interface documented in window.h */
|
|
|
|
void nsgtk_window_destroy_browser(struct gui_window *gw)
|
|
|
|
{
|
|
|
|
/* remove tab */
|
|
|
|
gtk_widget_destroy(gw->container);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* exported interface documented in window.h */
|
|
|
|
nserror nsgtk_window_update_all(void)
|
|
|
|
{
|
|
|
|
struct gui_window *gw;
|
|
|
|
for (gw = window_list; gw != NULL; gw = gw->next) {
|
|
|
|
nsgtk_tab_options_changed(nsgtk_scaffolding_notebook(gw->scaffold));
|
2019-09-10 02:44:15 +03:00
|
|
|
nsgtk_toolbar_restyle(gw->toolbar);
|
2019-09-17 02:48:57 +03:00
|
|
|
nsgtk_search_restyle(gw->search);
|
2019-09-04 21:23:06 +03:00
|
|
|
browser_window_schedule_reformat(gw->bw);
|
|
|
|
}
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* exported interface documented in window.h */
|
|
|
|
nserror nsgtk_window_toolbar_show(struct nsgtk_scaffolding *gs, bool show)
|
|
|
|
{
|
|
|
|
struct gui_window *gw;
|
|
|
|
for (gw = window_list; gw != NULL; gw = gw->next) {
|
|
|
|
if (gw->scaffold == gs) {
|
|
|
|
nsgtk_toolbar_show(gw->toolbar, show);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
2019-09-10 02:44:15 +03:00
|
|
|
|
2019-10-09 01:06:01 +03:00
|
|
|
|
2019-09-10 02:44:15 +03:00
|
|
|
/* exported interface documented in window.h */
|
|
|
|
nserror nsgtk_window_toolbar_update(void)
|
|
|
|
{
|
|
|
|
struct gui_window *gw;
|
|
|
|
for (gw = window_list; gw != NULL; gw = gw->next) {
|
|
|
|
nsgtk_toolbar_update(gw->toolbar);
|
|
|
|
|
|
|
|
}
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|