bug 1343802 remove unused moz_gtk_enable_style_props r?jhorak
MozReview-Commit-ID: KbAIRCyqmJ8
--- a/widget/gtk/gtk2drawing.c
+++ b/widget/gtk/gtk2drawing.c
@@ -61,36 +61,28 @@ static GtkWidget* gTreeHeaderCellWidget;
static GtkWidget* gTreeHeaderSortArrowWidget;
static GtkWidget* gExpanderWidget;
static GtkWidget* gToolbarSeparatorWidget;
static GtkWidget* gMenuSeparatorWidget;
static GtkWidget* gHPanedWidget;
static GtkWidget* gVPanedWidget;
static GtkWidget* gScrolledWindowWidget;
-static style_prop_t style_prop_func;
static gboolean have_arrow_scaling;
static gboolean is_initialized;
/* Because we have such an unconventional way of drawing widgets, signal to the GTK theme engine
that they are drawing for Mozilla instead of a conventional GTK app so they can do any specific
things they may want to do. */
static void
moz_gtk_set_widget_name(GtkWidget* widget)
{
gtk_widget_set_name(widget, "MozillaGtkWidget");
}
-gint
-moz_gtk_enable_style_props(style_prop_t styleGetProp)
-{
- style_prop_func = styleGetProp;
- return MOZ_GTK_SUCCESS;
-}
-
static gint
ensure_window_widget()
{
if (!gProtoWindow) {
gProtoWindow = gtk_window_new(GTK_WINDOW_POPUP);
gtk_widget_realize(gProtoWindow);
moz_gtk_set_widget_name(gProtoWindow);
}
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -13,17 +13,16 @@
#include <string.h>
#include "gtkdrawing.h"
#include "mozilla/Assertions.h"
#include "prinrval.h"
#include "WidgetStyleCache.h"
#include <math.h>
-static style_prop_t style_prop_func;
static gboolean have_arrow_scaling;
static gboolean checkbox_check_state;
static gboolean notebook_has_tab_gap;
static gboolean is_initialized;
#define ARROW_UP 0
#define ARROW_DOWN G_PI
#define ARROW_RIGHT G_PI_2
@@ -73,23 +72,16 @@ GetStateFlagsFromGtkWidgetState(GtkWidge
static GtkStateFlags
GetStateFlagsFromGtkTabFlags(GtkTabFlags flags)
{
return ((flags & MOZ_GTK_TAB_SELECTED) == 0) ?
GTK_STATE_FLAG_NORMAL : GTK_STATE_FLAG_ACTIVE;
}
gint
-moz_gtk_enable_style_props(style_prop_t styleGetProp)
-{
- style_prop_func = styleGetProp;
- return MOZ_GTK_SUCCESS;
-}
-
-gint
moz_gtk_init()
{
if (is_initialized)
return MOZ_GTK_SUCCESS;
is_initialized = TRUE;
have_arrow_scaling = (gtk_major_version > 2 ||
(gtk_major_version == 2 && gtk_minor_version >= 12));
--- a/widget/gtk/gtkdrawing.h
+++ b/widget/gtk/gtkdrawing.h
@@ -62,19 +62,16 @@ typedef enum {
/* first eight bits are used to pass a margin */
MOZ_GTK_TAB_MARGIN_MASK = 0xFF,
/* the first tab in the group */
MOZ_GTK_TAB_FIRST = 1 << 9,
/* the selected tab */
MOZ_GTK_TAB_SELECTED = 1 << 10
} GtkTabFlags;
-/* function type for moz_gtk_enable_style_props */
-typedef gint (*style_prop_t)(GtkStyle*, const gchar*, gint);
-
/*** result/error codes ***/
#define MOZ_GTK_SUCCESS 0
#define MOZ_GTK_UNKNOWN_WIDGET -1
#define MOZ_GTK_UNSAFE_THEME -2
/*** checkbox/radio flags ***/
#define MOZ_GTK_WIDGET_CHECKED 1
#define MOZ_GTK_WIDGET_INCONSISTENT (1 << 1)
@@ -267,25 +264,16 @@ typedef enum {
* prior to using any other functionality.
* returns: MOZ_GTK_SUCCESS if there were no errors
* MOZ_GTK_UNSAFE_THEME if the current theme engine is known
* to crash with gtkdrawing.
*/
gint moz_gtk_init();
/**
- * Enable GTK+ 1.2.9+ theme enhancements. You must provide a pointer
- * to the GTK+ 1.2.9+ function "gtk_style_get_prop_experimental".
- * styleGetProp: pointer to gtk_style_get_prop_experimental
- *
- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise
- */
-gint moz_gtk_enable_style_props(style_prop_t styleGetProp);
-
-/**
* Perform cleanup of the drawing library. You should call this function
* when your program exits, or you no longer need the library.
*
* returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise
*/
gint moz_gtk_shutdown();
#if (MOZ_WIDGET_GTK == 2)