[gnome-builder/document-manager] GbDocument: add vfunc to create a tab for the document
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/document-manager] GbDocument: add vfunc to create a tab for the document
- Date: Thu, 4 Dec 2014 19:26:50 +0000 (UTC)
commit bfa3fd837e376689e6b7b7a8551577dfb28efb2f
Author: Christian Hergert <christian hergert me>
Date: Thu Dec 4 11:26:14 2014 -0800
GbDocument: add vfunc to create a tab for the document
src/documents/gb-document.c | 8 ++++++++
src/documents/gb-document.h | 4 +++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/documents/gb-document.c b/src/documents/gb-document.c
index a66282e..0528a42 100644
--- a/src/documents/gb-document.c
+++ b/src/documents/gb-document.c
@@ -47,6 +47,14 @@ gb_document_get_title (GbDocument *document)
return GB_DOCUMENT_GET_INTERFACE (document)->get_title (document);
}
+GbTab *
+gb_document_create_tab (GbDocument *document)
+{
+ g_return_val_if_fail (GB_IS_DOCUMENT (document), NULL);
+
+ return GB_DOCUMENT_GET_INTERFACE (document)->create_tab (document);
+}
+
static void
gb_document_default_init (GbDocumentInterface *iface)
{
diff --git a/src/documents/gb-document.h b/src/documents/gb-document.h
index 219ef81..f572dac 100644
--- a/src/documents/gb-document.h
+++ b/src/documents/gb-document.h
@@ -19,7 +19,7 @@
#ifndef GB_DOCUMENT_H
#define GB_DOCUMENT_H
-#include <glib-object.h>
+#include "gb-tab.h"
G_BEGIN_DECLS
@@ -37,11 +37,13 @@ struct _GbDocumentInterface
gboolean (*get_can_save) (GbDocument *document);
const gchar *(*get_title) (GbDocument *document);
+ GbTab *(*create_tab) (GbDocument *document);
};
GType gb_document_get_type (void) G_GNUC_CONST;
gboolean gb_document_get_can_save (GbDocument *document);
const gchar *gb_document_get_title (GbDocument *document);
+GbTab *gb_document_create_tab (GbDocument *document);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]