2007-12-05 Michael Natterer <mitch@imendio.com>
authoralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2007 12:35:47 +0000 (12:35 +0000)
committeralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2007 12:35:47 +0000 (12:35 +0000)
        Reviewed by Alp Toker.

        * WebView/webkitwebview.cpp
        * WebCoreSupport/ChromeClientGtk.cpp
        * WebCoreSupport/FrameLoaderClientGtk.cpp: canonicalize signal names.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28437 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/gtk/ChangeLog
WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
WebKit/gtk/WebView/webkitwebframe.cpp
WebKit/gtk/WebView/webkitwebview.cpp

index 9e3fbdbf6078e2c257840459ed22b90f1f43f878..99471070c8ab55bc48da64762d04ca4bcfcb85c5 100644 (file)
@@ -1,3 +1,11 @@
+2007-12-05  Michael Natterer  <mitch@imendio.com>
+
+        Reviewed by Alp Toker.
+
+        * WebView/webkitwebview.cpp
+        * WebCoreSupport/ChromeClientGtk.cpp
+        * WebCoreSupport/FrameLoaderClientGtk.cpp: canonicalize signal names.
+
 2007-12-04  Darin Adler  <darin@apple.com>
 
         Reviewed by Kevin Decker.
index 81f1a20ae1a106cb4b801661ffb263b2eef0a5ab..fdf03ed68de2987a0852a2ee5ce987fe60d9901b 100644 (file)
@@ -230,7 +230,7 @@ bool ChromeClient::runJavaScriptPrompt(Frame* frame, const String& message, cons
 void ChromeClient::setStatusbarText(const String& string)
 {
     CString stringMessage = string.utf8();
-    g_signal_emit_by_name(m_webPage, "status_bar_text_changed", stringMessage.data());
+    g_signal_emit_by_name(m_webPage, "status-bar-text-changed", stringMessage.data());
 }
 
 bool ChromeClient::shouldInterruptJavaScript()
@@ -274,11 +274,11 @@ void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo
         if (!url.isEmpty() && url != m_hoveredLinkURL) {
             CString titleString = hit.title().utf8();
             DeprecatedCString urlString = url.prettyURL().utf8();
-            g_signal_emit_by_name(m_webPage, "hovering_over_link", titleString.data(), urlString.data());
+            g_signal_emit_by_name(m_webPage, "hovering-over-link", titleString.data(), urlString.data());
             m_hoveredLinkURL = url;
         }
     } else if (!isLink && !m_hoveredLinkURL.isEmpty()) {
-        g_signal_emit_by_name(m_webPage, "hovering_over_link", 0, 0);
+        g_signal_emit_by_name(m_webPage, "hovering-over-link", 0, 0);
         m_hoveredLinkURL = KURL();
     }
 }
index a0311a688587e8dfb8b477e345c24e9de7ffff1c..ea54d85ac4097ce43e5cf71b4f583ffd6dba5f82 100644 (file)
@@ -200,7 +200,7 @@ void FrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifie
 void FrameLoaderClient::postProgressStartedNotification()
 {
     WebKitWebView* page = getViewFromFrame(m_frame);
-    g_signal_emit_by_name(page, "load_started", m_frame);
+    g_signal_emit_by_name(page, "load-started", m_frame);
 }
 
 void FrameLoaderClient::postProgressEstimateChangedNotification()
@@ -208,14 +208,14 @@ void FrameLoaderClient::postProgressEstimateChangedNotification()
     WebKitWebView* kitPage = getViewFromFrame(m_frame);
     Page* corePage = core(kitPage);
 
-    g_signal_emit_by_name(kitPage, "load_progress_changed", lround(corePage->progress()->estimatedProgress()*100));
+    g_signal_emit_by_name(kitPage, "load-progress-changed", lround(corePage->progress()->estimatedProgress()*100));
 }
 
 void FrameLoaderClient::postProgressFinishedNotification()
 {
     WebKitWebView* page = getViewFromFrame(m_frame);
 
-    g_signal_emit_by_name(page, "load_finished", m_frame);
+    g_signal_emit_by_name(page, "load-finished", m_frame);
 }
 
 void FrameLoaderClient::frameLoaderDestroyed()
