Commit 672ded42 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Begin the Name menu.


2000-07-03  Jody Goldberg <jgoldberg@home.com>

	* src/workbook.c : Begin the Name menu.

	* src/workbook-edit.c (workbook_edit_set_sensitive) : New function.
	(workbook_finish_editing) : Use here.
	(workbook_start_editing_at_cursor) : And here.
	(workbook_edit_attach_guru) : And here.
	(workbook_edit_detach_guru) : And here.
	(workbook_edit_entry_redirect_p) : New function.

	* src/item-grid.c (item_grid_button_1) : If we have a guru up, but are
	  not selecting a region ignore clicks.
	(item_grid_event) : Ditto.

	* src/gnumeric-sheet.c (gnumeric_sheet_can_select_expr_range) : It is
	  possible to have a guru up without selecting regions.

	* src/expr-name.c (expr_name_list) : Doh!

2000-07-02  Jody Goldberg <jgoldberg@home.com>

	* src/expr.c (expr_rewrite) : Names can contain relative references,
	  we need to check them too.

	* src/parser.y (exp) : Add production for sheet specific names.
	  eg Sheet2!name

2000-07-01  Jody Goldberg <jgoldberg@home.com>

	* src/functions/fn-string.c (parse_search_strin) : Use g_strdup.
parent 8243cd20
......@@ -73,11 +73,18 @@ Dialogs
: Editing nested functions. How best to express this.
: Switching between multiple function at the same level.
: Better communication and handling of parse errors.
- Name Guru
: Ick. This is very ugly.
Sorting
-------
- Hidden rows/cols should not be sorted.
Function Breakage
-----------------
- Index : does not support 0,0 or reference syntax.
- ftest : Needs auditing. All calls to eval_pos_init_cellref are questionable.
- address : This code is a duplicate. Have the function use the standard routines.
Printing
--------
......@@ -87,4 +94,4 @@ Printing
Widget polishing
----------------
- Add row (rows ?) for custom colours in the color combo dialog.
- Selection for the undo/redo combo is ugly
2000-07-03 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Begin the Name menu.
* src/workbook-edit.c (workbook_edit_set_sensitive) : New function.
(workbook_finish_editing) : Use here.
(workbook_start_editing_at_cursor) : And here.
(workbook_edit_attach_guru) : And here.
(workbook_edit_detach_guru) : And here.
(workbook_edit_entry_redirect_p) : New function.
* src/item-grid.c (item_grid_button_1) : If we have a guru up, but are
not selecting a region ignore clicks.
(item_grid_event) : Ditto.
* src/gnumeric-sheet.c (gnumeric_sheet_can_select_expr_range) : It is
possible to have a guru up without selecting regions.
* src/expr-name.c (expr_name_list) : Doh!
2000-07-03 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/analysis-tools.c: Implemented `Histogram' tool (mostly).
......@@ -27,6 +47,9 @@
2000-07-02 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_rewrite) : Names can contain relative references,
we need to check them too.
* src/parser.y (exp) : Add production for sheet specific names.
eg Sheet2!name
......
2000-07-03 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Begin the Name menu.
* src/workbook-edit.c (workbook_edit_set_sensitive) : New function.
(workbook_finish_editing) : Use here.
(workbook_start_editing_at_cursor) : And here.
(workbook_edit_attach_guru) : And here.
(workbook_edit_detach_guru) : And here.
(workbook_edit_entry_redirect_p) : New function.
* src/item-grid.c (item_grid_button_1) : If we have a guru up, but are
not selecting a region ignore clicks.
(item_grid_event) : Ditto.
* src/gnumeric-sheet.c (gnumeric_sheet_can_select_expr_range) : It is
possible to have a guru up without selecting regions.
* src/expr-name.c (expr_name_list) : Doh!
2000-07-03 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/analysis-tools.c: Implemented `Histogram' tool (mostly).
......@@ -27,6 +47,9 @@
2000-07-02 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_rewrite) : Names can contain relative references,
we need to check them too.
* src/parser.y (exp) : Add production for sheet specific names.
eg Sheet2!name
......
2000-07-03 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Begin the Name menu.
* src/workbook-edit.c (workbook_edit_set_sensitive) : New function.
(workbook_finish_editing) : Use here.
(workbook_start_editing_at_cursor) : And here.
(workbook_edit_attach_guru) : And here.
(workbook_edit_detach_guru) : And here.
(workbook_edit_entry_redirect_p) : New function.
* src/item-grid.c (item_grid_button_1) : If we have a guru up, but are
not selecting a region ignore clicks.
(item_grid_event) : Ditto.
* src/gnumeric-sheet.c (gnumeric_sheet_can_select_expr_range) : It is
possible to have a guru up without selecting regions.
* src/expr-name.c (expr_name_list) : Doh!
2000-07-03 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/analysis-tools.c: Implemented `Histogram' tool (mostly).
......@@ -27,6 +47,9 @@
2000-07-02 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_rewrite) : Names can contain relative references,
we need to check them too.
* src/parser.y (exp) : Add production for sheet specific names.
eg Sheet2!name
......
2000-07-03 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Begin the Name menu.
* src/workbook-edit.c (workbook_edit_set_sensitive) : New function.
(workbook_finish_editing) : Use here.
(workbook_start_editing_at_cursor) : And here.
(workbook_edit_attach_guru) : And here.
(workbook_edit_detach_guru) : And here.
(workbook_edit_entry_redirect_p) : New function.
* src/item-grid.c (item_grid_button_1) : If we have a guru up, but are
not selecting a region ignore clicks.
(item_grid_event) : Ditto.
* src/gnumeric-sheet.c (gnumeric_sheet_can_select_expr_range) : It is
possible to have a guru up without selecting regions.
* src/expr-name.c (expr_name_list) : Doh!
2000-07-03 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/analysis-tools.c: Implemented `Histogram' tool (mostly).
......@@ -27,6 +47,9 @@
2000-07-02 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_rewrite) : Names can contain relative references,
we need to check them too.
* src/parser.y (exp) : Add production for sheet specific names.
eg Sheet2!name
......
2000-07-03 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Begin the Name menu.
* src/workbook-edit.c (workbook_edit_set_sensitive) : New function.
(workbook_finish_editing) : Use here.
(workbook_start_editing_at_cursor) : And here.
(workbook_edit_attach_guru) : And here.
(workbook_edit_detach_guru) : And here.
(workbook_edit_entry_redirect_p) : New function.
* src/item-grid.c (item_grid_button_1) : If we have a guru up, but are
not selecting a region ignore clicks.
(item_grid_event) : Ditto.
* src/gnumeric-sheet.c (gnumeric_sheet_can_select_expr_range) : It is
possible to have a guru up without selecting regions.
* src/expr-name.c (expr_name_list) : Doh!
2000-07-03 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/analysis-tools.c: Implemented `Histogram' tool (mostly).
......@@ -27,6 +47,9 @@
2000-07-02 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_rewrite) : Names can contain relative references,
we need to check them too.
* src/parser.y (exp) : Add production for sheet specific names.
eg Sheet2!name
......
2000-07-03 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Begin the Name menu.
* src/workbook-edit.c (workbook_edit_set_sensitive) : New function.
(workbook_finish_editing) : Use here.
(workbook_start_editing_at_cursor) : And here.
(workbook_edit_attach_guru) : And here.
(workbook_edit_detach_guru) : And here.
(workbook_edit_entry_redirect_p) : New function.
* src/item-grid.c (item_grid_button_1) : If we have a guru up, but are
not selecting a region ignore clicks.
(item_grid_event) : Ditto.
* src/gnumeric-sheet.c (gnumeric_sheet_can_select_expr_range) : It is
possible to have a guru up without selecting regions.
* src/expr-name.c (expr_name_list) : Doh!
2000-07-03 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/analysis-tools.c: Implemented `Histogram' tool (mostly).
......@@ -27,6 +47,9 @@
2000-07-02 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_rewrite) : Names can contain relative references,
we need to check them too.
* src/parser.y (exp) : Add production for sheet specific names.
eg Sheet2!name
......
2000-07-03 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Begin the Name menu.
* src/workbook-edit.c (workbook_edit_set_sensitive) : New function.
(workbook_finish_editing) : Use here.
(workbook_start_editing_at_cursor) : And here.
(workbook_edit_attach_guru) : And here.
(workbook_edit_detach_guru) : And here.
(workbook_edit_entry_redirect_p) : New function.
* src/item-grid.c (item_grid_button_1) : If we have a guru up, but are
not selecting a region ignore clicks.
(item_grid_event) : Ditto.
* src/gnumeric-sheet.c (gnumeric_sheet_can_select_expr_range) : It is
possible to have a guru up without selecting regions.
* src/expr-name.c (expr_name_list) : Doh!
2000-07-03 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/analysis-tools.c: Implemented `Histogram' tool (mostly).
......@@ -27,6 +47,9 @@
2000-07-02 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_rewrite) : Names can contain relative references,
we need to check them too.
* src/parser.y (exp) : Add production for sheet specific names.
eg Sheet2!name
......
......@@ -1184,8 +1184,7 @@ parse_search_string(gchar *find_str)
} else if (*find_str == '?' || *find_str == '*') {
buf[i] = '\0';
search_cond = g_new(string_search_t, 1);
search_cond->str = g_new(gchar, strlen(buf)+1);
strcpy(search_cond->str, buf);
search_cond->str = g_strdup (buf);
search_cond->min_skip = qmarks;
search_cond->wildcard_prefix = wildcard;
conditions = g_slist_append(conditions, search_cond);
......@@ -1198,8 +1197,7 @@ parse_search_string(gchar *find_str)
}
buf[i] = '\0';
search_cond = g_new(string_search_t, 1);
search_cond->str = g_new(gchar, strlen(buf)+1);
strcpy(search_cond->str, buf);
search_cond->str = g_strdup (buf);
search_cond->min_skip = qmarks;
search_cond->wildcard_prefix = wildcard;
conditions = g_slist_append(conditions, search_cond);
......
/**
* dialog-summary.c: Implements the summary info stuff
/* vim: set sw=8: */
/*
* dialog-define-name.c: Edit named regions.
*
* Author:
* Jody Goldberg <jgoldberg@home.com>
* Michael Meeks <michael@imaginator.com>
*
**/
*/
#include <config.h>
#include <gnome.h>
#include <glade/glade.h>
......@@ -35,55 +37,33 @@ typedef struct {
} NameGuruState;
static void
update_edit (NameGuruState *state)
cb_name_guru_select_name (GtkWidget *list, NameGuruState *state)
{
gint i = state->selected;
NamedExpression *expr_name;
Sheet *sheet;
GList *sel = GTK_LIST(list)->selection;
char *txt;
sheet = state->wb->current_sheet;
g_return_if_fail (sheet != NULL);
expr_name = g_list_nth (state->expr_names, i)->data;
if (expr_name->name && expr_name->name->str)
gtk_entry_set_text (state->name, expr_name->name->str);
else
gtk_entry_set_text (state->name, "");
txt = expr_name_value (expr_name);
gtk_entry_set_text (state->value, txt);
g_free (txt);
}
static void
cb_name_guru_select_name (GtkWidget *w, NameGuruState *state)
{
guint i = 0;
GList *sel = GTK_LIST(w)->selection;
GList *p = state->expr_names;
NamedExpression *name;
if (sel == NULL)
return;
g_return_if_fail (sel->data != NULL);
name = gtk_object_get_data (GTK_OBJECT (sel->data), LIST_KEY);
expr_name = gtk_object_get_data (GTK_OBJECT (sel->data), LIST_KEY);
while (p) {
if (p->data == name) {
state->selected = i;
update_edit (state);
return;
}
i++;
p = g_list_next (p);
}
g_return_if_fail (expr_name->name != NULL);
g_return_if_fail (expr_name->name->str != NULL);
/* Display the name */
gtk_entry_set_text (state->name, expr_name->name->str);
/* Display the value */
txt = expr_name_value (expr_name);
gtk_entry_set_text (state->value, txt);
g_free (txt);
}
static void
cb_name_guru_populate_list (NameGuruState *state)
name_guru_populate_list (NameGuruState *state)
{
GList *names;
GtkContainer *list;
......@@ -178,17 +158,29 @@ cb_name_guru_add (NameGuruState *state)
}
gtk_list_clear_items (state->list, 0, -1);
cb_name_guru_populate_list (state);
name_guru_populate_list (state);
return TRUE;
}
static void
cb_name_guru_value_focus (GtkWidget *w, GdkEventFocus *ev, NameGuruState *state)
{
if (w == state->value) {
workbook_set_entry (state->wb, state->value);
workbook_edit_select_absolute (state->wb);
} else
workbook_set_entry (state->wb, NULL);
}
static void
cb_name_guru_clicked (GtkWidget *button, NameGuruState *state)
{
if (state->dialog == NULL)
return;
workbook_set_entry (state->wb, NULL);
if (button == state->delete_button) {
cb_name_guru_remove (NULL, state);
return;
......@@ -255,26 +247,23 @@ name_guru_init (NameGuruState *state)
state->add_button = name_guru_init_button (state, "add_button");
state->delete_button = name_guru_init_button (state, "delete_button");
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_EDITABLE(state->name));
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_EDITABLE (state->value));
cb_name_guru_populate_list (state);
gtk_signal_connect (GTK_OBJECT (state->list), "selection_changed",
GTK_SIGNAL_FUNC (cb_name_guru_select_name), state);
gtk_signal_connect (GTK_OBJECT (state->name), "focus-in-event",
GTK_SIGNAL_FUNC (cb_name_guru_value_focus), state);
gtk_signal_connect (GTK_OBJECT (state->value), "focus-in-event",
GTK_SIGNAL_FUNC (cb_name_guru_value_focus), state);
gtk_signal_connect (GTK_OBJECT (state->dialog), "destroy",
GTK_SIGNAL_FUNC (cb_name_guru_destroy),
state);
GTK_SIGNAL_FUNC (cb_name_guru_destroy), state);
gtk_window_set_transient_for (GTK_WINDOW (state->dialog),
GTK_WINDOW (state->wb->toplevel));
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_EDITABLE(state->name));
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_EDITABLE (state->value));
workbook_set_entry (state->wb, state->value);
workbook_edit_attach_guru (state->wb, state->dialog);
workbook_edit_select_absolute (state->wb);
return FALSE;
}
......@@ -293,5 +282,6 @@ dialog_define_names (Workbook *wb)
return;
}
name_guru_populate_list (state);
gtk_widget_show (state->dialog);
}
......@@ -290,10 +290,10 @@ expr_name_list (Workbook *wb, Sheet *sheet, gboolean builtins_too)
l = g_list_copy (sheet->names);
if (wb != NULL && wb->names)
l = g_list_append (l, g_list_copy (wb->names));
l = g_list_concat (l, g_list_copy (wb->names));
if (builtins_too && global_names != NULL)
l = g_list_append (l, g_list_copy (global_names));
l = g_list_concat (l, g_list_copy (global_names));
return l;
}
......
......@@ -1493,6 +1493,15 @@ expr_rewrite (ExprTree const *expr,
}
case OPER_NAME:
if (!expr->name.name->builtin) {
/* Do NOT rewrite the name. Just invalidate the use of the name */
ExprTree *tmp = expr_rewrite (expr->name.name->t.expr_tree, rwinfo);
if (tmp != NULL) {
expr_tree_unref (tmp);
return expr_tree_new_constant (
value_new_error (NULL, gnumeric_err_REF));
}
}
return NULL;
case OPER_VAR:
......
......@@ -1184,8 +1184,7 @@ parse_search_string(gchar *find_str)
} else if (*find_str == '?' || *find_str == '*') {
buf[i] = '\0';
search_cond = g_new(string_search_t, 1);
search_cond->str = g_new(gchar, strlen(buf)+1);
strcpy(search_cond->str, buf);
search_cond->str = g_strdup (buf);
search_cond->min_skip = qmarks;
search_cond->wildcard_prefix = wildcard;
conditions = g_slist_append(conditions, search_cond);
......@@ -1198,8 +1197,7 @@ parse_search_string(gchar *find_str)
}
buf[i] = '\0';
search_cond = g_new(string_search_t, 1);
search_cond->str = g_new(gchar, strlen(buf)+1);
strcpy(search_cond->str, buf);
search_cond->str = g_strdup (buf);
search_cond->min_skip = qmarks;
search_cond->wildcard_prefix = wildcard;
conditions = g_slist_append(conditions, search_cond);
......
......@@ -196,7 +196,7 @@ gnumeric_sheet_can_select_expr_range (GnumericSheet *gsheet)
g_return_val_if_fail (GNUMERIC_IS_SHEET (gsheet), FALSE);
wb = gsheet->sheet_view->sheet->workbook;
if (workbook_edit_has_guru (wb))
if (workbook_edit_entry_redirect_p (wb))
return TRUE;
if (!wb->editing)
......
......@@ -196,7 +196,7 @@ gnumeric_sheet_can_select_expr_range (GnumericSheet *gsheet)
g_return_val_if_fail (GNUMERIC_IS_SHEET (gsheet), FALSE);
wb = gsheet->sheet_view->sheet->workbook;
if (workbook_edit_has_guru (wb))
if (workbook_edit_entry_redirect_p (wb))
return TRUE;
if (!wb->editing)
......
......@@ -674,6 +674,10 @@ item_grid_button_1 (Sheet *sheet, GdkEvent *event, ItemGrid *item_grid, int col,
return 1;
}
/* While a guru is up ignore clicks */
if (workbook_edit_has_guru (sheet->workbook))
return 1;
/*
* This was a regular click on a cell on the spreadsheet. Select it.
*/
......@@ -865,6 +869,10 @@ item_grid_event (GnomeCanvasItem *item, GdkEvent *event)
col = gnumeric_sheet_find_col (gsheet, x, NULL);
row = gnumeric_sheet_find_row (gsheet, y, NULL);
/* While a guru is up ignore clicks */
if (workbook_edit_has_guru (sheet->workbook) && event->button.button != 1)
return TRUE;
switch (event->button.button){
case 1:
return item_grid_button_1 (sheet, event, item_grid, col, row, x, y);
......@@ -872,7 +880,7 @@ item_grid_event (GnomeCanvasItem *item, GdkEvent *event)
case 2:
g_warning ("This is here just for demo purposes");
drag_start (GTK_WIDGET (item->canvas), event, sheet);
return 1;
return TRUE;
case 3:
item_grid_popup_menu (sheet,
......
......@@ -51,6 +51,19 @@ workbook_auto_complete_destroy (Workbook *wb)
}
static void
workbook_edit_set_sensitive (Workbook const *wb, gboolean flag1, gboolean flag2)
{
/* These are only sensitive while editing */
gtk_widget_set_sensitive (wb->priv->ok_button, flag1);
gtk_widget_set_sensitive (wb->priv->cancel_button, flag1);
/* Toolbars are insensitive while editing */
gtk_widget_set_sensitive (wb->priv->func_button, flag2);
gtk_widget_set_sensitive (wb->priv->standard_toolbar, flag2);
gtk_widget_set_sensitive (wb->priv->format_toolbar, flag2);
}
void
workbook_finish_editing (Workbook *wb, gboolean const accept)
{
......@@ -73,14 +86,7 @@ workbook_finish_editing (Workbook *wb, gboolean const accept)
wb->editing_sheet = NULL;
wb->editing_cell = NULL;
/* These are only sensitive while editing */
gtk_widget_set_sensitive (wb->priv->ok_button, FALSE);
gtk_widget_set_sensitive (wb->priv->cancel_button, FALSE);
/* Toolbars are insensitive while editing */
gtk_widget_set_sensitive (wb->priv->func_button, TRUE);
gtk_widget_set_sensitive (wb->priv->standard_toolbar, TRUE);
gtk_widget_set_sensitive (wb->priv->format_toolbar, TRUE);
workbook_edit_set_sensitive (wb, FALSE, TRUE);
/* Save the results before changing focus */
if (accept) {
......@@ -202,6 +208,7 @@ workbook_start_editing_at_cursor (Workbook *wb, gboolean blankp,
g_return_if_fail (sheet != NULL);
application_clipboard_unant ();
workbook_edit_set_sensitive (wb, TRUE, FALSE);
cell = sheet_cell_get (sheet,
sheet->cursor.edit_pos.col,
......@@ -252,15 +259,6 @@ workbook_start_editing_at_cursor (Workbook *wb, gboolean blankp,
wb->editing_sheet = sheet;
wb->editing_cell = cell;
/* These are only sensitive while editing */
gtk_widget_set_sensitive (wb->priv->ok_button, TRUE);
gtk_widget_set_sensitive (wb->priv->cancel_button, TRUE);
/* Toolbars are insensitive while editing */
gtk_widget_set_sensitive (wb->priv->func_button, FALSE);
gtk_widget_set_sensitive (wb->priv->standard_toolbar, FALSE);
gtk_widget_set_sensitive (wb->priv->format_toolbar, FALSE);
/*
* If this assert fails, it means editing was not shut down
* properly before
......@@ -319,6 +317,7 @@ workbook_edit_attach_guru (Workbook *wb, GtkWidget *guru)
wb->priv->edit_line.guru = guru;
gtk_entry_set_editable (wb->priv->edit_line.entry, FALSE);
workbook_edit_set_sensitive (wb, FALSE, FALSE);
}
void
......@@ -331,6 +330,7 @@ workbook_edit_detach_guru (Workbook *wb)
workbook_set_entry (wb, NULL);
wb->priv->edit_line.guru = NULL;
gtk_entry_set_editable (wb->priv->edit_line.entry, TRUE);
workbook_edit_set_sensitive (wb, FALSE, TRUE);
}
gboolean
......@@ -339,6 +339,12 @@ workbook_edit_has_guru (Workbook const *wb)
return (wb->priv->edit_line.guru != NULL);
}
gboolean
workbook_edit_entry_redirect_p (Workbook const *wb)
{
return (wb->priv->edit_line.temp_entry != NULL);
}
void
workbook_edit_select_absolute (Workbook *wb)
{
......
......@@ -12,6 +12,7 @@ void workbook_set_entry (Workbook *wb, GtkEntry *new_ent
void workbook_edit_attach_guru (Workbook *wb, GtkWidget *guru);
void workbook_edit_detach_guru (Workbook *wb);
gboolean workbook_edit_has_guru (Workbook const *wb);
gboolean workbook_edit_entry_redirect_p (Workbook const *wb);
void workbook_edit_select_absolute (Workbook *wb);
void workbook_auto_complete_destroy (Workbook *wb);
......
......@@ -744,10 +744,17 @@ goto_cell_cmd (GtkWidget *unused, Workbook *wb)
}
static void
define_cell_cmd (GtkWidget *unused, Workbook *wb)
cb_edit_named_expr (GtkWidget *unused, Workbook *wb)
{
dialog_define_names (wb);
}
#if 0
static void
cb_auto_generate__named_expr (GtkWidget *unused, Workbook *wb)
{
dialog_auto_generate_names (wb);
}
#endif
static void
insert_sheet_cmd (GtkWidget *unused, Workbook *wb)
......@@ -1240,7 +1247,7 @@ static GnomeUIInfo workbook_menu_edit [] = {
N_("Paste with optional filters and transformations"),
&paste_special_cmd),
GNOMEUIINFO_SUBTREE(N_("C_lear"), &workbook_menu_edit_clear),
GNOMEUIINFO_SUBTREE(N_("C_lear"), workbook_menu_edit_clear),
GNOMEUIINFO_ITEM_NONE(N_("_Delete..."),
N_("Remove selected cells, shifting other into their place"),
......@@ -1251,7 +1258,7 @@ static GnomeUIInfo workbook_menu_edit [] = {
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_SUBTREE(N_("_Select..."), &workbook_menu_edit_select),
GNOMEUIINFO_SUBTREE(N_("_Select..."), workbook_menu_edit_select),
/* Default <Ctrl-I> to be goto */
{ GNOME_APP_UI_ITEM, N_("_Goto cell..."),
......@@ -1291,6 +1298,18 @@ static GnomeUIInfo workbook_menu_insert_special [] = {
GNOMEUIINFO_END
};
static GnomeUIInfo workbook_menu_names [] = {
GNOMEUIINFO_ITEM_NONE(N_("_Names..."),
N_("Edit sheet and workbook names"),
&cb_edit_named_expr),
#if 0
GNOMEUIINFO_ITEM_NONE(N_("_Auto generate names..."),
N_("Use the current selection to create names"),
&cb_auto_generate__named_expr),
#endif
GNOMEUIINFO_END
};
static GnomeUIInfo workbook_menu_insert [] = {
GNOMEUIINFO_ITEM_NONE(N_("_Sheet"),
N_("Insert a new spreadsheet"),
......@@ -1313,16 +1332,13 @@ static GnomeUIInfo workbook_menu_insert [] = {
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_ITEM_NONE(N_("Define _Name"), NULL,
&define_cell_cmd),
GNOMEUIINFO_SUBTREE(N_("N_ames"), workbook_menu_names),
GNOMEUIINFO_ITEM_NONE(N_("_Add/modify comment..."),
N_("Edit the selected cell's comment"),
&workbook_edit_comment),
GNOMEUIINFO_SUBTREE(N_("S_pecial"),
workbook_menu_insert_special),
GNOMEUIINFO_SUBTREE(N_("S_pecial"), workbook_menu_insert_special),
GNOMEUIINFO_END
};
......@@ -1413,9 +1429,9 @@ static GnomeUIInfo workbook_menu_format [] = {
N_("Modify the formatting of the selected cells"),
format_cells_cmd, NULL, NULL, 0, 0, GDK_1, GDK_CONTROL_MASK },
{ GNOME_APP_UI_SUBTREE, N_("C_olumn"), NULL, workbook_menu_format_column },
{ GNOME_APP_UI_SUBTREE, N_("_Row"), NULL, workbook_menu_format_row },
{ GNOME_APP_UI_SUBTREE, N_("_Sheet"), NULL, workbook_menu_format_sheet },
GNOMEUIINFO_SUBTREE(N_("C_olumn"), workbook_menu_format_column),
GNOMEUIINFO_SUBTREE(N_("_Row"), workbook_menu_format_row),
GNOMEUIINFO_SUBTREE(N_("_Sheet"), workbook_menu_format_sheet),
GNOMEUIINFO_ITEM_NONE(N_("_Workbook..."),
N_("Modify the workbook attributes"),
......@@ -1480,10 +1496,10 @@ static GnomeUIInfo workbook_menu [] = {
GNOMEUIINFO_MENU_FILE_TREE (workbook_menu_file),
GNOMEUIINFO_MENU_EDIT_TREE (workbook_menu_edit),
GNOMEUIINFO_MENU_VIEW_TREE (workbook_menu_view),
{ GNOME_APP_UI_SUBTREE, N_("_Insert"), NULL, workbook_menu_insert },
{ GNOME_APP_UI_SUBTREE, N_("F_ormat"), NULL, workbook_menu_format },
{ GNOME_APP_UI_SUBTREE, N_("_Tools"), NULL, workbook_menu_tools },
{ GNOME_APP_UI_SUBTREE, N_("_Data"), NULL, workbook_menu_data },
GNOMEUIINFO_SUBTREE(N_("_Insert"), workbook_menu_insert),
GNOMEUIINFO_SUBTREE(N_("F_ormat"), workbook_menu_format),
GNOMEUIINFO_SUBTREE(N_("_Tools"), workbook_menu_tools),
GNOMEUIINFO_SUBTREE(N_("_Data"), workbook_menu_data),
#ifdef ENABLE_BONOBO
#warning Should enable this when Bonobo gets menu help support
#else
......
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