[gnome-builder/document-manager] GbEditorView: add getter for GbEditorFrame 1 and 2
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/document-manager] GbEditorView: add getter for GbEditorFrame 1 and 2
- Date: Wed, 10 Dec 2014 09:42:05 +0000 (UTC)
commit 15eb876c06a3a6be44790474c7dea8c37b6eeece
Author: Christian Hergert <christian hergert me>
Date: Wed Dec 10 00:25:03 2014 -0800
GbEditorView: add getter for GbEditorFrame 1 and 2
src/editor/gb-editor-view.c | 22 ++++++++++++++++++++++
src/editor/gb-editor-view.h | 7 +++++--
2 files changed, 27 insertions(+), 2 deletions(-)
---
diff --git a/src/editor/gb-editor-view.c b/src/editor/gb-editor-view.c
index 026f8af..fcdfbea 100644
--- a/src/editor/gb-editor-view.c
+++ b/src/editor/gb-editor-view.c
@@ -114,6 +114,28 @@ gb_editor_view_create_preview (GbDocumentView *view)
return document;
}
+GbEditorFrame *
+gb_editor_view_get_frame1 (GbEditorView *view)
+{
+ g_return_val_if_fail (GB_IS_EDITOR_VIEW (view), NULL);
+
+ return view->priv->frame;
+}
+
+GbEditorFrame *
+gb_editor_view_get_frame2 (GbEditorView *view)
+{
+ GtkWidget *child2;
+
+ g_return_val_if_fail (GB_IS_EDITOR_VIEW (view), NULL);
+
+ child2 = gtk_paned_get_child2 (view->priv->paned);
+ if (GB_IS_EDITOR_FRAME (child2))
+ return GB_EDITOR_FRAME (child2);
+
+ return NULL;
+}
+
static void
gb_editor_view_connect (GbEditorView *view,
GbEditorDocument *document)
diff --git a/src/editor/gb-editor-view.h b/src/editor/gb-editor-view.h
index 928f566..402d72a 100644
--- a/src/editor/gb-editor-view.h
+++ b/src/editor/gb-editor-view.h
@@ -23,6 +23,7 @@
#include "gb-document-view.h"
#include "gb-editor-document.h"
+#include "gb-editor-frame.h"
G_BEGIN_DECLS
@@ -51,8 +52,10 @@ struct _GbEditorViewClass
GbDocumentViewClass parent;
};
-GType gb_editor_view_get_type (void);
-GtkWidget *gb_editor_view_new (GbEditorDocument *document);
+GType gb_editor_view_get_type (void);
+GtkWidget *gb_editor_view_new (GbEditorDocument *document);
+GbEditorFrame *gb_editor_view_get_frame1 (GbEditorView *view);
+GbEditorFrame *gb_editor_view_get_frame2 (GbEditorView *view);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]