summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-06-17 16:46:04 +0000
committerjstebbins <[email protected]>2009-06-17 16:46:04 +0000
commitd91db83b70cc62ae6655183d8526494ed3411d58 (patch)
tree62b7382b687c430b3bda2208ea59e4533ec76acc
parent0c4a88000b2a9456c2079a256c00b0baf43699a7 (diff)
LinGui: update appcast checker to handle modified format
exchange gtkhtml for webkitgtk in order to load html from the link provided in the new appcast format. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2552 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/configure.ac4
-rw-r--r--gtk/src/appcast.c2
-rw-r--r--gtk/src/callbacks.c34
3 files changed, 17 insertions, 23 deletions
diff --git a/gtk/configure.ac b/gtk/configure.ac
index 566c78918..3e7ae4a90 100644
--- a/gtk/configure.ac
+++ b/gtk/configure.ac
@@ -69,14 +69,14 @@ AM_PROG_LIBTOOL
case $host in
*-*-mingw*)
if test "x$w32_gst" = "xyes" ; then
- GHB_PACKAGES="gtk+-2.0 >= 2.8 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 hal hal-storage libgtkhtml-3.14"
+ GHB_PACKAGES="gtk+-2.0 >= 2.8 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 hal hal-storage webkit-1.0"
else
GHB_PACKAGES="gtk+-2.0 >= 2.8 gthread-2.0 gio-2.0"
fi
mingw_flag=yes
;;
*)
- GHB_PACKAGES="gtk+-2.0 >= 2.8 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 hal hal-storage libgtkhtml-3.14 libnotify"
+ GHB_PACKAGES="gtk+-2.0 >= 2.8 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 hal hal-storage webkit-1.0 libnotify"
mingw_flag=no
;;
esac
diff --git a/gtk/src/appcast.c b/gtk/src/appcast.c
index 114b653f2..6e6f564a6 100644
--- a/gtk/src/appcast.c
+++ b/gtk/src/appcast.c
@@ -35,7 +35,7 @@ typedef struct
static tag_map_t tag_map[] =
{
- {"description", A_DESCRIPTION},
+ {"sparkle:releaseNotesLink", A_DESCRIPTION},
{"enclosure", A_ENCLOSURE},
{"item", A_ITEM},
};
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index aa5635fc2..487e89fb5 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -27,7 +27,7 @@
#include <netinet/in.h>
#include <netdb.h>
-#include <gtkhtml/gtkhtml.h>
+#include <webkit/webkit.h>
#include <libnotify/notify.h>
#else
#define WINVER 0x0500
@@ -3420,14 +3420,6 @@ format_vquality_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud)
return g_strdup_printf("QP: %.1f / %.1f%%", val, percent);
}
-#if !defined(_WIN32)
-G_MODULE_EXPORT void
-html_link_cb(GtkHTML *html, const gchar *url, signal_user_data_t *ud)
-{
- browse_url(url);
-}
-#endif
-
static gpointer check_stable_update(signal_user_data_t *ud);
static gboolean stable_update_lock = FALSE;
@@ -3436,7 +3428,8 @@ process_appcast(signal_user_data_t *ud)
{
gchar *description = NULL, *build = NULL, *version = NULL, *msg;
#if !defined(_WIN32)
- GtkWidget *html, *window;
+ GtkWidget *window;
+ static GtkWidget *html = NULL;
#endif
GtkWidget *dialog, *label;
gint response, ibuild = 0, skip;
@@ -3463,21 +3456,22 @@ process_appcast(signal_user_data_t *ud)
version, build, hb_get_version(NULL), hb_get_build(NULL));
label = GHB_WIDGET(ud->builder, "update_message");
gtk_label_set_text(GTK_LABEL(label), msg);
+
#if !defined(_WIN32)
- html = gtk_html_new_from_string(description, -1);
- g_signal_connect(html, "link_clicked", G_CALLBACK(html_link_cb), ud);
- window = GHB_WIDGET(ud->builder, "update_scroll");
- gtk_container_add(GTK_CONTAINER(window), html);
- // Show it
- gtk_widget_set_size_request(html, 420, 240);
- gtk_widget_show(html);
+ if (html == NULL)
+ {
+ html = webkit_web_view_new();
+ window = GHB_WIDGET(ud->builder, "update_scroll");
+ gtk_container_add(GTK_CONTAINER(window), html);
+ // Show it
+ gtk_widget_set_size_request(html, 420, 240);
+ gtk_widget_show(html);
+ }
#endif
dialog = GHB_WIDGET(ud->builder, "update_dialog");
+ webkit_web_view_load_uri(WEBKIT_WEB_VIEW(html), description);
response = gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_hide(dialog);
-#if !defined(_WIN32)
- gtk_widget_destroy(html);
-#endif
if (response == GTK_RESPONSE_OK)
{
// Skip