Commit 29637c87 authored by Morten Welinder's avatar Morten Welinder

Cleanup.

parent 59313e91
2003-07-25 Morten Welinder <terra@gnome.org>
* src/gui-util.c (gnumeric_clist_moveto): Finally delete this.
* src/stf-parse.c (stf_parse_options_fixed_splitpositions_clear):
Add terminator here.
(stf_parse_options_fixed_splitpositions_add): Insert sorted.
......
2003-07-25 Morten Welinder <terra@gnome.org>
* src/gui-util.c (gnumeric_clist_moveto): Finally delete this.
* src/stf-parse.c (stf_parse_options_fixed_splitpositions_clear):
Add terminator here.
(stf_parse_options_fixed_splitpositions_add): Insert sorted.
......
2003-07-25 Morten Welinder <terra@gnome.org>
* src/gui-util.c (gnumeric_clist_moveto): Finally delete this.
* src/stf-parse.c (stf_parse_options_fixed_splitpositions_clear):
Add terminator here.
(stf_parse_options_fixed_splitpositions_add): Insert sorted.
......
......@@ -19,8 +19,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#warning "This file uses GTK_DISABLE_DEPRECATED"
#include <gnumeric-config.h>
#include <gnumeric-i18n.h>
#include <gnumeric.h>
......@@ -122,20 +120,19 @@ static gboolean
widen_column (StfDialogData *pagedata, int col, gboolean test_only)
{
int colcount = stf_parse_options_fixed_splitpositions_count (pagedata->parseoptions);
int nextstart;
int nextstart, nextnextstart;
if (col >= colcount - 1)
return FALSE;
nextstart = stf_parse_options_fixed_splitpositions_nth (pagedata->parseoptions, col);
if (col != colcount - 2) {
int nextnextstart =
stf_parse_options_fixed_splitpositions_nth (pagedata->parseoptions, col + 1);
nextnextstart = (col == colcount - 2)
? pagedata->longest_line
: stf_parse_options_fixed_splitpositions_nth (pagedata->parseoptions, col + 1);
if (nextstart + 1 >= nextnextstart)
return FALSE;
}
if (nextstart + 1 >= nextnextstart)
return FALSE;
if (!test_only) {
stf_parse_options_fixed_splitpositions_remove (pagedata->parseoptions, nextstart);
......@@ -302,19 +299,6 @@ cb_col_button_press (GtkWidget *button,
return TRUE;
}
#if 0
if (event->type == GDK_BUTTON_PRESS && event->button == 3) {
/* Remove column. */
gtk_clist_select_row (data->fixed.fixed_collist, col, 0);
gnumeric_clist_moveto (data->fixed.fixed_collist, col);
gtk_signal_emit_by_name (GTK_OBJECT (data->fixed.fixed_remove),
"clicked",
data);
return TRUE;
}
#endif
return FALSE;
}
......
......@@ -705,49 +705,6 @@ gnumeric_popup_menu (GtkMenu *menu, GdkEventButton *event)
gtk_menu_popup (menu, NULL, NULL, 0, NULL, 0, event->time);
}
/*
* Helper for gnumeric_clist_moveto. Ensures that we move in the same way
* whether direct or from a callback.
*/
static void
clist_moveto (GtkCList *clist, gint row)
{
gtk_clist_moveto (clist, row, 0, 0.1, 0.0);
clist->focus_row = row;
}
/*
* map handler. Disconnects itself and moves the list.
*/
static void
cb_clist_moveto (GtkWidget *clist, gpointer row)
{
g_signal_handlers_disconnect_by_func (G_OBJECT (clist),
G_CALLBACK (cb_clist_moveto), row);
clist_moveto (GTK_CLIST (clist), GPOINTER_TO_INT (row));
}
/*
* gnumeric_clist_moveto
* @clist clist
* @row row
*
* Scroll the viewing area of the list to the given row.
* We do it this way because gtk_clist_moveto only works if the list is
* mapped.
*/
void
gnumeric_clist_moveto (/*GtkCList*/ void *clist, gint row)
{
if (GTK_WIDGET_DRAWABLE (clist))
clist_moveto (clist, row);
else
g_signal_connect (G_OBJECT (clist),
"map",
G_CALLBACK (cb_clist_moveto), GINT_TO_POINTER (row));
}
GtkWidget *
gnumeric_create_tooltip (void)
......
......@@ -55,9 +55,6 @@ int gnumeric_glade_group_value (GladeXML *gui, const char *group[]);
/* Use this on menus that are popped up */
void gnumeric_popup_menu (GtkMenu *menu, GdkEventButton *event);
/* Scroll the viewing area of the list to the given row */
void gnumeric_clist_moveto (/*GtkCList*/ void *clist, gint row);
/*
* Pseudo-tool-tip support code.
*/
......
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