diff options
Diffstat (limited to 'tools/glade/glade/gnome-db')
-rw-r--r-- | tools/glade/glade/gnome-db/Makefile.am | 23 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbcombo.c | 136 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbconnectprop.c | 93 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbdsnconfig.c | 147 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbdsndruid.c | 161 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbeditor.c | 188 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedberror.c | 148 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedberrordlg.c | 232 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbform.c | 161 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbgraybar.c | 149 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbgrid.c | 144 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedblogin.c | 148 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedblogindlg.c | 234 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbprovidersel.c | 161 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbsourcesel.c | 161 | ||||
-rw-r--r-- | tools/glade/glade/gnome-db/gnomedbtableeditor.c | 144 |
16 files changed, 2430 insertions, 0 deletions
diff --git a/tools/glade/glade/gnome-db/Makefile.am b/tools/glade/glade/gnome-db/Makefile.am new file mode 100644 index 00000000..e2547f54 --- /dev/null +++ b/tools/glade/glade/gnome-db/Makefile.am @@ -0,0 +1,23 @@ +## Process this file with automake to produce Makefile.in + +noinst_LIBRARIES = libgnomedbwidgets.a + +INCLUDES = $(GLADE_CFLAGS) \ + $(GLADE_DEPRECATION_CFLAGS) + +libgnomedbwidgets_a_SOURCES = \ + gnomedbcombo.c \ + gnomedbconnectprop.c \ + gnomedbdsnconfig.c \ + gnomedbdsndruid.c \ + gnomedbeditor.c \ + gnomedberror.c \ + gnomedberrordlg.c \ + gnomedbform.c \ + gnomedbgraybar.c \ + gnomedbgrid.c \ + gnomedblogin.c \ + gnomedblogindlg.c \ + gnomedbprovidersel.c \ + gnomedbsourcesel.c \ + gnomedbtableeditor.c diff --git a/tools/glade/glade/gnome-db/gnomedbcombo.c b/tools/glade/glade/gnome-db/gnomedbcombo.c new file mode 100644 index 00000000..c06cb38c --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbcombo.c @@ -0,0 +1,136 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <libgnomedb/gnome-db-combo.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-combo.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbCombo, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +static GtkWidget* +gb_gnome_db_combo_new (GbWidgetNewData *data) +{ + return gnome_db_combo_new (); +} + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_combo_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_combo_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_combo_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbCombo, with signals pointing to + * other functions in this file. + */ +static void +gb_gnome_db_combo_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_combo_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_combo_new ();\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_combo_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_combo_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_combo_xpm; + gbwidget.tooltip = _("Data-bound combo"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_combo_new; + gbwidget.gb_widget_create_properties = gb_gnome_db_combo_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_combo_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_combo_set_properties; + gbwidget.gb_widget_write_source = gb_gnome_db_combo_write_source; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_combo_create_popup_menu; + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedbconnectprop.c b/tools/glade/glade/gnome-db/gnomedbconnectprop.c new file mode 100644 index 00000000..4f9bfe0f --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbconnectprop.c @@ -0,0 +1,93 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1998 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <string.h> +#include <libgnomedb/gnome-db-connection-properties.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-connection-properties.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbEditor, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + * If the widget needs a special destroy handler, add a signal here. + */ + +GtkWidget* +gb_gnome_db_connection_properties_new(GbWidgetNewData *data) +{ + return (GtkWidget *) gnome_db_connection_properties_new(NULL); +} + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_connection_properties_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + + if (data->create_widget) + { + source_add (data, " %s = gnome_db_connection_properties_new (NULL);\n", data->wname); + } + + gb_widget_write_standard_source (widget, data); + +} + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget * +gb_gnome_db_connection_properties_init () +{ + /* Initialise the GTK type */ + volatile GType type; + type = gnome_db_connection_properties_get_type (); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct (&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_connection_properties_xpm; + gbwidget.tooltip = _("GnomeDbConnectionProperties"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_connection_properties_new; + gbwidget.gb_widget_write_source = gb_gnome_db_connection_properties_write_source; + + return &gbwidget; +} diff --git a/tools/glade/glade/gnome-db/gnomedbdsnconfig.c b/tools/glade/glade/gnome-db/gnomedbdsnconfig.c new file mode 100644 index 00000000..be57bc6b --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbdsnconfig.c @@ -0,0 +1,147 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 2001 Carlos Perelló Marín <carlos@gnome-db.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <libgnomedb/gnome-db-dsn-config.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-dsnconfig.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbDsnConfig, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +static GtkWidget* +gb_gnome_db_dsnconfig_new (GbWidgetNewData *data) +{ + return gnome_db_dsn_config_new (); +} + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_dsnconfig_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_dsnconfig_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_dsnconfig_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} + + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbBrowser, with signals pointing to + * other functions in this file. + */ +static void +gb_gnome_db_dsnconfig_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_dsnconfig_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_dsn_config_new ();\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_dsnconfig_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_dsn_config_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_dsnconfig_xpm; + gbwidget.tooltip = _("DSN Configurator"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_dsnconfig_new; + gbwidget.gb_widget_write_source = gb_gnome_db_dsnconfig_write_source; + gbwidget.gb_widget_create_properties = gb_gnome_db_dsnconfig_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_dsnconfig_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_dsnconfig_set_properties; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_dsnconfig_create_popup_menu; + + return &gbwidget; +} diff --git a/tools/glade/glade/gnome-db/gnomedbdsndruid.c b/tools/glade/glade/gnome-db/gnomedbdsndruid.c new file mode 100644 index 00000000..e0661cc6 --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbdsndruid.c @@ -0,0 +1,161 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999-2002 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <gtk/gtk.h> +#include <libgnomedb/gnome-db-dsn-config-druid.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-dsn-druid.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbDsnConfigDruid, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +/* +static GtkWidget* +gb_gnome_db_dsn_config_druid_new (GbWidgetNewData *data) +{ + +} +*/ + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +/* +static void +gb_gnome_db_dsn_config_druid_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} +*/ + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +/* +static void +gb_gnome_db_dsn_config_druid_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} +*/ + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +/* +static void +gb_gnome_db_dsn_config_druid_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} +*/ + + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbDsnConfigDruid, with signals pointing to + * other functions in this file. + */ +/* +static void +gb_gnome_db_dsn_config_druid_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} +*/ + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_dsn_config_druid_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_dsn_config_druid_new ();\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_dsn_config_druid_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_dsn_config_druid_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_dsn_druid_xpm; + gbwidget.tooltip = _("DSN Config Druid"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_write_source = gb_gnome_db_dsn_config_druid_write_source; +/* + gbwidget.gb_widget_new = gb_gnome_db_dsn_config_druid_new; + gbwidget.gb_widget_create_properties = gb_gnome_db_dsn_config_druid_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_dsn_config_druid_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_dsn_config_druid_set_properties; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_dsn_config_druid_create_popup_menu; +*/ + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedbeditor.c b/tools/glade/glade/gnome-db/gnomedbeditor.c new file mode 100644 index 00000000..4c90fdf9 --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbeditor.c @@ -0,0 +1,188 @@ + +/* Gtk+ User Interface Builder + * Copyright (C) 1998 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <string.h> +#include <libgnomedb/gnome-db-editor.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-editor.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + +static gchar *Editable = "GnomeDbEditor::editable"; +static gchar *Highlight = "GnomeDbEditor::highlight"; +static gchar *Text = "GnomeDbEditor::text"; + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbEditor, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + * If the widget needs a special destroy handler, add a signal here. + */ + +GtkWidget* +gb_gnome_db_editor_new(GbWidgetNewData *data) +{ + return (GtkWidget *) gnome_db_editor_new(); +} + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_editor_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + property_add_bool (Editable, _("Editable:"), _("If the text can be edited")); + property_add_bool (Highlight, _("Highlight text:"), _("If selected, text will be highlighted inside the widget")); + property_add_string (Text, _("Text:"), _("The text to display")); +} + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_editor_get_properties (GtkWidget * widget, GbWidgetGetArgData * data) +{ + gchar *wtext; + wtext = (gchar *) gnome_db_editor_get_all_text(GNOME_DB_EDITOR(widget)); + gb_widget_output_translatable_string (data, Text, wtext); + gb_widget_output_bool(data, Editable, gnome_db_editor_get_editable(GNOME_DB_EDITOR(widget))); +#ifdef HAVE_GTKSOURCEVIEW + gb_widget_output_bool(data, Highlight, gnome_db_editor_get_highlight(GNOME_DB_EDITOR(widget))); +#else +#endif +} + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_editor_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + gboolean editable, highlight; + gchar *text; + + editable = gb_widget_input_bool (data, Editable); + if (data->apply) + gnome_db_editor_set_editable (GNOME_DB_EDITOR (widget), editable); + +#ifdef HAVE_GTKSOURCEVIEW + highlight = gb_widget_input_bool (data, Highlight); + if (data->apply) + gnome_db_editor_set_highlight (GNOME_DB_EDITOR (widget), highlight); +#else +#endif + + text = gb_widget_input_string (data, Text); + if (data->apply) + gnome_db_editor_set_text (GNOME_DB_EDITOR (widget), text, -1); +} + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_editor_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + const gchar *entry_text = (gchar *)gnome_db_editor_get_all_text (GNOME_DB_EDITOR (widget)); + gboolean translatable, context; + gchar *comments; + + if (data->create_widget) + { + source_add (data, " %s = gnome_db_editor_new ();\n", data->wname); + } + + if (entry_text != NULL) + { + glade_util_get_translation_properties (widget, Text, &translatable, + &comments, &context); + source_add_translator_comments (data, translatable, comments); + + source_add (data, + " gnome_db_editor_set_text (GNOME_DB_EDITOR (%s), %s, -1);\n", + data->wname, + source_make_string_full (entry_text, + data->use_gettext && translatable, + context)); + } + + if (!gnome_db_editor_get_editable (GNOME_DB_EDITOR(widget))) + { + source_add (data, " gnome_db_editor_set_editable (GNOME_DB_EDITOR (%s), FALSE);\n", + data->wname); + } + if (!gnome_db_editor_get_highlight (GNOME_DB_EDITOR(widget))) + { + source_add (data, " gnome_db_editor_set_highlight (GNOME_DB_EDITOR (%s), FALSE);\n", + data->wname); + } + gb_widget_write_standard_source (widget, data); + +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget * +gb_gnome_db_editor_init () +{ + /* Initialise the GTK type */ + volatile GType type; + type = gnome_db_editor_get_type (); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct (&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_editor_xpm; + gbwidget.tooltip = _("GnomeDbEditor"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_create_properties = gb_gnome_db_editor_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_editor_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_editor_set_properties; + gbwidget.gb_widget_new = gb_gnome_db_editor_new; + gbwidget.gb_widget_write_source = gb_gnome_db_editor_write_source; + + return &gbwidget; +} diff --git a/tools/glade/glade/gnome-db/gnomedberror.c b/tools/glade/glade/gnome-db/gnomedberror.c new file mode 100644 index 00000000..52816f20 --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedberror.c @@ -0,0 +1,148 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <libgnomedb/gnome-db-error.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-error.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbError, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +static GtkWidget* +gb_gnome_db_error_new (GbWidgetNewData *data) +{ + return gnome_db_error_new (); +} + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_error_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_error_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_error_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} + + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbError, with signals pointing to + * other functions in this file. + */ +static void +gb_gnome_db_error_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_error_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_error_new ();\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_error_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_error_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_error_xpm; + gbwidget.tooltip = _("Database error viewer"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_error_new; + gbwidget.gb_widget_write_source = gb_gnome_db_error_write_source; + gbwidget.gb_widget_create_properties = gb_gnome_db_error_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_error_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_error_set_properties; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_error_create_popup_menu; + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedberrordlg.c b/tools/glade/glade/gnome-db/gnomedberrordlg.c new file mode 100644 index 00000000..696be87d --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedberrordlg.c @@ -0,0 +1,232 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <gtk/gtkmain.h> +#include <libgnomedb/gnome-db-error-dialog.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-error-dlg.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + +static gchar *Title = "GnomeDbErrorDlg|GtkWindow::title"; +static gchar *Type = "GnomeDbErrorDlg|GtkWindow::type"; +static gchar *Position = "GnomeDbErrorDlg|GtkWindow::window_position"; +static gchar *Modal = "GnomeDbErrorDlg|GtkWindow::modal"; +static gchar *DefaultWidth = "GnomeDbErrorDlg|GtkWindow::default_width"; +static gchar *DefaultHeight = "GnomeDbErrorDlg|GtkWindow::default_height"; +static gchar *Shrink = "GnomeDbErrorDlg|GtkWindow::allow_shrink"; +static gchar *Grow = "GnomeDbErrorDlg|GtkWindow::allow_grow"; +static gchar *AutoShrink = "GnomeDbErrorDlg|GtkWindow::auto_shrink"; +static gchar *IconName = "GnomeDbErrorDlg|GtkWindow::icon_name"; +static gchar *FocusOnMap = "GnomeDbErrorDlg|GtkWindow::focus_on_map"; + +static gchar *Resizable = "GnomeDbErrorDlg|GtkWindow::resizable"; +static gchar *DestroyWithParent = "GnomeDbErrorDlg|GtkWindow::destroy_with_parent"; +static gchar *Icon = "GnomeDbErrorDlg|GtkWindow::icon"; + +static gchar *Role = "GnomeDbErrorDlg|GtkWindow::role"; +static gchar *TypeHint = "GnomeDbErrorDlg|GtkWindow::type_hint"; +static gchar *SkipTaskbar = "GnomeDbErrorDlg|GtkWindow::skip_taskbar_hint"; +static gchar *SkipPager = "GnomeDbErrorDlg|GtkWindow::skip_pager_hint"; +static gchar *Decorated = "GnomeDbErrorDlg|GtkWindow::decorated"; +static gchar *Gravity = "GnomeDbErrorDlg|GtkWindow::gravity"; +static gchar *Urgency = "GnomeDbErrorDlg|GtkWindow::urgency_hint"; + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbErrorDlg, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +static GtkWidget* +gb_gnome_db_errordlg_new (GbWidgetNewData *data) +{ + GtkWidget *widget; + GList *elem; + + widget = gnome_db_error_dialog_new (_("Error")); + + /* We connect a close signal handler which always returns TRUE so that + the built-in close functionality is skipped. */ + gtk_signal_connect (GTK_OBJECT (widget), "close", + GTK_SIGNAL_FUNC (gtk_true), NULL); + + /* Now we connect our normal delete_event handler. */ + gtk_signal_connect (GTK_OBJECT (widget), "delete_event", + GTK_SIGNAL_FUNC (editor_close_window), NULL); + + gtk_object_set_data (GTK_OBJECT (widget), TypeHint, + GINT_TO_POINTER (GLADE_TYPE_HINT_DIALOG_INDEX)); + + return widget; +} + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_errordlg_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + gb_window_create_standard_properties (widget, data, + Title, Type, Position, Modal, + DefaultWidth, DefaultHeight, + Shrink, Grow, AutoShrink, + IconName, FocusOnMap, + Resizable, DestroyWithParent, Icon, + Role, TypeHint, SkipTaskbar, + SkipPager, Decorated, Gravity, Urgency); +} + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_errordlg_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + gb_window_get_standard_properties (widget, data, + Title, Type, Position, Modal, + DefaultWidth, DefaultHeight, + Shrink, Grow, AutoShrink, + IconName, FocusOnMap, + Resizable, DestroyWithParent, Icon, + Role, TypeHint, SkipTaskbar, + SkipPager, Decorated, Gravity, Urgency); +} + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_errordlg_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + gb_window_set_standard_properties (widget, data, + Title, Type, Position, Modal, + DefaultWidth, DefaultHeight, + Shrink, Grow, AutoShrink, + IconName, FocusOnMap, + Resizable, DestroyWithParent, Icon, + Role, TypeHint, SkipTaskbar, + SkipPager, Decorated, Gravity, Urgency); +} + + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbErrorDlg, with signals pointing to + * other functions in this file. + */ +static void +gb_gnome_db_errordlg_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_errordlg_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + gchar *title; + gboolean translatable, context; + gchar *comments; + + glade_util_get_translation_properties (widget, Title, &translatable, + &comments, &context); + source_add_translator_comments (data, translatable, comments); + + title = GTK_WINDOW (widget)->title; + source_add (data, " %s = gnome_db_error_dialog_new (%s);\n", + data->wname, + title ? source_make_string_full (title, data->use_gettext && translatable, context) : "NULL"); + } + + gb_widget_write_standard_source (widget, data); + + /* The title is already set above, so we pass NULL to skip it. */ + gb_window_write_standard_source (widget, data, + NULL, Type, Position, Modal, + DefaultWidth, DefaultHeight, + Shrink, Grow, AutoShrink, + IconName, FocusOnMap, + Resizable, DestroyWithParent, Icon, + Role, TypeHint, SkipTaskbar, + SkipPager, Decorated, Gravity, Urgency); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_errordlg_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_error_dialog_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_error_dlg_xpm; + gbwidget.tooltip = _("Database error dialog"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_errordlg_new; + gbwidget.gb_widget_create_properties = gb_gnome_db_errordlg_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_errordlg_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_errordlg_set_properties; + gbwidget.gb_widget_write_source = gb_gnome_db_errordlg_write_source; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_errordlg_create_popup_menu; + gbwidget.gb_widget_destroy = gb_window_destroy; + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedbform.c b/tools/glade/glade/gnome-db/gnomedbform.c new file mode 100644 index 00000000..08ea9b5d --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbform.c @@ -0,0 +1,161 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999-2002 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <gtk/gtk.h> +#include <libgnomedb/gnome-db-form.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-form.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbForm, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +/* +static GtkWidget* +gb_gnome_db_form_new (GbWidgetNewData *data) +{ + +} +*/ + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +/* +static void +gb_gnome_db_form_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} +*/ + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +/* +static void +gb_gnome_db_form_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} +*/ + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +/* +static void +gb_gnome_db_form_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} +*/ + + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbForm, with signals pointing to + * other functions in this file. + */ +/* +static void +gb_gnome_db_form_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} +*/ + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_form_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_form_new ();\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_form_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_form_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_form_xpm; + gbwidget.tooltip = _("Form"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_write_source = gb_gnome_db_form_write_source; +/* + gbwidget.gb_widget_new = gb_gnome_db_form_new; + gbwidget.gb_widget_create_properties = gb_gnome_db_form_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_form_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_form_set_properties; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_form_create_popup_menu; +*/ + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedbgraybar.c b/tools/glade/glade/gnome-db/gnomedbgraybar.c new file mode 100644 index 00000000..4e32a988 --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbgraybar.c @@ -0,0 +1,149 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <libgnomedb/gnome-db-gray-bar.h> +#include <gtk/gtkentry.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-graybar.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + +static gchar *Text = "GnomeDbGrayBar::text"; +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbGrayBar, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +static GtkWidget* +gb_gnome_db_gray_bar_new (GbWidgetNewData *data) +{ + return gnome_db_gray_bar_new (""); +} + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_gray_bar_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + property_add_string (Text, _("Text:"), _("Text inside the gray bar")); +} + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_gray_bar_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + gchar *wtext; + wtext = (gchar *)gnome_db_gray_bar_get_text (GNOME_DB_GRAY_BAR(widget)); + gb_widget_output_translatable_string (data, Text, wtext); +} + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_gray_bar_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + const gchar *text; + + text = gb_widget_input_string (data, Text); + if (data->apply) + gnome_db_gray_bar_set_text (GNOME_DB_GRAY_BAR (widget), text); +} + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_gray_bar_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + const gchar *text; + gboolean translatable, context; + gchar *comments; + + if (data->create_widget) + { + text = gnome_db_gray_bar_get_text(GNOME_DB_GRAY_BAR (widget)); + + glade_util_get_translation_properties (widget, Text, &translatable, + &comments, &context); + source_add_translator_comments (data, translatable, comments); + + source_add (data, " %s = gnome_db_gray_bar_new (%s);\n", + data->wname, + source_make_string_full (text, + data->use_gettext && translatable, + context)); + } + gb_widget_write_standard_source (widget, data); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_gray_bar_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_gray_bar_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_graybar_xpm; + gbwidget.tooltip = _("Gray Bar"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_gray_bar_new; + gbwidget.gb_widget_write_source = gb_gnome_db_gray_bar_write_source; + gbwidget.gb_widget_create_properties = gb_gnome_db_gray_bar_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_gray_bar_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_gray_bar_set_properties; + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedbgrid.c b/tools/glade/glade/gnome-db/gnomedbgrid.c new file mode 100644 index 00000000..d899a3a8 --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbgrid.c @@ -0,0 +1,144 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <libgnomedb/gnome-db-grid.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-grid.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbGrid, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +static GtkWidget* +gb_gnome_db_grid_new (GbWidgetNewData *data) +{ + return gnome_db_grid_new (); +} + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_grid_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_grid_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_grid_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbGrid, with signals pointing to + * other functions in this file. + */ +static void +gb_gnome_db_grid_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_grid_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_grid_new ();\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_grid_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_grid_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_grid_xpm; + gbwidget.tooltip = _("Data-bound grid"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_grid_new; + gbwidget.gb_widget_write_source = gb_gnome_db_grid_write_source; + gbwidget.gb_widget_create_properties = gb_gnome_db_grid_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_grid_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_grid_set_properties; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_grid_create_popup_menu; + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedblogin.c b/tools/glade/glade/gnome-db/gnomedblogin.c new file mode 100644 index 00000000..b50720b4 --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedblogin.c @@ -0,0 +1,148 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <libgnomedb/gnome-db-login.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-login.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbLogin, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +static GtkWidget* +gb_gnome_db_login_new (GbWidgetNewData *data) +{ + return gnome_db_login_new (NULL); +} + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_login_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_login_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_login_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} + + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbLogin, with signals pointing to + * other functions in this file. + */ +static void +gb_gnome_db_login_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_login_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_login_new (NULL);\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_login_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_login_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_login_xpm; + gbwidget.tooltip = _("Database login widget"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_login_new; + gbwidget.gb_widget_write_source = gb_gnome_db_login_write_source; + gbwidget.gb_widget_create_properties = gb_gnome_db_login_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_login_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_login_set_properties; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_login_create_popup_menu; + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedblogindlg.c b/tools/glade/glade/gnome-db/gnomedblogindlg.c new file mode 100644 index 00000000..a4239814 --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedblogindlg.c @@ -0,0 +1,234 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <gtk/gtkmain.h> +#include <libgnomedb/gnome-db-login.h> +#include <libgnomedb/gnome-db-login-dialog.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-login-dlg.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + +static gchar *Title = "GnomeDbLoginDlg|GtkWindow::title"; +static gchar *Type = "GnomeDbLoginDlg|GtkWindow::type"; +static gchar *Position = "GnomeDbLoginDlg|GtkWindow::window_position"; +static gchar *Modal = "GnomeDbLoginDlg|GtkWindow::modal"; +static gchar *DefaultWidth = "GnomeDbLoginDlg|GtkWindow::default_width"; +static gchar *DefaultHeight = "GnomeDbLoginDlg|GtkWindow::default_height"; +static gchar *Shrink = "GnomeDbLoginDlg|GtkWindow::allow_shrink"; +static gchar *Grow = "GnomeDbLoginDlg|GtkWindow::allow_grow"; +static gchar *AutoShrink = "GnomeDbLoginDlg|GtkWindow::auto_shrink"; +static gchar *IconName = "GnomeDbLoginDlg|GtkWindow::icon_name"; +static gchar *FocusOnMap = "GnomeDbLoginDlg|GtkWindow::focus_on_map"; + +static gchar *Resizable = "GnomeDbLoginDlg|GtkWindow::resizable"; +static gchar *DestroyWithParent = "GnomeDbLoginDlg|GtkWindow::destroy_with_parent"; +static gchar *Icon = "GnomeDbLoginDlg|GtkWindow::icon"; + +static gchar *Role = "GnomeDbLoginDlg|GtkWindow::role"; +static gchar *TypeHint = "GnomeDbLoginDlg|GtkWindow::type_hint"; +static gchar *SkipTaskbar = "GnomeDbLoginDlg|GtkWindow::skip_taskbar_hint"; +static gchar *SkipPager = "GnomeDbLoginDlg|GtkWindow::skip_pager_hint"; +static gchar *Decorated = "GnomeDbLoginDlg|GtkWindow::decorated"; +static gchar *Gravity = "GnomeDbLoginDlg|GtkWindow::gravity"; +static gchar *Urgency = "GnomeDbLoginDlg|GtkWindow::urgency_hint"; + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbLoginDlg, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +static GtkWidget* +gb_gnome_db_logindlg_new (GbWidgetNewData *data) +{ + GtkWidget *widget, *login; + GList *elem; + + login = gnome_db_login_new (NULL); + + widget = gnome_db_login_dialog_new (_("Login")); + + /* We connect a close signal handler which always returns TRUE so that + the built-in close functionality is skipped. */ + gtk_signal_connect (GTK_OBJECT (widget), "close", + GTK_SIGNAL_FUNC (gtk_true), NULL); + + /* Now we connect our normal delete_event handler. */ + gtk_signal_connect (GTK_OBJECT (widget), "delete_event", + GTK_SIGNAL_FUNC (editor_close_window), NULL); + + gtk_object_set_data (GTK_OBJECT (widget), TypeHint, + GINT_TO_POINTER (GLADE_TYPE_HINT_DIALOG_INDEX)); + + return widget; +} + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_logindlg_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + gb_window_create_standard_properties (widget, data, + Title, Type, Position, Modal, + DefaultWidth, DefaultHeight, + Shrink, Grow, AutoShrink, + IconName, FocusOnMap, + Resizable, DestroyWithParent, Icon, + Role, TypeHint, SkipTaskbar, + SkipPager, Decorated, Gravity, Urgency); +} + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_logindlg_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + gb_window_get_standard_properties (widget, data, + Title, Type, Position, Modal, + DefaultWidth, DefaultHeight, + Shrink, Grow, AutoShrink, + IconName, FocusOnMap, + Resizable, DestroyWithParent, Icon, + Role, TypeHint, SkipTaskbar, + SkipPager, Decorated, Gravity, Urgency); +} + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_logindlg_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + gb_window_set_standard_properties (widget, data, + Title, Type, Position, Modal, + DefaultWidth, DefaultHeight, + Shrink, Grow, AutoShrink, + IconName, FocusOnMap, + Resizable, DestroyWithParent, Icon, + Role, TypeHint, SkipTaskbar, + SkipPager, Decorated, Gravity, Urgency); +} + + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbLoginDlg, with signals pointing to + * other functions in this file. + */ +static void +gb_gnome_db_logindlg_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_logindlg_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + gchar *title; + gboolean translatable, context; + gchar *comments; + + glade_util_get_translation_properties (widget, Title, &translatable, + &comments, &context); + source_add_translator_comments (data, translatable, comments); + + title = GTK_WINDOW (widget)->title; + source_add (data, " %s = gnome_db_login_dialog_new (%s);\n", + data->wname, + title ? source_make_string_full (title, data->use_gettext && translatable, context) : "NULL"); + } + + gb_widget_write_standard_source (widget, data); + + /* The title is already set above, so we pass NULL to skip it. */ + gb_window_write_standard_source (widget, data, + NULL, Type, Position, Modal, + DefaultWidth, DefaultHeight, + Shrink, Grow, AutoShrink, + IconName, FocusOnMap, + Resizable, DestroyWithParent, Icon, + Role, TypeHint, SkipTaskbar, + SkipPager, Decorated, Gravity, Urgency); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_logindlg_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_login_dialog_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_login_dlg_xpm; + gbwidget.tooltip = _("Database login dialog"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_logindlg_new; + gbwidget.gb_widget_create_properties = gb_gnome_db_logindlg_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_logindlg_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_logindlg_set_properties; + gbwidget.gb_widget_write_source = gb_gnome_db_logindlg_write_source; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_logindlg_create_popup_menu; + gbwidget.gb_widget_destroy = gb_window_destroy; + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedbprovidersel.c b/tools/glade/glade/gnome-db/gnomedbprovidersel.c new file mode 100644 index 00000000..69dd669b --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbprovidersel.c @@ -0,0 +1,161 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999-2002 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <gtk/gtk.h> +#include <libgnomedb/gnome-db-provider-selector.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-provider-sel.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbProviderSelector, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +/* +static GtkWidget* +gb_gnome_db_provider_selector_new (GbWidgetNewData *data) +{ + +} +*/ + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +/* +static void +gb_gnome_db_provider_selector_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} +*/ + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +/* +static void +gb_gnome_db_provider_selector_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} +*/ + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +/* +static void +gb_gnome_db_provider_selector_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} +*/ + + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbProviderSelector, with signals pointing to + * other functions in this file. + */ +/* +static void +gb_gnome_db_provider_selector_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} +*/ + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_provider_selector_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_provider_selector_new ();\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_provider_selector_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_provider_selector_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_provider_sel_xpm; + gbwidget.tooltip = _("Provider Selector"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_write_source = gb_gnome_db_provider_selector_write_source; +/* + gbwidget.gb_widget_new = gb_gnome_db_provider_selector_new; + gbwidget.gb_widget_create_properties = gb_gnome_db_provider_selector_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_provider_selector_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_provider_selector_set_properties; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_provider_selector_create_popup_menu; +*/ + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedbsourcesel.c b/tools/glade/glade/gnome-db/gnomedbsourcesel.c new file mode 100644 index 00000000..3398e499 --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbsourcesel.c @@ -0,0 +1,161 @@ +/* Gtk+ User Interface Builder + * Copyright (C) 1999-2002 Damon Chaplin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <config.h> + +#include <gtk/gtk.h> +#include <libgnomedb/gnome-db-data-source-selector.h> +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +#include "../graphics/gnome-db-sourcesel.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + + + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbDataSourceSelector, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ +/* +static GtkWidget* +gb_gnome_db_data_source_selector_new (GbWidgetNewData *data) +{ + +} +*/ + + + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +/* +static void +gb_gnome_db_data_source_selector_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} +*/ + + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +/* +static void +gb_gnome_db_data_source_selector_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} +*/ + + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +/* +static void +gb_gnome_db_data_source_selector_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} +*/ + + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbDataSourceSelector, with signals pointing to + * other functions in this file. + */ +/* +static void +gb_gnome_db_data_source_selector_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} +*/ + + + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_data_source_selector_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_data_source_selector_new (NULL);\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_data_source_selector_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_data_source_selector_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct = gnome_db_sourcesel_xpm; + gbwidget.tooltip = _("Data Source Selector"); + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_write_source = gb_gnome_db_data_source_selector_write_source; +/* + gbwidget.gb_widget_new = gb_gnome_db_data_source_selector_new; + gbwidget.gb_widget_create_properties = gb_gnome_db_data_source_selector_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_data_source_selector_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_data_source_selector_set_properties; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_data_source_selector_create_popup_menu; +*/ + + return &gbwidget; +} + diff --git a/tools/glade/glade/gnome-db/gnomedbtableeditor.c b/tools/glade/glade/gnome-db/gnomedbtableeditor.c new file mode 100644 index 00000000..e7b7cf8f --- /dev/null +++ b/tools/glade/glade/gnome-db/gnomedbtableeditor.c @@ -0,0 +1,144 @@ +/* GNOME DB library + * Copyright (C), 1999-2001 The Free Software Foundation + * + * AUTHORS: + * Rodrigo Moya <rodrigo@gnome-db.org> + * + * This Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This Library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * Revision 0.1 + */ +#include <config.h> + +#include <libgnomedb/gnome-db-table-editor.h> + +#include "../gb.h" + +/* Include the 21x21 icon pixmap for this widget, to be used in the palette */ +/* This has to be changed to the correct pixmap! */ +#include "../graphics/gnome-db-table-editor.xpm" + +/* + * This is the GbWidget struct for this widget (see ../gbwidget.h). + * It is initialized in the init() function at the end of this file + */ +static GbWidget gbwidget; + +/****** + * NOTE: To use these functions you need to uncomment them AND add a pointer + * to the function in the GbWidget struct at the end of this file. + ******/ + +/* + * Creates a new GtkWidget of class GnomeDbTableEditor, performing any specialized + * initialization needed for the widget to work correctly in this environment. + * If a dialog box is used to initialize the widget, return NULL from this + * function, and call data->callback with your new widget when it is done. + */ + +static GtkWidget* +gb_gnome_db_table_editor_new (GbWidgetNewData *data) +{ + return gnome_db_table_editor_new (); +} + +/* + * Creates the components needed to edit the extra properties of this widget. + */ +static void +gb_gnome_db_table_editor_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data) +{ + +} + + +/* + * Gets the properties of the widget. This is used for both displaying the + * properties in the property editor, and also for saving the properties. + */ +static void +gb_gnome_db_table_editor_get_properties (GtkWidget *widget, GbWidgetGetArgData * data) +{ + +} + + +/* + * Sets the properties of the widget. This is used for both applying the + * properties changed in the property editor, and also for loading. + */ +static void +gb_gnome_db_table_editor_set_properties (GtkWidget * widget, GbWidgetSetArgData * data) +{ + +} + + +/* + * Adds menu items to a context menu which is just about to appear! + * Add commands to aid in editing a GnomeDbGrid, with signals pointing to + * other functions in this file. + */ +static void +gb_gnome_db_table_editor_create_popup_menu (GtkWidget * widget, GbWidgetCreateMenuData * data) +{ + +} + +/* + * Writes the source code needed to create this widget. + * You have to output everything necessary to create the widget here, though + * there are some convenience functions to help. + */ +static void +gb_gnome_db_table_editor_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data) +{ + if (data->create_widget) + { + source_add (data, " %s = gnome_db_table_editor_new ();\n", data->wname); + } + gb_widget_write_standard_source (widget, data); +} + + +/* + * Initializes the GbWidget structure. + * I've placed this at the end of the file so we don't have to include + * declarations of all the functions. + */ +GbWidget* +gb_gnome_db_table_editor_init () +{ + /* Initialise the GTK type */ + volatile GtkType type; + type = gnome_db_table_editor_get_type(); + + /* Initialize the GbWidget structure */ + gb_widget_init_struct(&gbwidget); + + /* Fill in the pixmap struct & tooltip */ + gbwidget.pixmap_struct =gnome_db_table_editor_xpm; + gbwidget.tooltip = _("Table Editor "); /* Please FIXME*/ + + /* Fill in any functions that this GbWidget has */ + gbwidget.gb_widget_new = gb_gnome_db_table_editor_new; + gbwidget.gb_widget_write_source = gb_gnome_db_table_editor_write_source; + gbwidget.gb_widget_create_properties = gb_gnome_db_table_editor_create_properties; + gbwidget.gb_widget_get_properties = gb_gnome_db_table_editor_get_properties; + gbwidget.gb_widget_set_properties = gb_gnome_db_table_editor_set_properties; + gbwidget.gb_widget_create_popup_menu = gb_gnome_db_table_editor_create_popup_menu; + + return &gbwidget; +} |