[gnome-builder] glade: add get_file() helper for glade view
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] glade: add get_file() helper for glade view
- Date: Sun, 21 Oct 2018 19:01:54 +0000 (UTC)
commit 4b144881ad8f882f1ef2d7c5f12d2eeacd43c0d6
Author: Christian Hergert <chergert redhat com>
Date: Sun Oct 21 12:01:23 2018 -0700
glade: add get_file() helper for glade view
src/plugins/glade/gbp-glade-view.c | 13 +++++++++++++
src/plugins/glade/gbp-glade-view.h | 1 +
2 files changed, 14 insertions(+)
---
diff --git a/src/plugins/glade/gbp-glade-view.c b/src/plugins/glade/gbp-glade-view.c
index 1eeb541b6..92436a85c 100644
--- a/src/plugins/glade/gbp-glade-view.c
+++ b/src/plugins/glade/gbp-glade-view.c
@@ -204,3 +204,16 @@ gbp_glade_view_load_file_finish (GbpGladeView *self,
return ide_task_propagate_boolean (IDE_TASK (result), error);
}
+
+/**
+ * gbp_glade_view_get_file:
+ *
+ * Returns: (nullable) (transfer none): a #GFile or %NULL
+ */
+GFile *
+gbp_glade_view_get_file (GbpGladeView *self)
+{
+ g_return_val_if_fail (GBP_IS_GLADE_VIEW (self), NULL);
+
+ return self->file;
+}
diff --git a/src/plugins/glade/gbp-glade-view.h b/src/plugins/glade/gbp-glade-view.h
index c82a447ac..c0f8a276f 100644
--- a/src/plugins/glade/gbp-glade-view.h
+++ b/src/plugins/glade/gbp-glade-view.h
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GbpGladeView, gbp_glade_view, GBP, GLADE_VIEW, IdeLayoutView)
GbpGladeView *gbp_glade_view_new (void);
+GFile *gbp_glade_view_get_file (GbpGladeView *self);
void gbp_glade_view_load_file_async (GbpGladeView *self,
GFile *file,
GCancellable *cancellable,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]