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 <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2006-03-27 17:19:08 +04:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <limits.h>
|
2007-01-30 01:27:15 +03:00
|
|
|
#include <sys/select.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 <gdk/gdkkeysyms.h>
|
|
|
|
#include <gtk/gtk.h>
|
2010-07-23 03:01:13 +04:00
|
|
|
#include <glib.h>
|
|
|
|
|
2014-10-16 12:53:55 +04:00
|
|
|
#include "utils/filepath.h"
|
|
|
|
#include "utils/log.h"
|
|
|
|
#include "utils/messages.h"
|
|
|
|
#include "utils/utf8.h"
|
|
|
|
#include "utils/utils.h"
|
|
|
|
#include "utils/file.h"
|
|
|
|
#include "utils/nsoption.h"
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "content/content.h"
|
|
|
|
#include "content/fetch.h"
|
2014-06-26 21:56:42 +04:00
|
|
|
#include "content/fetchers.h"
|
2011-02-16 02:18:10 +03:00
|
|
|
#include "content/fetchers/curl.h"
|
2011-02-24 01:27:55 +03:00
|
|
|
#include "content/fetchers/resource.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"
|
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
|
|
|
#include "desktop/save_pdf/pdf_plotters.h"
|
2009-12-18 02:55:02 +03:00
|
|
|
#include "desktop/searchweb.h"
|
2013-08-12 14:43:41 +04:00
|
|
|
#include "desktop/sslcert_viewer.h"
|
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
|
|
|
#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"
|
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;
|
|
|
|
char *res_dir_location;
|
|
|
|
char *languages_file_location;
|
2012-12-30 05:17:17 +04:00
|
|
|
char *themelist_file_location;
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
char *nsgtk_config_home; /* exported global defined in gtk/gui.h */
|
|
|
|
|
2011-12-31 04:00:54 +04:00
|
|
|
GdkPixbuf *favicon_pixbuf; /* favicon default pixbuf */
|
|
|
|
|
2011-09-24 13:24:13 +04:00
|
|
|
struct glade_file_location_s *glade_file_location;
|
2010-12-14 21:54:20 +03:00
|
|
|
|
2010-09-13 03:40:34 +04:00
|
|
|
static GtkWindow *nsgtk_warning_window;
|
2010-07-28 19:22:44 +04:00
|
|
|
GtkWidget *widWarning;
|
2006-07-19 17:41:57 +04:00
|
|
|
|
2007-08-12 03:14:33 +04:00
|
|
|
static void nsgtk_ssl_accept(GtkButton *w, gpointer data);
|
2010-10-05 23:14:46 +04:00
|
|
|
static void nsgtk_ssl_reject(GtkWidget *w, gpointer data);
|
|
|
|
static gboolean nsgtk_ssl_delete_event(GtkWidget *w, GdkEvent *event,
|
|
|
|
gpointer data);
|
2008-10-10 13:30:17 +04:00
|
|
|
#ifdef WITH_PDF_EXPORT
|
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);
|
|
|
|
static void nsgtk_PDF_no_pass(GtkButton *w, gpointer data);
|
2008-10-10 13:30:17 +04:00
|
|
|
#endif
|
2007-08-12 03:14:33 +04:00
|
|
|
|
2010-01-24 04:46:17 +03:00
|
|
|
#define THROBBER_FRAMES 9
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2010-07-28 19:22:44 +04: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 **
|
|
|
|
nsgtk_init_resource(const char *resource_path)
|
2010-07-23 03:01:13 +04:00
|
|
|
{
|
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
|
|
|
|
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
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
return respath;
|
|
|
|
}
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
/* This is an ugly hack to just get the new-style throbber going.
|
|
|
|
* It, along with the PNG throbber loader, need making more generic.
|
|
|
|
*/
|
|
|
|
static bool nsgtk_throbber_init(char **respath, int framec)
|
2010-07-23 03:01:13 +04:00
|
|
|
{
|
2010-07-28 19:22:44 +04:00
|
|
|
char **filenames;
|
|
|
|
char targetname[PATH_MAX];
|
|
|
|
int frame_num;
|
|
|
|
bool ret;
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
filenames = calloc(framec, sizeof(char *));
|
|
|
|
if (filenames == NULL)
|
|
|
|
return false;
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
for (frame_num = 0; frame_num < framec; frame_num++) {
|
|
|
|
snprintf(targetname, PATH_MAX, "throbber/throbber%d.png", frame_num);
|
2011-03-17 14:26:30 +03:00
|
|
|
filenames[frame_num] = filepath_find(respath, targetname);
|
2010-07-28 19:22:44 +04:00
|
|
|
}
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
ret = nsgtk_throbber_initialise_from_png(frame_num, filenames);
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
for (frame_num = 0; frame_num < framec; frame_num++) {
|
|
|
|
free(filenames[frame_num]);
|
2010-07-23 03:01:13 +04:00
|
|
|
}
|
2010-07-28 19:22:44 +04:00
|
|
|
free(filenames);
|
2010-07-23 03:01:13 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
return ret;
|
2010-07-23 03:01:13 +04:00
|
|
|
|
|
|
|
}
|
2006-03-27 17:19:08 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
#define NEW_GLADE_ERROR_SIZE 128
|
|
|
|
|
2010-03-31 17:59:57 +04:00
|
|
|
static char *
|
2012-05-16 23:57:43 +04:00
|
|
|
nsgtk_new_ui(char **respath, const char *name, GtkBuilder **pglade)
|
2010-03-31 17:59:57 +04:00
|
|
|
{
|
2012-05-16 23:57:43 +04:00
|
|
|
GtkBuilder *builder;
|
|
|
|
GError* error = NULL;
|
2010-07-28 19:22:44 +04:00
|
|
|
char *filepath;
|
|
|
|
char errorstr[NEW_GLADE_ERROR_SIZE];
|
|
|
|
char resname[PATH_MAX];
|
2012-05-16 23:57:43 +04:00
|
|
|
#if GTK_CHECK_VERSION(3,0,0)
|
|
|
|
int gtkv = 3;
|
|
|
|
#else
|
|
|
|
int gtkv = 2;
|
|
|
|
#endif
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
snprintf(resname, PATH_MAX, "%s.gtk%d.ui", name, gtkv);
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2011-03-17 14:26:30 +03:00
|
|
|
filepath = filepath_find(respath, resname);
|
2010-07-28 19:22:44 +04:00
|
|
|
if (filepath == NULL) {
|
2014-01-11 18:20:30 +04:00
|
|
|
snprintf(errorstr, NEW_GLADE_ERROR_SIZE,
|
2010-07-28 19:22:44 +04:00
|
|
|
"Unable to locate %s glade template file.\n", name);
|
|
|
|
die(errorstr);
|
2010-03-31 17:59:57 +04:00
|
|
|
}
|
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
builder = gtk_builder_new();
|
|
|
|
if (!gtk_builder_add_from_file(builder, filepath, &error)) {
|
|
|
|
g_warning ("Couldn't load builder file: %s", error->message);
|
|
|
|
g_error_free (error);
|
2014-01-11 18:20:30 +04:00
|
|
|
snprintf(errorstr, NEW_GLADE_ERROR_SIZE,
|
2010-07-28 19:22:44 +04:00
|
|
|
"Unable to load glade %s window definitions.\n", name);
|
2010-03-31 17:59:57 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
die(errorstr);
|
|
|
|
}
|
2010-03-31 17:59:57 +04:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
gtk_builder_connect_signals(builder, NULL);
|
|
|
|
|
|
|
|
LOG(("Using '%s' as %s ui template file", filepath, name));
|
2010-03-31 17:59:57 +04:00
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
if (pglade != NULL) {
|
2012-05-16 23:57:43 +04:00
|
|
|
*pglade = builder;
|
2014-08-01 03:58:42 +04:00
|
|
|
} else {
|
|
|
|
/* release our reference to the builder if it is not
|
|
|
|
* being used.
|
|
|
|
*/
|
|
|
|
g_object_unref(G_OBJECT(builder));
|
2010-03-31 17:59:57 +04:00
|
|
|
}
|
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
return filepath;
|
2010-03-31 17:59:57 +04:00
|
|
|
}
|
2010-01-20 23:32:30 +03:00
|
|
|
|
2010-03-15 03:42:48 +03:00
|
|
|
/**
|
2010-07-28 19:22:44 +04:00
|
|
|
* Load definitions from glade files.
|
2010-03-15 03:42:48 +03:00
|
|
|
*/
|
2014-01-11 18:20:30 +04:00
|
|
|
static void
|
2010-07-28 19:22:44 +04:00
|
|
|
nsgtk_init_glade(char **respath)
|
2006-03-27 17:19:08 +04:00
|
|
|
{
|
2012-05-16 23:57:43 +04:00
|
|
|
GtkBuilder *gladeWarning;
|
Merged revisions 4859-5013,5016-5018 via svnmerge from
svn://source.netsurf-browser.org/branches/takkaria/netsurf-hubbub
........
r4860 | takkaria | 2008-08-02 03:51:35 +0100 (Sat, 02 Aug 2008) | 2 lines
A really horribly rough first go at integrating hubbub with NetSurf. Segfaults, but I'm not sure what I've done wrong.
........
r4861 | jmb | 2008-08-02 05:01:19 +0100 (Sat, 02 Aug 2008) | 3 lines
Fix segfault caused by mismatched struct layout expectations.
Fix warnings, too.
........
r4862 | jmb | 2008-08-02 05:11:02 +0100 (Sat, 02 Aug 2008) | 2 lines
Destroy parser as soon as it's no longer needed, and flag this so that html_destroy doesn't cause things to trample all over the heap.
........
r4863 | takkaria | 2008-08-02 15:30:34 +0100 (Sat, 02 Aug 2008) | 2 lines
Remove deugging printf()s, add Aliases file, add script { display: none; } block.
........
r4868 | takkaria | 2008-08-02 22:14:55 +0100 (Sat, 02 Aug 2008) | 2 lines
Fix a segfault bug.
........
r4869 | takkaria | 2008-08-02 22:17:58 +0100 (Sat, 02 Aug 2008) | 2 lines
Add gtk/res/Aliases as a symlink to the one in !NS/Resources
........
r4870 | takkaria | 2008-08-02 22:26:31 +0100 (Sat, 02 Aug 2008) | 2 lines
Fix symlink.
........
r4885 | jmb | 2008-08-03 23:26:54 +0100 (Sun, 03 Aug 2008) | 2 lines
Make multiple parallel parser instances work correctly.
........
r4886 | tlsa | 2008-08-04 00:21:29 +0100 (Mon, 04 Aug 2008) | 1 line
Don't display contents of STYLE.
........
r4891 | jmb | 2008-08-04 01:18:07 +0100 (Mon, 04 Aug 2008) | 5 lines
Fix reparent_children to actually work
Make get_parent_node pay attention to the element_only flag
Fixup node referencing when appending a text child
Make clone_node clone attributes and namespace information in the non-deep case
........
r4918 | jmb | 2008-08-05 15:27:03 +0100 (Tue, 05 Aug 2008) | 2 lines
Fix debug target
........
r4944 | takkaria | 2008-08-07 12:56:50 +0100 (Thu, 07 Aug 2008) | 2 lines
Use talloc to allocate space for Hubbub.
........
r4993 | takkaria | 2008-08-10 17:49:47 +0100 (Sun, 10 Aug 2008) | 2 lines
Stub out the encoding change callback so NS-hubbub compiles again.
........
r4994 | takkaria | 2008-08-10 18:02:33 +0100 (Sun, 10 Aug 2008) | 2 lines
Tell Hubbub the encoding that HTTP gives us, if we have one.
........
r5001 | takkaria | 2008-08-11 02:53:24 +0100 (Mon, 11 Aug 2008) | 2 lines
First go at implementing proper <meta charset> support in NetSurf, amongst some refactoring. Probably works, but I have no pages around to test it on.
........
r5002 | takkaria | 2008-08-11 02:56:35 +0100 (Mon, 11 Aug 2008) | 2 lines
Fix (I hope) a 64-bit compiler warning.
........
r5012 | takkaria | 2008-08-11 08:40:28 +0100 (Mon, 11 Aug 2008) | 2 lines
Fix some nits from jmb. (Remove const from html->encoding, set encoding_source to something about right.)
........
r5013 | takkaria | 2008-08-11 08:48:50 +0100 (Mon, 11 Aug 2008) | 2 lines
Properly fix <meta charset> handling, by passing in the right thing as the context. No idea how this worked before. :) (credit: jmb)
........
r5017 | jmb | 2008-08-11 09:13:22 +0100 (Mon, 11 Aug 2008) | 7 lines
Pedantic typo fix.
Make Hubbub YES when building for RISC OS.
Make Hubbub AUTO when building for GTK
Ignore the presence of Hubbub on other platforms.
Remove the explicit libparserutils pkg-config stuff from the makefile (see r5016)
Add some logic that means Hubbub gets enabled correctly when building on RISC OS and when cross-compiling for it. (This is ugly and will go away when pkg-config is available on RO)
........
svn path=/trunk/netsurf/; revision=5019
2008-08-11 12:17:48 +04:00
|
|
|
|
2011-09-24 13:24:13 +04:00
|
|
|
glade_file_location = calloc(1, sizeof(struct glade_file_location_s));
|
|
|
|
if (glade_file_location == NULL) {
|
|
|
|
die("Unable to allocate glade file locations");
|
|
|
|
}
|
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
glade_file_location->netsurf = nsgtk_new_ui(respath, "netsurf", NULL);
|
|
|
|
glade_file_location->tabcontents = nsgtk_new_ui(respath, "tabcontents", NULL);
|
|
|
|
glade_file_location->password = nsgtk_new_ui(respath, "password", NULL);
|
|
|
|
glade_file_location->login = nsgtk_new_ui(respath, "login", NULL);
|
|
|
|
glade_file_location->ssl = nsgtk_new_ui(respath, "ssl", NULL);
|
|
|
|
glade_file_location->toolbar = nsgtk_new_ui(respath, "toolbar", NULL);
|
|
|
|
glade_file_location->downloads = nsgtk_new_ui(respath, "downloads", NULL);
|
|
|
|
glade_file_location->history = nsgtk_new_ui(respath, "history", NULL);
|
|
|
|
glade_file_location->options = nsgtk_new_ui(respath, "options", NULL);
|
|
|
|
glade_file_location->hotlist = nsgtk_new_ui(respath, "hotlist", NULL);
|
|
|
|
glade_file_location->cookies = nsgtk_new_ui(respath, "cookies", NULL);
|
2014-08-01 03:58:42 +04:00
|
|
|
glade_file_location->viewdata = nsgtk_new_ui(respath, "viewdata", NULL);
|
2012-05-16 23:57:43 +04:00
|
|
|
|
|
|
|
glade_file_location->warning = nsgtk_new_ui(respath, "warning", &gladeWarning);
|
|
|
|
nsgtk_warning_window = GTK_WINDOW(gtk_builder_get_object(gladeWarning, "wndWarning"));
|
|
|
|
widWarning = GTK_WIDGET(gtk_builder_get_object(gladeWarning, "labelWarning"));
|
2010-07-28 19:22:44 +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)) {
|
|
|
|
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
|
|
|
|
2014-01-11 18:20:30 +04:00
|
|
|
/* find the languages file */
|
2011-09-22 19:10:22 +04:00
|
|
|
languages_file_location = filepath_find(respath, "languages");
|
2014-01-11 18:20:30 +04:00
|
|
|
if ((languages_file_location == NULL) ||
|
2011-09-22 19:10:22 +04:00
|
|
|
(strlen(languages_file_location) < 10)) {
|
2014-01-11 18:20:30 +04:00
|
|
|
die("Unable to find resources.\n");
|
2011-09-22 19:10:22 +04:00
|
|
|
}
|
|
|
|
|
2014-01-11 18:20:30 +04:00
|
|
|
/* find the theme list file */
|
2012-12-30 05:17:17 +04:00
|
|
|
themelist_file_location = filepath_find(respath, "themelist");
|
|
|
|
if ((themelist_file_location != NULL) &&
|
|
|
|
(strlen(themelist_file_location) < 10)) {
|
|
|
|
free(themelist_file_location);
|
|
|
|
themelist_file_location = NULL;
|
|
|
|
}
|
2014-01-11 18:20:30 +04:00
|
|
|
if (themelist_file_location == NULL) {
|
2012-12-30 05:17:17 +04:00
|
|
|
LOG(("Unable to find themelist - disabling"));
|
|
|
|
}
|
|
|
|
|
2014-01-11 18:20:30 +04:00
|
|
|
/* Obtain resources path location.
|
2010-07-28 19:22:44 +04:00
|
|
|
*
|
|
|
|
* Uses the directory the languages file was found in,
|
2011-09-22 19:10:22 +04:00
|
|
|
* @todo find and slaughter all references to this!
|
|
|
|
*/
|
|
|
|
res_dir_location = calloc(1, strlen(languages_file_location) - 8);
|
2014-01-11 18:20:30 +04:00
|
|
|
memcpy(res_dir_location,
|
|
|
|
languages_file_location,
|
2011-09-22 19:10:22 +04:00
|
|
|
strlen(languages_file_location) - 9);
|
|
|
|
LOG(("Using '%s' for resource path", res_dir_location));
|
2010-07-28 19:22:44 +04:00
|
|
|
|
|
|
|
/* initialise the glade templates */
|
|
|
|
nsgtk_init_glade(respath);
|
|
|
|
|
|
|
|
/* set default icon if its available */
|
2011-03-17 14:26:30 +03:00
|
|
|
resource_filename = filepath_find(respath, "netsurf.xpm");
|
2010-07-28 19:22:44 +04:00
|
|
|
if (resource_filename != NULL) {
|
|
|
|
gtk_window_set_default_icon_from_file(resource_filename, NULL);
|
|
|
|
free(resource_filename);
|
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) {
|
|
|
|
LOG(("Using '%s' as Search Engines file", resource_filename));
|
|
|
|
free(resource_filename);
|
|
|
|
}
|
2010-07-28 19:22:44 +04:00
|
|
|
|
2011-12-31 04:00:54 +04:00
|
|
|
/* Default favicon */
|
|
|
|
resource_filename = filepath_find(respath, "favicon.png");
|
|
|
|
if (resource_filename != NULL) {
|
|
|
|
favicon_pixbuf = gdk_pixbuf_new_from_file(resource_filename, NULL);
|
|
|
|
free(resource_filename);
|
|
|
|
if (favicon_pixbuf == NULL) {
|
|
|
|
favicon_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, false, 8, 16,16);
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2011-12-31 04:00:54 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
/* Toolbar inicies file */
|
2011-03-17 14:26:30 +03:00
|
|
|
toolbar_indices_file_location = filepath_find(respath, "toolbarIndices");
|
2010-07-28 19:22:44 +04:00
|
|
|
LOG(("Using '%s' as custom toolbar settings file", toolbar_indices_file_location));
|
|
|
|
|
2014-01-11 18:20:30 +04:00
|
|
|
/* load throbber images */
|
2010-07-28 19:22:44 +04:00
|
|
|
if (nsgtk_throbber_init(respath, THROBBER_FRAMES) == false)
|
|
|
|
die("Unable to load throbber image.\n");
|
|
|
|
|
|
|
|
/* 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()));
|
|
|
|
LOG(("Set CSS DPI to %d", browser_get_dpi()));
|
2010-12-17 16:07:38 +03:00
|
|
|
|
2011-09-24 13:24:13 +04:00
|
|
|
if (nsgtk_history_init(glade_file_location->history) == false)
|
2010-07-28 19:22:44 +04:00
|
|
|
die("Unable to initialise history window.\n");
|
2010-03-30 00:03:44 +04:00
|
|
|
|
2011-09-24 13:24:13 +04:00
|
|
|
if (nsgtk_download_init(glade_file_location->downloads) == false)
|
2010-07-28 19:22:44 +04:00
|
|
|
die("Unable to initialise download window.\n");
|
2010-03-30 00:03:44 +04:00
|
|
|
|
2011-09-24 13:24:13 +04:00
|
|
|
if (nsgtk_cookies_init(glade_file_location->cookies) == false)
|
2010-12-14 21:54:20 +03:00
|
|
|
die("Unable to initialise cookies window.\n");
|
|
|
|
|
2011-09-24 13:24:13 +04:00
|
|
|
if (nsgtk_hotlist_init(glade_file_location->hotlist) == false)
|
2010-12-14 21:54:20 +03:00
|
|
|
die("Unable to initialise hotlist window.\n");
|
|
|
|
|
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
|
|
|
{
|
2014-01-11 18:20:30 +04:00
|
|
|
LOG(("Quitting GUI"));
|
|
|
|
|
|
|
|
/* 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 */
|
|
|
|
|
2007-06-16 02:07:11 +04: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
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "%s %s", messages_get(warning),
|
|
|
|
detail ? detail : "");
|
|
|
|
buf[sizeof(buf) - 1] = 0;
|
|
|
|
|
2010-07-28 19:22:44 +04:00
|
|
|
gtk_label_set_text(GTK_LABEL(widWarning), 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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-15 16:28:55 +04:00
|
|
|
static void gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
|
2010-04-15 03:03:49 +04:00
|
|
|
unsigned long num, nserror (*cb)(bool proceed, void *pw),
|
|
|
|
void *cbpw)
|
2014-01-11 18:20:30 +04:00
|
|
|
{
|
|
|
|
static struct nsgtk_treeview *ssl_window;
|
2010-10-05 23:14:46 +04:00
|
|
|
struct sslcert_session_data *data;
|
2007-08-12 03:14:33 +04:00
|
|
|
GtkButton *accept, *reject;
|
2013-11-01 02:58:39 +04:00
|
|
|
void **session;
|
2010-10-05 23:14:46 +04:00
|
|
|
GtkWindow *window;
|
|
|
|
GtkScrolledWindow *scrolled;
|
|
|
|
GtkDrawingArea *drawing_area;
|
2012-05-16 23:57:43 +04:00
|
|
|
GError* error = NULL;
|
2014-01-11 18:20:30 +04:00
|
|
|
GtkBuilder* builder;
|
2012-05-16 23:57:43 +04:00
|
|
|
|
2014-07-17 18:20:38 +04:00
|
|
|
/* state while window is open */
|
|
|
|
session = calloc(sizeof(void *), 3);
|
|
|
|
if (session == NULL) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
builder = gtk_builder_new ();
|
|
|
|
if (!gtk_builder_add_from_file(builder, glade_file_location->ssl, &error)) {
|
|
|
|
g_warning("Couldn't load builder file: %s", error->message);
|
|
|
|
g_error_free(error);
|
2014-07-17 18:20:38 +04:00
|
|
|
|
|
|
|
free(session);
|
2012-05-16 23:57:43 +04:00
|
|
|
return;
|
|
|
|
}
|
2010-03-15 03:42:48 +03:00
|
|
|
|
2013-11-01 02:58:39 +04:00
|
|
|
sslcert_viewer_create_session_data(num, url, cb, cbpw, certs, &data);
|
2013-08-12 14:43:41 +04:00
|
|
|
ssl_current_session = data;
|
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
window = GTK_WINDOW(gtk_builder_get_object(builder, "wndSSLProblem"));
|
|
|
|
scrolled = GTK_SCROLLED_WINDOW(gtk_builder_get_object(builder, "SSLScrolled"));
|
|
|
|
drawing_area = GTK_DRAWING_AREA(gtk_builder_get_object(builder, "SSLDrawingArea"));
|
2010-03-15 03:42:48 +03:00
|
|
|
|
2013-11-01 02:58:39 +04:00
|
|
|
|
2013-08-13 16:48:53 +04:00
|
|
|
ssl_window = nsgtk_treeview_create(TREE_SSLCERT, window, scrolled,
|
|
|
|
drawing_area);
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2013-11-01 02:58:39 +04:00
|
|
|
if (ssl_window == NULL) {
|
|
|
|
free(session);
|
2010-10-05 23:14:46 +04:00
|
|
|
return;
|
2013-11-01 02:58:39 +04:00
|
|
|
}
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
accept = GTK_BUTTON(gtk_builder_get_object(builder, "sslaccept"));
|
2014-01-11 18:20:30 +04:00
|
|
|
reject = GTK_BUTTON(gtk_builder_get_object(builder, "sslreject"));
|
2010-03-15 03:42:48 +03:00
|
|
|
|
2012-05-16 23:57:43 +04:00
|
|
|
session[0] = builder;
|
2010-10-05 23:14:46 +04:00
|
|
|
session[1] = ssl_window;
|
|
|
|
session[2] = data;
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2010-10-05 23:14:46 +04:00
|
|
|
#define CONNECT(obj, sig, callback, ptr) \
|
2014-01-11 18:20:30 +04:00
|
|
|
g_signal_connect(G_OBJECT(obj), (sig), G_CALLBACK(callback), (ptr))
|
|
|
|
|
2010-10-05 23:14:46 +04:00
|
|
|
CONNECT(accept, "clicked", nsgtk_ssl_accept, session);
|
|
|
|
CONNECT(reject, "clicked", nsgtk_ssl_reject, session);
|
|
|
|
CONNECT(window, "delete_event", G_CALLBACK(nsgtk_ssl_delete_event),
|
|
|
|
(gpointer)session);
|
2014-01-11 18:20:30 +04:00
|
|
|
|
|
|
|
gtk_widget_show(GTK_WIDGET(window));
|
2007-08-12 03:14:33 +04:00
|
|
|
}
|
2007-06-27 20:06:42 +04:00
|
|
|
|
2010-03-15 03:42:48 +03:00
|
|
|
void nsgtk_ssl_accept(GtkButton *w, gpointer data)
|
2007-08-12 03:14:33 +04:00
|
|
|
{
|
|
|
|
void **session = data;
|
2012-05-16 23:57:43 +04:00
|
|
|
GtkBuilder *x = session[0];
|
2010-10-05 23:14:46 +04:00
|
|
|
struct nsgtk_treeview *wnd = session[1];
|
|
|
|
struct sslcert_session_data *ssl_data = session[2];
|
2010-04-15 03:03:49 +04:00
|
|
|
|
2013-08-12 14:43:41 +04:00
|
|
|
sslcert_viewer_accept(ssl_data);
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2010-10-05 23:14:46 +04:00
|
|
|
nsgtk_treeview_destroy(wnd);
|
2007-08-12 03:14:33 +04:00
|
|
|
g_object_unref(G_OBJECT(x));
|
|
|
|
free(session);
|
|
|
|
}
|
|
|
|
|
2010-10-05 23:14:46 +04:00
|
|
|
void nsgtk_ssl_reject(GtkWidget *w, gpointer data)
|
2007-08-12 03:14:33 +04:00
|
|
|
{
|
|
|
|
void **session = data;
|
2012-05-16 23:57:43 +04:00
|
|
|
GtkBuilder *x = session[0];
|
2010-10-05 23:14:46 +04:00
|
|
|
struct nsgtk_treeview *wnd = session[1];
|
|
|
|
struct sslcert_session_data *ssl_data = session[2];
|
2010-03-15 03:42:48 +03:00
|
|
|
|
2013-08-12 14:43:41 +04:00
|
|
|
sslcert_viewer_reject(ssl_data);
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2010-10-05 23:14:46 +04:00
|
|
|
nsgtk_treeview_destroy(wnd);
|
2007-08-12 03:14:33 +04:00
|
|
|
g_object_unref(G_OBJECT(x));
|
|
|
|
free(session);
|
2007-06-27 20:06:42 +04:00
|
|
|
}
|
2004-09-04 02:44:48 +04:00
|
|
|
|
2010-10-05 23:14:46 +04:00
|
|
|
gboolean nsgtk_ssl_delete_event(GtkWidget *w, GdkEvent *event, gpointer data)
|
|
|
|
{
|
|
|
|
nsgtk_ssl_reject(w, data);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2010-03-15 03:42:48 +03:00
|
|
|
|
2008-08-15 14:24:52 +04:00
|
|
|
#ifdef WITH_PDF_EXPORT
|
2008-08-15 13:30:21 +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
|
|
|
void PDF_Password(char **owner_pass, char **user_pass, char *path)
|
|
|
|
{
|
2009-12-18 02:55:02 +03:00
|
|
|
GladeXML *x = glade_xml_new(glade_password_file_location, NULL, NULL);
|
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
|
|
|
GtkWindow *wnd = GTK_WINDOW(glade_xml_get_widget(x, "wndPDFPassword"));
|
|
|
|
GtkButton *ok, *no;
|
|
|
|
void **data = malloc(5 * sizeof(void *));
|
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 = NULL;
|
|
|
|
*user_pass = NULL;
|
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
|
|
|
data[0] = owner_pass;
|
|
|
|
data[1] = user_pass;
|
|
|
|
data[2] = wnd;
|
|
|
|
data[3] = x;
|
|
|
|
data[4] = path;
|
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
|
|
|
ok = GTK_BUTTON(glade_xml_get_widget(x, "buttonPDFSetPassword"));
|
|
|
|
no = GTK_BUTTON(glade_xml_get_widget(x, "buttonPDFNoPassword"));
|
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
|
|
|
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);
|
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_show(GTK_WIDGET(wnd));
|
|
|
|
}
|
|
|
|
|
|
|
|
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];
|
|
|
|
GladeXML *x = ((void **)data)[3];
|
|
|
|
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
|
|
|
|
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
|
|
|
op = strdup(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(x,
|
|
|
|
"entryPDFOwnerPassword"))));
|
|
|
|
op1 = strdup(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(x,
|
|
|
|
"entryPDFOwnerPassword1"))));
|
|
|
|
up = strdup(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(x,
|
|
|
|
"entryPDFUserPassword"))));
|
|
|
|
up1 = strdup(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(x,
|
2010-03-15 03:42:48 +03:00
|
|
|
"entryPDFUserPassword1"))));
|
|
|
|
|
|
|
|
|
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') {
|
|
|
|
gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(x,
|
|
|
|
"labelInfo")),
|
|
|
|
"Owner password must be at least 1 character long:");
|
|
|
|
free(op);
|
|
|
|
free(up);
|
|
|
|
}
|
|
|
|
else if (!strcmp(op, up)) {
|
|
|
|
gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(x,
|
|
|
|
"labelInfo")),
|
|
|
|
"User and owner passwords must be different:");
|
|
|
|
free(op);
|
|
|
|
free(up);
|
|
|
|
}
|
|
|
|
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));
|
|
|
|
g_object_unref(G_OBJECT(x));
|
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);
|
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
|
|
|
}
|
|
|
|
else {
|
|
|
|
gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(x,
|
|
|
|
"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];
|
|
|
|
GladeXML *x = ((void **)data)[3];
|
|
|
|
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));
|
|
|
|
g_object_unref(G_OBJECT(x));
|
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);
|
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
|
|
|
}
|
2008-08-15 13:30:21 +04:00
|
|
|
#endif
|
|
|
|
|
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):
|
2011-03-12 22:02:58 +03:00
|
|
|
return KEY_TAB;
|
|
|
|
|
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)
|
|
|
|
return KEY_DELETE_LINE_START;
|
|
|
|
else
|
|
|
|
return 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)
|
|
|
|
return KEY_DELETE_LINE_END;
|
|
|
|
else
|
|
|
|
return KEY_DELETE_RIGHT;
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Linefeed): return 13;
|
|
|
|
case GDK_KEY(Return): return 10;
|
|
|
|
case GDK_KEY(Left): return KEY_LEFT;
|
|
|
|
case GDK_KEY(Right): return KEY_RIGHT;
|
|
|
|
case GDK_KEY(Up): return KEY_UP;
|
|
|
|
case GDK_KEY(Down): return KEY_DOWN;
|
|
|
|
case GDK_KEY(Home):
|
2011-03-12 22:02:58 +03:00
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
|
|
|
return KEY_TEXT_START;
|
|
|
|
else
|
|
|
|
return 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)
|
|
|
|
return KEY_TEXT_END;
|
|
|
|
else
|
|
|
|
return KEY_LINE_END;
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Page_Up):
|
2011-03-12 22:02:58 +03:00
|
|
|
return KEY_PAGE_UP;
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Page_Down):
|
2011-03-12 22:02:58 +03:00
|
|
|
return KEY_PAGE_DOWN;
|
|
|
|
case 'a':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
|
|
|
return KEY_SELECT_ALL;
|
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
|
|
|
case 'u':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
2013-02-11 14:34:06 +04:00
|
|
|
return 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)
|
|
|
|
return KEY_COPY_SELECTION;
|
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
|
|
|
case 'v':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
|
|
|
return KEY_PASTE;
|
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
|
|
|
case 'x':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
|
|
|
return 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)
|
|
|
|
return KEY_REDO;
|
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
|
|
|
case 'z':
|
|
|
|
if (key->state & GDK_CONTROL_MASK)
|
|
|
|
return KEY_UNDO;
|
|
|
|
return gdk_keyval_to_unicode(key->keyval);
|
2012-05-16 23:57:43 +04:00
|
|
|
case GDK_KEY(Escape):
|
2011-03-12 22:02:58 +03:00
|
|
|
return 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) {
|
|
|
|
LOG(("\"%s\"", config_home));
|
|
|
|
*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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LOG(("\"%s\"", config_home));
|
|
|
|
|
|
|
|
*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;
|
|
|
|
|
|
|
|
LOG(("Attempting to create configuration directory"));
|
|
|
|
|
|
|
|
/* $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;
|
|
|
|
|
2014-03-22 19:26:30 +04:00
|
|
|
LOG(("\"%s\"", config_home));
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LOG(("\"%s\"", cache_home));
|
|
|
|
|
|
|
|
*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;
|
|
|
|
|
|
|
|
LOG(("Attempting to create configuration directory"));
|
|
|
|
|
|
|
|
/* $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;
|
|
|
|
|
|
|
|
LOG(("\"%s\"", cache_home));
|
|
|
|
|
|
|
|
*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;
|
|
|
|
}
|
|
|
|
|
2014-01-15 23:37:05 +04:00
|
|
|
static struct gui_browser_table nsgtk_browser_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,
|
|
|
|
.cert_verify = gui_cert_verify,
|
2014-01-16 04:52:17 +04:00
|
|
|
.login = gui_401login_open,
|
2014-01-11 18:20:30 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Main entry point from OS.
|
|
|
|
*/
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
char *messages;
|
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 = {
|
2014-01-15 23:37:05 +04:00
|
|
|
.browser = &nsgtk_browser_table,
|
|
|
|
.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,
|
2014-01-15 23:37:05 +04:00
|
|
|
};
|
2014-01-11 18:20:30 +04:00
|
|
|
|
2014-05-10 13:22:10 +04: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");
|
2014-05-10 13:22:10 +04:00
|
|
|
}
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* build the common resource path list */
|
2014-01-11 18:20:30 +04:00
|
|
|
respaths = nsgtk_init_resource("${HOME}/.netsurf/:${NETSURFRES}:"GTK_RESPATH":./gtk/res");
|
|
|
|
|
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) {
|
|
|
|
LOG(("Unable to locate a configuration directory."));
|
|
|
|
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);
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* Obtain path to messages */
|
2014-01-11 18:20:30 +04:00
|
|
|
messages = filepath_find(respaths, "Messages");
|
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) {
|
|
|
|
LOG(("Unable to locate a cache directory."));
|
|
|
|
}
|
|
|
|
|
2014-04-28 19:37:00 +04:00
|
|
|
/* core initialisation */
|
2014-03-22 19:26:30 +04:00
|
|
|
ret = netsurf_init(messages, cache_home);
|
2014-01-11 18:20:30 +04:00
|
|
|
free(messages);
|
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) {
|
|
|
|
fprintf(stderr, "NetSurf gtk specific initialise failed (%s)\n",
|
|
|
|
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;
|
|
|
|
}
|