2004-06-22 22:48:33 +04:00
|
|
|
/*
|
2010-03-15 03:42:48 +03:00
|
|
|
* Copyright 2004-2010 James Bursa <bursa@users.sourceforge.net>
|
|
|
|
* Copyright 2010 Vincent Sanders <vince@debian.org>
|
|
|
|
* Copyright 2004-2009 John-Mark Bell <jmb@netsurf-browser.org>
|
|
|
|
* Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
|
|
|
|
* Copyright 2006-2009 Daniel Silverstone <dsilvers@netsurf-browser.org>
|
|
|
|
* Copyright 2006-2008 Rob Kendrick <rjek@netsurf-browser.org>
|
|
|
|
* Copyright 2008 John Tytgat <joty@netsurf-browser.org>
|
|
|
|
* Copyright 2008 Adam Blokus <adamblokus@gmail.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
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* 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
|
|
|
*/
|
|
|
|
|
2005-07-16 18:35:25 +04:00
|
|
|
#include <assert.h>
|
2004-06-22 22:48:33 +04:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2006-03-27 17:19:08 +04:00
|
|
|
#include <unistd.h>
|
2006-08-24 21:24:36 +04:00
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/types.h>
|
2004-06-22 22:48:33 +04:00
|
|
|
#include <gtk/gtk.h>
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2014-10-16 12:53:55 +04:00
|
|
|
#include "utils/filepath.h"
|
|
|
|
#include "utils/log.h"
|
|
|
|
#include "utils/messages.h"
|
|
|
|
#include "utils/utils.h"
|
|
|
|
#include "utils/file.h"
|
|
|
|
#include "utils/nsoption.h"
|
2014-06-26 21:56:42 +04:00
|
|
|
#include "content/fetchers.h"
|
2010-03-28 16:56:39 +04:00
|
|
|
#include "content/hlcache.h"
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "content/urldb.h"
|
2014-03-22 19:26:30 +04:00
|
|
|
#include "content/backing_store.h"
|
2014-02-08 21:13:04 +04:00
|
|
|
#include "desktop/browser.h"
|
2012-11-04 03:19:28 +04:00
|
|
|
#include "desktop/save_complete.h"
|
2014-10-27 02:49:18 +03:00
|
|
|
#include "desktop/save_pdf.h"
|
2009-12-18 02:55:02 +03:00
|
|
|
#include "desktop/searchweb.h"
|
2015-04-12 19:26:22 +03:00
|
|
|
#include "desktop/textinput.h"
|
2011-01-20 17:05:13 +03:00
|
|
|
#include "desktop/tree.h"
|
2014-10-16 12:53:55 +04:00
|
|
|
#include "desktop/gui_misc.h"
|
|
|
|
#include "desktop/netsurf.h"
|
2014-01-15 16:28:55 +04:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
#include "gtk/compat.h"
|
2011-01-30 02:40:22 +03:00
|
|
|
#include "gtk/completion.h"
|
|
|
|
#include "gtk/cookies.h"
|
|
|
|
#include "gtk/download.h"
|
2014-01-26 03:00:22 +04:00
|
|
|
#include "gtk/fetch.h"
|
2011-01-30 02:40:22 +03:00
|
|
|
#include "gtk/gui.h"
|
|
|
|
#include "gtk/history.h"
|
|
|
|
#include "gtk/hotlist.h"
|
|
|
|
#include "gtk/throbber.h"
|
|
|
|
#include "gtk/treeview.h"
|
|
|
|
#include "gtk/window.h"
|
|
|
|
#include "gtk/schedule.h"
|
2014-01-15 16:28:55 +04:00
|
|
|
#include "gtk/selection.h"
|
2014-03-19 02:32:52 +04:00
|
|
|
#include "gtk/search.h"
|
2015-04-12 19:26:22 +03:00
|
|
|
#include "gtk/ssl_cert.h"
|
2015-04-14 01:49:44 +03:00
|
|
|
#include "gtk/bitmap.h"
|
2015-06-13 13:31:23 +03:00
|
|
|
#include "gtk/resources.h"
|
|
|
|
#include "gtk/login.h"
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2014-09-22 21:07:34 +04:00
|
|
|
bool nsgtk_complete = false;
|
2004-06-22 22:48:33 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
char *toolbar_indices_file_location;
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
char *nsgtk_config_home; /* exported global defined in gtk/gui.h */
|
|
|
|
|
2015-06-14 22:22:09 +03:00
|
|
|
GdkPixbuf *favicon_pixbuf; /** favicon default pixbuf */
|
|
|
|
GdkPixbuf *win_default_icon_pixbuf; /** default window icon pixbuf */
|
2016-03-08 18:45:28 +03:00
|
|
|
GdkPixbuf *arrow_down_pixbuf; /** arrow down pixbuf */
|
2011-12-31 04:00:54 +04:00
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
GtkBuilder *warning_builder;
|
2006-07-19 17:41:57 +04:00
|
|
|
|
2014-01-26 03:00:22 +04:00
|
|
|
char **respaths; /** resource search path vector */
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2014-10-26 15:42:53 +03:00
|
|
|
/**
|
|
|
|
* Cause an abnormal program termination.
|
|
|
|
*
|
|
|
|
* \note This never returns and is intended to terminate without any cleanup.
|
|
|
|
*
|
|
|
|
* \param error The message to display to the user.
|
|
|
|
*/
|
|
|
|
static void die(const char * const error)
|
|
|
|
{
|
|
|
|
fprintf(stderr, "%s", error);
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
|
2015-06-17 23:29:48 +03:00
|
|
|
/**
|
|
|
|
* Create an array of valid paths to search for resources.
|
2010-07-23 03:01:13 +04:00
|
|
|
*
|
2010-07-28 19:22:44 +04:00
|
|
|
* The idea is that all the complex path computation to find resources
|
|
|
|
* is performed here, once, rather than every time a resource is
|
|
|
|
* searched for.
|
2010-07-23 03:01:13 +04:00
|
|
|
*/
|
2010-07-28 19:22:44 +04:00
|
|
|
static char **
|
2015-06-19 18:15:24 +03:00
|
|
|
nsgtk_init_resource_path(const char *config_home)
|
2010-07-23 03:01:13 +04:00
|
|
|
{
|
2015-06-19 18:15:24 +03:00
|
|
|
char *resource_path;
|
|
|
|
int resource_path_len;
|
2010-07-28 19:22:44 +04:00
|
|
|
const gchar * const *langv;
|
|
|
|
char **pathv; /* resource path string vector */
|
|
|
|
char **respath; /* resource paths vector */
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2015-06-19 18:15:24 +03:00
|
|
|
if (config_home != NULL) {
|
|
|
|
resource_path_len = snprintf(NULL, 0,
|
2016-02-20 21:37:50 +03:00
|
|
|
"%s:${NETSURFRES}:%s",
|
2015-06-19 18:15:24 +03:00
|
|
|
config_home,
|
|
|
|
GTK_RESPATH);
|
|
|
|
resource_path = malloc(resource_path_len + 1);
|
|
|
|
if (resource_path == NULL) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
snprintf(resource_path, resource_path_len + 1,
|
2016-02-20 21:37:50 +03:00
|
|
|
"%s:${NETSURFRES}:%s",
|
2015-06-19 18:15:24 +03:00
|
|
|
config_home,
|
|
|
|
GTK_RESPATH);
|
|
|
|
} else {
|
|
|
|
resource_path_len = snprintf(NULL, 0,
|
2016-02-20 21:37:50 +03:00
|
|
|
"${NETSURFRES}:%s",
|
2015-06-19 18:15:24 +03:00
|
|
|
GTK_RESPATH);
|
|
|
|
resource_path = malloc(resource_path_len + 1);
|
|
|
|
if (resource_path == NULL) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
snprintf(resource_path,
|
|
|
|
resource_path_len + 1,
|
2016-02-20 21:37:50 +03:00
|
|
|
"${NETSURFRES}:%s",
|
2015-06-19 18:15:24 +03:00
|
|
|
GTK_RESPATH);
|
|
|
|
}
|
|
|
|
|
2011-03-17 14:26:30 +03:00
|
|
|
pathv = filepath_path_to_strvec(resource_path);
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
langv = g_get_language_names();
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2011-03-17 14:26:30 +03:00
|
|
|
respath = filepath_generate(pathv, langv);
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2011-03-17 14:26:30 +03:00
|
|
|
filepath_free_strvec(pathv);
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2015-06-19 18:15:24 +03:00
|
|
|
free(resource_path);
|
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
return respath;
|
|
|
|
}
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2006-07-26 00:55:10 +04:00
|
|
|
|
2013-05-27 17:21:48 +04:00
|
|
|
/**
|
2014-04-28 19:37:00 +04:00
|
|
|
* Set option defaults for gtk frontend.
|
2013-05-27 17:21:48 +04:00
|
|
|
*
|
|
|
|
* @param defaults The option table to update.
|
|
|
|
* @return error status.
|
|
|
|
*/
|
|
|
|
static nserror set_defaults(struct nsoption_s *defaults)
|
2010-07-28 19:22:44 +04:00
|
|
|
{
|
2014-04-28 19:37:00 +04:00
|
|
|
char *fname;
|
2006-08-16 01:29:20 +04:00
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* cookie file default */
|
2014-05-07 19:14:18 +04:00
|
|
|
fname = NULL;
|
|
|
|
netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "Cookies");
|
2014-04-28 19:37:00 +04:00
|
|
|
if (fname != NULL) {
|
|
|
|
nsoption_setnull_charp(cookie_file, fname);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* cookie jar default */
|
2014-05-07 19:14:18 +04:00
|
|
|
fname = NULL;
|
|
|
|
netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "Cookies");
|
2014-04-28 19:37:00 +04:00
|
|
|
if (fname != NULL) {
|
|
|
|
nsoption_setnull_charp(cookie_jar, fname);
|
2013-05-27 17:21:48 +04:00
|
|
|
}
|
2012-10-17 17:20:18 +04:00
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* url database default */
|
2014-05-07 19:14:18 +04:00
|
|
|
fname = NULL;
|
|
|
|
netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "URLs");
|
2014-04-28 19:37:00 +04:00
|
|
|
if (fname != NULL) {
|
|
|
|
nsoption_setnull_charp(url_file, fname);
|
2012-10-17 17:20:18 +04:00
|
|
|
}
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* bookmark database default */
|
2014-05-07 19:14:18 +04:00
|
|
|
fname = NULL;
|
|
|
|
netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "Hotlist");
|
2014-04-28 19:37:00 +04:00
|
|
|
if (fname != NULL) {
|
|
|
|
nsoption_setnull_charp(hotlist_path, fname);
|
2012-10-17 17:20:18 +04:00
|
|
|
}
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* download directory default */
|
2014-05-07 19:14:18 +04:00
|
|
|
fname = getenv("HOME");
|
2014-04-28 19:37:00 +04:00
|
|
|
if (fname != NULL) {
|
2014-05-07 19:14:18 +04:00
|
|
|
nsoption_setnull_charp(downloads_directory, strdup(fname));
|
2012-10-17 17:20:18 +04:00
|
|
|
}
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* default path to certificates */
|
2012-10-17 17:20:18 +04:00
|
|
|
nsoption_setnull_charp(ca_path, strdup("/etc/ssl/certs"));
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
if ((nsoption_charp(cookie_file) == NULL) ||
|
|
|
|
(nsoption_charp(cookie_jar) == NULL) ||
|
|
|
|
(nsoption_charp(url_file) == NULL) ||
|
|
|
|
(nsoption_charp(hotlist_path) == NULL) ||
|
|
|
|
(nsoption_charp(downloads_directory) == NULL) ||
|
|
|
|
(nsoption_charp(ca_path) == NULL)) {
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("Failed initialising default resource paths");
|
2013-05-27 17:21:48 +04:00
|
|
|
return NSERROR_BAD_PARAMETER;
|
2012-10-17 17:20:18 +04:00
|
|
|
}
|
2013-05-27 17:21:48 +04:00
|
|
|
|
|
|
|
/* set default font names */
|
|
|
|
nsoption_set_charp(font_sans, strdup("Sans"));
|
|
|
|
nsoption_set_charp(font_serif, strdup("Serif"));
|
|
|
|
nsoption_set_charp(font_mono, strdup("Monospace"));
|
|
|
|
nsoption_set_charp(font_cursive, strdup("Serif"));
|
|
|
|
nsoption_set_charp(font_fantasy, strdup("Serif"));
|
|
|
|
|
|
|
|
return NSERROR_OK;
|
2012-10-17 17:20:18 +04:00
|
|
|
}
|
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2011-02-24 01:27:55 +03:00
|
|
|
|
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
/**
|
|
|
|
* Initialize GTK interface.
|
|
|
|
*/
|
2014-09-20 21:48:54 +04:00
|
|
|
static nserror nsgtk_init(int argc, char** argv, char **respath)
|
2010-07-28 19:22:44 +04:00
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
char *resource_filename;
|
2013-11-17 18:27:24 +04:00
|
|
|
char *addr = NULL;
|
2013-02-14 22:21:11 +04:00
|
|
|
nsurl *url;
|
|
|
|
nserror error;
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
error = nsgtk_builder_new_from_resname("warning", &warning_builder);
|
|
|
|
if (error != NSERROR_OK) {
|
|
|
|
LOG("Unable to initialise warning dialog");
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_builder_connect_signals(warning_builder, NULL);
|
2010-07-28 19:22:44 +04:00
|
|
|
|
|
|
|
/* set default icon if its available */
|
2015-06-14 22:22:09 +03:00
|
|
|
error = nsgdk_pixbuf_new_from_resname("netsurf.xpm",
|
|
|
|
&win_default_icon_pixbuf);
|
|
|
|
if (error == NSERROR_OK) {
|
|
|
|
LOG("Seting default window icon");
|
|
|
|
gtk_window_set_default_icon(win_default_icon_pixbuf);
|
Merged revisions 4282-4285,4288-4293,4297-4298,4307,4309-4313,4322,4324-4680 via svnmerge from
svn://svn.netsurf-browser.org/branches/mikeL/netsurf
........
r4432 | mikeL | 2008-06-24 04:00:36 +0100 (Tue, 24 Jun 2008) | 1 line
Drag events are now emited from where the press originated, instead of from where they became a drag
........
r4433 | mikeL | 2008-06-24 04:25:33 +0100 (Tue, 24 Jun 2008) | 1 line
Added accelerator to 'Select All'
........
r4495 | mikeL | 2008-07-02 21:36:32 +0100 (Wed, 02 Jul 2008) | 1 line
Selections are now deleted and replaced when a key is typed in a text area or text box. All input box behavior while a selection is active is now implemented (ex: pressing the right arrow key moves the caret to the end of the selection). Cut now works properly in both versions. Fixed discrepancy between where the caret was placed and selection began when starting a drag-select. Fixed bug with calculation of a selections end box.
........
r4496 | mikeL | 2008-07-02 22:11:24 +0100 (Wed, 02 Jul 2008) | 1 line
Added support for cut in input boxes
........
r4497 | mikeL | 2008-07-02 22:21:35 +0100 (Wed, 02 Jul 2008) | 1 line
Removed unused variables (Thanks tlsa)
........
r4498 | mikeL | 2008-07-02 23:30:30 +0100 (Wed, 02 Jul 2008) | 1 line
Modified selection clearing behavior to allow for drag-saves
........
r4499 | mikeL | 2008-07-03 00:51:50 +0100 (Thu, 03 Jul 2008) | 1 line
Fixed regression where it would take two clicks to place caret in an input (Thanks tlsa)
........
r4509 | mikeL | 2008-07-06 07:55:09 +0100 (Sun, 06 Jul 2008) | 1 line
Basic download support implemented. Only downloading of text files works
........
r4510 | mikeL | 2008-07-06 18:55:31 +0100 (Sun, 06 Jul 2008) | 1 line
Downloading of non-text files is now possible. Progress bar and size downloaded are now updated
........
r4511 | mikeL | 2008-07-06 20:46:00 +0100 (Sun, 06 Jul 2008) | 1 line
Added downloads glade file
........
r4512 | mikeL | 2008-07-06 20:47:39 +0100 (Sun, 06 Jul 2008) | 1 line
Downloads window now spawns in the center of the parent browser window
........
r4513 | mikeL | 2008-07-06 20:56:12 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed bug where backspace would be ignored if the selection began at the beginning on an input
........
r4514 | mikeL | 2008-07-06 21:26:45 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed compiler warnings by adding casts
........
r4516 | mikeL | 2008-07-06 21:32:41 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed initialization of size string, added initialization of progress
........
r4518 | mikeL | 2008-07-06 21:51:08 +0100 (Sun, 06 Jul 2008) | 1 line
Added an option for short units (with space) to human_friendly_bytesize
........
r4519 | mikeL | 2008-07-06 21:52:05 +0100 (Sun, 06 Jul 2008) | 1 line
Removed function size_to_string
........
r4520 | mikeL | 2008-07-06 22:03:11 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed pedantic error (kB instead of KB). Added missing necessary parameters to human_friendly_bytesize. Fixed incorrect bool types
........
r4521 | mikeL | 2008-07-06 22:08:15 +0100 (Sun, 06 Jul 2008) | 1 line
Removed unnecessary parameter and units list from human_friendly_bytesize
........
r4522 | mikeL | 2008-07-06 22:57:03 +0100 (Sun, 06 Jul 2008) | 1 line
Removed unnused variable
........
r4523 | mikeL | 2008-07-06 23:03:46 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed url parsing by replacing url_parse_filename with url_nice. Total size and size downloaded are now in human readable form. Speed is now calculated (roughly)
........
r4524 | mikeL | 2008-07-07 01:19:01 +0100 (Mon, 07 Jul 2008) | 1 line
Added file overwrite confirmation. Changed speed to a double
........
r4546 | mikeL | 2008-07-09 17:21:43 +0100 (Wed, 09 Jul 2008) | 1 line
Changed parameter of selection_get_end/start to a size_t instead of int and changed all offset variables to size_t as well
........
r4547 | mikeL | 2008-07-09 17:30:47 +0100 (Wed, 09 Jul 2008) | 1 line
Added action buttons to the bottom toolbar. Added ability to clear selected (and completed) downloads with a framework for other actions.
........
r4556 | jmb | 2008-07-10 00:17:24 +0100 (Thu, 10 Jul 2008) | 3 lines
A large bunch of tidying and general fixes to text input handling.
Make selection code treat password fields as inputs, too.
........
r4557 | mikeL | 2008-07-10 00:24:46 +0100 (Thu, 10 Jul 2008) | 1 line
Added functionality to gui_empty_clipboard and gui_start_selection (Thanks jmb)
........
r4573 | mikeL | 2008-07-10 16:33:27 +0100 (Thu, 10 Jul 2008) | 1 line
Removed example download. Made the list store row aware of its download and vise versa. Added new way of handling actions from the dialog (e.g. buttons) which handles all rows in the selection. Added a few memory management function calls to clean up better
........
r4577 | mikeL | 2008-07-10 21:11:51 +0100 (Thu, 10 Jul 2008) | 1 line
Download write channels now close properly. Added status column to the tree store which will change the progress bar text if a download is canceled or completed. Implemented cancel button functionality.
........
r4578 | mikeL | 2008-07-10 21:17:51 +0100 (Thu, 10 Jul 2008) | 1 line
Speed is now displayed as '-' when 0 or download has stopped
........
r4580 | mikeL | 2008-07-11 02:10:57 +0100 (Fri, 11 Jul 2008) | 1 line
Added two download related options (Download directory & Clear completed downloads) and a Downloads tab to the preferences dialog. Also moved the option to ask when overwriting files to Downloads tab. Added another option to the pre-download dialog, Save, which downloads the file immediately to your 'Download directory'
........
r4581 | mikeL | 2008-07-11 02:26:00 +0100 (Fri, 11 Jul 2008) | 1 line
Rearranged pre-download dialog buttons to conform to the HIG
........
r4616 | mikeL | 2008-07-11 19:54:12 +0100 (Fri, 11 Jul 2008) | 1 line
Limited download window updates to a user-defined variable that can be set in options (default is .5). Updates are now only done if the download window is visible. This greatly reduces the cpu usage.
........
r4617 | mikeL | 2008-07-11 20:07:48 +0100 (Fri, 11 Jul 2008) | 1 line
Removed unnecessary update limit option (it is now fixed at .5)
........
r4629 | mikeL | 2008-07-13 04:21:07 +0100 (Sun, 13 Jul 2008) | 1 line
Reorganized button sensitivity functions. Sensitivities are now updated when the selection changes as well as when a selected download's state changes.
........
r4635 | mikeL | 2008-07-13 17:00:05 +0100 (Sun, 13 Jul 2008) | 1 line
Added error handling. Added word-wrap to the "info" cell renderer so that to keep everything under control. Fixed bug where downloads would always go to you default folder (missing breaks).
........
r4642 | mikeL | 2008-07-13 21:46:09 +0100 (Sun, 13 Jul 2008) | 1 line
Added time remaining column. Fixed regression where the download info would be erased upon completion/cancelation.
........
r4655 | mikeL | 2008-07-14 23:20:33 +0100 (Mon, 14 Jul 2008) | 1 line
Downloads dialog is now initialized in gtk_gui.c with no parent window. The parent windows are now set when a download is created (through an extra parameter in gui_download_window_create) and when nsgtk_download_show is called. When it is closed (when NS shuts down) all incomplete downloads are canceled (and the files deleted). Added a warning dialog when netsurf tries to close with incomplete downloads. Fixed bug where default save directory would initialize to NULL.
........
r4676 | mikeL | 2008-07-15 21:01:17 +0100 (Tue, 15 Jul 2008) | 1 line
Downloads dialog is now initialized in gtk_gui.c with no parent window. The parent windows are now set when a download is created (through an extra parameter in gui_download_window_create) and when nsgtk_download_show is called. (This is the second half of the patch, last commit was only partial for some reason)
........
r4678 | mikeL | 2008-07-16 01:18:52 +0100 (Wed, 16 Jul 2008) | 1 line
Addresses almost all of rjek and jmb's concerns, fixes most of the sloppiness that was present earlier. Downloads without a total_size are now handled correctly (thanks tlsa). Changes to the default download directly are now saved correctly. Billions of other small bugs fixed
........
svn path=/trunk/netsurf/; revision=4681
2008-07-16 14:19:30 +04:00
|
|
|
}
|
2010-03-15 03:42:48 +03:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
/* Search engine sources */
|
2014-05-25 03:57:48 +04:00
|
|
|
resource_filename = filepath_find(respath, "SearchEngines");
|
|
|
|
search_web_init(resource_filename);
|
|
|
|
if (resource_filename != NULL) {
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("Using '%s' as Search Engines file", resource_filename);
|
2014-05-25 03:57:48 +04:00
|
|
|
free(resource_filename);
|
|
|
|
}
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2011-12-31 04:00:54 +04:00
|
|
|
/* Default favicon */
|
2015-06-13 13:31:23 +03:00
|
|
|
error = nsgdk_pixbuf_new_from_resname("favicon.png", &favicon_pixbuf);
|
|
|
|
if (error != NSERROR_OK) {
|
2015-06-17 23:29:48 +03:00
|
|
|
favicon_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
|
2016-03-08 18:45:28 +03:00
|
|
|
false, 8, 16, 16);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* arrow down icon */
|
|
|
|
error = nsgdk_pixbuf_new_from_resname("arrow_down_8x32.png",
|
|
|
|
&arrow_down_pixbuf);
|
|
|
|
if (error != NSERROR_OK) {
|
|
|
|
arrow_down_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
|
2016-03-08 20:48:16 +03:00
|
|
|
false, 8, 8, 32);
|
2011-12-31 04:00:54 +04:00
|
|
|
}
|
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
/* Toolbar inicies file */
|
2015-06-17 23:29:48 +03:00
|
|
|
toolbar_indices_file_location = filepath_find(respath,
|
|
|
|
"toolbarIndices");
|
|
|
|
LOG("Using '%s' as custom toolbar settings file",
|
|
|
|
toolbar_indices_file_location);
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2015-06-16 02:20:37 +03:00
|
|
|
/* initialise throbber */
|
|
|
|
error = nsgtk_throbber_init();
|
|
|
|
if (error != NSERROR_OK) {
|
|
|
|
LOG("Unable to initialise throbber.");
|
|
|
|
return error;
|
|
|
|
}
|
2010-07-28 19:22:44 +04:00
|
|
|
|
|
|
|
/* Initialise completions - cannot fail */
|
|
|
|
nsgtk_completion_init();
|
|
|
|
|
2011-03-17 14:26:30 +03:00
|
|
|
filepath_sfinddef(respath, buf, "mime.types", "/etc/");
|
2007-05-30 03:53:35 +04:00
|
|
|
gtk_fetch_filetype_init(buf);
|
|
|
|
|
2012-11-04 03:19:28 +04:00
|
|
|
save_complete_init();
|
|
|
|
|
2012-03-22 13:34:34 +04:00
|
|
|
urldb_load(nsoption_charp(url_file));
|
|
|
|
urldb_load_cookies(nsoption_charp(cookie_file));
|
2007-05-06 20:39:34 +04:00
|
|
|
|
2010-12-17 16:07:38 +03:00
|
|
|
/* The tree view system needs to know the screen's DPI, so we
|
|
|
|
* find that out here, rather than when we create a first browser
|
|
|
|
* window.
|
|
|
|
*/
|
2014-10-13 05:34:10 +04:00
|
|
|
browser_set_dpi(gdk_screen_get_resolution(gdk_screen_get_default()));
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("Set CSS DPI to %d", browser_get_dpi());
|
2010-12-17 16:07:38 +03:00
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
/* Initialise top level UI elements */
|
|
|
|
error = nsgtk_history_init();
|
|
|
|
if (error != NSERROR_OK) {
|
|
|
|
LOG("Unable to initialise global history window.");
|
|
|
|
return error;
|
|
|
|
}
|
2010-03-30 00:03:44 +04:00
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
error = nsgtk_download_init();
|
|
|
|
if (error != NSERROR_OK) {
|
|
|
|
LOG("Unable to initialise download window.");
|
|
|
|
return error;
|
|
|
|
}
|
2010-03-30 00:03:44 +04:00
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
error = nsgtk_cookies_init();
|
|
|
|
if (error != NSERROR_OK) {
|
|
|
|
LOG("Unable to initialise cookies window.");
|
|
|
|
return error;
|
|
|
|
}
|
2010-12-14 21:54:20 +03:00
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
error = nsgtk_hotlist_init();
|
|
|
|
if (error != NSERROR_OK) {
|
|
|
|
LOG("Unable to initialise hotlist window.");
|
|
|
|
return error;
|
|
|
|
}
|
2010-12-14 21:54:20 +03:00
|
|
|
|
2013-02-14 22:21:11 +04:00
|
|
|
/* If there is a url specified on the command line use it */
|
|
|
|
if (argc > 1) {
|
2013-11-17 18:27:24 +04:00
|
|
|
struct stat fs;
|
|
|
|
if (stat(argv[1], &fs) == 0) {
|
2014-04-30 16:56:01 +04:00
|
|
|
size_t addrlen;
|
2013-11-17 18:27:24 +04:00
|
|
|
char *rp = realpath(argv[1], NULL);
|
|
|
|
assert(rp != NULL);
|
2014-04-30 16:56:01 +04:00
|
|
|
|
|
|
|
/* calculate file url length including terminator */
|
|
|
|
addrlen = SLEN("file://") + strlen(rp) + 1;
|
|
|
|
addr = malloc(addrlen);
|
2013-11-17 18:27:24 +04:00
|
|
|
assert(addr != NULL);
|
2014-04-30 16:56:01 +04:00
|
|
|
snprintf(addr, addrlen, "file://%s", rp);
|
2013-11-17 18:27:24 +04:00
|
|
|
free(rp);
|
|
|
|
} else {
|
|
|
|
addr = strdup(argv[1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (addr != NULL) {
|
|
|
|
/* managed to set up based on local launch */
|
2013-02-14 22:21:11 +04:00
|
|
|
} else if (nsoption_charp(homepage_url) != NULL) {
|
2013-11-17 18:27:24 +04:00
|
|
|
addr = strdup(nsoption_charp(homepage_url));
|
2013-02-14 22:21:11 +04:00
|
|
|
} else {
|
2013-11-17 18:27:24 +04:00
|
|
|
addr = strdup(NETSURF_HOMEPAGE);
|
2012-03-22 13:34:34 +04:00
|
|
|
}
|
2010-03-30 00:03:44 +04:00
|
|
|
|
2013-02-14 22:21:11 +04:00
|
|
|
/* create an initial browser window */
|
|
|
|
error = nsurl_create(addr, &url);
|
|
|
|
if (error == NSERROR_OK) {
|
2014-02-10 18:08:45 +04:00
|
|
|
error = browser_window_create(BW_CREATE_HISTORY,
|
2013-02-14 22:21:11 +04:00
|
|
|
url,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
|
|
|
nsurl_unref(url);
|
|
|
|
}
|
2013-11-18 18:19:27 +04:00
|
|
|
|
|
|
|
free(addr);
|
|
|
|
|
2014-09-20 21:48:54 +04:00
|
|
|
return error;
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-15 03:42:48 +03:00
|
|
|
|
2013-05-23 14:50:57 +04:00
|
|
|
/**
|
|
|
|
* Ensures output logging stream is correctly configured
|
|
|
|
*/
|
|
|
|
static bool nslog_stream_configure(FILE *fptr)
|
|
|
|
{
|
2014-01-11 18:20:30 +04:00
|
|
|
/* set log stream to be non-buffering */
|
2013-05-23 14:50:57 +04:00
|
|
|
setbuf(fptr, NULL);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-09-22 21:07:34 +04:00
|
|
|
/**
|
|
|
|
* Run the gtk event loop.
|
|
|
|
*
|
|
|
|
* The same as the standard gtk_main loop except this ensures active
|
|
|
|
* FD are added to the gtk poll event set.
|
|
|
|
*/
|
|
|
|
static void nsgtk_main(void)
|
2004-07-29 03:14:04 +04:00
|
|
|
{
|
2005-12-20 00:54:51 +03:00
|
|
|
fd_set read_fd_set, write_fd_set, exc_fd_set;
|
|
|
|
int max_fd;
|
|
|
|
GPollFD *fd_list[1000];
|
2014-09-22 21:07:34 +04:00
|
|
|
unsigned int fd_count;
|
|
|
|
|
|
|
|
while (!nsgtk_complete) {
|
|
|
|
max_fd = -1;
|
|
|
|
fd_count = 0;
|
|
|
|
FD_ZERO(&read_fd_set);
|
|
|
|
FD_ZERO(&write_fd_set);
|
|
|
|
FD_ZERO(&exc_fd_set);
|
|
|
|
|
|
|
|
fetcher_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
|
|
|
|
for (int i = 0; i <= max_fd; i++) {
|
|
|
|
if (FD_ISSET(i, &read_fd_set)) {
|
|
|
|
GPollFD *fd = malloc(sizeof *fd);
|
|
|
|
fd->fd = i;
|
|
|
|
fd->events = G_IO_IN | G_IO_HUP | G_IO_ERR;
|
|
|
|
g_main_context_add_poll(0, fd, 0);
|
|
|
|
fd_list[fd_count++] = fd;
|
|
|
|
}
|
|
|
|
if (FD_ISSET(i, &write_fd_set)) {
|
|
|
|
GPollFD *fd = malloc(sizeof *fd);
|
|
|
|
fd->fd = i;
|
|
|
|
fd->events = G_IO_OUT | G_IO_ERR;
|
|
|
|
g_main_context_add_poll(0, fd, 0);
|
|
|
|
fd_list[fd_count++] = fd;
|
|
|
|
}
|
|
|
|
if (FD_ISSET(i, &exc_fd_set)) {
|
|
|
|
GPollFD *fd = malloc(sizeof *fd);
|
|
|
|
fd->fd = i;
|
|
|
|
fd->events = G_IO_ERR;
|
|
|
|
g_main_context_add_poll(0, fd, 0);
|
|
|
|
fd_list[fd_count++] = fd;
|
|
|
|
}
|
2014-06-26 21:56:42 +04:00
|
|
|
}
|
|
|
|
|
2014-09-22 21:07:34 +04:00
|
|
|
schedule_run();
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2014-09-22 21:07:34 +04:00
|
|
|
gtk_main_iteration();
|
2007-08-07 07:55:18 +04:00
|
|
|
|
2014-09-22 21:07:34 +04:00
|
|
|
for (unsigned int i = 0; i != fd_count; i++) {
|
|
|
|
g_main_context_remove_poll(0, fd_list[i]);
|
|
|
|
free(fd_list[i]);
|
|
|
|
}
|
2005-12-20 00:54:51 +03:00
|
|
|
}
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-01-11 18:20:30 +04:00
|
|
|
static void gui_quit(void)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("Quitting GUI");
|
2014-01-11 18:20:30 +04:00
|
|
|
|
|
|
|
/* Ensure all scaffoldings are destroyed before we go into exit */
|
Merged revisions 4282-4285,4288-4293,4297-4298,4307,4309-4313,4322,4324-4680 via svnmerge from
svn://svn.netsurf-browser.org/branches/mikeL/netsurf
........
r4432 | mikeL | 2008-06-24 04:00:36 +0100 (Tue, 24 Jun 2008) | 1 line
Drag events are now emited from where the press originated, instead of from where they became a drag
........
r4433 | mikeL | 2008-06-24 04:25:33 +0100 (Tue, 24 Jun 2008) | 1 line
Added accelerator to 'Select All'
........
r4495 | mikeL | 2008-07-02 21:36:32 +0100 (Wed, 02 Jul 2008) | 1 line
Selections are now deleted and replaced when a key is typed in a text area or text box. All input box behavior while a selection is active is now implemented (ex: pressing the right arrow key moves the caret to the end of the selection). Cut now works properly in both versions. Fixed discrepancy between where the caret was placed and selection began when starting a drag-select. Fixed bug with calculation of a selections end box.
........
r4496 | mikeL | 2008-07-02 22:11:24 +0100 (Wed, 02 Jul 2008) | 1 line
Added support for cut in input boxes
........
r4497 | mikeL | 2008-07-02 22:21:35 +0100 (Wed, 02 Jul 2008) | 1 line
Removed unused variables (Thanks tlsa)
........
r4498 | mikeL | 2008-07-02 23:30:30 +0100 (Wed, 02 Jul 2008) | 1 line
Modified selection clearing behavior to allow for drag-saves
........
r4499 | mikeL | 2008-07-03 00:51:50 +0100 (Thu, 03 Jul 2008) | 1 line
Fixed regression where it would take two clicks to place caret in an input (Thanks tlsa)
........
r4509 | mikeL | 2008-07-06 07:55:09 +0100 (Sun, 06 Jul 2008) | 1 line
Basic download support implemented. Only downloading of text files works
........
r4510 | mikeL | 2008-07-06 18:55:31 +0100 (Sun, 06 Jul 2008) | 1 line
Downloading of non-text files is now possible. Progress bar and size downloaded are now updated
........
r4511 | mikeL | 2008-07-06 20:46:00 +0100 (Sun, 06 Jul 2008) | 1 line
Added downloads glade file
........
r4512 | mikeL | 2008-07-06 20:47:39 +0100 (Sun, 06 Jul 2008) | 1 line
Downloads window now spawns in the center of the parent browser window
........
r4513 | mikeL | 2008-07-06 20:56:12 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed bug where backspace would be ignored if the selection began at the beginning on an input
........
r4514 | mikeL | 2008-07-06 21:26:45 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed compiler warnings by adding casts
........
r4516 | mikeL | 2008-07-06 21:32:41 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed initialization of size string, added initialization of progress
........
r4518 | mikeL | 2008-07-06 21:51:08 +0100 (Sun, 06 Jul 2008) | 1 line
Added an option for short units (with space) to human_friendly_bytesize
........
r4519 | mikeL | 2008-07-06 21:52:05 +0100 (Sun, 06 Jul 2008) | 1 line
Removed function size_to_string
........
r4520 | mikeL | 2008-07-06 22:03:11 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed pedantic error (kB instead of KB). Added missing necessary parameters to human_friendly_bytesize. Fixed incorrect bool types
........
r4521 | mikeL | 2008-07-06 22:08:15 +0100 (Sun, 06 Jul 2008) | 1 line
Removed unnecessary parameter and units list from human_friendly_bytesize
........
r4522 | mikeL | 2008-07-06 22:57:03 +0100 (Sun, 06 Jul 2008) | 1 line
Removed unnused variable
........
r4523 | mikeL | 2008-07-06 23:03:46 +0100 (Sun, 06 Jul 2008) | 1 line
Fixed url parsing by replacing url_parse_filename with url_nice. Total size and size downloaded are now in human readable form. Speed is now calculated (roughly)
........
r4524 | mikeL | 2008-07-07 01:19:01 +0100 (Mon, 07 Jul 2008) | 1 line
Added file overwrite confirmation. Changed speed to a double
........
r4546 | mikeL | 2008-07-09 17:21:43 +0100 (Wed, 09 Jul 2008) | 1 line
Changed parameter of selection_get_end/start to a size_t instead of int and changed all offset variables to size_t as well
........
r4547 | mikeL | 2008-07-09 17:30:47 +0100 (Wed, 09 Jul 2008) | 1 line
Added action buttons to the bottom toolbar. Added ability to clear selected (and completed) downloads with a framework for other actions.
........
r4556 | jmb | 2008-07-10 00:17:24 +0100 (Thu, 10 Jul 2008) | 3 lines
A large bunch of tidying and general fixes to text input handling.
Make selection code treat password fields as inputs, too.
........
r4557 | mikeL | 2008-07-10 00:24:46 +0100 (Thu, 10 Jul 2008) | 1 line
Added functionality to gui_empty_clipboard and gui_start_selection (Thanks jmb)
........
r4573 | mikeL | 2008-07-10 16:33:27 +0100 (Thu, 10 Jul 2008) | 1 line
Removed example download. Made the list store row aware of its download and vise versa. Added new way of handling actions from the dialog (e.g. buttons) which handles all rows in the selection. Added a few memory management function calls to clean up better
........
r4577 | mikeL | 2008-07-10 21:11:51 +0100 (Thu, 10 Jul 2008) | 1 line
Download write channels now close properly. Added status column to the tree store which will change the progress bar text if a download is canceled or completed. Implemented cancel button functionality.
........
r4578 | mikeL | 2008-07-10 21:17:51 +0100 (Thu, 10 Jul 2008) | 1 line
Speed is now displayed as '-' when 0 or download has stopped
........
r4580 | mikeL | 2008-07-11 02:10:57 +0100 (Fri, 11 Jul 2008) | 1 line
Added two download related options (Download directory & Clear completed downloads) and a Downloads tab to the preferences dialog. Also moved the option to ask when overwriting files to Downloads tab. Added another option to the pre-download dialog, Save, which downloads the file immediately to your 'Download directory'
........
r4581 | mikeL | 2008-07-11 02:26:00 +0100 (Fri, 11 Jul 2008) | 1 line
Rearranged pre-download dialog buttons to conform to the HIG
........
r4616 | mikeL | 2008-07-11 19:54:12 +0100 (Fri, 11 Jul 2008) | 1 line
Limited download window updates to a user-defined variable that can be set in options (default is .5). Updates are now only done if the download window is visible. This greatly reduces the cpu usage.
........
r4617 | mikeL | 2008-07-11 20:07:48 +0100 (Fri, 11 Jul 2008) | 1 line
Removed unnecessary update limit option (it is now fixed at .5)
........
r4629 | mikeL | 2008-07-13 04:21:07 +0100 (Sun, 13 Jul 2008) | 1 line
Reorganized button sensitivity functions. Sensitivities are now updated when the selection changes as well as when a selected download's state changes.
........
r4635 | mikeL | 2008-07-13 17:00:05 +0100 (Sun, 13 Jul 2008) | 1 line
Added error handling. Added word-wrap to the "info" cell renderer so that to keep everything under control. Fixed bug where downloads would always go to you default folder (missing breaks).
........
r4642 | mikeL | 2008-07-13 21:46:09 +0100 (Sun, 13 Jul 2008) | 1 line
Added time remaining column. Fixed regression where the download info would be erased upon completion/cancelation.
........
r4655 | mikeL | 2008-07-14 23:20:33 +0100 (Mon, 14 Jul 2008) | 1 line
Downloads dialog is now initialized in gtk_gui.c with no parent window. The parent windows are now set when a download is created (through an extra parameter in gui_download_window_create) and when nsgtk_download_show is called. When it is closed (when NS shuts down) all incomplete downloads are canceled (and the files deleted). Added a warning dialog when netsurf tries to close with incomplete downloads. Fixed bug where default save directory would initialize to NULL.
........
r4676 | mikeL | 2008-07-15 21:01:17 +0100 (Tue, 15 Jul 2008) | 1 line
Downloads dialog is now initialized in gtk_gui.c with no parent window. The parent windows are now set when a download is created (through an extra parameter in gui_download_window_create) and when nsgtk_download_show is called. (This is the second half of the patch, last commit was only partial for some reason)
........
r4678 | mikeL | 2008-07-16 01:18:52 +0100 (Wed, 16 Jul 2008) | 1 line
Addresses almost all of rjek and jmb's concerns, fixes most of the sloppiness that was present earlier. Downloads without a total_size are now handled correctly (thanks tlsa). Changes to the default download directly are now saved correctly. Billions of other small bugs fixed
........
svn path=/trunk/netsurf/; revision=4681
2008-07-16 14:19:30 +04:00
|
|
|
nsgtk_download_destroy();
|
2012-03-22 13:34:34 +04:00
|
|
|
urldb_save_cookies(nsoption_charp(cookie_jar));
|
|
|
|
urldb_save(nsoption_charp(url_file));
|
2010-10-05 23:14:46 +04:00
|
|
|
nsgtk_cookies_destroy();
|
|
|
|
nsgtk_history_destroy();
|
|
|
|
nsgtk_hotlist_destroy();
|
2014-04-28 19:37:00 +04:00
|
|
|
|
2009-12-18 02:55:02 +03:00
|
|
|
free(toolbar_indices_file_location);
|
2014-04-28 19:37:00 +04:00
|
|
|
|
|
|
|
free(nsgtk_config_home);
|
|
|
|
|
2007-05-30 03:53:35 +04:00
|
|
|
gtk_fetch_filetype_fin();
|
2010-03-15 03:42:48 +03:00
|
|
|
}
|
|
|
|
|
2014-05-28 02:52:35 +04:00
|
|
|
static nserror gui_launch_url(struct nsurl *url)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
2012-04-07 16:56:02 +04:00
|
|
|
gboolean ok;
|
|
|
|
GError *error = NULL;
|
|
|
|
|
2014-05-28 02:52:35 +04:00
|
|
|
ok = nsgtk_show_uri(NULL, nsurl_access(url), GDK_CURRENT_TIME, &error);
|
|
|
|
if (ok == TRUE) {
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
2012-04-07 16:56:02 +04:00
|
|
|
|
|
|
|
if (error) {
|
|
|
|
warn_user(messages_get("URIOpenError"), error->message);
|
|
|
|
g_error_free(error);
|
|
|
|
}
|
2014-05-28 02:52:35 +04:00
|
|
|
return NSERROR_NO_FETCH_HANDLER;
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void warn_user(const char *warning, const char *detail)
|
|
|
|
{
|
2007-05-06 20:39:34 +04:00
|
|
|
char buf[300]; /* 300 is the size the RISC OS GUI uses */
|
2015-06-13 13:31:23 +03:00
|
|
|
static GtkWindow *nsgtk_warning_window;
|
|
|
|
GtkLabel *WarningLabel;
|
2007-05-06 20:39:34 +04:00
|
|
|
|
2015-06-19 18:29:42 +03:00
|
|
|
LOG("%s %s", warning, detail ? detail : "");
|
2007-05-06 23:27:04 +04:00
|
|
|
fflush(stdout);
|
2007-05-06 20:39:34 +04:00
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
nsgtk_warning_window = GTK_WINDOW(gtk_builder_get_object(warning_builder, "wndWarning"));
|
|
|
|
WarningLabel = GTK_LABEL(gtk_builder_get_object(warning_builder,
|
|
|
|
"labelWarning"));
|
|
|
|
|
2007-05-06 20:39:34 +04:00
|
|
|
snprintf(buf, sizeof(buf), "%s %s", messages_get(warning),
|
|
|
|
detail ? detail : "");
|
|
|
|
buf[sizeof(buf) - 1] = 0;
|
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
gtk_label_set_text(WarningLabel, buf);
|
2007-05-06 20:39:34 +04:00
|
|
|
|
2010-09-13 03:40:34 +04:00
|
|
|
gtk_widget_show_all(GTK_WIDGET(nsgtk_warning_window));
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
static void nsgtk_PDF_set_pass(GtkButton *w, gpointer data)
|
|
|
|
{
|
|
|
|
char **owner_pass = ((void **)data)[0];
|
|
|
|
char **user_pass = ((void **)data)[1];
|
|
|
|
GtkWindow *wnd = ((void **)data)[2];
|
2015-06-13 13:31:23 +03:00
|
|
|
GtkBuilder *password_builder = ((void **)data)[3];
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
char *path = ((void **)data)[4];
|
2010-03-15 03:42:48 +03:00
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
char *op, *op1;
|
|
|
|
char *up, *up1;
|
2010-03-15 03:42:48 +03:00
|
|
|
|
2014-10-27 02:49:18 +03:00
|
|
|
op = strdup(gtk_entry_get_text(
|
2015-06-13 13:31:23 +03:00
|
|
|
GTK_ENTRY(gtk_builder_get_object(password_builder,
|
2014-10-27 02:49:18 +03:00
|
|
|
"entryPDFOwnerPassword"))));
|
|
|
|
op1 = strdup(gtk_entry_get_text(
|
2015-06-13 13:31:23 +03:00
|
|
|
GTK_ENTRY(gtk_builder_get_object(password_builder,
|
2014-10-27 02:49:18 +03:00
|
|
|
"entryPDFOwnerPassword1"))));
|
|
|
|
up = strdup(gtk_entry_get_text(
|
2015-06-13 13:31:23 +03:00
|
|
|
GTK_ENTRY(gtk_builder_get_object(password_builder,
|
2014-10-27 02:49:18 +03:00
|
|
|
"entryPDFUserPassword"))));
|
|
|
|
up1 = strdup(gtk_entry_get_text(
|
2015-06-13 13:31:23 +03:00
|
|
|
GTK_ENTRY(gtk_builder_get_object(password_builder,
|
2014-10-27 02:49:18 +03:00
|
|
|
"entryPDFUserPassword1"))));
|
2010-03-15 03:42:48 +03:00
|
|
|
|
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
if (op[0] == '\0') {
|
2015-06-13 13:31:23 +03:00
|
|
|
gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(password_builder,
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
"labelInfo")),
|
2015-06-19 18:29:42 +03:00
|
|
|
"Owner password must be at least 1 character long:");
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
free(op);
|
|
|
|
free(up);
|
2014-10-27 02:49:18 +03:00
|
|
|
} else if (!strcmp(op, up)) {
|
2015-06-13 13:31:23 +03:00
|
|
|
gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(password_builder,
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
"labelInfo")),
|
2015-06-19 18:29:42 +03:00
|
|
|
"User and owner passwords must be different:");
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
free(op);
|
|
|
|
free(up);
|
2014-10-27 02:49:18 +03:00
|
|
|
} else if (!strcmp(op, op1) && !strcmp(up, up1)) {
|
2010-03-15 03:42:48 +03:00
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
*owner_pass = op;
|
|
|
|
if (up[0] == '\0')
|
|
|
|
free(up);
|
|
|
|
else
|
|
|
|
*user_pass = up;
|
2010-03-15 03:42:48 +03:00
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
free(data);
|
|
|
|
gtk_widget_destroy(GTK_WIDGET(wnd));
|
2015-06-13 13:31:23 +03:00
|
|
|
g_object_unref(G_OBJECT(password_builder));
|
2010-03-15 03:42:48 +03:00
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
save_pdf(path);
|
2014-10-27 02:49:18 +03:00
|
|
|
|
2008-09-28 17:40:06 +04:00
|
|
|
free(path);
|
2014-10-27 02:49:18 +03:00
|
|
|
} else {
|
2015-06-13 13:31:23 +03:00
|
|
|
gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(password_builder,
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
"labelInfo")), "Passwords not confirmed:");
|
|
|
|
free(op);
|
|
|
|
free(up);
|
|
|
|
}
|
2010-03-15 03:42:48 +03:00
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
free(op1);
|
|
|
|
free(up1);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void nsgtk_PDF_no_pass(GtkButton *w, gpointer data)
|
|
|
|
{
|
|
|
|
GtkWindow *wnd = ((void **)data)[2];
|
2015-06-13 13:31:23 +03:00
|
|
|
GtkBuilder *password_builder = ((void **)data)[3];
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
char *path = ((void **)data)[4];
|
2010-03-15 03:42:48 +03:00
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
free(data);
|
2010-03-15 03:42:48 +03:00
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
gtk_widget_destroy(GTK_WIDGET(wnd));
|
2015-06-13 13:31:23 +03:00
|
|
|
g_object_unref(G_OBJECT(password_builder));
|
2010-03-15 03:42:48 +03:00
|
|
|
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
save_pdf(path);
|
2014-10-27 02:49:18 +03:00
|
|
|
|
2008-09-28 17:40:06 +04:00
|
|
|
free(path);
|
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf
........
r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines
Sorting out some problems with svn.
........
r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines
Added export tab to the options dialog.
Added the possibility of changing some print options.
........
r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines
Added checking of horizontal clipping.
Added better table loosening.
Changed some minor bugs.
Applied changes in the Export options tab according to the review from tlsa.
........
r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed bug which made it impossible to export pdf's.
........
r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines
Fixed some memory leaks which caused Netsurf to break.
........
r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines
Fixed bug with filenames which crashed Netsurf.
Turned anti aliasing off for printing.
Fixed some scaling issues.
........
r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines
Added new export/print options:
- suppressing images
- turning off backgrounds
- toggled loosening
........
r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines
Added new options to PDF export:
- document compression
- document encryption
Added PDF password dialog
........
r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines
Added saving print settings.
........
r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines
Fixes to PDF encryption
........
r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines
Fixed bug in plotting tiled bitmaps.
Fixed bug with too long text decorations.
........
r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines
Fixed JPG embedding bug.
........
r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines
Added clip checking to pdf plotters. No more "blank" clips.
Made PDF compression a default setting.
........
r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines
Fixed Haru crash on font-size==0.
........
r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines
Added changing text mode only if necessary.
........
r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines
Removing gtk stuff from core code.
Little fix in options.
........
r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines
Better font size checking in PDF export.
........
r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines
Fixed riscos text scale bug.
........
r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines
Added missing tooltips
........
r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines
Moved /pdf folder to desktop/save_pdf
........
r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines
Added comments.
........
r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines
Cosmetic changes
........
r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines
Fixed bug with BOX_INLINE_END in tree duplication.
........
r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line
Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure.
........
svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
|
|
|
}
|
2014-10-27 02:49:18 +03:00
|
|
|
|
|
|
|
static void nsgtk_pdf_password(char **owner_pass, char **user_pass, char *path)
|
|
|
|
{
|
|
|
|
GtkButton *ok, *no;
|
|
|
|
GtkWindow *wnd;
|
|
|
|
void **data;
|
2015-06-13 13:31:23 +03:00
|
|
|
GtkBuilder *password_builder;
|
|
|
|
nserror res;
|
|
|
|
|
|
|
|
res = nsgtk_builder_new_from_resname("password", &password_builder);
|
|
|
|
if (res != NSERROR_OK) {
|
|
|
|
LOG("Password UI builder init failed");
|
2014-10-27 02:49:18 +03:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
gtk_builder_connect_signals(password_builder, NULL);
|
|
|
|
|
|
|
|
wnd = GTK_WINDOW(gtk_builder_get_object(password_builder,
|
|
|
|
"wndPDFPassword"));
|
2014-10-27 02:49:18 +03:00
|
|
|
|
|
|
|
data = malloc(5 * sizeof(void *));
|
|
|
|
|
|
|
|
*owner_pass = NULL;
|
|
|
|
*user_pass = NULL;
|
|
|
|
|
|
|
|
data[0] = owner_pass;
|
|
|
|
data[1] = user_pass;
|
|
|
|
data[2] = wnd;
|
2015-06-13 13:31:23 +03:00
|
|
|
data[3] = password_builder;
|
2014-10-27 02:49:18 +03:00
|
|
|
data[4] = path;
|
|
|
|
|
2015-06-13 13:31:23 +03:00
|
|
|
ok = GTK_BUTTON(gtk_builder_get_object(password_builder,
|
|
|
|
"buttonPDFSetPassword"));
|
|
|
|
no = GTK_BUTTON(gtk_builder_get_object(password_builder,
|
|
|
|
"buttonPDFNoPassword"));
|
2014-10-27 02:49:18 +03:00
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(ok), "clicked",
|
|
|
|
G_CALLBACK(nsgtk_PDF_set_pass), (gpointer)data);
|
|
|
|
g_signal_connect(G_OBJECT(no), "clicked",
|
|
|
|
G_CALLBACK(nsgtk_PDF_no_pass), (gpointer)data);
|
|
|
|
|
|
|
|
gtk_widget_show(GTK_WIDGET(wnd));
|
|
|
|
}
|
|
|
|
|
2008-08-15 13:30:21 +04:00
|
|
|
|
Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key)
|
|
|
|
{
|
|
|
|
/* this function will need to become much more complex to support
|
|
|
|
* everything that the RISC OS version does. But this will do for
|
|
|
|
* now. I hope.
|
|
|
|
*/
|
2011-03-12 22:02:58 +03:00
|
|
|
switch (key->keyval) {
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Tab):
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_TAB;
|
2011-03-12 22:02:58 +03:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(BackSpace):
|
2011-03-12 22:02:58 +03:00
|
|
|
if (key->state & GDK_SHIFT_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_DELETE_LINE_START;
|
2011-03-12 22:02:58 +03:00
|
|
|
else
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_DELETE_LEFT;
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Delete):
|
2011-03-12 22:02:58 +03:00
|
|
|
if (key->state & GDK_SHIFT_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_DELETE_LINE_END;
|
2011-03-12 22:02:58 +03:00
|
|
|
else
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_DELETE_RIGHT;
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Linefeed): return 13;
|
|
|
|
case GDK_KEY(Return): return 10;
|
2015-03-27 12:36:19 +03:00
|
|
|
case GDK_KEY(Left): return NS_KEY_LEFT;
|
|
|
|
case GDK_KEY(Right): return NS_KEY_RIGHT;
|
|
|
|
case GDK_KEY(Up): return NS_KEY_UP;
|
|
|
|
case GDK_KEY(Down): return NS_KEY_DOWN;
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Home):
|
2011-03-12 22:02:58 +03:00
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_TEXT_START;
|
2011-03-12 22:02:58 +03:00
|
|
|
else
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_LINE_START;
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(End):
|
2011-03-12 22:02:58 +03:00
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_TEXT_END;
|
2011-03-12 22:02:58 +03:00
|
|
|
else
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_LINE_END;
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Page_Up):
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_PAGE_UP;
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Page_Down):
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_PAGE_DOWN;
|
2011-03-12 22:02:58 +03:00
|
|
|
case 'a':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_SELECT_ALL;
|
2011-03-12 22:02:58 +03:00
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
|
|
|
case 'u':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_DELETE_LINE;
|
2013-01-08 16:07:56 +04:00
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
|
|
|
case 'c':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_COPY_SELECTION;
|
2013-01-08 16:07:56 +04:00
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
|
|
|
case 'v':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_PASTE;
|
2013-01-08 16:07:56 +04:00
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
|
|
|
case 'x':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_CUT_SELECTION;
|
2011-03-12 22:02:58 +03:00
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
2013-10-01 16:15:25 +04:00
|
|
|
case 'Z':
|
2013-10-01 00:37:31 +04:00
|
|
|
case 'y':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_REDO;
|
2013-10-01 00:37:31 +04:00
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
|
|
|
case 'z':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_UNDO;
|
2013-10-01 00:37:31 +04:00
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Escape):
|
2015-03-27 12:36:19 +03:00
|
|
|
return NS_KEY_ESCAPE;
|
2010-03-15 03:42:48 +03:00
|
|
|
|
Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
/* Modifiers - do nothing for now */
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Shift_L):
|
|
|
|
case GDK_KEY(Shift_R):
|
|
|
|
case GDK_KEY(Control_L):
|
|
|
|
case GDK_KEY(Control_R):
|
|
|
|
case GDK_KEY(Caps_Lock):
|
|
|
|
case GDK_KEY(Shift_Lock):
|
|
|
|
case GDK_KEY(Meta_L):
|
|
|
|
case GDK_KEY(Meta_R):
|
|
|
|
case GDK_KEY(Alt_L):
|
|
|
|
case GDK_KEY(Alt_R):
|
|
|
|
case GDK_KEY(Super_L):
|
|
|
|
case GDK_KEY(Super_R):
|
|
|
|
case GDK_KEY(Hyper_L):
|
2014-01-11 18:20:30 +04:00
|
|
|
case GDK_KEY(Hyper_R):
|
2011-03-12 22:02:58 +03:00
|
|
|
return 0;
|
|
|
|
|
2014-01-11 18:20:30 +04:00
|
|
|
default:
|
2011-03-12 22:02:58 +03:00
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
2014-01-11 18:20:30 +04:00
|
|
|
}
|
Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
}
|
2010-03-21 16:32:59 +03:00
|
|
|
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/**
|
|
|
|
* create directory name and check it is acessible and a directory.
|
|
|
|
*/
|
|
|
|
static nserror
|
|
|
|
check_dirname(const char *path, const char *leaf, char **dirname_out)
|
|
|
|
{
|
|
|
|
nserror ret;
|
2014-05-07 19:14:18 +04:00
|
|
|
char *dirname = NULL;
|
2014-04-28 19:37:00 +04:00
|
|
|
struct stat dirname_stat;
|
|
|
|
|
2014-05-07 19:14:18 +04:00
|
|
|
ret = netsurf_mkpath(&dirname, NULL, 2, path, leaf);
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
2014-04-28 19:37:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ensure access is possible and the entry is actualy
|
|
|
|
* a directory.
|
|
|
|
*/
|
|
|
|
if (stat(dirname, &dirname_stat) == 0) {
|
|
|
|
if (S_ISDIR(dirname_stat.st_mode)) {
|
|
|
|
if (access(dirname, R_OK | W_OK) == 0) {
|
|
|
|
*dirname_out = dirname;
|
|
|
|
return NSERROR_OK;
|
|
|
|
} else {
|
|
|
|
ret = NSERROR_PERMISSION;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ret = NSERROR_NOT_DIRECTORY;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ret = NSERROR_NOT_FOUND;
|
|
|
|
}
|
|
|
|
|
|
|
|
free(dirname);
|
|
|
|
|
2014-08-17 02:31:55 +04:00
|
|
|
return ret;
|
2014-04-28 19:37:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the path to the config directory.
|
|
|
|
*
|
|
|
|
* @param config_home_out Path to configuration directory.
|
|
|
|
* @return NSERROR_OK on sucess and \a config_home_out updated else error code.
|
|
|
|
*/
|
|
|
|
static nserror get_config_home(char **config_home_out)
|
|
|
|
{
|
|
|
|
nserror ret;
|
|
|
|
char *home_dir;
|
|
|
|
char *xdg_config_dir;
|
|
|
|
char *config_home;
|
|
|
|
|
|
|
|
home_dir = getenv("HOME");
|
|
|
|
|
|
|
|
/* The old $HOME/.netsurf/ directory should be used if it
|
|
|
|
* exists and is accessible.
|
|
|
|
*/
|
|
|
|
if (home_dir != NULL) {
|
|
|
|
ret = check_dirname(home_dir, ".netsurf", &config_home);
|
|
|
|
if (ret == NSERROR_OK) {
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("\"%s\"", config_home);
|
2014-04-28 19:37:00 +04:00
|
|
|
*config_home_out = config_home;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* $XDG_CONFIG_HOME defines the base directory
|
|
|
|
* relative to which user specific configuration files
|
|
|
|
* should be stored.
|
|
|
|
*/
|
|
|
|
xdg_config_dir = getenv("XDG_CONFIG_HOME");
|
|
|
|
|
|
|
|
if ((xdg_config_dir == NULL) || (*xdg_config_dir == 0)) {
|
|
|
|
/* If $XDG_CONFIG_HOME is either not set or empty, a
|
|
|
|
* default equal to $HOME/.config should be used.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @todo the meaning of empty is never defined so I
|
|
|
|
* am assuming it is a zero length string but is it
|
|
|
|
* supposed to mean "whitespace" and if so what counts
|
|
|
|
* as whitespace? (are tabs etc. counted or should
|
|
|
|
* isspace() be used)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* the HOME envvar is required */
|
|
|
|
if (home_dir == NULL) {
|
|
|
|
return NSERROR_NOT_DIRECTORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = check_dirname(home_dir, ".config/netsurf", &config_home);
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ret = check_dirname(xdg_config_dir, "netsurf", &config_home);
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("\"%s\"", config_home);
|
2014-04-28 19:37:00 +04:00
|
|
|
|
|
|
|
*config_home_out = config_home;
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static nserror create_config_home(char **config_home_out)
|
|
|
|
{
|
2014-05-13 20:49:23 +04:00
|
|
|
char *config_home = NULL;
|
2014-04-28 19:37:00 +04:00
|
|
|
char *home_dir;
|
|
|
|
char *xdg_config_dir;
|
|
|
|
nserror ret;
|
|
|
|
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("Attempting to create configuration directory");
|
2014-04-28 19:37:00 +04:00
|
|
|
|
|
|
|
/* $XDG_CONFIG_HOME defines the base directory
|
|
|
|
* relative to which user specific configuration files
|
|
|
|
* should be stored.
|
|
|
|
*/
|
|
|
|
xdg_config_dir = getenv("XDG_CONFIG_HOME");
|
|
|
|
|
|
|
|
if ((xdg_config_dir == NULL) || (*xdg_config_dir == 0)) {
|
|
|
|
home_dir = getenv("HOME");
|
|
|
|
|
|
|
|
if ((home_dir == NULL) || (*home_dir == 0)) {
|
|
|
|
return NSERROR_NOT_DIRECTORY;
|
|
|
|
}
|
|
|
|
|
2014-05-13 20:49:23 +04:00
|
|
|
ret = netsurf_mkpath(&config_home, NULL, 4, home_dir, ".config","netsurf", "/");
|
2014-05-07 19:14:18 +04:00
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
2014-04-28 19:37:00 +04:00
|
|
|
}
|
|
|
|
} else {
|
2014-05-13 20:49:23 +04:00
|
|
|
ret = netsurf_mkpath(&config_home, NULL, 3, xdg_config_dir, "netsurf", "/");
|
2014-05-07 19:14:18 +04:00
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
2014-04-28 19:37:00 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ensure all elements of path exist (the trailing / is required) */
|
2014-06-05 15:06:47 +04:00
|
|
|
ret = netsurf_mkdir_all(config_home);
|
2014-04-28 19:37:00 +04:00
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
free(config_home);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* strip the trailing separator */
|
|
|
|
config_home[strlen(config_home) - 1] = 0;
|
|
|
|
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("\"%s\"", config_home);
|
2014-03-22 19:26:30 +04:00
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
*config_home_out = config_home;
|
|
|
|
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
2014-03-22 19:26:30 +04:00
|
|
|
/**
|
|
|
|
* Get the path to the cache directory.
|
|
|
|
*
|
|
|
|
* @param cache_home_out Path to cache directory.
|
|
|
|
* @return NSERROR_OK on sucess and \a cache_home_out updated else error code.
|
|
|
|
*/
|
|
|
|
static nserror get_cache_home(char **cache_home_out)
|
|
|
|
{
|
|
|
|
nserror ret;
|
|
|
|
char *xdg_cache_dir;
|
|
|
|
char *cache_home;
|
|
|
|
char *home_dir;
|
|
|
|
|
|
|
|
/* $XDG_CACHE_HOME defines the base directory relative to
|
|
|
|
* which user specific non-essential data files should be
|
|
|
|
* stored.
|
|
|
|
*/
|
|
|
|
xdg_cache_dir = getenv("XDG_CACHE_HOME");
|
|
|
|
|
|
|
|
if ((xdg_cache_dir == NULL) || (*xdg_cache_dir == 0)) {
|
|
|
|
/* If $XDG_CACHE_HOME is either not set or empty, a
|
|
|
|
* default equal to $HOME/.cache should be used.
|
|
|
|
*/
|
|
|
|
|
|
|
|
home_dir = getenv("HOME");
|
|
|
|
|
|
|
|
/* the HOME envvar is required */
|
|
|
|
if (home_dir == NULL) {
|
|
|
|
return NSERROR_NOT_DIRECTORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = check_dirname(home_dir, ".cache/netsurf", &cache_home);
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ret = check_dirname(xdg_cache_dir, "netsurf", &cache_home);
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("\"%s\"", cache_home);
|
2014-03-22 19:26:30 +04:00
|
|
|
|
|
|
|
*cache_home_out = cache_home;
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static nserror create_cache_home(char **cache_home_out)
|
|
|
|
{
|
|
|
|
char *cache_home = NULL;
|
|
|
|
char *home_dir;
|
|
|
|
char *xdg_cache_dir;
|
|
|
|
nserror ret;
|
|
|
|
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("Attempting to create configuration directory");
|
2014-03-22 19:26:30 +04:00
|
|
|
|
|
|
|
/* $XDG_CACHE_HOME defines the base directory
|
|
|
|
* relative to which user specific cache files
|
|
|
|
* should be stored.
|
|
|
|
*/
|
|
|
|
xdg_cache_dir = getenv("XDG_CACHE_HOME");
|
|
|
|
|
|
|
|
if ((xdg_cache_dir == NULL) || (*xdg_cache_dir == 0)) {
|
|
|
|
home_dir = getenv("HOME");
|
|
|
|
|
|
|
|
if ((home_dir == NULL) || (*home_dir == 0)) {
|
|
|
|
return NSERROR_NOT_DIRECTORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = netsurf_mkpath(&cache_home, NULL, 4, home_dir, ".cache", "netsurf", "/");
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ret = netsurf_mkpath(&cache_home, NULL, 3, xdg_cache_dir, "netsurf", "/");
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ensure all elements of path exist (the trailing / is required) */
|
2014-06-05 15:06:47 +04:00
|
|
|
ret = netsurf_mkdir_all(cache_home);
|
2014-03-22 19:26:30 +04:00
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
free(cache_home);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* strip the trailing separator */
|
|
|
|
cache_home[strlen(cache_home) - 1] = 0;
|
|
|
|
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("\"%s\"", cache_home);
|
2014-03-22 19:26:30 +04:00
|
|
|
|
|
|
|
*cache_home_out = cache_home;
|
|
|
|
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
static nserror nsgtk_option_init(int *pargc, char** argv)
|
|
|
|
{
|
|
|
|
nserror ret;
|
2014-05-13 02:46:31 +04:00
|
|
|
char *choices = NULL;
|
2014-04-28 19:37:00 +04:00
|
|
|
|
|
|
|
/* user options setup */
|
|
|
|
ret = nsoption_init(set_defaults, &nsoptions, &nsoptions_default);
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Attempt to load the user choices */
|
2014-05-07 19:14:18 +04:00
|
|
|
ret = netsurf_mkpath(&choices, NULL, 2, nsgtk_config_home, "Choices");
|
|
|
|
if (ret == NSERROR_OK) {
|
2014-04-28 19:37:00 +04:00
|
|
|
nsoption_read(choices, nsoptions);
|
|
|
|
free(choices);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* overide loaded options with those from commandline */
|
|
|
|
nsoption_commandline(pargc, argv, nsoptions);
|
|
|
|
|
|
|
|
/* ensure all options fall within sensible bounds */
|
|
|
|
|
|
|
|
/* Attempt to handle nonsense status bar widths. These may exist
|
|
|
|
* in people's Choices as the GTK front end used to abuse the
|
|
|
|
* status bar width option by using it for an absolute value in px.
|
|
|
|
* The GTK front end now correctly uses it as a proportion of window
|
|
|
|
* width. Here we assume that a value of less than 15% is wrong
|
|
|
|
* and set to the default two thirds. */
|
|
|
|
if (nsoption_int(toolbar_status_size) < 1500) {
|
|
|
|
nsoption_set_int(toolbar_status_size, 6667);
|
|
|
|
}
|
|
|
|
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
2016-04-16 00:50:28 +03:00
|
|
|
static struct gui_misc_table nsgtk_misc_table = {
|
2014-03-08 18:13:27 +04:00
|
|
|
.schedule = nsgtk_schedule,
|
2014-01-23 03:19:57 +04:00
|
|
|
|
2014-01-12 02:34:12 +04:00
|
|
|
.quit = gui_quit,
|
2014-01-15 16:28:55 +04:00
|
|
|
.launch_url = gui_launch_url,
|
2015-04-12 19:26:22 +03:00
|
|
|
.cert_verify = gtk_cert_verify,
|
2015-06-17 23:29:48 +03:00
|
|
|
.login = gui_401login_open,
|
2014-10-27 02:49:18 +03:00
|
|
|
.pdf_password = nsgtk_pdf_password,
|
2014-01-11 18:20:30 +04:00
|
|
|
};
|
|
|
|
|
2015-06-19 18:29:42 +03:00
|
|
|
|
|
|
|
static nserror nsgtk_messages_init(char **respaths)
|
|
|
|
{
|
2015-06-23 13:53:41 +03:00
|
|
|
const char *messages;
|
2015-06-22 01:24:31 +03:00
|
|
|
nserror ret;
|
|
|
|
const uint8_t *data;
|
|
|
|
size_t data_size;
|
2015-06-19 18:29:42 +03:00
|
|
|
|
2015-06-22 01:24:31 +03:00
|
|
|
ret = nsgtk_data_from_resname("Messages", &data, &data_size);
|
|
|
|
if (ret == NSERROR_OK) {
|
|
|
|
ret = messages_add_from_inline(data, data_size);
|
|
|
|
} else {
|
|
|
|
/* Obtain path to messages */
|
2015-06-23 13:53:41 +03:00
|
|
|
ret = nsgtk_path_from_resname("Messages", &messages);
|
|
|
|
if (ret == NSERROR_OK) {
|
2015-06-22 01:24:31 +03:00
|
|
|
ret = messages_add_from_file(messages);
|
|
|
|
}
|
2015-06-19 18:29:42 +03:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2014-01-11 18:20:30 +04:00
|
|
|
/**
|
|
|
|
* Main entry point from OS.
|
|
|
|
*/
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
2014-03-22 19:26:30 +04:00
|
|
|
char *cache_home = NULL;
|
2014-01-11 18:20:30 +04:00
|
|
|
nserror ret;
|
2014-05-10 13:22:10 +04:00
|
|
|
struct netsurf_table nsgtk_table = {
|
2016-04-16 00:50:28 +03:00
|
|
|
.misc = &nsgtk_misc_table,
|
2014-01-15 23:37:05 +04:00
|
|
|
.window = nsgtk_window_table,
|
2014-02-01 16:41:23 +04:00
|
|
|
.clipboard = nsgtk_clipboard_table,
|
2014-01-15 23:37:05 +04:00
|
|
|
.download = nsgtk_download_table,
|
2014-01-26 03:00:22 +04:00
|
|
|
.fetch = nsgtk_fetch_table,
|
2014-03-22 19:26:30 +04:00
|
|
|
.llcache = filesystem_llcache_table,
|
2014-05-25 03:57:48 +04:00
|
|
|
.search = nsgtk_search_table,
|
|
|
|
.search_web = nsgtk_search_web_table,
|
2015-04-14 01:49:44 +03:00
|
|
|
.bitmap = nsgtk_bitmap_table,
|
2014-01-15 23:37:05 +04:00
|
|
|
};
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2015-06-17 23:29:48 +03:00
|
|
|
ret = netsurf_register(&nsgtk_table);
|
|
|
|
if (ret != NSERROR_OK) {
|
2014-09-22 21:07:34 +04:00
|
|
|
die("NetSurf operation table failed registration\n");
|
2015-06-17 23:29:48 +03:00
|
|
|
}
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* Locate the correct user configuration directory path */
|
|
|
|
ret = get_config_home(&nsgtk_config_home);
|
|
|
|
if (ret == NSERROR_NOT_FOUND) {
|
|
|
|
/* no config directory exists yet so try to create one */
|
|
|
|
ret = create_config_home(&nsgtk_config_home);
|
|
|
|
}
|
|
|
|
if (ret != NSERROR_OK) {
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("Unable to locate a configuration directory.");
|
2014-04-28 19:37:00 +04:00
|
|
|
nsgtk_config_home = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Initialise gtk */
|
2014-01-11 18:20:30 +04:00
|
|
|
gtk_init(&argc, &argv);
|
|
|
|
|
|
|
|
/* initialise logging. Not fatal if it fails but not much we
|
|
|
|
* can do about it either.
|
|
|
|
*/
|
|
|
|
nslog_init(nslog_stream_configure, &argc, argv);
|
|
|
|
|
2015-06-17 23:29:48 +03:00
|
|
|
/* build the common resource path list */
|
2015-06-19 18:15:24 +03:00
|
|
|
respaths = nsgtk_init_resource_path(nsgtk_config_home);
|
|
|
|
if (respaths == NULL) {
|
|
|
|
fprintf(stderr, "Unable to locate resources\n");
|
|
|
|
return 1;
|
|
|
|
}
|
2015-06-17 23:29:48 +03:00
|
|
|
|
|
|
|
/* initialise the gtk resource handling */
|
|
|
|
ret = nsgtk_init_resources(respaths);
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
fprintf(stderr, "GTK resources failed to initialise (%s)\n",
|
|
|
|
messages_get_errorcode(ret));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* Initialise user options */
|
|
|
|
ret = nsgtk_option_init(&argc, argv);
|
2014-01-11 18:20:30 +04:00
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
fprintf(stderr, "Options failed to initialise (%s)\n",
|
|
|
|
messages_get_errorcode(ret));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2015-06-19 18:29:42 +03:00
|
|
|
/* Initialise translated messages */
|
|
|
|
ret = nsgtk_messages_init(respaths);
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
fprintf(stderr, "Unable to load translated messages (%s)\n",
|
|
|
|
messages_get_errorcode(ret));
|
|
|
|
LOG("Unable to load translated messages");
|
|
|
|
/** \todo decide if message load faliure should be fatal */
|
|
|
|
}
|
2014-04-28 19:37:00 +04:00
|
|
|
|
2014-03-22 19:26:30 +04:00
|
|
|
/* Locate the correct user cache directory path */
|
|
|
|
ret = get_cache_home(&cache_home);
|
|
|
|
if (ret == NSERROR_NOT_FOUND) {
|
|
|
|
/* no cache directory exists yet so try to create one */
|
|
|
|
ret = create_cache_home(&cache_home);
|
|
|
|
}
|
|
|
|
if (ret != NSERROR_OK) {
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("Unable to locate a cache directory.");
|
2014-03-22 19:26:30 +04:00
|
|
|
}
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* core initialisation */
|
2015-06-19 18:29:42 +03:00
|
|
|
ret = netsurf_init(cache_home);
|
2014-03-22 19:26:30 +04:00
|
|
|
free(cache_home);
|
2014-01-11 18:20:30 +04:00
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
fprintf(stderr, "NetSurf core failed to initialise (%s)\n",
|
|
|
|
messages_get_errorcode(ret));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* run the browser */
|
2014-09-20 21:48:54 +04:00
|
|
|
ret = nsgtk_init(argc, argv, respaths);
|
|
|
|
if (ret != NSERROR_OK) {
|
2015-06-13 13:31:23 +03:00
|
|
|
fprintf(stderr, "NetSurf gtk initialise failed (%s)\n",
|
2014-09-20 21:48:54 +04:00
|
|
|
messages_get_errorcode(ret));
|
|
|
|
} else {
|
2014-09-22 21:07:34 +04:00
|
|
|
nsgtk_main();
|
2014-09-20 21:48:54 +04:00
|
|
|
}
|
2014-01-11 18:20:30 +04:00
|
|
|
|
|
|
|
/* common finalisation */
|
|
|
|
netsurf_exit();
|
|
|
|
|
|
|
|
/* finalise options */
|
|
|
|
nsoption_finalise(nsoptions, nsoptions_default);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|