[gtk+] gtk/gtktoolshell.c: Use G_DEFINE_INTERFACE macro



commit 523ea1c65614bed598a4d8e52e2981e7fe098f09
Author: Javier Jardón <jjardon gnome org>
Date:   Wed Aug 25 21:59:15 2010 +0200

    gtk/gtktoolshell.c: Use G_DEFINE_INTERFACE macro

 gtk/gtktoolshell.c |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtktoolshell.c b/gtk/gtktoolshell.c
index 5a73c08..ead74d4 100644
--- a/gtk/gtktoolshell.c
+++ b/gtk/gtktoolshell.c
@@ -43,22 +43,17 @@
  * Dummy structure for accessing instances of #GtkToolShellIface.
  */
 
-GType
-gtk_tool_shell_get_type (void)
-{
-  static GType type = 0;
 
-  if (!type)
-    {
-      type = g_type_register_static_simple (G_TYPE_INTERFACE, I_("GtkToolShell"),
-                                            sizeof (GtkToolShellIface),
-                                            NULL, 0, NULL, 0);
-      g_type_interface_add_prerequisite (type, GTK_TYPE_WIDGET);
-    }
+typedef GtkToolShellIface GtkToolShellInterface;
+G_DEFINE_INTERFACE (GtkToolShell, gtk_tool_shell, GTK_TYPE_WIDGET);
+
 
-  return type;
+static void
+gtk_tool_shell_default_init (GtkToolShellInterface *iface)
+{
 }
 
+
 /**
  * gtk_tool_shell_get_icon_size:
  * @shell: a #GtkToolShell



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