goffice r2087 - trunk/plugins/plot_surface
- From: jbrefort svn gnome org
- To: svn-commits-list gnome org
- Subject: goffice r2087 - trunk/plugins/plot_surface
- Date: Mon, 12 May 2008 14:52:27 +0100 (BST)
Author: jbrefort
Date: Mon May 12 13:52:27 2008
New Revision: 2087
URL: http://svn.gnome.org/viewvc/goffice?rev=2087&view=rev
Log:
add missing code.
Modified:
trunk/plugins/plot_surface/gog-xyz-prefs.c
trunk/plugins/plot_surface/gog-xyz-prefs.glade
Modified: trunk/plugins/plot_surface/gog-xyz-prefs.c
==============================================================================
--- trunk/plugins/plot_surface/gog-xyz-prefs.c (original)
+++ trunk/plugins/plot_surface/gog-xyz-prefs.c Mon May 12 13:52:27 2008
@@ -0,0 +1,64 @@
+/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * gog-xyz-prefs.c
+ *
+ * Copyright (C) 2004-2008 Jean Brefort (jean brefort normalesup org)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include <goffice/goffice-config.h>
+#include "gog-xyz.h"
+#include <goffice/gtk/goffice-gtk.h>
+#include <goffice/app/go-plugin.h>
+
+#include <gtk/gtktogglebutton.h>
+
+#include <string.h>
+
+GtkWidget *gog_xyz_plot_pref (GogXYZPlot *plot, GOCmdContext *cc);
+
+static void
+cb_transpose (GtkToggleButton *btn, GObject *plot)
+{
+ g_object_set (plot, "transposed", gtk_toggle_button_get_active (btn), NULL);
+}
+
+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.glade", NULL);
+ GladeXML *gui = go_libglade_new (path, "gog_xyz_prefs", GETTEXT_PACKAGE, cc);
+
+ g_free (path);
+ if (gui == NULL)
+ return NULL;
+
+
+ w = glade_xml_get_widget (gui, "transpose");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), plot->transposed);
+ g_signal_connect (G_OBJECT (w),
+ "toggled",
+ G_CALLBACK (cb_transpose), plot);
+
+ w = glade_xml_get_widget (gui, "gog_xyz_prefs");
+ g_object_set_data_full (G_OBJECT (w),
+ "state", gui, (GDestroyNotify)g_object_unref);
+
+ return w;
+}
Modified: trunk/plugins/plot_surface/gog-xyz-prefs.glade
==============================================================================
--- trunk/plugins/plot_surface/gog-xyz-prefs.glade (original)
+++ trunk/plugins/plot_surface/gog-xyz-prefs.glade Mon May 12 13:52:27 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
+<glade-interface>
+ <widget class="GtkWindow" id="window1">
+ <property name="title" translatable="yes">window1</property>
+ <child>
+ <widget class="GtkTable" id="gog_xyz_prefs">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">1</property>
+ <property name="column_spacing">5</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <widget class="GtkCheckButton" id="transpose">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Transpose</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</glade-interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]