Files
evolution/widgets/table/e-table-config.h
Chris Toshok 82a04fbcb4 pass NULL for parent_window for e_table_config_new.
2002-12-18  Chris Toshok  <toshok@ximian.com>

	* e-table-header-item.c (ethi_popup_customize_view): pass NULL for
	parent_window for e_table_config_new.

	* e-table-config.glade, e-table-config-no-group.glade: switch from
	GnomePropertyBox to GtkDialog, remove the extra notebook widget
	from the heirarchy, and set all the subdialogs modal.

	* e-table-config.h: add parent_window arg to
	e_table_config_{new,construct}.

	* e-table-config.c (config_dialog_changed): new function, not
	really needed yet since the apply/ok buttons are never
	insensitive.
	(config_get_property): handle the "state" read-only property.
	(config_class_init): put back in the "state" property that was
	deleted during the merge from the gal-2 branch (it looks like).
	(do_sort_and_group_config_dialog): set the sort/group dialog
	transient for the e-table-config dialog, and
	gnome_property_box_changed -> config_dialog_changed.
	(do_fields_config_dialog): same, but with the fields dialog.
	(dialog_response): response handler for the e-table-config dialog.
	(setup_gui): remote the hide button/notebook code, since neither
	of those widgets exist anymore in this dialog, and remove the
	"apply" signal and connect to "response", since we're a GtkDialog
	dialog instead of a GnomePropertyBox.
	(e_table_config_construct): take a parent_window arg, and
	set_transient_for if it's non-NULL.
	(e_table_config_new): take parent_window arg and pass to
	construct.

svn path=/trunk/; revision=19165
2002-12-19 02:24:24 +00:00

116 lines
3.4 KiB
C

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* e-table-config.h
* Copyright 2000, 2001, Ximian, Inc.
*
* Authors:
* Chris Lahey <clahey@ximian.com>
* Miguel de Icaza <miguel@ximian.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License, version 2, as published by the Free Software Foundation.
*
* 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; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef _E_TABLE_CONFIG_H_
#define _E_TABLE_CONFIG_H_
#include <gal/e-table/e-table-sort-info.h>
#include <gal/e-table/e-table-specification.h>
#include <gal/widgets/gtk-combo-text.h>
#include <gal/e-table/e-table-without.h>
#include <gal/e-table/e-table-subset-variable.h>
#include <gal/e-table/e-table.h>
#include <gtk/gtkwindow.h>
G_BEGIN_DECLS
#define E_TABLE_CONFIG_TYPE (e_table_config_get_type ())
#define E_TABLE_CONFIG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TABLE_CONFIG_TYPE, ETableConfig))
#define E_TABLE_CONFIG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TABLE_CONFIG_TYPE, ETableConfigClass))
#define E_IS_TABLE_CONFIG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TABLE_CONFIG_TYPE))
#define E_IS_TABLE_CONFIG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_CONFIG_TYPE))
#define E_TABLE_CONFIG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TABLE_CONFIG_TYPE, ETableConfigClass))
typedef struct {
GtkComboText *combo;
GtkWidget *frames;
GtkWidget *radio_ascending;
GtkWidget *radio_descending;
GtkWidget *view_check; /* Only for group dialog */
guint changed_id, toggled_id;
void *e_table_config;
} ETableConfigSortWidgets;
typedef struct {
GObject parent;
char *header;
/*
* Our various dialog boxes
*/
GtkWidget *dialog_toplevel;
GtkWidget *dialog_show_fields;
GtkWidget *dialog_group_by;
GtkWidget *dialog_sort;
/*
* The state we manipulate
*/
ETableSpecification *source_spec;
ETableState *source_state, *state, *temp_state;
GtkWidget *sort_label;
GtkWidget *group_label;
GtkWidget *fields_label;
ETableConfigSortWidgets sort [4];
ETableConfigSortWidgets group [4];
ETable *available;
ETableWithout *available_model;
ETable *shown;
ETableSubsetVariable *shown_model;
char *domain;
/*
* List of valid column names
*/
GSList *column_names;
} ETableConfig;
typedef struct {
GObjectClass parent_class;
/* Signals */
void (*changed) (ETableConfig *config);
} ETableConfigClass;
GType e_table_config_get_type (void);
ETableConfig *e_table_config_new (const char *header,
ETableSpecification *spec,
ETableState *state,
GtkWindow *parent_window);
ETableConfig *e_table_config_construct (ETableConfig *etco,
const char *header,
ETableSpecification *spec,
ETableState *state,
GtkWindow *parent_window);
void e_table_config_raise (ETableConfig *config);
G_END_DECLS
#endif /* _E_TABLE_CONFIG_H */