@@ -258,7 +258,7 @@ void FrameLoaderClient::dispatchDecidePolicyForNavigationAction(FramePolicyFunct
     WebKitNetworkRequest* request = webkit_network_request_new(resourceRequest.url().url().utf8().data());
     WebKitNavigationResponse response;
 
-    g_signal_emit_by_name(page, "navigation_requested", m_frame, request, &response);
+    g_signal_emit_by_name(page, "navigation-requested", m_frame, request, &response);
 
     g_object_unref(request);
 
@@ -367,7 +367,7 @@ void FrameLoaderClient::windowObjectCleared()
     ASSERT(windowObject);
 
     WebKitWebView* page = getViewFromFrame(m_frame);
-    g_signal_emit_by_name(page, "window_object_cleared", m_frame, context, windowObject);
+    g_signal_emit_by_name(page, "window-object-cleared", m_frame, context, windowObject);
 
     // TODO: Re-attach debug clients if present.
     // The Win port has an example of how we might do this.
@@ -401,7 +401,7 @@ bool FrameLoaderClient::hasFrameView() const
 
 void FrameLoaderClient::dispatchDidFinishLoad()
 {
-    g_signal_emit_by_name(m_frame, "load_done", true);
+    g_signal_emit_by_name(m_frame, "load-done", true);
 }
 
 void FrameLoaderClient::frameLoadCompleted()
@@ -448,7 +448,7 @@ void FrameLoaderClient::dispatchDidReceiveIcon()
 {
     WebKitWebView* page = getViewFromFrame(m_frame);
 
-    g_signal_emit_by_name(page, "icon_loaded", m_frame);
+    g_signal_emit_by_name(page, "icon-loaded", m_frame);
 }
 
 void FrameLoaderClient::dispatchDidStartProvisionalLoad()
@@ -510,10 +510,10 @@ void FrameLoaderClient::setTitle(const String& title, const KURL& url)
 
     CString titleString = title.utf8();
     DeprecatedCString urlString = url.prettyURL().utf8();
-    g_signal_emit_by_name(m_frame, "title_changed", titleString.data(), urlString.data());
+    g_signal_emit_by_name(m_frame, "title-changed", titleString.data(), urlString.data());
 
     if (m_frame == webkit_web_view_get_main_frame(page))
-        g_signal_emit_by_name(page, "title_changed", titleString.data(), urlString.data());
+        g_signal_emit_by_name(page, "title-changed", titleString.data(), urlString.data());
 }
 
 void FrameLoaderClient::setDocumentViewFromCachedPage(WebCore::CachedPage*) { notImplemented(); }
@@ -524,12 +524,12 @@ bool FrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*,
 
 void FrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError&)
 {
-    g_signal_emit_by_name(m_frame, "load_done", false);
+    g_signal_emit_by_name(m_frame, "load-done", false);
 }
 
 void FrameLoaderClient::dispatchDidFailLoad(const ResourceError&)
 {
-    g_signal_emit_by_name(m_frame, "load_done", false);
+    g_signal_emit_by_name(m_frame, "load-done", false);
 }
 
 void FrameLoaderClient::download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&) { notImplemented(); }
index dd83087868eeaad7e1e913fa0eea936d97d4a4a3..8e03345b2a4b431dd2c09ee3a1278f6e4640a6f9 100644 (file)
@@ -93,7 +93,7 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
             g_cclosure_marshal_VOID__VOID,
             G_TYPE_NONE, 0);
 
