Title: [95800] trunk/Source/WebCore
- Revision
- 95800
- Author
- [email protected]
- Date
- 2011-09-23 07:14:01 -0700 (Fri, 23 Sep 2011)
Log Message
[Gtk] Title attribute is not respected on option elements.
https://bugs.webkit.org/show_bug.cgi?id=68615
Patch by Deepak Sherveghar <[email protected]> on 2011-09-23
Reviewed by Martin Robinson.
Set tooltip on PopupMenuGtk items created from GtkActions.
* platform/gtk/GtkPopupMenu.cpp:
(WebCore::GtkPopupMenu::appendItem): Added a call to gtk_widget_set_tooltip_text()
to set the tooltip on menuitem. Tooltip text is retrieved from GtkAction.
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::createGtkActionForMenuItem): Pass the tooltip text
from client when creating a GtkAction.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (95799 => 95800)
--- trunk/Source/WebCore/ChangeLog 2011-09-23 14:03:46 UTC (rev 95799)
+++ trunk/Source/WebCore/ChangeLog 2011-09-23 14:14:01 UTC (rev 95800)
@@ -1,3 +1,19 @@
+2011-09-23 Deepak Sherveghar <[email protected]>
+
+ [Gtk] Title attribute is not respected on option elements.
+ https://bugs.webkit.org/show_bug.cgi?id=68615
+
+ Reviewed by Martin Robinson.
+
+ Set tooltip on PopupMenuGtk items created from GtkActions.
+
+ * platform/gtk/GtkPopupMenu.cpp:
+ (WebCore::GtkPopupMenu::appendItem): Added a call to gtk_widget_set_tooltip_text()
+ to set the tooltip on menuitem. Tooltip text is retrieved from GtkAction.
+ * platform/gtk/PopupMenuGtk.cpp:
+ (WebCore::PopupMenuGtk::createGtkActionForMenuItem): Pass the tooltip text
+ from client when creating a GtkAction.
+
2011-09-23 Yael Aharon <[email protected]>
[Qt][Gtk] Wrong state when pausing a video in the "playing" event handler
Modified: trunk/Source/WebCore/platform/gtk/GtkPopupMenu.cpp (95799 => 95800)
--- trunk/Source/WebCore/platform/gtk/GtkPopupMenu.cpp 2011-09-23 14:03:46 UTC (rev 95799)
+++ trunk/Source/WebCore/platform/gtk/GtkPopupMenu.cpp 2011-09-23 14:14:01 UTC (rev 95800)
@@ -65,6 +65,7 @@
void GtkPopupMenu::appendItem(GtkAction* action)
{
GtkWidget* menuItem = gtk_action_create_menu_item(action);
+ gtk_widget_set_tooltip_text(menuItem, gtk_action_get_tooltip(action));
g_signal_connect(menuItem, "select", G_CALLBACK(GtkPopupMenu::selectItemCallback), this);
gtk_menu_shell_append(GTK_MENU_SHELL(m_popup.get()), menuItem);
gtk_widget_show(menuItem);
Modified: trunk/Source/WebCore/platform/gtk/PopupMenuGtk.cpp (95799 => 95800)
--- trunk/Source/WebCore/platform/gtk/PopupMenuGtk.cpp 2011-09-23 14:03:46 UTC (rev 95799)
+++ trunk/Source/WebCore/platform/gtk/PopupMenuGtk.cpp 2011-09-23 14:14:01 UTC (rev 95800)
@@ -54,7 +54,7 @@
GtkAction* PopupMenuGtk::createGtkActionForMenuItem(int itemIndex)
{
GOwnPtr<char> actionName(g_strdup_printf("popup-menu-action-%d", itemIndex));
- GtkAction* action = "" client()->itemText(itemIndex).utf8().data(), 0, 0);
+ GtkAction* action = "" client()->itemText(itemIndex).utf8().data(), client()->itemToolTip(itemIndex).utf8().data(), 0);
g_object_set_data(G_OBJECT(action), "popup-menu-action-index", GINT_TO_POINTER(itemIndex));
g_signal_connect(action, "activate", G_CALLBACK(menuItemActivated), this);
// FIXME: Apply the PopupMenuStyle from client()->itemStyle(i)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes