Changeset 99156 in webkit
- Timestamp:
- Nov 3, 2011 2:59:32 AM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r99147 r99156 1 2011-11-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Remove GtkLauncher2 4 https://bugs.webkit.org/show_bug.cgi?id=71449 5 6 Reviewed by Martin Robinson. 7 8 GtkLauncher2 is the GtkLauncher code compiled with webkit2. This 9 made sense when we wanted to implement the exactly same wk1 API 10 for wk2. Now the code would require an ifdef for most the api, so 11 it's better to remove GtkLauncher2 and port MiniBrowser to the new 12 GTK+ API. 13 14 * GNUmakefile.am: 15 * GtkLauncher/main.c: 16 (notifyProgressCb): 17 (closeWebViewCb): 18 (createBrowser): 19 (addWebSettingsGroupToContext): 20 (main): 21 1 22 2011-11-02 Philippe Normand <pnormand@igalia.com> 2 23 -
trunk/Tools/GNUmakefile.am
r96242 r99156 3 3 Programs/GtkLauncher 4 4 5 if ENABLE_WEBKIT26 noinst_PROGRAMS += \7 Programs/GtkLauncher28 9 # FIXME: should this dependency be automatically identified by10 # automake somehow?11 Tools/GtkLauncher/main.c: $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.h $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.cpp12 endif13 14 5 # GtkLauncher 15 gtklauncher_sources = \ 6 Programs_GtkLauncher_CPPFLAGS = \ 7 -I$(srcdir)/Source/WebKit/gtk \ 8 -I$(srcdir)/Source/WebCore/platform/network/soup/cache/ \ 9 -I$(top_builddir)/Source/WebKit/gtk \ 10 -I$(top_builddir)/DerivedSources \ 11 $(global_cppflags) \ 12 $(javascriptcore_cppflags) 13 14 Programs_GtkLauncher_SOURCES = \ 16 15 Tools/GtkLauncher/main.c 17 16 18 gtklauncher_cflags = \ 17 Programs_GtkLauncher_CFLAGS = \ 18 -ansi \ 19 19 -fno-strict-aliasing \ 20 20 $(global_cflags) \ … … 22 22 $(LIBSOUP_CFLAGS) 23 23 24 gtklauncher_ldadd = \ 24 Programs_GtkLauncher_LDADD = \ 25 libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \ 25 26 libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \ 26 27 $(GTK_LIBS) \ … … 29 30 $(WINMM_LIBS) 30 31 31 gtklauncher_ldflags= \32 Programs_GtkLauncher_LDFLAGS = \ 32 33 -no-fast-install \ 33 34 -no-install 34 35 Programs_GtkLauncher_CPPFLAGS = \36 -I$(srcdir)/Source/WebKit/gtk \37 -I$(srcdir)/Source/WebCore/platform/network/soup/cache/ \38 -I$(top_builddir)/Source/WebKit/gtk \39 -I$(top_builddir)/DerivedSources \40 $(global_cppflags) \41 $(javascriptcore_cppflags)42 43 Programs_GtkLauncher_SOURCES = \44 $(gtklauncher_sources)45 46 Programs_GtkLauncher_CFLAGS = \47 -ansi \48 $(gtklauncher_cflags)49 50 Programs_GtkLauncher_LDADD = \51 libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \52 $(gtklauncher_ldadd)53 54 Programs_GtkLauncher_LDFLAGS = \55 $(gtklauncher_ldflags)56 57 if ENABLE_WEBKIT258 Programs_GtkLauncher2_CPPFLAGS = \59 -I$(srcdir)/Source \60 -I$(top_builddir)/DerivedSources/WebKit2/include \61 -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \62 -I$(top_builddir)/Source/WebKit2/UIProcess/API/gtk \63 -I$(srcdir)/Source/WebKit/gtk \64 -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \65 -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \66 -I$(top_builddir)/Source/WebKit/gtk \67 -I$(top_builddir)/DerivedSources \68 $(global_cppflags) \69 $(javascriptcore_cppflags)70 71 Programs_GtkLauncher2_SOURCES = \72 $(gtklauncher_sources)73 74 Programs_GtkLauncher2_CFLAGS = \75 -DWEBKIT2=\"1\" \76 $(gtklauncher_cflags)77 78 Programs_GtkLauncher2_LDADD = \79 libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \80 $(gtklauncher_ldadd)81 82 Programs_GtkLauncher2_LDFLAGS = \83 $(gtklauncher_ldflags)84 85 endif86 35 87 36 # libWebCoreInternals … … 220 169 Programs/GtkLauncher 221 170 222 if ENABLE_WEBKIT2223 CLEANFILES += \224 Programs/GtkLauncher2225 endif226 227 171 if TARGET_X11 228 172 -
trunk/Tools/GtkLauncher/main.c
r98239 r99156 30 30 #include <stdlib.h> 31 31 #include <string.h> 32 #ifdef WEBKIT233 #include <webkit2/webkit2.h>34 #else35 32 #include <webkit/webkit.h> 36 #endif37 33 38 34 static gint windowCount = 0; … … 48 44 } 49 45 50 #ifndef WEBKIT251 46 static void updateTitle(GtkWindow* window, WebKitWebView* webView) 52 47 { … … 90 85 updateTitle(GTK_WINDOW(window), webView); 91 86 } 92 #endif93 87 94 88 static void destroyCb(GtkWidget* widget, GtkWidget* window) … … 108 102 } 109 103 110 #ifndef WEBKIT2111 104 static WebKitWebView* 112 105 createWebViewCb(WebKitWebView* webView, WebKitWebFrame* web_frame, GtkWidget* window) … … 130 123 return TRUE; 131 124 } 132 #endif133 125 134 126 static GtkWidget* createBrowser(GtkWidget* window, GtkWidget* uriEntry, GtkWidget* statusbar, WebKitWebView* webView) … … 139 131 gtk_container_add(GTK_CONTAINER(scrolledWindow), GTK_WIDGET(webView)); 140 132 141 #ifndef WEBKIT2142 133 g_signal_connect(webView, "notify::title", G_CALLBACK(notifyTitleCb), window); 143 134 g_signal_connect(webView, "notify::load-status", G_CALLBACK(notifyLoadStatusCb), uriEntry); … … 147 138 g_signal_connect(webView, "web-view-ready", G_CALLBACK(webViewReadyCb), window); 148 139 g_signal_connect(webView, "close-web-view", G_CALLBACK(closeWebViewCb), window); 149 #endif150 140 151 141 return scrolledWindow; … … 250 240 } 251 241 252 #ifndef WEBKIT2253 242 static gboolean parseOptionEntryCallback(const gchar *optionNameFull, const gchar *value, WebKitWebSettings *webSettings, GError **error) 254 243 { … … 378 367 return TRUE; 379 368 } 380 #endif381 369 382 370 int main(int argc, char* argv[]) 383 371 { 384 #ifndef WEBKIT2385 372 WebKitWebSettings *webkitSettings = 0; 386 #endif387 373 const gchar **uriArguments = 0; 388 374 const GOptionEntry commandLineOptions[] = … … 397 383 g_option_context_add_main_entries(context, commandLineOptions, 0); 398 384 g_option_context_add_group(context, gtk_get_option_group(TRUE)); 399 #ifndef WEBKIT2 385 400 386 webkitSettings = webkit_web_settings_new(); 401 387 if (!addWebSettingsGroupToContext(context, webkitSettings)) { … … 403 389 webkitSettings = 0; 404 390 } 405 #endif406 391 407 392 GError *error = 0; … … 415 400 g_option_context_free(context); 416 401 417 #ifndef WEBKIT2418 402 #ifdef SOUP_TYPE_PROXY_RESOLVER_DEFAULT 419 403 soup_session_add_feature_by_type(webkit_get_default_session(), SOUP_TYPE_PROXY_RESOLVER_DEFAULT); … … 426 410 } 427 411 #endif 428 #endif429 412 430 413 WebKitWebView *webView; 431 414 GtkWidget *main_window = createWindow(&webView); 432 415 433 #ifndef WEBKIT2434 416 if (webkitSettings) { 435 417 webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView), webkitSettings); 436 418 g_object_unref(webkitSettings); 437 419 } 438 #endif439 420 440 421 const gchar *uri = (uriArguments ? uriArguments[0] : "http://www.google.com/");
Note: See TracChangeset
for help on using the changeset viewer.