[goffice] plot_surface: reconnect the ui stuff



commit 38584d06160c4fb8cbeb0c383d35f8601cafb189
Author: Morten Welinder <terra gnome org>
Date:   Sat Dec 3 16:35:17 2011 -0500

    plot_surface: reconnect the ui stuff

 plugins/plot_surface/gog-xyz-prefs.c         |   10 +++-------
 plugins/plot_surface/gog-xyz-surface-prefs.c |   10 ++++------
 2 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/plugins/plot_surface/gog-xyz-prefs.c b/plugins/plot_surface/gog-xyz-prefs.c
index d385c72..d83817b 100644
--- a/plugins/plot_surface/gog-xyz-prefs.c
+++ b/plugins/plot_surface/gog-xyz-prefs.c
@@ -38,16 +38,12 @@ GtkWidget *
 gog_xyz_plot_pref (GogXYZPlot *plot, GOCmdContext *cc)
 {
 	GtkWidget  *w;
-	char const *dir = go_plugin_get_dir_name (
-		go_plugins_get_plugin_by_id ("GOffice_plot_surface"));
-	char	 *path = g_build_filename (dir, "gog-xyz-prefs.ui", NULL);
-	GtkBuilder *gui = go_gtk_builder_new (path, GETTEXT_PACKAGE, cc);
-
-	g_free (path);
+	GtkBuilder *gui =
+		go_gtk_builder_new ("res:go:plot_surface/gog-xyz-prefs.ui",
+				    GETTEXT_PACKAGE, cc);
         if (gui == NULL)
                 return NULL;
 
-
 	w = go_gtk_builder_get_widget (gui, "transpose");
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), plot->transposed);
 	g_signal_connect (G_OBJECT (w),
diff --git a/plugins/plot_surface/gog-xyz-surface-prefs.c b/plugins/plot_surface/gog-xyz-surface-prefs.c
index 220e888..3c8fcb1 100644
--- a/plugins/plot_surface/gog-xyz-surface-prefs.c
+++ b/plugins/plot_surface/gog-xyz-surface-prefs.c
@@ -80,15 +80,13 @@ cb_rows_toggled (GtkToggleButton *btn, XYZSurfPrefsState *state)
 GtkWidget *
 gog_xyz_surface_plot_pref (GogXYZPlot *plot, GogDataAllocator *dalloc, GOCmdContext *cc)
 {
+	GogDataset *set = GOG_DATASET (plot);
 	XYZSurfPrefsState *state;
 	GtkWidget  *w, *box;
-	char const *dir = go_plugin_get_dir_name (
-		go_plugins_get_plugin_by_id ("GOffice_plot_surface"));
-	char	 *path = g_build_filename (dir, "gog-xyz-surface-prefs.ui", NULL);
-	GtkBuilder *gui = go_gtk_builder_new (path, GETTEXT_PACKAGE, cc);
-	GogDataset *set = GOG_DATASET (plot);
+	GtkBuilder *gui =
+		go_gtk_builder_new ("res:go:plot_surface/gog-xyz-surface-prefs.ui",
+				    GETTEXT_PACKAGE, cc);
 
-	g_free (path);
         if (gui == NULL)
                 return NULL;
 



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