diff options
author | Steve Block <steveblock@google.com> | 2010-02-02 14:57:50 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-04 15:06:55 +0000 |
commit | d0825bca7fe65beaee391d30da42e937db621564 (patch) | |
tree | 7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebCore/platform/gtk/ContextMenuItemGtk.cpp | |
parent | 3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff) | |
download | external_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2 |
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebCore/platform/gtk/ContextMenuItemGtk.cpp')
-rw-r--r-- | WebCore/platform/gtk/ContextMenuItemGtk.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/WebCore/platform/gtk/ContextMenuItemGtk.cpp b/WebCore/platform/gtk/ContextMenuItemGtk.cpp index aaec206..b2fa853 100644 --- a/WebCore/platform/gtk/ContextMenuItemGtk.cpp +++ b/WebCore/platform/gtk/ContextMenuItemGtk.cpp @@ -59,7 +59,7 @@ static const char* gtkStockIDFromContextMenuAction(const ContextMenuAction& acti case ContextMenuItemTagSelectAll: return GTK_STOCK_SELECT_ALL; case ContextMenuItemTagSpellingGuess: - return GTK_STOCK_INFO; + return NULL; case ContextMenuItemTagIgnoreSpelling: return GTK_STOCK_NO; case ContextMenuItemTagLearnSpelling: @@ -117,6 +117,12 @@ ContextMenuItem::ContextMenuItem(GtkMenuItem* item) m_platformDescription.checked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(item)); } else m_platformDescription.type = ActionType; +#if GTK_CHECK_VERSION (2, 16, 0) + m_platformDescription.title = String::fromUTF8(gtk_menu_item_get_label(GTK_MENU_ITEM(item))); +#else + GtkWidget* label = gtk_bin_get_child(GTK_BIN(item)); + m_platformDescription.title = String::fromUTF8(gtk_label_get_label(GTK_LABEL(label))); +#endif m_platformDescription.action = *static_cast<ContextMenuAction*>(g_object_get_data(G_OBJECT(item), WEBKIT_CONTEXT_MENU_ACTION)); @@ -205,13 +211,12 @@ void ContextMenuItem::setAction(ContextMenuAction action) String ContextMenuItem::title() const { - notImplemented(); - return String(); + return m_platformDescription.title; } -void ContextMenuItem::setTitle(const String&) +void ContextMenuItem::setTitle(const String& title) { - notImplemented(); + m_platformDescription.title = title; } PlatformMenuDescription ContextMenuItem::platformSubMenu() const |