Commit 65a24531 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

use the new artwork.

2001-08-24  Jody Goldberg <jgoldberg@home.com>

	* src/sheet-control-gui.c (scg_context_menu) : use the new artwork.

	* configure.in : bump version req for gnome-print to ensure that
	  we only see fontmap2.
	* README : ditto.
	* gnumeric.spec.in : ditto.

	* src/style.c (font_init) : Mention only the file fontmap2.

	* src/item-bar.c (item_bar_realize) : Don't attempt to use a gc from
	  an unrealized button.  Do it manually instead.

	* src/sheet-object.c (sheet_object_populate_menu) : Put Properties
	  above delete.
parent 7b7562c8
2001-08-24 Jody Goldberg <jgoldberg@home.com>
* src/sheet-control-gui.c (scg_context_menu) : use the new artwork.
* configure.in : bump version req for gnome-print to ensure that
we only see fontmap2.
* README : ditto.
* gnumeric.spec.in : ditto.
* src/style.c (font_init) : Mention only the file fontmap2.
* src/item-bar.c (item_bar_realize) : Don't attempt to use a gc from
an unrealized button. Do it manually instead.
* src/sheet-object.c (sheet_object_populate_menu) : Put Properties
above delete.
2001-08-23 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (item_bar_destroy) : remove debug msg.
......
2001-08-24 Jody Goldberg <jgoldberg@home.com>
* src/sheet-control-gui.c (scg_context_menu) : use the new artwork.
* configure.in : bump version req for gnome-print to ensure that
we only see fontmap2.
* README : ditto.
* gnumeric.spec.in : ditto.
* src/style.c (font_init) : Mention only the file fontmap2.
* src/item-bar.c (item_bar_realize) : Don't attempt to use a gc from
an unrealized button. Do it manually instead.
* src/sheet-object.c (sheet_object_populate_menu) : Put Properties
above delete.
2001-08-23 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (item_bar_destroy) : remove debug msg.
......
2001-08-24 Jody Goldberg <jgoldberg@home.com>
* src/sheet-control-gui.c (scg_context_menu) : use the new artwork.
* configure.in : bump version req for gnome-print to ensure that
we only see fontmap2.
* README : ditto.
* gnumeric.spec.in : ditto.
* src/style.c (font_init) : Mention only the file fontmap2.
* src/item-bar.c (item_bar_realize) : Don't attempt to use a gc from
an unrealized button. Do it manually instead.
* src/sheet-object.c (sheet_object_populate_menu) : Put Properties
above delete.
2001-08-23 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (item_bar_destroy) : remove debug msg.
......
2001-08-24 Jody Goldberg <jgoldberg@home.com>
* src/sheet-control-gui.c (scg_context_menu) : use the new artwork.
* configure.in : bump version req for gnome-print to ensure that
we only see fontmap2.
* README : ditto.
* gnumeric.spec.in : ditto.
* src/style.c (font_init) : Mention only the file fontmap2.
* src/item-bar.c (item_bar_realize) : Don't attempt to use a gc from
an unrealized button. Do it manually instead.
* src/sheet-object.c (sheet_object_populate_menu) : Put Properties
above delete.
2001-08-23 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (item_bar_destroy) : remove debug msg.
......
......@@ -25,7 +25,7 @@ You need:
xml-i18n-tools >= 0.9 (only required to build, not while running)
libglade >= 0.16
gal >= 0.8
gnome-print >= 0.25
gnome-print >= 0.29
gnome-xml >= 1.8.14 (gnome-xml 2.x not supported yet)
NOTE : gnome-xml is also known as libxml
libole2 >= 0.2.3
......
......@@ -481,13 +481,13 @@ AC_SUBST(GB_LIBS)
dnl ******************************
dnl GnomePrint checking
dnl ******************************
AC_MSG_CHECKING(for GnomePrint libraries >= 0.25 )
AC_MSG_CHECKING(for GnomePrint libraries >= 0.29 )
gnomeprint_ok=no
if gnome-config --libs print > /dev/null 2>&1; then
verstxt=`gnome-config --modversion print`
vers=`echo "$verstxt" | sed -e "s/gnome-print-//" -e 's/cvs$//' -e 's/pre$//' | \
awk -F. '{ printf "%d", $1 * 1000 + $2;}'`
if test "$vers" -ge 25; then
if test "$vers" -ge 29; then
AC_MSG_RESULT($marker_ok found $verstxt)
gnomeprint_ok=yes
else
......@@ -497,7 +497,7 @@ else
AC_MSG_RESULT($marker_fail not found)
fi
if test "$gnomeprint_ok" = no; then
AC_MSG_ERROR(You need at least gnome-print-0.25 for this version of Gnumeric)
AC_MSG_ERROR(You need at least gnome-print-0.29 for this version of Gnumeric)
fi
unset gnomeprint_ok
......
......@@ -16,7 +16,7 @@ Docdir: %{prefix}/doc
Requires: gtk+ >= 1.2.7
Requires: gnome-libs >= 1.0.57
Requires: gnome-print >= 0.25
Requires: gnome-print >= 0.29
Requires: libglade >= 0.16
Requires: libxml >= 1.8.14
Requires: libole2 >= 0.2.3
......
......@@ -325,28 +325,37 @@ gnm_graph_destroy (GtkObject *obj)
gnm_graph_parent_class->destroy (obj);
}
static void
cb_graph_assign_data (GtkWidget *ignored, GnmGraph *graph)
{
}
static void
gnm_graph_populate_menu (SheetObject *so,
GtkObject *obj_view,
GtkMenu *menu)
{
GnmGraph *graph;
GtkWidget *item;
graph = GNUMERIC_GRAPH (so);
g_return_if_fail (IS_GNUMERIC_GRAPH (so));
#if 0
GtkWidget *item;
item = gtk_menu_item_new_with_label (_("Open"));
item = gtk_menu_item_new_with_label (_("Data..."));
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC (open_cb), so);
GTK_SIGNAL_FUNC (cb_graph_assign_data), graph);
gtk_menu_append (menu, item);
#endif
if (SHEET_OBJECT_CLASS (gnm_graph_parent_class)->populate_menu)
SHEET_OBJECT_CLASS (gnm_graph_parent_class)->populate_menu (so, obj_view, menu);
}
static void
gnm_graph_user_config (SheetObject *sheet_object,
SheetControlGUI *s_control)
{
}
static void
gnm_graph_class_init (GtkObjectClass *object_class)
{
......@@ -358,6 +367,7 @@ gnm_graph_class_init (GtkObjectClass *object_class)
sheet_object_class = SHEET_OBJECT_CLASS (object_class);
sheet_object_class->populate_menu = &gnm_graph_populate_menu;
sheet_object_class->user_config = &gnm_graph_user_config;
}
E_MAKE_TYPE (gnm_graph, "GnmGraph", GnmGraph,
......
......@@ -37,7 +37,7 @@ struct _ItemBar {
GnomeCanvasItem canvas_item;
GnumericCanvas *gcanvas;
GdkGC *gc, *lines, *shade; /* Draw gc */
GdkGC *text_gc, *lines, *shade;
GdkCursor *normal_cursor;
GdkCursor *change_cursor;
StyleFont *normal_font, *bold_font;
......@@ -156,7 +156,6 @@ item_bar_realize (GnomeCanvasItem *item)
{
ItemBar *ib;
GdkWindow *window;
GdkGC *gc;
GtkStyle *style;
GtkWidget *button;
......@@ -166,21 +165,21 @@ item_bar_realize (GnomeCanvasItem *item)
ib = ITEM_BAR (item);
window = GTK_WIDGET (item->canvas)->window;
/* We need to extract the colours from a real visible button,
* choose this one because it is available.
*/
button = ib->gcanvas->scg->select_all_btn;
button = gtk_button_new ();
/* Configure our gc */
ib->gc = gc = gdk_gc_new (window);
gtk_widget_ensure_style (button);
style = gtk_widget_get_style (button);
gdk_gc_set_foreground (ib->gc, &style->text[GTK_STATE_NORMAL]);
ib->shade = gdk_gc_ref (style->dark_gc[GTK_STATE_NORMAL]);
ib->text_gc = gdk_gc_new (window);
gdk_gc_set_foreground (ib->text_gc, &style->text[GTK_STATE_NORMAL]);
ib->shade = gdk_gc_new (window);
gdk_gc_set_foreground (ib->shade, &style->dark[GTK_STATE_NORMAL]);
ib->lines = gdk_gc_new (window);
gdk_gc_copy (ib->lines, gc);
gdk_gc_copy (ib->lines, ib->text_gc);
gdk_gc_set_line_attributes (ib->lines, 2, GDK_LINE_SOLID,
GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
gtk_widget_destroy (button);
ib->normal_cursor = gdk_cursor_new (GDK_ARROW);
if (ib->is_col_header)
......@@ -195,7 +194,7 @@ item_bar_unrealize (GnomeCanvasItem *item)
{
ItemBar *ib = ITEM_BAR (item);
gdk_gc_unref (ib->gc);
gdk_gc_unref (ib->text_gc);
gdk_gc_unref (ib->lines);
gdk_gc_unref (ib->shade);
gdk_cursor_destroy (ib->change_cursor);
......@@ -243,8 +242,8 @@ ib_draw_cell (ItemBar const * const ib,
rect->x + 1, rect->y + 1, rect->width-2, rect->height-2);
gtk_draw_shadow (canvas->style, drawable, GTK_STATE_NORMAL, shadow,
rect->x, rect->y, rect->width, rect->height);
gdk_gc_set_clip_rectangle (ib->gc, rect);
gdk_draw_string (drawable, font, ib->gc,
gdk_gc_set_clip_rectangle (ib->text_gc, rect);
gdk_draw_string (drawable, font, ib->text_gc,
rect->x + (rect->width - len) / 2,
rect->y + (rect->height - texth) / 2 + font->ascent + 1,
str);
......
......@@ -1294,11 +1294,11 @@ scg_context_menu (SheetControlGUI *scg, GdkEventButton *event,
};
static GnumericPopupMenuElement const popup_elements[] = {
{ N_("Cu_t"), GNOME_STOCK_MENU_CUT,
{ N_("Cu_t"), "Menu_Gnumeric_Cut",
0, 0, CONTEXT_CUT },
{ N_("_Copy"), GNOME_STOCK_MENU_COPY,
{ N_("_Copy"), "Menu_Gnumeric_Copy",
0, 0, CONTEXT_COPY },
{ N_("_Paste"), GNOME_STOCK_MENU_PASTE,
{ N_("_Paste"), "Menu_Gnumeric_Paste",
0, 0, CONTEXT_PASTE },
{ N_("Paste _Special"), NULL,
0, CONTEXT_DISABLE_PASTE_SPECIAL, CONTEXT_PASTE_SPECIAL },
......
......@@ -238,7 +238,7 @@ sheet_object_bonobo_populate_menu (SheetObject *so,
g_return_if_fail (sob != NULL);
if (sob->has_persist_file || sob->has_persist_stream) {
item = gtk_menu_item_new_with_label (_("Open"));
item = gtk_menu_item_new_with_label (_("Open..."));
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC (open_cb), so);
gtk_menu_append (menu, item);
......
......@@ -40,7 +40,7 @@ GtkType sheet_object_get_type (void);
static GtkObjectClass *sheet_object_parent_class;
static void
sheet_object_remove_cb (GtkWidget *widget, GtkObject *so_view)
cb_sheet_object_remove (GtkWidget *widget, GtkObject *so_view)
{
Sheet *sheet;
SheetObject *so;
......@@ -82,13 +82,7 @@ sheet_object_populate_menu (SheetObject *so,
GtkObject *obj_view,
GtkMenu *menu)
{
GtkWidget *item = gnome_stock_menu_item (GNOME_STOCK_MENU_CLOSE,
_("Delete"));
gtk_menu_append (menu, item);
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC (sheet_object_remove_cb), obj_view);
GtkWidget *item;
if (SO_CLASS(so)->user_config != NULL) {
item = gnome_stock_menu_item (GNOME_STOCK_MENU_PROP,
_("Properties..."));
......@@ -96,6 +90,11 @@ sheet_object_populate_menu (SheetObject *so,
GTK_SIGNAL_FUNC (cb_sheet_object_configure), obj_view);
gtk_menu_append (menu, item);
}
item = gnome_stock_menu_item (GNOME_STOCK_MENU_CLOSE, _("Delete"));
gtk_menu_append (menu, item);
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC (cb_sheet_object_remove), obj_view);
}
/**
......
......@@ -243,11 +243,11 @@ font_init (void)
const char *lc_all = getenv ("LC_ALL");
const char *lang = getenv ("LANG");
char *msg;
char *fontmap_fn = gnome_datadir_file ("fonts/fontmaps");
char *fontmap_fn = gnome_datadir_file ("fonts/fontmap2");
gboolean exists = (fontmap_fn != NULL);
if (!exists)
fontmap_fn = gnome_unconditional_datadir_file ("fonts/fontmaps");
fontmap_fn = gnome_unconditional_datadir_file ("fonts/fontmap2");
if (lc_all == NULL)
lc_all = _("<Has not been set>");
......@@ -263,7 +263,7 @@ font_init (void)
"If you still have no luck, please file a proper bug report (see\n"
"http://bugzilla.gnome.org) including the following extra items:\n"
"\n"
"1) The content of your fontmap file, if the file exists.\n"
"1) The content of your fontmap2 file, if the file exists.\n"
"\t(typically located in %s)\n"
"2) The value of the LC_ALL environment variable\n"
"\tLC_ALL=%s\n"
......@@ -275,8 +275,8 @@ font_init (void)
"\tYou may be able to use the 'ldd' command to get that information.\n"
"\n"
"Thanks -- the Gnumeric Team\n"), exists
? _("Your fontmap file does not have a valid entry for Helvetica.")
: _("Your fontmap file could not be found in the expected location."),
? _("Your fontmap2 file does not have a valid entry for Helvetica.")
: _("Your fontmap2 file could not be found in the expected location."),
fontmap_fn, lc_all, lang);
gnumeric_notice (NULL, GNOME_MESSAGE_BOX_ERROR, msg);
exit (1);
......
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