Commit c11eed99 authored by Zbigniew Chyla's avatar Zbigniew Chyla Committed by Arturo Espinosa

Creating auto_expr menu every time it is popped up instead of using one

1998-04-09 Zbigniew Chyla <cyba@t19.ds.pwr.wroc.pl>

	* src/workbook.c: Creating auto_expr menu every time it is popped
        up instead of using one object all the time (and referencing to
        invalid workbook from "activate" signal handler).

        * src/item-grid.c: (item_grid_popup_menu): Fixed memory leak
        (gnumeric_popup_menu used instead of gtk_menu_popup).
parent 36ab057f
1998-04-09 Zbigniew Chyla <cyba@t19.ds.pwr.wroc.pl>
* src/workbook.c: Creating auto_expr menu every time it is popped
up instead of using one object all the time (and referencing to
invalid workbook from "activate" signal handler).
* src/item-grid.c: (item_grid_popup_menu): Fixed memory leak
(gnumeric_popup_menu used instead of gtk_menu_popup).
1999-04-11 Michael Meeks <michael@imaginator.com>
* src/expr.c (eval_funccall): New array / 'area' tokens added,
......
1998-04-09 Zbigniew Chyla <cyba@t19.ds.pwr.wroc.pl>
* src/workbook.c: Creating auto_expr menu every time it is popped
up instead of using one object all the time (and referencing to
invalid workbook from "activate" signal handler).
* src/item-grid.c: (item_grid_popup_menu): Fixed memory leak
(gnumeric_popup_menu used instead of gtk_menu_popup).
1999-04-11 Michael Meeks <michael@imaginator.com>
* src/expr.c (eval_funccall): New array / 'area' tokens added,
......
1998-04-09 Zbigniew Chyla <cyba@t19.ds.pwr.wroc.pl>
* src/workbook.c: Creating auto_expr menu every time it is popped
up instead of using one object all the time (and referencing to
invalid workbook from "activate" signal handler).
* src/item-grid.c: (item_grid_popup_menu): Fixed memory leak
(gnumeric_popup_menu used instead of gtk_menu_popup).
1999-04-11 Michael Meeks <michael@imaginator.com>
* src/expr.c (eval_funccall): New array / 'area' tokens added,
......
1998-04-09 Zbigniew Chyla <cyba@t19.ds.pwr.wroc.pl>
* src/workbook.c: Creating auto_expr menu every time it is popped
up instead of using one object all the time (and referencing to
invalid workbook from "activate" signal handler).
* src/item-grid.c: (item_grid_popup_menu): Fixed memory leak
(gnumeric_popup_menu used instead of gtk_menu_popup).
1999-04-11 Michael Meeks <michael@imaginator.com>
* src/expr.c (eval_funccall): New array / 'area' tokens added,
......
#include <gnome-factory.idl>
#include <Table.idl>
......
......@@ -14,6 +14,7 @@
#include "color.h"
#include "dialogs.h"
#include "cursors.h"
#include "gnome-util.h"
static GnomeCanvasItem *item_grid_parent_class;
......@@ -586,7 +587,7 @@ item_grid_popup_menu (ItemGrid *item_grid, GdkEvent *event, int col, int row)
menu = create_popup_menu (item_grid, show_paste);
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 3, event->button.time);
gnumeric_popup_menu (GTK_MENU (menu), (GdkEventButton *) event);
}
static int
......
......@@ -1194,28 +1194,26 @@ change_auto_expr (GtkWidget *item, Workbook *wb)
static void
change_auto_expr_menu (GtkWidget *widget, GdkEventButton *event, Workbook *wb)
{
static GtkWidget *menu;
if (!menu){
GtkWidget *item;
int i;
GtkWidget *menu;
GtkWidget *item;
int i;
menu = gtk_menu_new ();
for (i = 0; quick_compute_routines [i].displayed_name; i++){
item = gtk_menu_item_new_with_label (
_(quick_compute_routines [i].displayed_name));
gtk_menu_append (GTK_MENU (menu), item);
gtk_widget_show (item);
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC(change_auto_expr), wb);
gtk_object_set_data (GTK_OBJECT (item), "expr",
quick_compute_routines [i].function);
gtk_object_set_data (GTK_OBJECT (item), "name",
_(quick_compute_routines [i].displayed_name));
}
menu = gtk_menu_new ();
for (i = 0; quick_compute_routines [i].displayed_name; i++){
item = gtk_menu_item_new_with_label (
_(quick_compute_routines [i].displayed_name));
gtk_menu_append (GTK_MENU (menu), item);
gtk_widget_show (item);
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC(change_auto_expr), wb);
gtk_object_set_data (GTK_OBJECT (item), "expr",
quick_compute_routines [i].function);
gtk_object_set_data (GTK_OBJECT (item), "name",
_(quick_compute_routines [i].displayed_name));
}
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, 0, NULL, event->button, event->time);
gnumeric_popup_menu (GTK_MENU (menu), event);
}
/*
......
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