Commit b6e4045b authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

don't use _SOURCES for things that are not directly related to automake.

2001-10-01  Jody Goldberg <jgoldberg@home.com>

	* src/Makefile.am : don't use _SOURCES for things that are not
	  directly related to automake.  1.5 complains.

	* idl/Makefile.am (CLEANFILES) : New automake warnings.
parent 8e5de92e
2001-10-01 Jody Goldberg <jgoldberg@home.com>
* src/Makefile.am : don't use _SOURCES for things that are not
directly related to automake. 1.5 complains.
* idl/Makefile.am (CLEANFILES) : New automake warnings.
2001-10-01 Morten Welinder <terra@diku.dk>
* src/search.h (SearchReplaceQuery): Add SRQ_query.
......
2001-10-01 Jody Goldberg <jgoldberg@home.com>
* src/Makefile.am : don't use _SOURCES for things that are not
directly related to automake. 1.5 complains.
* idl/Makefile.am (CLEANFILES) : New automake warnings.
2001-10-01 Morten Welinder <terra@diku.dk>
* src/search.h (SearchReplaceQuery): Add SRQ_query.
......
2001-10-01 Jody Goldberg <jgoldberg@home.com>
* src/Makefile.am : don't use _SOURCES for things that are not
directly related to automake. 1.5 complains.
* idl/Makefile.am (CLEANFILES) : New automake warnings.
2001-10-01 Morten Welinder <terra@diku.dk>
* src/search.h (SearchReplaceQuery): Add SRQ_query.
......
2001-10-01 Jody Goldberg <jgoldberg@home.com>
* src/Makefile.am : don't use _SOURCES for things that are not
directly related to automake. 1.5 complains.
* idl/Makefile.am (CLEANFILES) : New automake warnings.
2001-10-01 Morten Welinder <terra@diku.dk>
* src/search.h (SearchReplaceQuery): Add SRQ_query.
......
......@@ -60,9 +60,9 @@ idl_DATA = GNOME_Gnumeric_Graph.idl GNOME_Gnumeric.idl
EXTRA_DIST = $(idl_DATA)
# Do not use built sources BUILT_SOURCES
# it attempts to build the source even if it is not used.
CLEANFILES += $(GNUMERIC_GENERATED) \
$(GNUMERIC_GRAPH_GENERATED) \
$(EVOLUTION_GENERATED) \
CLEANFILES = $(GNUMERIC_GENERATED) \
$(GNUMERIC_GRAPH_GENERATED) \
$(EVOLUTION_GENERATED) \
stamp_Gnumeric_idl stamp_Gnumeric_Graph_idl stamp_evolution_idl
dist-hook :
......
......@@ -21,7 +21,7 @@ INCLUDES = \
$(EXTRA_GNOME_CFLAGS) \
$(GUILE_INCS)
GNUMERIC_BASE_SOURCES = \
GNUMERIC_BASE = \
analysis-tools.c \
analysis-tools.h \
application.c \
......@@ -240,11 +240,11 @@ GNUMERIC_BASE_SOURCES = \
xml-io-autoft.h
# TODO : split the bonobo and corba tests one day
GNUMERIC_CORBA_SOURCES = \
GNUMERIC_CORBA = \
workbook-control-corba.c \
workbook-control-corba.h
GNUMERIC_BONOBO_SOURCES = \
GNUMERIC_BONOBO = \
bonobo-io.c \
bonobo-io.h \
embeddable-grid.c \
......@@ -257,13 +257,13 @@ GNUMERIC_BONOBO_SOURCES = \
sheet-object-container.h \
sheet-object-item.c \
sheet-object-item.h \
$(GNUMERIC_CORBA_SOURCES)
$(GNUMERIC_CORBA)
if BONOBO
gnumeric_SOURCES = \
$(GNUMERIC_BASE_SOURCES) \
$(GNUMERIC_BASE) \
corba-args.c \
$(GNUMERIC_BONOBO_SOURCES)
$(GNUMERIC_BONOBO)
gnumeric_LDADD = \
$(gnumeric_libs) \
......@@ -275,7 +275,7 @@ gnumeric_LDADD = \
$(INTLLIBS)
else
gnumeric_SOURCES = \
$(GNUMERIC_BASE_SOURCES) \
$(GNUMERIC_BASE) \
normal-args.c
gnumeric_LDADD = \
......@@ -297,7 +297,7 @@ gnumeric_libs = \
# what the build
EXTRA_DIST = portability.h.in GNOME_Gnumeric.xml \
normal-args.c corba-args.c \
$(GNUMERIC_BONOBO_SOURCES)
$(GNUMERIC_BONOBO)
dist-hook:
-mkdir $(distdir)/pixmaps
cp $(srcdir)/pixmaps/*.xpm $(distdir)/pixmaps
......
2001-10-01 Jody Goldberg <jgoldberg@home.com>
* dialog-graph-guru.c (cb_graph_guru_focus) : removing an already
non-existent dimension is possible in the event that a user changes
their mind.
* dialog-graph-guru.c (vector_state_fill) : split actual setting out
into vector_state_set_entry.
2001-10-01 Morten Welinder <terra@diku.dk>
* dialog-search-replace.c (dialog_search_replace_query): New
......
......@@ -5,10 +5,10 @@ iconsdir = $(datadir)/pixmaps/gnumeric
if BONOBO
gnumeric_version="$(VERSION)-bonobo"
libdialogs_a_SOURCES = $(std_SOURCES) dialog-graph-guru.c
libdialogs_a_SOURCES = $(base_files) dialog-graph-guru.c
else
gnumeric_version="$(VERSION)"
libdialogs_a_SOURCES = $(std_SOURCES)
libdialogs_a_SOURCES = $(base_files)
endif
gnumeric_libdir = $(datadir)/gnumeric/$(gnumeric_version)
......@@ -25,7 +25,7 @@ INCLUDES = \
noinst_LIBRARIES = libdialogs.a
std_SOURCES = \
base_files = \
dialog-about.c \
dialog-advanced-filter.c \
dialog-analysis-tools.c \
......
......@@ -3,7 +3,7 @@
/*
* dialog-graph-guru.c: The Graph guru
*
* Copyright (C) 2000 Jody Goldberg (jgoldberg@home.com)
* Copyright (C) 2000-2001 Jody Goldberg (jgoldberg@home.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
......@@ -107,6 +107,16 @@ graph_guru_clear_sample (GraphGuruState *state)
}
}
static void
vector_state_set_entry (VectorState *vs)
{
gnumeric_expr_entry_set_rangesel_from_dep (
vs->entry,
gnm_graph_vector_get_dependent (vs->vector));
gnumeric_expr_entry_set_flags (vs->entry,
GNUM_EE_ABS_COL|GNUM_EE_ABS_ROW, GNUM_EE_MASK);
}
static void
vector_state_fill (VectorState *vs, xmlNode *series)
{
......@@ -122,19 +132,15 @@ vector_state_fill (VectorState *vs, xmlNode *series)
GNUM_EE_ABS_COL|GNUM_EE_ABS_ROW, GNUM_EE_MASK);
vs->state->updating = FALSE;
vs->vector = NULL;
dim = gnm_graph_series_get_dimension (series, vs->element);
if (dim != NULL) {
id = e_xml_get_integer_prop_by_name_with_default (dim, "ID", -1);
if (id >= 0) {
vs->vector = gnm_graph_get_vector (vs->state->graph, id);
gnumeric_expr_entry_set_rangesel_from_dep (
vs->entry,
gnm_graph_vector_get_dependent (vs->vector));
gnumeric_expr_entry_set_flags (vs->entry,
GNUM_EE_ABS_COL|GNUM_EE_ABS_ROW, GNUM_EE_MASK);
vector_state_set_entry (vs);
}
} else
vs->vector = NULL;
}
}
static void
......@@ -614,9 +620,15 @@ cb_graph_guru_focus (GtkWindow *window, GtkWidget *focus, GraphGuruState *state)
puts ("Adding a new dimension");
}
} else if (vs->vector != NULL) {
puts ("removing an existing (check optional)");
} else {
puts ("should not happen");
/* removing an existing dimension */
if (vs->is_optional) {
puts ("Remove an optional dimension");
} else {
/* We need this, reset to original content */
state->updating = TRUE;
vector_state_set_entry (vs);
state->updating = FALSE;
}
}
}
......
......@@ -14,11 +14,78 @@ static GtkObjectClass *gnm_combo_text_parent_class;
static gboolean cb_pop_down (GtkWidget *w, GtkWidget *pop_down,
gpointer dummy);
static void list_unselect_cb (GtkWidget *list, GtkWidget *child,
gpointer data);
static void update_list_selection (GnmComboText *ct, const gchar *text);
static void
entry_activate_cb (GtkWidget *entry, gpointer data)
{
GnmComboText *combo = GNM_COMBO_TEXT (data);
update_list_selection (combo,
gtk_entry_get_text (GTK_ENTRY (combo->entry)));
}
static void
list_select_cb (GtkWidget *list, GtkWidget *child, gpointer data)
{
GnmComboText *combo = GNM_COMBO_TEXT (data);
GtkEntry *entry = GTK_ENTRY (combo->entry);
gchar *value = (gchar*) gtk_object_get_data
(GTK_OBJECT (child), "value");
g_return_if_fail (entry && value);
if (combo->cached_entry == child)
combo->cached_entry = NULL;
gtk_entry_set_text (entry, value);
gtk_signal_handler_block_by_func (GTK_OBJECT (entry),
GTK_SIGNAL_FUNC (entry_activate_cb),
(gpointer) combo);
gtk_signal_emit_by_name (GTK_OBJECT (entry), "activate");
gtk_signal_handler_unblock_by_func (GTK_OBJECT (entry),
GTK_SIGNAL_FUNC (entry_activate_cb),
(gpointer) combo);
gtk_combo_box_popup_hide (GTK_COMBO_BOX (data));
}
static void
list_unselect_cb (GtkWidget *list, GtkWidget *child, gpointer data)
{
if (GTK_WIDGET_VISIBLE (list)) /* Undo interactive unselect */
gtk_list_select_child (GTK_LIST (list), child);
}
static void
update_list_selection (GnmComboText *ct, const gchar *text)
{
gpointer candidate;
GtkWidget *child;
gtk_signal_handler_block_by_func (GTK_OBJECT (ct->list),
GTK_SIGNAL_FUNC (list_select_cb),
(gpointer) ct);
gtk_signal_handler_block_by_func (GTK_OBJECT (ct->list),
GTK_SIGNAL_FUNC (list_unselect_cb),
(gpointer) ct);
gtk_list_unselect_all (GTK_LIST (ct->list));
candidate = g_hash_table_lookup (ct->elements, (gconstpointer) text);
if (candidate && GTK_IS_WIDGET (candidate)) {
child = GTK_WIDGET (candidate);
gtk_list_select_child (GTK_LIST (ct->list), child);
gtk_widget_grab_focus (child);
}
gtk_signal_handler_unblock_by_func (GTK_OBJECT (ct->list),
GTK_SIGNAL_FUNC (list_select_cb),
(gpointer) ct);
gtk_signal_handler_unblock_by_func (GTK_OBJECT (ct->list),
GTK_SIGNAL_FUNC (list_unselect_cb),
(gpointer) ct);
}
static void
gnm_combo_text_destroy (GtkObject *object)
{
......@@ -43,11 +110,6 @@ gnm_combo_text_class_init (GtkObjectClass *object_class)
gnm_combo_text_parent_class = gtk_type_class (gtk_combo_box_get_type ());
}
static void
gnm_combo_text_init (GnmComboText *object)
{
}
GtkType
gnm_combo_text_get_type (void)
{
......@@ -59,7 +121,7 @@ gnm_combo_text_get_type (void)
sizeof (GnmComboText),
sizeof (GnmComboTextClass),
(GtkClassInitFunc) gnm_combo_text_class_init,
(GtkObjectInitFunc) gnm_combo_text_init,
(GtkObjectInitFunc) NULL,
NULL, /* reserved 1 */
NULL, /* reserved 2 */
(GtkClassInitFunc) NULL
......@@ -144,48 +206,6 @@ gnm_combo_text_set_case_sensitive (GnmComboText *combo, gboolean val)
}
}
static void
entry_activate_cb (GtkWidget *entry, gpointer data)
{
GnmComboText *combo = GNM_COMBO_TEXT (data);
update_list_selection (combo,
gtk_entry_get_text (GTK_ENTRY (combo->entry)));
}
static void
list_select_cb (GtkWidget *list, GtkWidget *child, gpointer data)
{
GnmComboText *combo = GNM_COMBO_TEXT (data);
GtkEntry *entry = GTK_ENTRY (combo->entry);
gchar *value = (gchar*) gtk_object_get_data
(GTK_OBJECT (child), "value");
g_return_if_fail (entry && value);
if (combo->cached_entry == child)
combo->cached_entry = NULL;
gtk_entry_set_text (entry, value);
gtk_signal_handler_block_by_func (GTK_OBJECT (entry),
GTK_SIGNAL_FUNC (entry_activate_cb),
(gpointer) combo);
gtk_signal_emit_by_name (GTK_OBJECT (entry), "activate");
gtk_signal_handler_unblock_by_func (GTK_OBJECT (entry),
GTK_SIGNAL_FUNC (entry_activate_cb),
(gpointer) combo);
gtk_combo_box_popup_hide (GTK_COMBO_BOX (data));
}
static void
list_unselect_cb (GtkWidget *list, GtkWidget *child, gpointer data)
{
if (GTK_WIDGET_VISIBLE (list)) /* Undo interactive unselect */
gtk_list_select_child (GTK_LIST (list), child);
}
static void
cb_toggle (GtkWidget *child, gpointer data)
{
......@@ -200,34 +220,6 @@ gnm_combo_text_select_item (GnmComboText *ct, int elem)
gtk_list_select_item (GTK_LIST(ct->list), elem);
}
static void
update_list_selection (GnmComboText *ct, const gchar *text)
{
gpointer candidate;
GtkWidget *child;
gtk_signal_handler_block_by_func (GTK_OBJECT (ct->list),
GTK_SIGNAL_FUNC (list_select_cb),
(gpointer) ct);
gtk_signal_handler_block_by_func (GTK_OBJECT (ct->list),
GTK_SIGNAL_FUNC (list_unselect_cb),
(gpointer) ct);
gtk_list_unselect_all (GTK_LIST (ct->list));
candidate = g_hash_table_lookup (ct->elements, (gconstpointer) text);
if (candidate && GTK_IS_WIDGET (candidate)) {
child = GTK_WIDGET (candidate);
gtk_list_select_child (GTK_LIST (ct->list), child);
gtk_widget_grab_focus (child);
}
gtk_signal_handler_unblock_by_func (GTK_OBJECT (ct->list),
GTK_SIGNAL_FUNC (list_select_cb),
(gpointer) ct);
gtk_signal_handler_unblock_by_func (GTK_OBJECT (ct->list),
GTK_SIGNAL_FUNC (list_unselect_cb),
(gpointer) ct);
}
void
gnm_combo_text_set_text (GnmComboText *ct, const gchar *text)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment