[gtk] shortcuts window: Make not subclassable
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] shortcuts window: Make not subclassable
- Date: Sun, 19 May 2019 19:09:00 +0000 (UTC)
commit be40ecbfe60dcc0ad5430afe7dbcd97d55728383
Author: Matthias Clasen <mclasen redhat com>
Date: Sun May 19 19:03:49 2019 +0000
shortcuts window: Make not subclassable
Part of being more explicit about what
we allow to be subclassed and what not.
gtk/gtkshortcutsgroup.h | 3 ---
gtk/gtkshortcutssection.h | 3 ---
gtk/gtkshortcutsshortcut.h | 3 ---
gtk/gtkshortcutswindow.c | 8 ++++++++
gtk/gtkshortcutswindow.h | 11 -----------
5 files changed, 8 insertions(+), 20 deletions(-)
---
diff --git a/gtk/gtkshortcutsgroup.h b/gtk/gtkshortcutsgroup.h
index 492b9ffc78..5342634533 100644
--- a/gtk/gtkshortcutsgroup.h
+++ b/gtk/gtkshortcutsgroup.h
@@ -29,10 +29,7 @@ G_BEGIN_DECLS
#define GTK_TYPE_SHORTCUTS_GROUP (gtk_shortcuts_group_get_type ())
#define GTK_SHORTCUTS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SHORTCUTS_GROUP,
GtkShortcutsGroup))
-#define GTK_SHORTCUTS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHORTCUTS_GROUP,
GtkShortcutsGroupClass))
#define GTK_IS_SHORTCUTS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SHORTCUTS_GROUP))
-#define GTK_IS_SHORTCUTS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHORTCUTS_GROUP))
-#define GTK_SHORTCUTS_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHORTCUTS_GROUP,
GtkShortcutsGroupClass))
typedef struct _GtkShortcutsGroup GtkShortcutsGroup;
diff --git a/gtk/gtkshortcutssection.h b/gtk/gtkshortcutssection.h
index 420a0de6f3..3f20123435 100644
--- a/gtk/gtkshortcutssection.h
+++ b/gtk/gtkshortcutssection.h
@@ -29,10 +29,7 @@ G_BEGIN_DECLS
#define GTK_TYPE_SHORTCUTS_SECTION (gtk_shortcuts_section_get_type ())
#define GTK_SHORTCUTS_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GTK_TYPE_SHORTCUTS_SECTION, GtkShortcutsSection))
-#define GTK_SHORTCUTS_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHORTCUTS_SECTION,
GtkShortcutsSectionClass))
#define GTK_IS_SHORTCUTS_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GTK_TYPE_SHORTCUTS_SECTION))
-#define GTK_IS_SHORTCUTS_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHORTCUTS_SECTION))
-#define GTK_SHORTCUTS_SECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHORTCUTS_SECTION,
GtkShortcutsSectionClass))
typedef struct _GtkShortcutsSection GtkShortcutsSection;
diff --git a/gtk/gtkshortcutsshortcut.h b/gtk/gtkshortcutsshortcut.h
index dd9e7aaf37..071a00caa4 100644
--- a/gtk/gtkshortcutsshortcut.h
+++ b/gtk/gtkshortcutsshortcut.h
@@ -29,10 +29,7 @@ G_BEGIN_DECLS
#define GTK_TYPE_SHORTCUTS_SHORTCUT (gtk_shortcuts_shortcut_get_type())
#define GTK_SHORTCUTS_SHORTCUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GTK_TYPE_SHORTCUTS_SHORTCUT, GtkShortcutsShortcut))
-#define GTK_SHORTCUTS_SHORTCUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GTK_TYPE_SHORTCUTS_SHORTCUT, GtkShortcutsShortcutClass))
#define GTK_IS_SHORTCUTS_SHORTCUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GTK_TYPE_SHORTCUTS_SHORTCUT))
-#define GTK_IS_SHORTCUTS_SHORTCUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GTK_TYPE_SHORTCUTS_SHORTCUT))
-#define GTK_SHORTCUTS_SHORTCUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GTK_TYPE_SHORTCUTS_SHORTCUT, GtkShortcutsShortcutClass))
typedef struct _GtkShortcutsShortcut GtkShortcutsShortcut;
diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c
index db8f359a98..bea8e84122 100644
--- a/gtk/gtkshortcutswindow.c
+++ b/gtk/gtkshortcutswindow.c
@@ -91,6 +91,14 @@
* The .ui file for this example can be found
[here](https://gitlab.gnome.org/GNOME/gtk/tree/master/demos/gtk-demo/shortcuts-builder.ui).
*/
+struct _GtkShortcutsWindowClass
+{
+ GtkWindowClass parent_class;
+
+ void (*close) (GtkShortcutsWindow *self);
+ void (*search) (GtkShortcutsWindow *self);
+};
+
typedef struct
{
GHashTable *keywords;
diff --git a/gtk/gtkshortcutswindow.h b/gtk/gtkshortcutswindow.h
index ec30006da1..09249d122d 100644
--- a/gtk/gtkshortcutswindow.h
+++ b/gtk/gtkshortcutswindow.h
@@ -29,10 +29,7 @@ G_BEGIN_DECLS
#define GTK_TYPE_SHORTCUTS_WINDOW (gtk_shortcuts_window_get_type ())
#define GTK_SHORTCUTS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SHORTCUTS_WINDOW,
GtkShortcutsWindow))
-#define GTK_SHORTCUTS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHORTCUTS_WINDOW,
GtkShortcutsWindowClass))
#define GTK_IS_SHORTCUTS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SHORTCUTS_WINDOW))
-#define GTK_IS_SHORTCUTS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHORTCUTS_WINDOW))
-#define GTK_SHORTCUTS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHORTCUTS_WINDOW,
GtkShortcutsWindowClass))
typedef struct _GtkShortcutsWindow GtkShortcutsWindow;
@@ -44,14 +41,6 @@ struct _GtkShortcutsWindow
GtkWindow window;
};
-struct _GtkShortcutsWindowClass
-{
- GtkWindowClass parent_class;
-
- void (*close) (GtkShortcutsWindow *self);
- void (*search) (GtkShortcutsWindow *self);
-};
-
GDK_AVAILABLE_IN_ALL
GType gtk_shortcuts_window_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]