Changeset 99156 in webkit


Ignore:
Timestamp:
Nov 3, 2011 2:59:32 AM (12 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Remove GtkLauncher2
https://bugs.webkit.org/show_bug.cgi?id=71449

Reviewed by Martin Robinson.

GtkLauncher2 is the GtkLauncher code compiled with webkit2. This
made sense when we wanted to implement the exactly same wk1 API
for wk2. Now the code would require an ifdef for most the api, so
it's better to remove GtkLauncher2 and port MiniBrowser to the new
GTK+ API.

  • GNUmakefile.am:
  • GtkLauncher/main.c:

(notifyProgressCb):
(closeWebViewCb):
(createBrowser):
(addWebSettingsGroupToContext):
(main):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r99147 r99156  
     12011-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
    1222011-11-02  Philippe Normand  <pnormand@igalia.com>
    223
  • trunk/Tools/GNUmakefile.am

    r96242 r99156  
    33        Programs/GtkLauncher
    44
    5 if ENABLE_WEBKIT2
    6 noinst_PROGRAMS += \
    7         Programs/GtkLauncher2
    8 
    9 # FIXME: should this dependency be automatically identified by
    10 # automake somehow?
    11 Tools/GtkLauncher/main.c: $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.h $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.cpp
    12 endif
    13 
    145# GtkLauncher
    15 gtklauncher_sources = \
     6Programs_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
     14Programs_GtkLauncher_SOURCES = \
    1615        Tools/GtkLauncher/main.c
    1716
    18 gtklauncher_cflags = \
     17Programs_GtkLauncher_CFLAGS = \
     18        -ansi \
    1919        -fno-strict-aliasing \
    2020        $(global_cflags) \
     
    2222        $(LIBSOUP_CFLAGS)
    2323
    24 gtklauncher_ldadd = \
     24Programs_GtkLauncher_LDADD = \
     25        libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
    2526        libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
    2627        $(GTK_LIBS) \
     
    2930        $(WINMM_LIBS)
    3031
    31 gtklauncher_ldflags = \
     32Programs_GtkLauncher_LDFLAGS = \
    3233        -no-fast-install \
    3334        -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_WEBKIT2
    58 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 endif
    8635
    8736# libWebCoreInternals
     
    220169        Programs/GtkLauncher
    221170
    222 if ENABLE_WEBKIT2
    223 CLEANFILES += \
    224         Programs/GtkLauncher2
    225 endif
    226 
    227171if TARGET_X11
    228172
  • trunk/Tools/GtkLauncher/main.c

    r98239 r99156  
    3030#include <stdlib.h>
    3131#include <string.h>
    32 #ifdef WEBKIT2
    33 #include <webkit2/webkit2.h>
    34 #else
    3532#include <webkit/webkit.h>
    36 #endif
    3733
    3834static gint windowCount = 0;
     
    4844}
    4945
    50 #ifndef WEBKIT2
    5146static void updateTitle(GtkWindow* window, WebKitWebView* webView)
    5247{
     
    9085    updateTitle(GTK_WINDOW(window), webView);
    9186}
    92 #endif
    9387
    9488static void destroyCb(GtkWidget* widget, GtkWidget* window)
     
    108102}
    109103
    110 #ifndef WEBKIT2
    111104static WebKitWebView*
    112105createWebViewCb(WebKitWebView* webView, WebKitWebFrame* web_frame, GtkWidget* window)
     
    130123    return TRUE;
    131124}
    132 #endif
    133125
    134126static GtkWidget* createBrowser(GtkWidget* window, GtkWidget* uriEntry, GtkWidget* statusbar, WebKitWebView* webView)
     
    139131    gtk_container_add(GTK_CONTAINER(scrolledWindow), GTK_WIDGET(webView));
    140132
    141 #ifndef WEBKIT2
    142133    g_signal_connect(webView, "notify::title", G_CALLBACK(notifyTitleCb), window);
    143134    g_signal_connect(webView, "notify::load-status", G_CALLBACK(notifyLoadStatusCb), uriEntry);
     
    147138    g_signal_connect(webView, "web-view-ready", G_CALLBACK(webViewReadyCb), window);
    148139    g_signal_connect(webView, "close-web-view", G_CALLBACK(closeWebViewCb), window);
    149 #endif
    150140
    151141    return scrolledWindow;
     
    250240}
    251241
    252 #ifndef WEBKIT2
    253242static gboolean parseOptionEntryCallback(const gchar *optionNameFull, const gchar *value, WebKitWebSettings *webSettings, GError **error)
    254243{
     
    378367    return TRUE;
    379368}
    380 #endif
    381369
    382370int main(int argc, char* argv[])
    383371{
    384 #ifndef WEBKIT2
    385372    WebKitWebSettings *webkitSettings = 0;
    386 #endif
    387373    const gchar **uriArguments = 0;
    388374    const GOptionEntry commandLineOptions[] =
     
    397383    g_option_context_add_main_entries(context, commandLineOptions, 0);
    398384    g_option_context_add_group(context, gtk_get_option_group(TRUE));
    399 #ifndef WEBKIT2
     385
    400386    webkitSettings = webkit_web_settings_new();
    401387    if (!addWebSettingsGroupToContext(context, webkitSettings)) {
     
    403389        webkitSettings = 0;
    404390    }
    405 #endif
    406391
    407392    GError *error = 0;
     
    415400    g_option_context_free(context);
    416401
    417 #ifndef WEBKIT2
    418402#ifdef SOUP_TYPE_PROXY_RESOLVER_DEFAULT
    419403    soup_session_add_feature_by_type(webkit_get_default_session(), SOUP_TYPE_PROXY_RESOLVER_DEFAULT);
     
    426410    }
    427411#endif
    428 #endif
    429412
    430413    WebKitWebView *webView;
    431414    GtkWidget *main_window = createWindow(&webView);
    432415
    433 #ifndef WEBKIT2
    434416    if (webkitSettings) {
    435417        webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView), webkitSettings);
    436418        g_object_unref(webkitSettings);
    437419    }
    438 #endif
    439420
    440421    const gchar *uri = (uriArguments ? uriArguments[0] : "http://www.google.com/");
Note: See TracChangeset for help on using the changeset viewer.