[libdazzle] widgets: add entry getter for filechooserentry
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] widgets: add entry getter for filechooserentry
- Date: Wed, 21 Nov 2018 03:12:38 +0000 (UTC)
commit cf6d443e18e34b0339ae1b0bc5baf15bca983835
Author: Christian Hergert <chergert redhat com>
Date: Tue Nov 20 19:12:30 2018 -0800
widgets: add entry getter for filechooserentry
src/widgets/dzl-file-chooser-entry.c | 20 ++++++++++++++++++++
src/widgets/dzl-file-chooser-entry.h | 12 +++++++-----
2 files changed, 27 insertions(+), 5 deletions(-)
---
diff --git a/src/widgets/dzl-file-chooser-entry.c b/src/widgets/dzl-file-chooser-entry.c
index eddc94f..17c2704 100644
--- a/src/widgets/dzl-file-chooser-entry.c
+++ b/src/widgets/dzl-file-chooser-entry.c
@@ -572,3 +572,23 @@ dzl_file_chooser_entry_new (const gchar *title,
"action", action,
NULL);
}
+
+/**
+ * dzl_file_chooser_entry_get_entry:
+ * @self: a #DzlFileChooserEntry
+ *
+ * Gets the entry used by the #GtkEntry.
+ *
+ * Returns: (transfer none): a #GtkEntry
+ *
+ * Since: 3.32
+ */
+GtkEntry *
+dzl_file_chooser_entry_get_entry (DzlFileChooserEntry *self)
+{
+ DzlFileChooserEntryPrivate *priv = dzl_file_chooser_entry_get_instance_private (self);
+
+ g_return_val_if_fail (DZL_IS_FILE_CHOOSER_ENTRY (self), NULL);
+
+ return priv->entry;
+}
diff --git a/src/widgets/dzl-file-chooser-entry.h b/src/widgets/dzl-file-chooser-entry.h
index d08dcd0..b6c6816 100644
--- a/src/widgets/dzl-file-chooser-entry.h
+++ b/src/widgets/dzl-file-chooser-entry.h
@@ -41,13 +41,15 @@ struct _DzlFileChooserEntryClass
};
DZL_AVAILABLE_IN_3_30
-GtkWidget *dzl_file_chooser_entry_new (const gchar *title,
- GtkFileChooserAction action);
+GtkWidget *dzl_file_chooser_entry_new (const gchar *title,
+ GtkFileChooserAction action);
DZL_AVAILABLE_IN_ALL
-GFile *dzl_file_chooser_entry_get_file (DzlFileChooserEntry *self);
+GFile *dzl_file_chooser_entry_get_file (DzlFileChooserEntry *self);
DZL_AVAILABLE_IN_ALL
-void dzl_file_chooser_entry_set_file (DzlFileChooserEntry *self,
- GFile *file);
+void dzl_file_chooser_entry_set_file (DzlFileChooserEntry *self,
+ GFile *file);
+DZL_AVAILABLE_IN_3_32
+GtkEntry *dzl_file_chooser_entry_get_entry (DzlFileChooserEntry *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]