[gnome-builder] prefs: add helper to get actual spin button instance



commit de518eb4acb6b9779ab2b2dc5970627b468f0a9b
Author: Christian Hergert <chergert redhat com>
Date:   Thu May 5 17:38:48 2016 +0300

    prefs: add helper to get actual spin button instance

 libide/preferences/ide-preferences-spin-button.c |   13 +++++++++++++
 libide/preferences/ide-preferences-spin-button.h |    2 ++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/libide/preferences/ide-preferences-spin-button.c 
b/libide/preferences/ide-preferences-spin-button.c
index 0f42ed4..f54ab56 100644
--- a/libide/preferences/ide-preferences-spin-button.c
+++ b/libide/preferences/ide-preferences-spin-button.c
@@ -402,3 +402,16 @@ ide_preferences_spin_button_init (IdePreferencesSpinButton *self)
                            self,
                            G_CONNECT_SWAPPED);
 }
+
+/**
+ * ide_preferences_spin_button_get_spin_button:
+ *
+ * Returns: (transfer none): The actual spin button widget.
+ */
+GtkWidget *
+ide_preferences_spin_button_get_spin_button (IdePreferencesSpinButton *self)
+{
+  g_return_val_if_fail (IDE_IS_PREFERENCES_SPIN_BUTTON (self), NULL);
+
+  return GTK_WIDGET (self->spin_button);
+}
diff --git a/libide/preferences/ide-preferences-spin-button.h 
b/libide/preferences/ide-preferences-spin-button.h
index 60a6b18..4629c10 100644
--- a/libide/preferences/ide-preferences-spin-button.h
+++ b/libide/preferences/ide-preferences-spin-button.h
@@ -29,6 +29,8 @@ G_BEGIN_DECLS
 
 G_DECLARE_FINAL_TYPE (IdePreferencesSpinButton, ide_preferences_spin_button, IDE, PREFERENCES_SPIN_BUTTON, 
IdePreferencesBin)
 
+GtkWidget *ide_preferences_spin_button_get_spin_button (IdePreferencesSpinButton *self);
+
 G_END_DECLS
 
 #endif /* IDE_PREFERENCES_SPIN_BUTTON_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]