r12147 vince - in /trunk/netsurf: utils/filepath.c windows/findfile.c windows/gui.c
by netsurf@semichrome.net
Author: vince
Date: Tue Mar 29 15:50:31 2011
New Revision: 12147
URL: http://source.netsurf-browser.org?rev=12147&view=rev
Log:
remove extraneous logging
fix windows path_to_url coping with NULL input and allocation errors.
remove forced verbose logging
Modified:
trunk/netsurf/utils/filepath.c
trunk/netsurf/windows/findfile.c
trunk/netsurf/windows/gui.c
Modified: trunk/netsurf/utils/filepath.c
URL: http://source.netsurf-browser.org/trunk/netsurf/utils/filepath.c?rev=1214...
==============================================================================
--- trunk/netsurf/utils/filepath.c (original)
+++ trunk/netsurf/utils/filepath.c Tue Mar 29 15:50:31 2011
@@ -33,7 +33,6 @@
#include "utils/config.h"
#include "utils/filepath.h"
-#include "utils/log.h"
/** maximum number of elements in the resource vector */
#define MAX_RESPATH 128
@@ -118,8 +117,6 @@
while (respathv[respathc] != NULL) {
if (filepath_sfindfile(filepath, "%s/%s", respathv[respathc], filename) != NULL) {
- LOG(("ret\"%s\"",filepath));
-
return filepath;
}
@@ -146,8 +143,6 @@
if (ret == NULL)
free(filepath);
-
- LOG(("ret\"%s\"",ret));
return ret;
}
Modified: trunk/netsurf/windows/findfile.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/findfile.c?rev=12...
==============================================================================
--- trunk/netsurf/windows/findfile.c (original)
+++ trunk/netsurf/windows/findfile.c Tue Mar 29 15:50:31 2011
@@ -66,13 +66,6 @@
pathi++;
pathv[pathi] = winpath;
-
- pathi = 0;
- while (pathv[pathi] != NULL) {
- LOG(("pathv[%d] = \"%s\"",pathi, pathv[pathi]));
- pathi++;
- }
-
respath = filepath_generate(pathv, &lang);
filepath_free_strvec(pathv);
@@ -88,8 +81,16 @@
char *path_to_url(const char *path)
{
- char *url = malloc(strlen(path) + FILE_SCHEME_PREFIX_LEN + 3);
+ char *url;
char *sidx;
+
+ if (path == NULL)
+ return NULL;
+
+ url = malloc(strlen(path) + FILE_SCHEME_PREFIX_LEN + 3);
+
+ if (url == NULL)
+ return NULL;
strcpy(url, FILE_SCHEME_PREFIX);
if (*path == '/') {
Modified: trunk/netsurf/windows/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/gui.c?rev=12147&r...
==============================================================================
--- trunk/netsurf/windows/gui.c (original)
+++ trunk/netsurf/windows/gui.c Tue Mar 29 15:50:31 2011
@@ -2603,8 +2603,6 @@
LPWSTR *argvw;
char *messages;
- verbose_log = true;
-
if (SLEN(lpcli) > 0) {
argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
}
12 years, 5 months
r12146 vince - in /trunk/netsurf: utils/filepath.c windows/Makefile.target windows/findfile.c windows/findfile.h windows/gui.c windows/prefs.c
by netsurf@semichrome.net
Author: vince
Date: Tue Mar 29 15:38:40 2011
New Revision: 12146
URL: http://source.netsurf-browser.org?rev=12146&view=rev
Log:
make windows frontend use
Modified:
trunk/netsurf/utils/filepath.c
trunk/netsurf/windows/Makefile.target
trunk/netsurf/windows/findfile.c
trunk/netsurf/windows/findfile.h
trunk/netsurf/windows/gui.c
trunk/netsurf/windows/prefs.c
Modified: trunk/netsurf/utils/filepath.c
URL: http://source.netsurf-browser.org/trunk/netsurf/utils/filepath.c?rev=1214...
==============================================================================
--- trunk/netsurf/utils/filepath.c (original)
+++ trunk/netsurf/utils/filepath.c Tue Mar 29 15:38:40 2011
@@ -33,6 +33,7 @@
#include "utils/config.h"
#include "utils/filepath.h"
+#include "utils/log.h"
/** maximum number of elements in the resource vector */
#define MAX_RESPATH 128
@@ -116,8 +117,11 @@
return NULL;
while (respathv[respathc] != NULL) {
- if (filepath_sfindfile(filepath, "%s/%s", respathv[respathc], filename) != NULL)
+ if (filepath_sfindfile(filepath, "%s/%s", respathv[respathc], filename) != NULL) {
+ LOG(("ret\"%s\"",filepath));
+
return filepath;
+ }
respathc++;
}
@@ -142,6 +146,8 @@
if (ret == NULL)
free(filepath);
+
+ LOG(("ret\"%s\"",ret));
return ret;
}
@@ -211,9 +217,9 @@
/* expand ${} in a string into environment variables */
static char *
-expand_path(const char *path)
-{
- char *exp = strdup(path);
+expand_path(const char *path, int pathlen)
+{
+ char *exp;
int explen;
int cstart = -1;
int cloop = 0;
@@ -221,10 +227,14 @@
int envlen;
int replen; /* length of replacement */
+ exp = malloc(pathlen + 1);
if (exp == NULL)
return NULL;
- explen = strlen(exp) + 1;
+ memcpy(exp, path, pathlen);
+ exp[pathlen] = 0;
+
+ explen = strlen(exp);
while (exp[cloop] != 0) {
if ((exp[cloop] == '$') &&
@@ -241,14 +251,14 @@
if (envv == NULL) {
memmove(exp + cstart,
exp + cloop + 1,
- explen - cloop - 1);
+ explen - cloop);
explen -= replen;
} else {
envlen = strlen(envv);
exp = realloc(exp, explen + envlen - replen);
memmove(exp + cstart + envlen,
exp + cloop + 1,
- explen - cloop - 1);
+ explen - cloop );
memmove(exp + cstart, envv, envlen);
explen += envlen - replen;
}
@@ -259,6 +269,11 @@
cloop++;
}
+ if (explen == 1) {
+ free(exp);
+ exp = NULL;
+ }
+
return exp;
}
@@ -268,37 +283,40 @@
{
char **strvec;
int strc = 0;
+ const char *estart; /* path element start */
+ const char *eend; /* path element end */
+ int elen;
strvec = calloc(MAX_RESPATH, sizeof(char *));
if (strvec == NULL)
return NULL;
- strvec[strc] = expand_path(path);
- if (strvec[strc] == NULL) {
- free(strvec);
- return NULL;
- }
- strc++;
-
- strvec[strc] = strchr(strvec[0], ':');
- while ((strc < (MAX_RESPATH - 2)) &&
- (strvec[strc] != NULL)) {
- /* null terminate previous entry */
- *strvec[strc] = 0;
- strvec[strc]++;
+ estart = eend = path;
+
+ while (strc < (MAX_RESPATH - 2)) {
+ while ( (*eend != 0) && (*eend != ':') )
+ eend++;
+ elen = eend - estart;
+
+ if (elen > 1) {
+ /* more than an empty colon */
+ strvec[strc] = expand_path(estart, elen);
+ if (strvec[strc] != NULL) {
+ /* successfully expanded an element */
+ strc++;
+ }
+ }
/* skip colons */
- while (*strvec[strc] == ':')
- strvec[strc]++;
-
- if (*strvec[strc] == 0)
- break; /* string is terminated */
-
- strc++;
-
- strvec[strc] = strchr(strvec[strc - 1], ':');
- }
-
+ while (*eend == ':')
+ eend++;
+
+ /* check for termination */
+ if (*eend == 0)
+ break;
+
+ estart = eend;
+ }
return strvec;
}
Modified: trunk/netsurf/windows/Makefile.target
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/Makefile.target?r...
==============================================================================
--- trunk/netsurf/windows/Makefile.target (original)
+++ trunk/netsurf/windows/Makefile.target Tue Mar 29 15:38:40 2011
@@ -33,6 +33,11 @@
CFLAGS += '-D_WIN32_WINNT=0x0501'
CFLAGS += '-D_WIN32_WINDOWS=0x0501'
CFLAGS += '-D_WIN32_IE=0x0501'
+
+ #installed resource path
+ CFLAGS += '-DNETSURF_WINDOWS_RESPATH="$(NETSURF_WINDOWS_RESPATH)"'
+
+
WSCFLAGS := -std=c99 \
$(WARNFLAGS) -I. -I${MINGW_INSTALL_ENV}/include/ \
-DCURL_STATICLIB -DLIBXML_STATIC -g
Modified: trunk/netsurf/windows/findfile.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/findfile.c?rev=12...
==============================================================================
--- trunk/netsurf/windows/findfile.c (original)
+++ trunk/netsurf/windows/findfile.c Tue Mar 29 15:38:40 2011
@@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <windows.h>
#include <limits.h>
#include <unistd.h>
#include <stdbool.h>
@@ -29,8 +30,55 @@
#include "utils/url.h"
#include "utils/log.h"
#include "utils/utils.h"
+#include "utils/filepath.h"
#include "windows/findfile.h"
+
+/** Create an array of valid paths to search for resources.
+ *
+ * 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.
+ */
+char **
+nsws_init_resource(const char *resource_path)
+{
+ char **pathv; /* resource path string vector */
+ char **respath; /* resource paths vector */
+ const char *lang = NULL;
+ char *winpath;
+ int pathi;
+ char *slsh;
+
+ pathv = filepath_path_to_strvec(resource_path);
+ if (pathv == NULL)
+ return NULL;
+
+ winpath = malloc(MAX_PATH);
+ GetModuleFileName(NULL, winpath, MAX_PATH);
+ slsh = strrchr(winpath, '\\');
+ if (slsh != NULL)
+ *slsh=0;
+ strncat(winpath, "\\windows\\res", MAX_PATH);
+
+ pathi = 0;
+ while (pathv[pathi] != NULL)
+ pathi++;
+ pathv[pathi] = winpath;
+
+
+ pathi = 0;
+ while (pathv[pathi] != NULL) {
+ LOG(("pathv[%d] = \"%s\"",pathi, pathv[pathi]));
+ pathi++;
+ }
+
+ respath = filepath_generate(pathv, &lang);
+
+ filepath_free_strvec(pathv);
+
+ return respath;
+}
static char *realpath(const char *path, char *resolved_path)
{
Modified: trunk/netsurf/windows/findfile.h
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/findfile.h?rev=12...
==============================================================================
--- trunk/netsurf/windows/findfile.h (original)
+++ trunk/netsurf/windows/findfile.h Tue Mar 29 15:38:40 2011
@@ -19,9 +19,9 @@
#ifndef _NETSURF_WINDOWS_FINDFILE_H_
#define _NETSURF_WINDOWS_FINDFILE_H_
-#define NETSURF_WINDOWS_RESPATH "C:"
+extern char *nsws_find_resource(char *buf, const char *filename, const char *def);
-extern char *nsws_find_resource(char *buf, const char *filename,
- const char *def);
+char **nsws_init_resource(const char *resource_path);
+
#endif /* _NETSURF_WINDOWS_FINDFILE_H_ */
Modified: trunk/netsurf/windows/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/gui.c?rev=12146&r...
==============================================================================
--- trunk/netsurf/windows/gui.c (original)
+++ trunk/netsurf/windows/gui.c Tue Mar 29 15:38:40 2011
@@ -47,6 +47,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
+#include "utils/filepath.h"
#include "windows/about.h"
#include "windows/gui.h"
@@ -120,6 +121,8 @@
};
static struct nsws_pointers nsws_pointer;
+
+static char **respaths; /** resource search path vector */
#ifndef MIN
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
@@ -567,28 +570,6 @@
w->acceltable = CreateAcceleratorTable(accels, nitems);
}
-
-/**
- * set window icons
- */
-static void nsws_window_set_ico(struct gui_window *w)
-{
- char ico[PATH_MAX];
-
- nsws_find_resource(ico, "NetSurf32.ico", "windows/res/NetSurf32.ico");
- LOG(("setting ico as %s", ico));
- hIcon = LoadImage(NULL, ico, IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
-
- if (hIcon != NULL)
- SendMessage(w->main, WM_SETICON, ICON_BIG, (LPARAM) hIcon);
- nsws_find_resource(ico, "NetSurf16.ico", "windows/res/NetSurf16.ico");
- LOG(("setting ico as %s", ico));
- hIconS = LoadImage(NULL, ico, IMAGE_ICON, 16, 16, LR_LOADFROMFILE);
-
- if (hIconS != NULL)
- SendMessage(w->main, WM_SETICON, ICON_SMALL, (LPARAM)hIconS);
-}
-
/**
* creation of throbber
@@ -1765,7 +1746,6 @@
}
nsws_window_set_accels(gw);
- nsws_window_set_ico(gw);
return hwnd;
}
@@ -2561,40 +2541,32 @@
char* gui_get_resource_url(const char *filename)
{
- return NULL;
+ char buf[PATH_MAX];
+ return path_to_url(filepath_sfind(respaths, buf, filename));
}
static void gui_init(int argc, char** argv)
{
- char buf[PATH_MAX], sbuf[PATH_MAX];
- int len;
struct browser_window *bw;
const char *addr = NETSURF_HOMEPAGE;
LOG(("argc %d, argv %p", argc, argv));
/* set up stylesheet urls */
- getcwd(sbuf, PATH_MAX);
- len = strlen(sbuf);
- strncat(sbuf, "windows/res/default.css", PATH_MAX - len);
- nsws_find_resource(buf, "default.css", sbuf);
- default_stylesheet_url = path_to_url(buf);
+ default_stylesheet_url = strdup("resource:default.css");
LOG(("Using '%s' as Default CSS URL", default_stylesheet_url));
- getcwd(sbuf, PATH_MAX);
- len = strlen(sbuf);
- strncat(sbuf, "windows/res/quirks.css", PATH_MAX - len);
- nsws_find_resource(buf, "quirks.css", sbuf);
- quirks_stylesheet_url = path_to_url(buf);
- LOG(("Using '%s' as quirks stylesheet url", quirks_stylesheet_url ));
-
+ quirks_stylesheet_url = strdup("resource:quirks.css");
+ LOG(("Using '%s' as quirks CSS URL", quirks_stylesheet_url));
+
+ adblock_stylesheet_url = strdup("resource:adblock.css");
+ LOG(("Using '%s' as AdBlock CSS URL", adblock_stylesheet_url));
create_local_windows_classes();
option_target_blank = false;
nsws_window_init_pointers();
- LOG(("argc %d, argv %p", argc, argv));
/* ensure homepage option has a default */
if (option_homepage_url == NULL || option_homepage_url[0] == '\0')
@@ -2615,9 +2587,9 @@
{
/* mwindows compile flag normally invalidates stdout unless
already redirected */
- if (_get_osfhandle(fileno(stdout)) == -1) {
+ if (_get_osfhandle(fileno(stderr)) == -1) {
AllocConsole();
- freopen("CONOUT$", "w", stdout);
+ freopen("CONOUT$", "w", stderr);
}
}
@@ -2629,8 +2601,9 @@
int argc = 0, argctemp = 0;
size_t len;
LPWSTR *argvw;
- char options[PATH_MAX];
- char messages[PATH_MAX];
+ char *messages;
+
+ verbose_log = true;
if (SLEN(lpcli) > 0) {
argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
@@ -2658,15 +2631,16 @@
argctemp++;
}
- /* load browser messages */
- nsws_find_resource(messages, "messages", "./windows/res/messages");
-
- /* load browser options */
- nsws_find_resource(options, "preferences", "~/.netsurf/preferences");
- options_file_location = strdup(options);
-
+ respaths = nsws_init_resource("${APPDATA}\\NetSurf:${HOME}\\.netsurf:${NETSURFRES}:${PROGRAMFILES}\\NetSurf\\res:"NETSURF_WINDOWS_RESPATH);
+
+ messages = filepath_find(respaths, "messages");
+
+ options_file_location = filepath_find(respaths, "preferences");
+
/* initialise netsurf */
- netsurf_init(&argc, &argv, options, messages);
+ netsurf_init(&argc, &argv, options_file_location, messages);
+
+ free(messages);
gui_init(argc, argv);
@@ -2674,5 +2648,7 @@
netsurf_exit();
+ free(options_file_location);
+
return 0;
}
Modified: trunk/netsurf/windows/prefs.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/prefs.c?rev=12146...
==============================================================================
--- trunk/netsurf/windows/prefs.c (original)
+++ trunk/netsurf/windows/prefs.c Tue Mar 29 15:38:40 2011
@@ -113,6 +113,8 @@
char *temp, number[6];
HWND sub;
+ LOG_WIN_MSG(hwnd, msg, wparam, lParam);
+
switch (msg) {
case WM_INITDIALOG:
sub = GetDlgItem(hwnd, IDC_PREFS_FONTDEF);
@@ -400,6 +402,8 @@
int len;
char *temp, number[6];
HWND sub;
+
+ LOG_WIN_MSG(hwnd, msg, wparam, lParam);
switch (msg) {
case WM_INITDIALOG:
@@ -560,6 +564,8 @@
UINT msg, WPARAM wparam, LPARAM lParam)
{
HWND sub;
+
+ LOG_WIN_MSG(hwnd, msg, wparam, lParam);
switch (msg) {
case WM_INITDIALOG:
@@ -629,7 +635,7 @@
PROPSHEETHEADER psh;
psp[0].dwSize = sizeof(PROPSHEETPAGE);
- psp[0].dwFlags = PSP_USEICONID;
+ psp[0].dwFlags = 0;/*PSP_USEICONID*/
psp[0].hInstance = hinst;
psp[0].pszTemplate = MAKEINTRESOURCE(IDD_DLG_OPTIONS_GENERAL);
psp[0].pfnDlgProc = options_general_dialog_handler;
@@ -637,7 +643,7 @@
psp[0].pfnCallback = NULL;
psp[1].dwSize = sizeof(PROPSHEETPAGE);
- psp[1].dwFlags = PSP_USEICONID;
+ psp[1].dwFlags = 0;/*PSP_USEICONID*/
psp[1].hInstance = hinst;
psp[1].pszTemplate = MAKEINTRESOURCE(IDD_DLG_OPTIONS_CONNECTIONS);
psp[1].pfnDlgProc = options_connections_dialog_handler;
@@ -645,7 +651,7 @@
psp[1].pfnCallback = NULL;
psp[2].dwSize = sizeof(PROPSHEETPAGE);
- psp[2].dwFlags = PSP_USEICONID;
+ psp[2].dwFlags = 0;/*PSP_USEICONID*/
psp[2].hInstance = hinst;
psp[2].pszTemplate = MAKEINTRESOURCE(IDD_DLG_OPTIONS_APPERANCE);
psp[2].pfnDlgProc = options_appearance_dialog_handler;
@@ -657,7 +663,7 @@
psh.dwFlags = PSH_NOAPPLYNOW | PSH_USEICONID | PSH_PROPSHEETPAGE;
psh.hwndParent = parent;
psh.hInstance = hinst;
-// psh.pszIcon = MAKEINTRESOURCE(IDI_CELL_PROPERTIES);
+ psh.pszIcon = MAKEINTRESOURCE(IDR_NETSURF_ICON);
psh.pszCaption = (LPSTR) "NetSurf Options";
psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
psh.nStartPage = 0;
12 years, 5 months
r12143 chris_y - in /branches/release/netsurf/2.7/amiga: menu.c version.c
by netsurf@semichrome.net
Author: chris_y
Date: Tue Mar 29 13:28:18 2011
New Revision: 12143
URL: http://source.netsurf-browser.org?rev=12143&view=rev
Log:
Set major version number
Disable Print menu item
Modified:
branches/release/netsurf/2.7/amiga/menu.c
branches/release/netsurf/2.7/amiga/version.c
Modified: branches/release/netsurf/2.7/amiga/menu.c
URL: http://source.netsurf-browser.org/branches/release/netsurf/2.7/amiga/menu...
==============================================================================
--- branches/release/netsurf/2.7/amiga/menu.c (original)
+++ branches/release/netsurf/2.7/amiga/menu.c Tue Mar 29 13:28:18 2011
@@ -308,6 +308,8 @@
gwin->menu[12].nm_Flags = menuflags;
gwin->menu[13].nm_Flags = menuflags;
+ gwin->menu[15].nm_Flags = NM_ITEMDISABLED; /* Not implemented in 2.7 */
+
#ifndef WITH_PDF_EXPORT
gwin->menu[9].nm_Flags = NM_ITEMDISABLED;
#endif
Modified: branches/release/netsurf/2.7/amiga/version.c
URL: http://source.netsurf-browser.org/branches/release/netsurf/2.7/amiga/vers...
==============================================================================
--- branches/release/netsurf/2.7/amiga/version.c (original)
+++ branches/release/netsurf/2.7/amiga/version.c Tue Mar 29 13:28:18 2011
@@ -18,7 +18,7 @@
#include "utils/testament.h"
-#define NETSURF_VERSION_MAJOR "3"
+#define NETSURF_VERSION_MAJOR "2"
static const __attribute__((used)) char *verstag = "\0$VER: NetSurf " NETSURF_VERSION_MAJOR "." WT_REVID " (" WT_COMPILEDATE ")\0";
const char * const versvn = "SVN " WT_REVID;
12 years, 5 months
r12142 stevef - in /trunk/netsurf/riscos: sslcert.c templates/de templates/en templates/fr templates/nl
by netsurf@semichrome.net
Author: stevef
Date: Mon Mar 28 16:49:24 2011
New Revision: 12142
URL: http://source.netsurf-browser.org?rev=12142&view=rev
Log:
Fix bug #3156695: apply scrollbar from r12128 to all treeview windows.
Modified:
trunk/netsurf/riscos/sslcert.c
trunk/netsurf/riscos/templates/de
trunk/netsurf/riscos/templates/en
trunk/netsurf/riscos/templates/fr
trunk/netsurf/riscos/templates/nl
Modified: trunk/netsurf/riscos/sslcert.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/sslcert.c?rev=1214...
==============================================================================
--- trunk/netsurf/riscos/sslcert.c (original)
+++ trunk/netsurf/riscos/sslcert.c Mon Mar 28 16:49:24 2011
@@ -85,8 +85,6 @@
wimp_WINDOW_TITLE_ICON |
wimp_WINDOW_SIZE_ICON |
wimp_WINDOW_TOGGLE_ICON);
-
- ro_gui_cert_tree_template->flags |= wimp_WINDOW_HSCROLL;
}
/**
Modified: trunk/netsurf/riscos/templates/de
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/templates/de?rev=1...
==============================================================================
--- trunk/netsurf/riscos/templates/de (original)
+++ trunk/netsurf/riscos/templates/de Mon Mar 28 16:49:24 2011
@@ -2638,7 +2638,7 @@
xscroll:0
yscroll:0
next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_NEW_FORMAT
+ window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_HSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_NEW_FORMAT
title_fg:wimp_COLOUR_BLACK
title_bg:wimp_COLOUR_LIGHT_GREY
work_fg:wimp_COLOUR_BLACK
Modified: trunk/netsurf/riscos/templates/en
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/templates/en?rev=1...
==============================================================================
--- trunk/netsurf/riscos/templates/en (original)
+++ trunk/netsurf/riscos/templates/en Mon Mar 28 16:49:24 2011
@@ -2794,7 +2794,7 @@
xscroll:0
yscroll:0
next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_NEW_FORMAT
+ window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_HSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_NEW_FORMAT
title_fg:wimp_COLOUR_BLACK
title_bg:wimp_COLOUR_LIGHT_GREY
work_fg:wimp_COLOUR_BLACK
Modified: trunk/netsurf/riscos/templates/fr
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/templates/fr?rev=1...
==============================================================================
--- trunk/netsurf/riscos/templates/fr (original)
+++ trunk/netsurf/riscos/templates/fr Mon Mar 28 16:49:24 2011
@@ -2648,7 +2648,7 @@
xscroll:0
yscroll:0
next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_NEW_FORMAT
+ window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_HSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_NEW_FORMAT
title_fg:wimp_COLOUR_BLACK
title_bg:wimp_COLOUR_LIGHT_GREY
work_fg:wimp_COLOUR_BLACK
Modified: trunk/netsurf/riscos/templates/nl
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/templates/nl?rev=1...
==============================================================================
--- trunk/netsurf/riscos/templates/nl (original)
+++ trunk/netsurf/riscos/templates/nl Mon Mar 28 16:49:24 2011
@@ -2798,7 +2798,7 @@
xscroll:0
yscroll:0
next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_NEW_FORMAT
+ window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_HSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_NEW_FORMAT
title_fg:wimp_COLOUR_BLACK
title_bg:wimp_COLOUR_LIGHT_GREY
work_fg:wimp_COLOUR_BLACK
12 years, 5 months
r12141 jmb - /trunk/netsurf/desktop/cookies.c
by netsurf@semichrome.net
Author: jmb
Date: Mon Mar 28 16:33:16 2011
New Revision: 12141
URL: http://source.netsurf-browser.org?rev=12141&view=rev
Log:
Fix bug #3253090: don't schedule updates of the cookie tree
Modified:
trunk/netsurf/desktop/cookies.c
Modified: trunk/netsurf/desktop/cookies.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/cookies.c?rev=121...
==============================================================================
--- trunk/netsurf/desktop/cookies.c (original)
+++ trunk/netsurf/desktop/cookies.c Mon Mar 28 16:33:16 2011
@@ -324,7 +324,7 @@
/**
* Called when scheduled event gets fired. Actually performs the update.
*/
-static void cookies_schedule_callback(void *scheduled_data)
+static void cookies_schedule_callback(const void *scheduled_data)
{
const struct cookie_data *data = scheduled_data;
struct node *node = NULL;
@@ -412,7 +412,7 @@
assert(user_delete == false);
if (cookies_tree_root != NULL)
- schedule(100, cookies_schedule_callback, (void *)data);
+ cookies_schedule_callback(data);
return true;
}
@@ -424,7 +424,7 @@
assert(data != NULL);
if (cookies_tree_root != NULL)
- schedule_remove(cookies_schedule_callback, (void *)data);
+ cookies_schedule_callback(data);
}
12 years, 5 months
r12139 chris_y - /trunk/netsurf/amiga/gui_options.c
by netsurf@semichrome.net
Author: chris_y
Date: Sat Mar 26 17:35:41 2011
New Revision: 12139
URL: http://source.netsurf-browser.org?rev=12139&view=rev
Log:
Enable the ask overwrite checkbox so it can actually be changed, correct the gadget ID
so it works and swap clipboard and search bar options as it makes the interface look
neater
Modified:
trunk/netsurf/amiga/gui_options.c
Modified: trunk/netsurf/amiga/gui_options.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/gui_options.c?rev=1...
==============================================================================
--- trunk/netsurf/amiga/gui_options.c (original)
+++ trunk/netsurf/amiga/gui_options.c Sat Mar 26 17:35:41 2011
@@ -1043,9 +1043,9 @@
LAYOUT_Label, gadlab[GRP_OPTS_DOWNLOADS],
LAYOUT_AddChild, HGroupObject,
LAYOUT_AddChild, gow->objects[GID_OPTS_OVERWRITE] = CheckBoxObject,
- GA_ID, GID_OPTS_CLIPBOARD,
+ GA_ID, GID_OPTS_OVERWRITE,
GA_RelVerify, TRUE,
- GA_Disabled, TRUE,
+ GA_Disabled, FALSE,
GA_Text, gadlab[GID_OPTS_OVERWRITE],
GA_Selected, option_ask_overwrite,
CheckBoxEnd,
@@ -1112,6 +1112,18 @@
LAYOUT_AddChild,HGroupObject,
LAYOUT_SpaceOuter, TRUE,
LAYOUT_BevelStyle, BVS_GROUP,
+ LAYOUT_Label, gadlab[GRP_OPTS_CLIPBOARD],
+ LAYOUT_AddChild, gow->objects[GID_OPTS_CLIPBOARD] = CheckBoxObject,
+ GA_ID, GID_OPTS_CLIPBOARD,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_CLIPBOARD],
+ GA_Selected, option_utf8_clipboard,
+ CheckBoxEnd,
+ LayoutEnd, // clipboard
+ CHILD_WeightedHeight, 0,
+ LAYOUT_AddChild,HGroupObject,
+ LAYOUT_SpaceOuter, TRUE,
+ LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_Label, gadlab[GRP_OPTS_SEARCH],
LAYOUT_AddChild, gow->objects[GID_OPTS_SEARCH_PROV] = ChooserObject,
GA_ID, GID_OPTS_SEARCH_PROV,
@@ -1126,17 +1138,6 @@
LabelEnd,
LayoutEnd, // search
CHILD_WeightedHeight, 0,
- LAYOUT_AddChild,HGroupObject,
- LAYOUT_SpaceOuter, TRUE,
- LAYOUT_BevelStyle, BVS_GROUP,
- LAYOUT_Label, gadlab[GRP_OPTS_CLIPBOARD],
- LAYOUT_AddChild, gow->objects[GID_OPTS_CLIPBOARD] = CheckBoxObject,
- GA_ID, GID_OPTS_CLIPBOARD,
- GA_RelVerify, TRUE,
- GA_Text, gadlab[GID_OPTS_CLIPBOARD],
- GA_Selected, option_utf8_clipboard,
- CheckBoxEnd,
- LayoutEnd, // clipboard
LayoutEnd, // hgroup
CHILD_WeightedHeight, 0,
LAYOUT_AddChild,VGroupObject,
12 years, 6 months
r12138 vince - in /trunk/netsurf: gtk/plotters.c gtk/print.c gtk/sexy_icon_entry.h gtk/throbber.c gtk/thumbnail.c gtk/window.c windows/gui.c
by netsurf@semichrome.net
Author: vince
Date: Sat Mar 26 15:56:59 2011
New Revision: 12138
URL: http://source.netsurf-browser.org?rev=12138&view=rev
Log:
make teh GTK frontend build on -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -DPANGO_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTK_MULTIHEAD_SAFE
Modified:
trunk/netsurf/gtk/plotters.c
trunk/netsurf/gtk/print.c
trunk/netsurf/gtk/sexy_icon_entry.h
trunk/netsurf/gtk/throbber.c
trunk/netsurf/gtk/thumbnail.c
trunk/netsurf/gtk/window.c
trunk/netsurf/windows/gui.c
Modified: trunk/netsurf/gtk/plotters.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/plotters.c?rev=12138&...
==============================================================================
--- trunk/netsurf/gtk/plotters.c (original)
+++ trunk/netsurf/gtk/plotters.c Sat Mar 26 15:56:59 2011
@@ -69,8 +69,7 @@
colour.blue = b | (b << 8);
colour.pixel = (r << 16) | (g << 8) | b;
- gdk_color_alloc(gdk_colormap_get_system(),
- &colour);
+ gdk_colormap_alloc_color(gdk_colormap_get_system(), &colour, true, true);
gdk_gc_set_foreground(current_gc, &colour);
cairo_set_source_rgba(current_cr, r / 255.0,
@@ -89,8 +88,8 @@
colour.green = 0;
colour.blue = 0;
colour.pixel = 0;
- gdk_color_alloc(gdk_colormap_get_system(),
- &colour);
+ gdk_colormap_alloc_color(gdk_colormap_get_system(),
+ &colour, true, true);
gdk_gc_set_foreground(current_gc, &colour);
gdk_draw_line(current_drawable, current_gc,
Modified: trunk/netsurf/gtk/print.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/print.c?rev=12138&r1=...
==============================================================================
--- trunk/netsurf/gtk/print.c (original)
+++ trunk/netsurf/gtk/print.c Sat Mar 26 15:56:59 2011
@@ -66,7 +66,7 @@
colour.blue = b | (b << 8);
colour.pixel = (r << 16) | (g << 8) | b;
- gdk_color_alloc(gdk_colormap_get_system(), &colour);
+ gdk_colormap_alloc_color(gdk_colormap_get_system(), &colour, true, true);
cairo_set_source_rgba(gtk_print_current_cr, r / 255.0,
g / 255.0, b / 255.0, 1.0);
Modified: trunk/netsurf/gtk/sexy_icon_entry.h
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/sexy_icon_entry.h?rev...
==============================================================================
--- trunk/netsurf/gtk/sexy_icon_entry.h (original)
+++ trunk/netsurf/gtk/sexy_icon_entry.h Sat Mar 26 15:56:59 2011
@@ -25,8 +25,7 @@
typedef struct _SexyIconEntryClass SexyIconEntryClass;
typedef struct _SexyIconEntryPriv SexyIconEntryPriv;
-#include <gtk/gtkentry.h>
-#include <gtk/gtkimage.h>
+#include <gtk/gtk.h>
#define SEXY_TYPE_ICON_ENTRY (sexy_icon_entry_get_type())
#define SEXY_ICON_ENTRY(obj) \
Modified: trunk/netsurf/gtk/throbber.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/throbber.c?rev=12138&...
==============================================================================
--- trunk/netsurf/gtk/throbber.c (original)
+++ trunk/netsurf/gtk/throbber.c Sat Mar 26 15:56:59 2011
@@ -77,7 +77,7 @@
if (errors_when_loading == true) {
for (frame_loop = 0; frame_loop < frames; frame_loop++) {
if (throb->framedata[frame_loop] != NULL)
- gdk_pixbuf_unref(throb->framedata[frame_loop]);
+ g_object_unref(throb->framedata[frame_loop]);
}
free(throb->framedata);
@@ -96,7 +96,7 @@
int i;
for (i = 0; i < nsgtk_throbber->nframes; i++)
- gdk_pixbuf_unref(nsgtk_throbber->framedata[i]);
+ g_object_unref(nsgtk_throbber->framedata[i]);
free(nsgtk_throbber->framedata);
free(nsgtk_throbber);
Modified: trunk/netsurf/gtk/thumbnail.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/thumbnail.c?rev=12138...
==============================================================================
--- trunk/netsurf/gtk/thumbnail.c (original)
+++ trunk/netsurf/gtk/thumbnail.c Sat Mar 26 15:56:59 2011
@@ -26,6 +26,8 @@
#include <assert.h>
#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+
#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
Modified: trunk/netsurf/gtk/window.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/window.c?rev=12138&r1...
==============================================================================
--- trunk/netsurf/gtk/window.c (original)
+++ trunk/netsurf/gtk/window.c Sat Mar 26 15:56:59 2011
@@ -954,8 +954,8 @@
16, 16);
r = gdk_cursor_new_from_pixmap(source, mask, &fg, &bg, 0, 3);
- gdk_pixmap_unref(source);
- gdk_pixmap_unref(mask);
+ g_object_unref(source);
+ g_object_unref(mask);
return r;
}
Modified: trunk/netsurf/windows/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/gui.c?rev=12138&r...
==============================================================================
--- trunk/netsurf/windows/gui.c (original)
+++ trunk/netsurf/windows/gui.c Sat Mar 26 15:56:59 2011
@@ -205,7 +205,6 @@
}
}
- LOG(("gw %p",gw));
return gw;
}
12 years, 6 months