Changeset 207870 in webkit


Ignore:
Timestamp:
Oct 26, 2016, 12:45:14 AM (9 years ago)
Author:
Carlos Garcia Campos
Message:

REGRESSION(r206505) [GTK] Build broken with GTK+ 3.14
https://bugs.webkit.org/show_bug.cgi?id=162776

Reviewed by Xabier Rodriguez-Calvar.

Do not use gtk_widget_get_action_group() when GTK+ < 3.16, use g_object_set instead to attach the action group
to the menu widget.

  • UIProcess/gtk/WebContextMenuProxyGtk.cpp:

(WebKit::WebContextMenuProxyGtk::append):
(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
(WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r207857 r207870  
     12016-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        REGRESSION(r206505) [GTK] Build broken with GTK+ 3.14
     4        https://bugs.webkit.org/show_bug.cgi?id=162776
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        Do not use gtk_widget_get_action_group() when GTK+ < 3.16, use g_object_set instead to attach the action group
     9        to the menu widget.
     10
     11        * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
     12        (WebKit::WebContextMenuProxyGtk::append):
     13        (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
     14        (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
     15
    1162016-10-25  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.cpp

    r207558 r207870  
    6767    GAction* action = menuItem.gAction();
    6868    ASSERT(action);
     69#if GTK_CHECK_VERSION(3, 16, 0)
    6970    g_action_map_add_action(G_ACTION_MAP(gtk_widget_get_action_group(GTK_WIDGET(m_menu), gContextMenuItemGroup)), action);
     71#else
     72    g_action_map_add_action(G_ACTION_MAP(g_object_get_data(G_OBJECT(m_menu), gContextMenuItemGroup)), action);
     73#endif
    7074
    7175    switch (menuItem.type()) {
     
    180184    GRefPtr<GSimpleActionGroup> group = adoptGRef(g_simple_action_group_new());
    181185    gtk_widget_insert_action_group(GTK_WIDGET(m_menu), gContextMenuItemGroup, G_ACTION_GROUP(group.get()));
     186#if !GTK_CHECK_VERSION(3, 16, 0)
     187    g_object_set_data(G_OBJECT(m_menu), gContextMenuItemGroup, group.get());
     188#endif
    182189    webkitWebViewBaseSetActiveContextMenuProxy(WEBKIT_WEB_VIEW_BASE(m_webView), this);
    183190}
     
    191198    m_signalHandlers.clear();
    192199
    193     gtk_widget_insert_action_group(GTK_WIDGET(m_menu), "webkitContextMenu", nullptr);
     200    gtk_widget_insert_action_group(GTK_WIDGET(m_menu), gContextMenuItemGroup, nullptr);
     201#if !GTK_CHECK_VERSION(3, 16, 0)
     202    g_object_set_data(G_OBJECT(m_menu), gContextMenuItemGroup, nullptr);
     203#endif
    194204    gtk_widget_destroy(GTK_WIDGET(m_menu));
    195205}
Note: See TracChangeset for help on using the changeset viewer.