bug 1319355 remove unused MOZ_GTK_IMAGEMENUITEM r=stransky+263117
authorKarl Tomlinson <karlt+@karlt.net>
Tue, 22 Nov 2016 09:17:34 +1300
changeset 323948 c403fcd5fbe350962c83aa7ea64a82b9ae3916c3
parent 323947 f6e90537b66f13f644e9fe96022537c1bd89cf84
child 323949 20c0572d2e4685cbd5caf21311a89b2117a1cb65
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersstransky
bugs1319355, 263117
milestone53.0a1
bug 1319355 remove unused MOZ_GTK_IMAGEMENUITEM r=stransky+263117 Unused since e7680c5fead3. MozReview-Commit-ID: DYgeoJDxna9
widget/gtk/WidgetStyleCache.cpp
widget/gtk/gtk2drawing.c
widget/gtk/gtkdrawing.h
widget/gtk/mozgtk/mozgtk.c
--- a/widget/gtk/WidgetStyleCache.cpp
+++ b/widget/gtk/WidgetStyleCache.cpp
@@ -748,19 +748,16 @@ GetWidgetRootStyle(WidgetNodeType aNodeT
 
   switch (aNodeType) {
     case MOZ_GTK_MENUBARITEM:
       style = CreateStyleForWidget(gtk_menu_item_new(), MOZ_GTK_MENUBAR);
       break;
     case MOZ_GTK_MENUITEM:
       style = CreateStyleForWidget(gtk_menu_item_new(), MOZ_GTK_MENUPOPUP);
       break;
-    case MOZ_GTK_IMAGEMENUITEM:
-      style = CreateStyleForWidget(gtk_image_menu_item_new(), MOZ_GTK_MENUPOPUP);
-      break;
     case MOZ_GTK_CHECKMENUITEM:
       style = CreateStyleForWidget(gtk_check_menu_item_new(), MOZ_GTK_MENUPOPUP);
       break;
     case MOZ_GTK_RADIOMENUITEM:
       style = CreateStyleForWidget(gtk_radio_menu_item_new(nullptr),
                                    MOZ_GTK_MENUPOPUP);
       break;
     default:
--- a/widget/gtk/gtk2drawing.c
+++ b/widget/gtk/gtk2drawing.c
@@ -49,17 +49,16 @@ static GtkWidget* gFrameWidget;
 static GtkWidget* gStatusbarWidget;
 static GtkWidget* gProgressWidget;
 static GtkWidget* gTabWidget;
 static GtkWidget* gTooltipWidget;
 static GtkWidget* gMenuBarWidget;
 static GtkWidget* gMenuBarItemWidget;
 static GtkWidget* gMenuPopupWidget;
 static GtkWidget* gMenuItemWidget;
-static GtkWidget* gImageMenuItemWidget;
 static GtkWidget* gCheckMenuItemWidget;
 static GtkWidget* gTreeViewWidget;
 static GtkTreeViewColumn* gMiddleTreeViewColumn;
 static GtkWidget* gTreeHeaderCellWidget;
 static GtkWidget* gTreeHeaderSortArrowWidget;
 static GtkWidget* gExpanderWidget;
 static GtkWidget* gToolbarSeparatorWidget;
 static GtkWidget* gMenuSeparatorWidget;
@@ -587,31 +586,16 @@ ensure_menu_item_widget()
         gtk_widget_realize(gMenuItemWidget);
         g_object_set_data(G_OBJECT(gMenuItemWidget),
                           "transparent-bg-hint", GINT_TO_POINTER(TRUE));
     }
     return MOZ_GTK_SUCCESS;
 }
 
 static gint
-ensure_image_menu_item_widget()
-{
-    if (!gImageMenuItemWidget) {
-        ensure_menu_popup_widget();
-        gImageMenuItemWidget = gtk_image_menu_item_new();
-        gtk_menu_shell_append(GTK_MENU_SHELL(gMenuPopupWidget),
-                              gImageMenuItemWidget);
-        gtk_widget_realize(gImageMenuItemWidget);
-        g_object_set_data(G_OBJECT(gImageMenuItemWidget),
-                          "transparent-bg-hint", GINT_TO_POINTER(TRUE));
-    }
-    return MOZ_GTK_SUCCESS;
-}
-
-static gint
 ensure_menu_separator_widget()
 {
     if (!gMenuSeparatorWidget) {
         ensure_menu_popup_widget();
         gMenuSeparatorWidget = gtk_separator_menu_item_new();
         gtk_menu_shell_append(GTK_MENU_SHELL(gMenuPopupWidget),
                               gMenuSeparatorWidget);
         gtk_widget_realize(gMenuSeparatorWidget);
@@ -3469,17 +3453,16 @@ moz_gtk_shutdown()
     gFrameWidget = NULL;
     gProgressWidget = NULL;
     gTabWidget = NULL;
     gTooltipWidget = NULL;
     gMenuBarWidget = NULL;
     gMenuBarItemWidget = NULL;
     gMenuPopupWidget = NULL;
     gMenuItemWidget = NULL;
-    gImageMenuItemWidget = NULL;
     gCheckMenuItemWidget = NULL;
     gTreeViewWidget = NULL;
     gMiddleTreeViewColumn = NULL;
     gTreeHeaderCellWidget = NULL;
     gTreeHeaderSortArrowWidget = NULL;
     gExpanderWidget = NULL;
     gToolbarSeparatorWidget = NULL;
     gMenuSeparatorWidget = NULL;
--- a/widget/gtk/gtkdrawing.h
+++ b/widget/gtk/gtkdrawing.h
@@ -205,17 +205,16 @@ typedef enum {
   /* Paints the arrow of menuitems that contain submenus */
   MOZ_GTK_MENUARROW,
   /* Paints an arrow in a toolbar button. flags is a GtkArrowType. */
   MOZ_GTK_TOOLBARBUTTON_ARROW,
   /* Paints items of menubar. */
   MOZ_GTK_MENUBARITEM,
   /* Paints items of popup menus. */
   MOZ_GTK_MENUITEM,
-  MOZ_GTK_IMAGEMENUITEM,
   /* Paints a menuitem with check indicator, or the gets the style context for
      a menuitem that contains a checkbox. */
   MOZ_GTK_CHECKMENUITEM,
   /* Gets the style context for a checkbox in a check menuitem. */
   MOZ_GTK_CHECKMENUITEM_INDICATOR,
   MOZ_GTK_RADIOMENUITEM,
   MOZ_GTK_RADIOMENUITEM_INDICATOR,
   MOZ_GTK_MENUSEPARATOR,
--- a/widget/gtk/mozgtk/mozgtk.c
+++ b/widget/gtk/mozgtk/mozgtk.c
@@ -240,17 +240,16 @@ STUB(gtk_icon_source_free)
 STUB(gtk_icon_source_new)
 STUB(gtk_icon_source_set_icon_name)
 STUB(gtk_icon_theme_add_builtin_icon)
 STUB(gtk_icon_theme_get_default)
 STUB(gtk_icon_theme_get_icon_sizes)
 STUB(gtk_icon_theme_lookup_by_gicon)
 STUB(gtk_icon_theme_lookup_icon)
 STUB(gtk_image_get_type)
-STUB(gtk_image_menu_item_new)
 STUB(gtk_image_new)
 STUB(gtk_image_new_from_stock)
 STUB(gtk_image_set_from_pixbuf)
 STUB(gtk_im_context_filter_keypress)
 STUB(gtk_im_context_focus_in)
 STUB(gtk_im_context_focus_out)
 STUB(gtk_im_context_get_preedit_string)
 STUB(gtk_im_context_reset)