-    webkit_web_frame_signals[LOAD_DONE] = g_signal_new("load_done",
+    webkit_web_frame_signals[LOAD_DONE] = g_signal_new("load-done",
             G_TYPE_FROM_CLASS(frameClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
@@ -103,7 +103,7 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
             G_TYPE_NONE, 1,
             G_TYPE_BOOLEAN);
 
-    webkit_web_frame_signals[TITLE_CHANGED] = g_signal_new("title_changed",
+    webkit_web_frame_signals[TITLE_CHANGED] = g_signal_new("title-changed",
             G_TYPE_FROM_CLASS(frameClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebFrameClass, title_changed),
@@ -113,7 +113,7 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
             G_TYPE_NONE, 2,
             G_TYPE_STRING, G_TYPE_STRING);
 
-    webkit_web_frame_signals[HOVERING_OVER_LINK] = g_signal_new("hovering_over_link",
+    webkit_web_frame_signals[HOVERING_OVER_LINK] = g_signal_new("hovering-over-link",
             G_TYPE_FROM_CLASS(frameClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
index 7972d1591749c3591facb71b5b7febc239bc712b..08a8aef14ffff0514d79e553e48977c03ab7db04 100644 (file)
@@ -411,7 +411,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      * Signals
      */
 
-    webkit_web_view_signals[NAVIGATION_REQUESTED] = g_signal_new("navigation_requested",
+    webkit_web_view_signals[NAVIGATION_REQUESTED] = g_signal_new("navigation-requested",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET (WebKitWebViewClass, navigation_requested),
@@ -437,7 +437,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      * cleared in preparation for a new load. This is the preferred place to
      * set custom properties on the window object using the JavaScriptCore API.
      */
-    webkit_web_view_signals[WINDOW_OBJECT_CLEARED] = g_signal_new("window_object_cleared",
+    webkit_web_view_signals[WINDOW_OBJECT_CLEARED] = g_signal_new("window-object-cleared",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET (WebKitWebViewClass, window_object_cleared),
@@ -456,7 +456,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      *
      * When a #WebKitWebFrame begins to load this signal is emitted.
      */
-    webkit_web_view_signals[LOAD_STARTED] = g_signal_new("load_started",
+    webkit_web_view_signals[LOAD_STARTED] = g_signal_new("load-started",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
@@ -471,7 +471,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      * @web_view: the #WebKitWebView
      * @progress: the global progress
      */
-    webkit_web_view_signals[LOAD_PROGRESS_CHANGED] = g_signal_new("load_progress_changed",
+    webkit_web_view_signals[LOAD_PROGRESS_CHANGED] = g_signal_new("load-progress-changed",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
@@ -481,7 +481,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
             G_TYPE_NONE, 1,
             G_TYPE_INT);
 
-    webkit_web_view_signals[LOAD_FINISHED] = g_signal_new("load_finished",
+    webkit_web_view_signals[LOAD_FINISHED] = g_signal_new("load-finished",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
@@ -491,7 +491,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
             G_TYPE_NONE, 1,
             WEBKIT_TYPE_WEB_FRAME);
 
-    webkit_web_view_signals[TITLE_CHANGED] = g_signal_new("title_changed",
+    webkit_web_view_signals[TITLE_CHANGED] = g_signal_new("title-changed",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
@@ -501,7 +501,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
             G_TYPE_NONE, 2,
             G_TYPE_STRING, G_TYPE_STRING);
 
-    webkit_web_view_signals[HOVERING_OVER_LINK] = g_signal_new("hovering_over_link",
+    webkit_web_view_signals[HOVERING_OVER_LINK] = g_signal_new("hovering-over-link",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
@@ -512,7 +512,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
             G_TYPE_STRING,
             G_TYPE_STRING);
 
-    webkit_web_view_signals[STATUS_BAR_TEXT_CHANGED] = g_signal_new("status_bar_text_changed",
+    webkit_web_view_signals[STATUS_BAR_TEXT_CHANGED] = g_signal_new("status-bar-text-changed",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
@@ -522,7 +522,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
             G_TYPE_NONE, 1,
             G_TYPE_STRING);
 
-    webkit_web_view_signals[ICOND_LOADED] = g_signal_new("icon_loaded",
+    webkit_web_view_signals[ICOND_LOADED] = g_signal_new("icon-loaded",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
@@ -531,7 +531,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
             g_cclosure_marshal_VOID__VOID,
             G_TYPE_NONE, 0);
 
-    webkit_web_view_signals[SELECTION_CHANGED] = g_signal_new("selection_changed",
+    webkit_web_view_signals[SELECTION_CHANGED] = g_signal_new("selection-changed",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             0,
@@ -550,7 +550,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      *
      * A JavaScript console message was created.
      */
-    webkit_web_view_signals[CONSOLE_MESSAGE] = g_signal_new("console_message",
+    webkit_web_view_signals[CONSOLE_MESSAGE] = g_signal_new("console-message",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebViewClass, console_message),
@@ -589,7 +589,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      *
      * A JavaScript confirm dialog was created, providing Yes and No buttons.
      */
-    webkit_web_view_signals[SCRIPT_CONFIRM] = g_signal_new("script_confirm",
+    webkit_web_view_signals[SCRIPT_CONFIRM] = g_signal_new("script-confirm",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebViewClass, script_confirm),
@@ -610,7 +610,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      *
      * A JavaScript prompt dialog was created, providing an entry to input text.
      */
-    webkit_web_view_signals[SCRIPT_PROMPT] = g_signal_new("script_prompt",
+    webkit_web_view_signals[SCRIPT_PROMPT] = g_signal_new("script-prompt",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebViewClass, script_prompt),
@@ -629,7 +629,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      *
      * The default bindings for this signal is Ctrl-a.
      */
-    webkit_web_view_signals[SELECT_ALL] = g_signal_new("select_all",
+    webkit_web_view_signals[SELECT_ALL] = g_signal_new("select-all",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebViewClass, select_all),
@@ -646,7 +646,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      *
      * The default bindings for this signal are Ctrl-x and Shift-Delete.
      */
-    webkit_web_view_signals[CUT_CLIPBOARD] = g_signal_new("cut_clipboard",
+    webkit_web_view_signals[CUT_CLIPBOARD] = g_signal_new("cut-clipboard",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebViewClass, cut_clipboard),
@@ -663,7 +663,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      *
      * The default bindings for this signal are Ctrl-c and Ctrl-Insert.
      */
-    webkit_web_view_signals[COPY_CLIPBOARD] = g_signal_new("copy_clipboard",
+    webkit_web_view_signals[COPY_CLIPBOARD] = g_signal_new("copy-clipboard",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebViewClass, copy_clipboard),
@@ -680,7 +680,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      *
      * The default bindings for this signal are Ctrl-v and Shift-Insert.
      */
-    webkit_web_view_signals[PASTE_CLIPBOARD] = g_signal_new("paste_clipboard",
+    webkit_web_view_signals[PASTE_CLIPBOARD] = g_signal_new("paste-clipboard",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebViewClass, paste_clipboard),
@@ -726,7 +726,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
      * make us scrollable (e.g. addable to a GtkScrolledWindow)
      */
     webViewClass->set_scroll_adjustments = webkit_web_view_set_scroll_adjustments;
-    GTK_WIDGET_CLASS(webViewClass)->set_scroll_adjustments_signal = g_signal_new("set_scroll_adjustments",
+    GTK_WIDGET_CLASS(webViewClass)->set_scroll_adjustments_signal = g_signal_new("set-scroll-adjustments",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebViewClass, set_scroll_adjustments),