From 0c69e6ff6432a023fddd6eb398073d179ebab01f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 30 Oct 2011 14:29:04 +0100 Subject: [PATCH] Define MidoriLoadStatus as alias to WebKitLoadStatus --- midori/midori-view.c | 21 ++------------------- midori/midori-view.h | 17 +++++------------ 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index f9f50363..ca0d611e 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -118,24 +118,6 @@ struct _MidoriViewClass G_DEFINE_TYPE (MidoriView, midori_view, GTK_TYPE_VBOX); -GType -midori_load_status_get_type (void) -{ - static GType type = 0; - static const GEnumValue values[] = { - { MIDORI_LOAD_PROVISIONAL, "MIDORI_LOAD_PROVISIONAL", "Load Provisional" }, - { MIDORI_LOAD_COMMITTED, "MIDORI_LOAD_COMMITTED", "Load Committed" }, - { MIDORI_LOAD_FINISHED, "MIDORI_LOAD_FINISHED", "Load Finished" }, - { 0, NULL, NULL } - }; - - if (type) - return type; - - type = g_enum_register_static ("MidoriLoadStatus", values); - return type; -} - GType midori_new_view_get_type (void) { @@ -3373,7 +3355,8 @@ midori_view_set_settings (MidoriView* view, * midori_view_load_status: * @web_view: a #MidoriView * - * Determines the current loading status of a view. + * Determines the current loading status of a view. There is no + * error state, unlike webkit_web_view_get_load_status(). * * Return value: the current #MidoriLoadStatus **/ diff --git a/midori/midori-view.h b/midori/midori-view.h index b0246e34..bdf21885 100644 --- a/midori/midori-view.h +++ b/midori/midori-view.h @@ -18,18 +18,11 @@ G_BEGIN_DECLS -typedef enum -{ - MIDORI_LOAD_PROVISIONAL, - MIDORI_LOAD_COMMITTED, - MIDORI_LOAD_FINISHED -} MidoriLoadStatus; - -GType -midori_load_status_get_type (void) G_GNUC_CONST; - -#define MIDORI_TYPE_LOAD_STATUS \ - (midori_load_status_get_type ()) +#define MIDORI_LOAD_PROVISIONAL WEBKIT_LOAD_PROVISIONAL +#define MIDORI_LOAD_COMMITTED WEBKIT_LOAD_COMMITTED +#define MIDORI_LOAD_FINISHED WEBKIT_LOAD_FINISHED +#define MidoriLoadStatus WebKitLoadStatus +#define MIDORI_TYPE_LOAD_STATUS WEBKIT_TYPE_LOAD_STATUS typedef enum {