Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/91515e2b566bee852f00ad9dbe68bc2beb8d1504
...commit
http://git.netsurf-browser.org/netsurf.git/commit/91515e2b566bee852f00ad9dbe68bc2beb8d1504
...tree
http://git.netsurf-browser.org/netsurf.git/tree/91515e2b566bee852f00ad9dbe68bc2beb8d1504
The branch, master has been updated
via 91515e2b566bee852f00ad9dbe68bc2beb8d1504 (commit)
from 4d18947adb21aa3e06f2431900111ad17b58d80d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=91515e2b566bee852f00ad9dbe68bc2beb8d1504
commit 91515e2b566bee852f00ad9dbe68bc2beb8d1504
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
update beos frontend to remove useage of depricated warn_user API
diff --git a/beos/fetch_rsrc.cpp b/beos/fetch_rsrc.cpp
index a2c8184..f696f18 100644
--- a/beos/fetch_rsrc.cpp
+++ b/beos/fetch_rsrc.cpp
@@ -374,7 +374,7 @@ void fetch_rsrc_register(void)
err = find_app_resources();
if (err < B_OK) {
- warn_user("Resources", strerror(err));
+ beos_warn_user("Resources", strerror(err));
return;
}
diff --git a/beos/filetype.cpp b/beos/filetype.cpp
index 5a54154..75a3324 100644
--- a/beos/filetype.cpp
+++ b/beos/filetype.cpp
@@ -38,6 +38,7 @@ extern "C" {
}
#include "beos/filetype.h"
+#include "beos/gui.h"
static struct {
const char *type;
@@ -68,7 +69,7 @@ void beos_fetch_filetype_init(void)
continue;
err = m.Install();
if (err < B_OK) {
- warn_user("Mime", strerror(err));
+ beos_warn_user("Mime", strerror(err));
continue;
}
// the mime db doesn't know about it yet
@@ -79,7 +80,7 @@ void beos_fetch_filetype_init(void)
extensions.AddString("extensions",
default_types[i].ext2);
err = m.SetFileExtensions(&extensions);
if (err < B_OK) {
- warn_user("Mime", strerror(err));
+ beos_warn_user("Mime", strerror(err));
}
}
}
diff --git a/beos/font.cpp b/beos/font.cpp
index 87c2346..003af52 100644
--- a/beos/font.cpp
+++ b/beos/font.cpp
@@ -332,7 +332,7 @@ bool nsfont_paint(const plot_font_style_t *fstyle,
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
diff --git a/beos/gui.cpp b/beos/gui.cpp
index fde0495..4fd2ecf 100644
--- a/beos/gui.cpp
+++ b/beos/gui.cpp
@@ -113,13 +113,8 @@ static int sEventPipe[2];
// #pragma mark - class NSBrowserFrameView
-/**
- * Display a warning for a serious problem (eg memory exhaustion).
- *
- * \param warning message key for warning message
- * \param detail additional message, or 0
- */
-static nserror beos_warn_user(const char *warning, const char *detail)
+/* exported function defined in beos/gui.h */
+nserror beos_warn_user(const char *warning, const char *detail)
{
LOG("warn_user: %s (%s)", warning, detail);
BAlert *alert;
diff --git a/beos/gui.h b/beos/gui.h
index b9f560e..f77fe39 100644
--- a/beos/gui.h
+++ b/beos/gui.h
@@ -78,3 +78,11 @@ void nsbeos_update_system_ui_colors(void);
* \param error The message to display to the user.
*/
void die(const char * const error) __attribute__ ((noreturn));
+
+/**
+ * Display a warning for a serious problem (eg memory exhaustion).
+ *
+ * \param warning message key for warning message
+ * \param detail additional message, or 0
+ */
+nserror beos_warn_user(const char *warning, const char *detail)
diff --git a/beos/plotters.cpp b/beos/plotters.cpp
index b7d1a2b..3fd786e 100644
--- a/beos/plotters.cpp
+++ b/beos/plotters.cpp
@@ -40,8 +40,6 @@ extern "C" {
#include "beos/font.h"
#include "beos/gui.h"
#include "beos/plotters.h"
-//#include "beos/scaffolding.h"
-//#include "beos/options.h"
#include "beos/bitmap.h"
#warning MAKE ME static
@@ -128,7 +126,7 @@ bool nsbeos_plot_rectangle(int x0, int y0, int x1, int y1,
const plot_style_t *s
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -162,7 +160,7 @@ bool nsbeos_plot_rectangle(int x0, int y0, int x1, int y1,
const plot_style_t *s
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -207,7 +205,7 @@ bool nsbeos_plot_line(int x0, int y0, int x1, int y1, const
plot_style_t *style)
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -235,7 +233,7 @@ bool nsbeos_plot_polygon(const int *p, unsigned int n,
const plot_style_t *style
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -265,7 +263,7 @@ bool nsbeos_plot_clip(const struct rect *ns_clip)
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -296,7 +294,7 @@ bool nsbeos_plot_disc(int x, int y, int radius, const
plot_style_t *style)
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -319,7 +317,7 @@ bool nsbeos_plot_arc(int x, int y, int radius, int angle1,
int angle2, const plo
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -349,7 +347,7 @@ static bool nsbeos_plot_bbitmap(int x, int y, int width,
int height,
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -419,7 +417,7 @@ bool nsbeos_plot_bitmap(int x, int y, int width, int height,
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp
index d189e9a..630e059 100644
--- a/beos/scaffolding.cpp
+++ b/beos/scaffolding.cpp
@@ -439,7 +439,7 @@ NSBaseView::NSBaseView(BMessage *archive)
NSBaseView::~NSBaseView()
{
- //warn_user ("~NSBaseView()", NULL);
+ //beos_warn_user("~NSBaseView()", NULL);
if (replicated) {
BMessage *message = new BMessage(B_QUIT_REQUESTED);
nsbeos_pipe_message_top(message, NULL, fScaffolding);
@@ -914,7 +914,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(nsurl);
}
if (error != NSERROR_OK) {
-
warn_user(messages_get_errorcode(error), 0);
+
beos_warn_user(messages_get_errorcode(error), 0);
}
}
break;
@@ -937,7 +937,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(url);
}
if (error != NSERROR_OK) {
-
warn_user(messages_get_errorcode(error), 0);
+
beos_warn_user(messages_get_errorcode(error), 0);
}
}
break;
@@ -957,7 +957,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
error = nsurl_create(url.String(), &nsurl);
if (error != NSERROR_OK) {
- warn_user(messages_get_errorcode(error), 0);
+ beos_warn_user(messages_get_errorcode(error),
0);
} else {
browser_window_navigate(bw,
nsurl,
@@ -1027,7 +1027,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
error = nsurl_create(addr, &url);
if (error != NSERROR_OK) {
- warn_user(messages_get_errorcode(error), 0);
+ beos_warn_user(messages_get_errorcode(error),
0);
} else {
browser_window_navigate(bw,
url,
@@ -1055,7 +1055,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
error = nsurl_create(text.String(), &url);
if (error != NSERROR_OK) {
- warn_user(messages_get_errorcode(error), 0);
+ beos_warn_user(messages_get_errorcode(error),
0);
} else {
browser_window_navigate(bw,
url,
@@ -1106,7 +1106,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
}
if (ret != NSERROR_OK) {
- warn_user(messages_get_errorcode(ret), 0);
+ beos_warn_user(messages_get_errorcode(ret), 0);
}
search_web_finalise();
@@ -1155,7 +1155,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(url);
}
if (nserr != NSERROR_OK) {
- warn_user(messages_get_errorcode(nserr), 0);
+ beos_warn_user(messages_get_errorcode(nserr),
0);
}
}
break;
@@ -1173,7 +1173,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(url);
}
if (nserr != NSERROR_OK) {
- warn_user(messages_get_errorcode(nserr), 0);
+ beos_warn_user(messages_get_errorcode(nserr),
0);
}
}
break;
@@ -1226,7 +1226,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(url);
}
if (error != NSERROR_OK) {
- warn_user(messages_get_errorcode(error), 0);
+ beos_warn_user(messages_get_errorcode(error),
0);
}
break;
}
@@ -1715,7 +1715,7 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct
gui_window *toplevel)
g->menu_bar = NULL;
if (replicated && !replicant_view) {
- warn_user("Error: No subwindow allowed when replicated.", NULL);
+ beos_warn_user("Error: No subwindow allowed when replicated.",
NULL);
return NULL;
}
diff --git a/beos/window.cpp b/beos/window.cpp
index 23ae283..ed6abcb 100644
--- a/beos/window.cpp
+++ b/beos/window.cpp
@@ -348,7 +348,7 @@ static struct gui_window *gui_window_create(struct
browser_window *bw,
g = (struct gui_window *)malloc(sizeof(*g));
if (!g) {
- warn_user("NoMemory", 0);
+ beos_warn_user("NoMemory", 0);
return 0;
}
-----------------------------------------------------------------------
Summary of changes:
beos/fetch_rsrc.cpp | 2 +-
beos/filetype.cpp | 5 +++--
beos/font.cpp | 2 +-
beos/gui.cpp | 9 ++-------
beos/gui.h | 8 ++++++++
beos/plotters.cpp | 20 +++++++++-----------
beos/scaffolding.cpp | 22 +++++++++++-----------
beos/window.cpp | 2 +-
8 files changed, 36 insertions(+), 34 deletions(-)
diff --git a/beos/fetch_rsrc.cpp b/beos/fetch_rsrc.cpp
index a2c8184..f696f18 100644
--- a/beos/fetch_rsrc.cpp
+++ b/beos/fetch_rsrc.cpp
@@ -374,7 +374,7 @@ void fetch_rsrc_register(void)
err = find_app_resources();
if (err < B_OK) {
- warn_user("Resources", strerror(err));
+ beos_warn_user("Resources", strerror(err));
return;
}
diff --git a/beos/filetype.cpp b/beos/filetype.cpp
index 5a54154..75a3324 100644
--- a/beos/filetype.cpp
+++ b/beos/filetype.cpp
@@ -38,6 +38,7 @@ extern "C" {
}
#include "beos/filetype.h"
+#include "beos/gui.h"
static struct {
const char *type;
@@ -68,7 +69,7 @@ void beos_fetch_filetype_init(void)
continue;
err = m.Install();
if (err < B_OK) {
- warn_user("Mime", strerror(err));
+ beos_warn_user("Mime", strerror(err));
continue;
}
// the mime db doesn't know about it yet
@@ -79,7 +80,7 @@ void beos_fetch_filetype_init(void)
extensions.AddString("extensions",
default_types[i].ext2);
err = m.SetFileExtensions(&extensions);
if (err < B_OK) {
- warn_user("Mime", strerror(err));
+ beos_warn_user("Mime", strerror(err));
}
}
}
diff --git a/beos/font.cpp b/beos/font.cpp
index 87c2346..003af52 100644
--- a/beos/font.cpp
+++ b/beos/font.cpp
@@ -332,7 +332,7 @@ bool nsfont_paint(const plot_font_style_t *fstyle,
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
diff --git a/beos/gui.cpp b/beos/gui.cpp
index fde0495..4fd2ecf 100644
--- a/beos/gui.cpp
+++ b/beos/gui.cpp
@@ -113,13 +113,8 @@ static int sEventPipe[2];
// #pragma mark - class NSBrowserFrameView
-/**
- * Display a warning for a serious problem (eg memory exhaustion).
- *
- * \param warning message key for warning message
- * \param detail additional message, or 0
- */
-static nserror beos_warn_user(const char *warning, const char *detail)
+/* exported function defined in beos/gui.h */
+nserror beos_warn_user(const char *warning, const char *detail)
{
LOG("warn_user: %s (%s)", warning, detail);
BAlert *alert;
diff --git a/beos/gui.h b/beos/gui.h
index b9f560e..f77fe39 100644
--- a/beos/gui.h
+++ b/beos/gui.h
@@ -78,3 +78,11 @@ void nsbeos_update_system_ui_colors(void);
* \param error The message to display to the user.
*/
void die(const char * const error) __attribute__ ((noreturn));
+
+/**
+ * Display a warning for a serious problem (eg memory exhaustion).
+ *
+ * \param warning message key for warning message
+ * \param detail additional message, or 0
+ */
+nserror beos_warn_user(const char *warning, const char *detail)
diff --git a/beos/plotters.cpp b/beos/plotters.cpp
index b7d1a2b..3fd786e 100644
--- a/beos/plotters.cpp
+++ b/beos/plotters.cpp
@@ -40,8 +40,6 @@ extern "C" {
#include "beos/font.h"
#include "beos/gui.h"
#include "beos/plotters.h"
-//#include "beos/scaffolding.h"
-//#include "beos/options.h"
#include "beos/bitmap.h"
#warning MAKE ME static
@@ -128,7 +126,7 @@ bool nsbeos_plot_rectangle(int x0, int y0, int x1, int y1,
const plot_style_t *s
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -162,7 +160,7 @@ bool nsbeos_plot_rectangle(int x0, int y0, int x1, int y1,
const plot_style_t *s
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -207,7 +205,7 @@ bool nsbeos_plot_line(int x0, int y0, int x1, int y1, const
plot_style_t *style)
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -235,7 +233,7 @@ bool nsbeos_plot_polygon(const int *p, unsigned int n,
const plot_style_t *style
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -265,7 +263,7 @@ bool nsbeos_plot_clip(const struct rect *ns_clip)
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -296,7 +294,7 @@ bool nsbeos_plot_disc(int x, int y, int radius, const
plot_style_t *style)
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -319,7 +317,7 @@ bool nsbeos_plot_arc(int x, int y, int radius, int angle1,
int angle2, const plo
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -349,7 +347,7 @@ static bool nsbeos_plot_bbitmap(int x, int y, int width,
int height,
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
@@ -419,7 +417,7 @@ bool nsbeos_plot_bitmap(int x, int y, int width, int height,
view = nsbeos_current_gc/*_lock*/();
if (view == NULL) {
- warn_user("No GC", 0);
+ beos_warn_user("No GC", 0);
return false;
}
diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp
index d189e9a..630e059 100644
--- a/beos/scaffolding.cpp
+++ b/beos/scaffolding.cpp
@@ -439,7 +439,7 @@ NSBaseView::NSBaseView(BMessage *archive)
NSBaseView::~NSBaseView()
{
- //warn_user ("~NSBaseView()", NULL);
+ //beos_warn_user("~NSBaseView()", NULL);
if (replicated) {
BMessage *message = new BMessage(B_QUIT_REQUESTED);
nsbeos_pipe_message_top(message, NULL, fScaffolding);
@@ -914,7 +914,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(nsurl);
}
if (error != NSERROR_OK) {
-
warn_user(messages_get_errorcode(error), 0);
+
beos_warn_user(messages_get_errorcode(error), 0);
}
}
break;
@@ -937,7 +937,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(url);
}
if (error != NSERROR_OK) {
-
warn_user(messages_get_errorcode(error), 0);
+
beos_warn_user(messages_get_errorcode(error), 0);
}
}
break;
@@ -957,7 +957,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
error = nsurl_create(url.String(), &nsurl);
if (error != NSERROR_OK) {
- warn_user(messages_get_errorcode(error), 0);
+ beos_warn_user(messages_get_errorcode(error),
0);
} else {
browser_window_navigate(bw,
nsurl,
@@ -1027,7 +1027,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
error = nsurl_create(addr, &url);
if (error != NSERROR_OK) {
- warn_user(messages_get_errorcode(error), 0);
+ beos_warn_user(messages_get_errorcode(error),
0);
} else {
browser_window_navigate(bw,
url,
@@ -1055,7 +1055,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
error = nsurl_create(text.String(), &url);
if (error != NSERROR_OK) {
- warn_user(messages_get_errorcode(error), 0);
+ beos_warn_user(messages_get_errorcode(error),
0);
} else {
browser_window_navigate(bw,
url,
@@ -1106,7 +1106,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
}
if (ret != NSERROR_OK) {
- warn_user(messages_get_errorcode(ret), 0);
+ beos_warn_user(messages_get_errorcode(ret), 0);
}
search_web_finalise();
@@ -1155,7 +1155,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(url);
}
if (nserr != NSERROR_OK) {
- warn_user(messages_get_errorcode(nserr), 0);
+ beos_warn_user(messages_get_errorcode(nserr),
0);
}
}
break;
@@ -1173,7 +1173,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(url);
}
if (nserr != NSERROR_OK) {
- warn_user(messages_get_errorcode(nserr), 0);
+ beos_warn_user(messages_get_errorcode(nserr),
0);
}
}
break;
@@ -1226,7 +1226,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding
*scaffold, BMessage *m
nsurl_unref(url);
}
if (error != NSERROR_OK) {
- warn_user(messages_get_errorcode(error), 0);
+ beos_warn_user(messages_get_errorcode(error),
0);
}
break;
}
@@ -1715,7 +1715,7 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct
gui_window *toplevel)
g->menu_bar = NULL;
if (replicated && !replicant_view) {
- warn_user("Error: No subwindow allowed when replicated.", NULL);
+ beos_warn_user("Error: No subwindow allowed when replicated.",
NULL);
return NULL;
}
diff --git a/beos/window.cpp b/beos/window.cpp
index 23ae283..ed6abcb 100644
--- a/beos/window.cpp
+++ b/beos/window.cpp
@@ -348,7 +348,7 @@ static struct gui_window *gui_window_create(struct
browser_window *bw,
g = (struct gui_window *)malloc(sizeof(*g));
if (!g) {
- warn_user("NoMemory", 0);
+ beos_warn_user("NoMemory", 0);
return 0;
}
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org