[gtk+] Move deprectated menu enumerations to a private header



commit af8539bf11fd4e7084d304a6f33a46431f025741
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 28 21:24:11 2010 -0400

    Move deprectated menu enumerations to a private header
    
    The GtkSubmenuDirection and GtkSubmenuPlacement enumerations
    have been deprecated as public API for a while, but are still used
    internally in the menu code. Move them to a private header. This
    also prevents to generation of GObject boilerplate for these enums.

 gtk/Makefile.am      |    1 +
 gtk/gtkenums.h       |   16 ----------------
 gtk/gtkmenu.c        |    2 +-
 gtk/gtkmenubar.c     |    3 +--
 gtk/gtkmenuitem.c    |    3 +--
 gtk/gtkmenuprivate.h |   44 ++++++++++++++++++++++++++++++++++++++++++++
 gtk/gtkmenushell.c   |    3 +--
 7 files changed, 49 insertions(+), 23 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 8fdc747..b2a03f3 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -372,6 +372,7 @@ gtk_private_h_sources =		\
 	gtkiconcache.h		\
 	gtkintl.h		\
 	gtkkeyhash.h		\
+	gtkmenuprivate.h	\
 	gtkmnemonichash.h	\
 	gtkmountoperationprivate.h \
 	gtkpango.h		\
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index f2c931e..adadce1 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -371,22 +371,6 @@ typedef enum
   GTK_STATE_INSENSITIVE
 } GtkStateType;
 
-#if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_MENU_INTERNALS)
-/* Directions for submenus */
-typedef enum
-{
-  GTK_DIRECTION_LEFT,
-  GTK_DIRECTION_RIGHT
-} GtkSubmenuDirection;
-
-/* Placement of submenus */
-typedef enum
-{
-  GTK_TOP_BOTTOM,
-  GTK_LEFT_RIGHT
-} GtkSubmenuPlacement;
-#endif /* GTK_DISABLE_DEPRECATED */
-
 /* Style for toolbars */
 typedef enum
 {
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index e258f01..17716f2 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -24,7 +24,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#define GTK_MENU_INTERNALS
 #include "config.h"
 #include <string.h>
 #include "gdk/gdkkeysyms.h"
@@ -36,6 +35,7 @@
 #include "gtkmain.h"
 #include "gtkmarshalers.h"
 #include "gtkmenu.h"
+#include "gtkmenuprivate.h"
 #include "gtktearoffmenuitem.h"
 #include "gtkwindow.h"
 #include "gtkhbox.h"
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index 91338d4..b597c1c 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -24,8 +24,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
-#define GTK_MENU_INTERNALS
-
 #include "config.h"
 #include "gdk/gdkkeysyms.h"
 #include "gtkbindings.h"
@@ -33,6 +31,7 @@
 #include "gtkmarshalers.h"
 #include "gtkmenubar.h"
 #include "gtkmenuitem.h"
+#include "gtkmenuprivate.h"
 #include "gtksettings.h"
 #include "gtkintl.h"
 #include "gtkwindow.h"
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index aa631f8..0203083 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -24,8 +24,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#define GTK_MENU_INTERNALS
-
 #include "config.h"
 #include <string.h>
 
@@ -34,6 +32,7 @@
 #include "gtkmarshalers.h"
 #include "gtkmenu.h"
 #include "gtkmenubar.h"
+#include "gtkmenuprivate.h"
 #include "gtkseparatormenuitem.h"
 #include "gtkprivate.h"
 #include "gtkbuildable.h"
diff --git a/gtk/gtkmenuprivate.h b/gtk/gtkmenuprivate.h
new file mode 100644
index 0000000..9c1e0b3
--- /dev/null
+++ b/gtk/gtkmenuprivate.h
@@ -0,0 +1,44 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
+ * file for a list of people on the GTK+ Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
+#ifndef __GTK_MENU_PRIVATE_H__
+#define __GTK_MENU_PRIVATE_H__
+
+/* Directions for submenus */
+typedef enum
+{
+  GTK_DIRECTION_LEFT,
+  GTK_DIRECTION_RIGHT
+} GtkSubmenuDirection;
+
+/* Placement of submenus */
+typedef enum
+{
+  GTK_TOP_BOTTOM,
+  GTK_LEFT_RIGHT
+} GtkSubmenuPlacement;
+
+
+#endif /* __GTK_MENU_PRIVATE_H__ */
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 31f5f99..763a6db 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -24,8 +24,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
-#define GTK_MENU_INTERNALS
-
 #include "config.h"
 #include "gdk/gdkkeysyms.h"
 #include "gtkbindings.h"
@@ -37,6 +35,7 @@
 #include "gtkmenubar.h"
 #include "gtkmenuitem.h"
 #include "gtkmenushell.h"
+#include "gtkmenuprivate.h"
 #include "gtkmnemonichash.h"
 #include "gtktearoffmenuitem.h"
 #include "gtkwindow.h"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]