Title: [183919] trunk/Source/WebKit2
Revision
183919
Author
[email protected]
Date
2015-05-07 01:02:24 -0700 (Thu, 07 May 2015)

Log Message

[GTK] Remove dock button from Web Inspector window
https://bugs.webkit.org/show_bug.cgi?id=144728

Reviewed by Sergio Villar Senin.

We added the dock buttons to the headerbar, because they were
removed from the inspector toolbar, but with the new tabbed
design, the dock buttons are back in the toolbar and look redundant.

* UIProcess/WebInspectorProxy.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
(WebKit::WebInspectorProxy::dockButtonClicked): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (183918 => 183919)


--- trunk/Source/WebKit2/ChangeLog	2015-05-07 07:09:06 UTC (rev 183918)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-07 08:02:24 UTC (rev 183919)
@@ -1,3 +1,20 @@
+2015-05-07  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Remove dock button from Web Inspector window
+        https://bugs.webkit.org/show_bug.cgi?id=144728
+
+        Reviewed by Sergio Villar Senin.
+
+        We added the dock buttons to the headerbar, because they were
+        removed from the inspector toolbar, but with the new tabbed
+        design, the dock buttons are back in the toolbar and look redundant.
+
+        * UIProcess/WebInspectorProxy.h:
+        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+        (WebKit::WebInspectorProxy::createInspectorWindow):
+        (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
+        (WebKit::WebInspectorProxy::dockButtonClicked): Deleted.
+
 2015-05-06  Jer Noble  <[email protected]>
 
         [WK2][Fullscreen] Elements whose children extend beyond their bounds are clipped in fullscreen mode.

Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h (183918 => 183919)


--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h	2015-05-07 07:09:06 UTC (rev 183918)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h	2015-05-07 08:02:24 UTC (rev 183919)
@@ -216,7 +216,6 @@
 
 #if PLATFORM(GTK)
     void updateInspectorWindowTitle() const;
-    static void dockButtonClicked(GtkWidget*, WebInspectorProxy*);
 #endif
 
     static const unsigned minimumWindowWidth;
@@ -252,8 +251,6 @@
     GtkWidget* m_inspectorView {nullptr};
     GtkWidget* m_inspectorWindow {nullptr};
     GtkWidget* m_headerBar {nullptr};
-    GtkWidget* m_dockBottomButton {nullptr};
-    GtkWidget* m_dockRightButton {nullptr};
     String m_inspectedURLString;
 #elif PLATFORM(EFL)
     Evas_Object* m_inspectorView {nullptr};

Modified: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp (183918 => 183919)


--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp	2015-05-07 07:09:06 UTC (rev 183918)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp	2015-05-07 08:02:24 UTC (rev 183919)
@@ -78,16 +78,6 @@
     return webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(m_inspectorView));
 }
 
-void WebInspectorProxy::dockButtonClicked(GtkWidget* button, WebInspectorProxy* inspector)
-{
-    if (button == inspector->m_dockBottomButton)
-        inspector->attach(AttachmentSide::Bottom);
-    else if (button == inspector->m_dockRightButton)
-        inspector->attach(AttachmentSide::Right);
-    else
-        ASSERT_NOT_REACHED();
-}
-
 void WebInspectorProxy::createInspectorWindow()
 {
     if (m_client.openWindow(this))
@@ -103,25 +93,6 @@
 #if GTK_CHECK_VERSION(3, 10, 0)
     m_headerBar = gtk_header_bar_new();
     gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(m_headerBar), TRUE);
-
-    m_dockBottomButton = gtk_button_new();
-    g_object_add_weak_pointer(G_OBJECT(m_dockBottomButton), reinterpret_cast<void**>(&m_dockBottomButton));
-    g_signal_connect(m_dockBottomButton, "clicked", G_CALLBACK(dockButtonClicked), this);
-    gtk_widget_set_sensitive(m_dockBottomButton, canAttach());
-    gtk_button_set_relief(GTK_BUTTON(m_dockBottomButton), GTK_RELIEF_NONE);
-    gtk_button_set_image(GTK_BUTTON(m_dockBottomButton), gtk_image_new_from_resource("/org/webkitgtk/inspector/UserInterface/Images/DockBottom.svg"));
-    gtk_header_bar_pack_start(GTK_HEADER_BAR(m_headerBar), m_dockBottomButton);
-    gtk_widget_show(m_dockBottomButton);
-
-    m_dockRightButton = gtk_button_new();
-    g_object_add_weak_pointer(G_OBJECT(m_dockRightButton), reinterpret_cast<void**>(&m_dockRightButton));
-    g_signal_connect(m_dockRightButton, "clicked", G_CALLBACK(dockButtonClicked), this);
-    gtk_widget_set_sensitive(m_dockRightButton, canAttach());
-    gtk_button_set_relief(GTK_BUTTON(m_dockRightButton), GTK_RELIEF_NONE);
-    gtk_button_set_image(GTK_BUTTON(m_dockRightButton), gtk_image_new_from_resource("/org/webkitgtk/inspector/UserInterface/Images/DockRight.svg"));
-    gtk_header_bar_pack_start(GTK_HEADER_BAR(m_headerBar), m_dockRightButton);
-    gtk_widget_show(m_dockRightButton);
-
     gtk_window_set_titlebar(GTK_WINDOW(m_inspectorWindow), m_headerBar);
     gtk_widget_show(m_headerBar);
 #endif
@@ -323,10 +294,6 @@
 void WebInspectorProxy::platformAttachAvailabilityChanged(bool available)
 {
     m_client.didChangeAttachAvailability(this, available);
-    if (m_dockBottomButton && m_dockRightButton) {
-        gtk_widget_set_sensitive(m_dockBottomButton, available);
-        gtk_widget_set_sensitive(m_dockRightButton, available);
-    }
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to