[libgda/LIBGDA_4.2] GdaBrowser: added ui_formgrid_get_ui_manager()



commit 0ef6972543518ca903c2a0e8f31b821af71a1f8e
Author: Vivien Malerba <malerba gnome-db org>
Date:   Wed Jul 27 21:05:32 2011 +0200

    GdaBrowser: added ui_formgrid_get_ui_manager()

 tools/browser/common/ui-formgrid.c |   16 ++++++++++++++++
 tools/browser/common/ui-formgrid.h |    1 +
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/tools/browser/common/ui-formgrid.c b/tools/browser/common/ui-formgrid.c
index 28bd99a..561e72c 100644
--- a/tools/browser/common/ui-formgrid.c
+++ b/tools/browser/common/ui-formgrid.c
@@ -333,6 +333,7 @@ ui_formgrid_init (UiFormGrid *formgrid)
 	gtk_ui_manager_ensure_update (uimanager);
 	gtk_box_pack_start (GTK_BOX (hbox), formgrid->priv->info, TRUE, TRUE, 0);
 	gtk_widget_show (formgrid->priv->info);
+	g_object_unref (G_OBJECT (uimanager));
 
 
 	/*gchar *tmp;
@@ -348,6 +349,21 @@ ui_formgrid_init (UiFormGrid *formgrid)
 			  G_CALLBACK (selection_changed_cb), formgrid);
 }
 
+/**
+ * ui_formgrid_get_ui_manager:
+ *
+ * Returns: (transfer none): the #GtkUIManager
+ */
+GtkUIManager *
+ui_formgrid_get_ui_manager (UiFormGrid *formgrid)
+{
+	GtkUIManager *uimanager;
+	g_return_val_if_fail (UI_IS_FORMGRID (formgrid), NULL);
+	g_object_get (G_OBJECT (formgrid->priv->info), "ui-manager", &uimanager, NULL);
+	g_object_unref (uimanager);
+	return uimanager;
+}
+
 static void
 selection_changed_cb (GdauiDataSelector *sel, UiFormGrid *formgrid)
 {
diff --git a/tools/browser/common/ui-formgrid.h b/tools/browser/common/ui-formgrid.h
index 7cf8a9e..180f3b8 100644
--- a/tools/browser/common/ui-formgrid.h
+++ b/tools/browser/common/ui-formgrid.h
@@ -70,6 +70,7 @@ void              ui_formgrid_set_sample_size     (UiFormGrid *formgrid, gint sa
 GdauiRawGrid     *ui_formgrid_get_grid_widget     (UiFormGrid *formgrid);
 
 void              ui_formgrid_set_connection      (UiFormGrid *formgrid, BrowserConnection *bcnc);
+GtkUIManager     *ui_formgrid_get_ui_manager      (UiFormGrid *formgrid);
 
 G_END_DECLS
 



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