diff --git a/ChangeLog b/ChangeLog index a379b83890..4b877ee22d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2000-07-20 Jean-Marc Lasgouttes + + * src/Makefile.am (INCLUDES): remove image directory from include + path. + + * src/bullet_forms.C (create_form_form_bullet): small cleanup. + * src/bullet_forms_cb.C (BulletPanelCB): ditto. + + * src/LyXView.C (create_form_form_main): read the application icon + from the disk. + + * lib/images/*.xpm: change the icons to use transparent color for + background. + + * src/toolbar.C (update): change the color of the button when it + is toggled on. + 2000-07-20 Jean-Marc Lasgouttes * src/lyxfunc.C (Dispatch): use LyXView::ShowState instead of diff --git a/lib/images/buffer-close.xpm b/lib/images/buffer-close.xpm index 752a72c8e0..e6dfd86bbe 100644 --- a/lib/images/buffer-close.xpm +++ b/lib/images/buffer-close.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * close_xpm[] = { "20 20 5 1", -" c #BFBFBFBFBFBF", +" c None", ". c #7B7B00000000", "X c #000000000000", "o c #9A9A94949494", diff --git a/lib/images/buffer-export_ascii.xpm b/lib/images/buffer-export_ascii.xpm index a75398fd3d..c19b1a837b 100644 --- a/lib/images/buffer-export_ascii.xpm +++ b/lib/images/buffer-export_ascii.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * make_ascii_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c black", " ", " .................. ", diff --git a/lib/images/buffer-export_latex.xpm b/lib/images/buffer-export_latex.xpm index 088c96699b..984986d4f8 100644 --- a/lib/images/buffer-export_latex.xpm +++ b/lib/images/buffer-export_latex.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * make_latex_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c black", " ", " .................. ", diff --git a/lib/images/buffer-open.xpm b/lib/images/buffer-open.xpm index 591c8bcfad..90b133ab5a 100644 --- a/lib/images/buffer-open.xpm +++ b/lib/images/buffer-open.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * open_xpm[] = { "20 20 5 1", -" c #BFBFBFBFBFBF", +" c None", ". c navy", "X c #000000000000", "o c #9A9A94949494", diff --git a/lib/images/buffer-print.xpm b/lib/images/buffer-print.xpm index 21d823790b..3c5b8253ca 100644 --- a/lib/images/buffer-print.xpm +++ b/lib/images/buffer-print.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * print1_xpm[] = { "24 20 7 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", "X c #FFFFFFFFFFFF", "o c #7B7B00000000", diff --git a/lib/images/buffer-typeset-ps.xpm b/lib/images/buffer-typeset-ps.xpm index 1deb0b0192..1c8c0a2676 100644 --- a/lib/images/buffer-typeset-ps.xpm +++ b/lib/images/buffer-typeset-ps.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * update_ps_xpm[] = { "20 20 3 1", -" c #BFBFBFBFBFBF", +" c None", ".c navy", "Xc black", " ... ", diff --git a/lib/images/buffer-typeset.xpm b/lib/images/buffer-typeset.xpm index 6986dc6a78..524663100e 100644 --- a/lib/images/buffer-typeset.xpm +++ b/lib/images/buffer-typeset.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * run_latex_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", " ", " . .. . . . .. ", diff --git a/lib/images/buffer-view-ps.xpm b/lib/images/buffer-view-ps.xpm index 090086b1fa..6d9ec40f6b 100644 --- a/lib/images/buffer-view-ps.xpm +++ b/lib/images/buffer-view-ps.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * view_ps_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", " ", " .............. ", diff --git a/lib/images/buffer-view.xpm b/lib/images/buffer-view.xpm index d1b71b313f..79dc0b2fd4 100644 --- a/lib/images/buffer-view.xpm +++ b/lib/images/buffer-view.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * view_dvi_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", " ", " .............. ", diff --git a/lib/images/buffer-write.xpm b/lib/images/buffer-write.xpm index b60de22668..ef2ba02bb5 100644 --- a/lib/images/buffer-write.xpm +++ b/lib/images/buffer-write.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * save_xpm[] = { "20 20 5 1", -" c #BFBFBFBFBFBF", +" c None", ". c black", "X c gray70", "o c gray90", diff --git a/lib/images/build-program.xpm b/lib/images/build-program.xpm index 6f091d5b0c..437dd19767 100644 --- a/lib/images/build-program.xpm +++ b/lib/images/build-program.xpm @@ -2,7 +2,7 @@ static char const * build_xpm[] = { "20 20 4 1", ". c black", -" c #BFBFBFBFBFBF", +" c None", "+ c white", "O c red", " ... ", diff --git a/lib/images/copy.xpm b/lib/images/copy.xpm index f6e7abae1f..81e5e9d36a 100644 --- a/lib/images/copy.xpm +++ b/lib/images/copy.xpm @@ -2,7 +2,7 @@ static char const * copy_xpm[] = { "20 20 5 1", " c #000000000000", -". c #BFBFBFBFBFBF", +". c None", "X c #FFFFFFFFFFFF", "o c navy", "O c #B2B2ABABACAC", diff --git a/lib/images/cut.xpm b/lib/images/cut.xpm index 0ea70262b0..f7925f47b7 100644 --- a/lib/images/cut.xpm +++ b/lib/images/cut.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * cut_xpm[] = { "20 20 3 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", "X c #7B7B00000000", " ", diff --git a/lib/images/depth-next.xpm b/lib/images/depth-next.xpm index 1acee58000..11b9d76410 100644 --- a/lib/images/depth-next.xpm +++ b/lib/images/depth-next.xpm @@ -5,7 +5,7 @@ static char const * depth_xpm[] = { ". c #000000000000", "X c #FFFFFFFFFFFF", "o c #7B7B00000000", -"O c #BFBFBFBFBFBF", +"O c None", " ", ".XXXXXXXXXXXXXXXXXX.", ".XX..............XX.", diff --git a/lib/images/figure-insert.xpm b/lib/images/figure-insert.xpm index 6a7c9bcf9e..9b3d06380a 100644 --- a/lib/images/figure-insert.xpm +++ b/lib/images/figure-insert.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * fig_xpm[] = { "20 20 4 1", -" c #000000000000", +" c None", ". c #FFFFFFFFFFFF", "X c #7B7B00000000", "o c gray70", diff --git a/lib/images/font-bold.xpm b/lib/images/font-bold.xpm index d484d886d2..46e86dc28a 100644 --- a/lib/images/font-bold.xpm +++ b/lib/images/font-bold.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * bold_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", " ", " ... .... ", diff --git a/lib/images/font-emph.xpm b/lib/images/font-emph.xpm index 15439b3c42..92bbade7fe 100644 --- a/lib/images/font-emph.xpm +++ b/lib/images/font-emph.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * emph_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", " ", " .. ", diff --git a/lib/images/font-free.xpm b/lib/images/font-free.xpm index 3377eab419..124f93e442 100644 --- a/lib/images/font-free.xpm +++ b/lib/images/font-free.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * free_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", " ", " ", diff --git a/lib/images/font-noun.xpm b/lib/images/font-noun.xpm index 0b0f40701c..e6c016701a 100644 --- a/lib/images/font-noun.xpm +++ b/lib/images/font-noun.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * noun_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", " ", " .. ", diff --git a/lib/images/font-sans.xpm b/lib/images/font-sans.xpm index 3ec1a95833..1f1259bfae 100644 --- a/lib/images/font-sans.xpm +++ b/lib/images/font-sans.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * sans_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", " ", " .... ", diff --git a/lib/images/layout_Scrap.xpm b/lib/images/layout_Scrap.xpm index 49b0c5d701..687eb4b239 100644 --- a/lib/images/layout_Scrap.xpm +++ b/lib/images/layout_Scrap.xpm @@ -2,7 +2,7 @@ static char const * layout_scrap_xpm[] = { " 20 20 3 1", ". c gray30", -" c #BFBFBFBFBFBF", +" c None", "c c black", "c c", " c .c.c.. ", diff --git a/lib/images/lyx-quit.xpm b/lib/images/lyx-quit.xpm index c07adfde5d..82c0b8c552 100644 --- a/lib/images/lyx-quit.xpm +++ b/lib/images/lyx-quit.xpm @@ -3,7 +3,7 @@ static char const * quit_xpm[] = { /* width height num_colors chars_per_pixel */ " 20 20 7 1", /* colors */ -". c #b2c0dc", +". c None", "# c #4d4d4d", "a c #000000", "b c #737373", diff --git a/images/lyx.xpm b/lib/images/lyx.xpm similarity index 100% rename from images/lyx.xpm rename to lib/images/lyx.xpm diff --git a/lib/images/marginpar-insert.xpm b/lib/images/marginpar-insert.xpm index 874e3d7b89..42a804538e 100644 --- a/lib/images/marginpar-insert.xpm +++ b/lib/images/marginpar-insert.xpm @@ -3,7 +3,7 @@ static char const * margin_xpm[] = { "20 20 5 1", " c gray60", ". c #000000000000", -"X c #BFBFBFBFBFBF", +"X c None", "o c #FFFFFFFFFFFF", "O c #7B7B00000000", " .................XX", diff --git a/lib/images/math-mode.xpm b/lib/images/math-mode.xpm index 89a3d14f41..60c3a0fe14 100644 --- a/lib/images/math-mode.xpm +++ b/lib/images/math-mode.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * math_xpm[] = { "20 20 4 1", -" c #BFBFBFBFBFBF", +" c None", ". c #242423238E8E", "X c #000000000000", "o c #FFFFFFFFFFFF", diff --git a/lib/images/melt.xpm b/lib/images/melt.xpm index f2af564901..9b287f6aad 100644 --- a/lib/images/melt.xpm +++ b/lib/images/melt.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * melt_xpm[] = { "20 20 5 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", "X c gray60", "o c gray70", diff --git a/lib/images/paste.xpm b/lib/images/paste.xpm index 17eae2594f..ca37486208 100644 --- a/lib/images/paste.xpm +++ b/lib/images/paste.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * paste_xpm[] = { "20 20 6 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", "X c #E5E5E0E0E1E1", "o c navy", diff --git a/lib/images/redo.xpm b/lib/images/redo.xpm index bebc8e7f7c..7d1369ae35 100644 --- a/lib/images/redo.xpm +++ b/lib/images/redo.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * redo_bw_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c black", " ", " ", diff --git a/lib/images/table-insert.xpm b/lib/images/table-insert.xpm index bd7e66e5aa..3287a1eca2 100644 --- a/lib/images/table-insert.xpm +++ b/lib/images/table-insert.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * tab_xpm[] = { "20 20 3 1", -" c #BFBFBFBFBFBF", +" c None", ". c #000000000000", "X c #FFFFFFFFFFFF", " ", diff --git a/lib/images/tex-mode.xpm b/lib/images/tex-mode.xpm index d107cf90ab..96aa33d95b 100644 --- a/lib/images/tex-mode.xpm +++ b/lib/images/tex-mode.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * tex_xpm[] = { "20 20 2 1", -" c #BEFBBEFBBEFB", +" c None", ". c #7B7B00000000", " ", " ", diff --git a/lib/images/undo.xpm b/lib/images/undo.xpm index 1d68d8553c..af1816fa4b 100644 --- a/lib/images/undo.xpm +++ b/lib/images/undo.xpm @@ -1,7 +1,7 @@ /* XPM */ static char const * undo_bw_xpm[] = { "20 20 2 1", -" c #BFBFBFBFBFBF", +" c None", ". c black", " ", " ", diff --git a/lib/images/unknown.xpm b/lib/images/unknown.xpm index 4771cca01f..9a4a03d799 100644 --- a/lib/images/unknown.xpm +++ b/lib/images/unknown.xpm @@ -4,7 +4,7 @@ static char const * unknown_xpm[] = { " 20 20 2 1", /* colors */ ". c #000000000000", -"# c #befbbefbbefb", +"# c None", /* pixels */ "####################", "####################", diff --git a/src/LyXView.C b/src/LyXView.C index d9cdc70bbf..b22acf6a7e 100644 --- a/src/LyXView.C +++ b/src/LyXView.C @@ -24,7 +24,6 @@ #include "toolbar.h" #include "minibuffer.h" #include "lyxfunc.h" -#include "lyx.xpm" #include "debug.h" #include "layout_forms.h" #include "intl.h" @@ -254,17 +253,20 @@ void LyXView::create_form_form_main(int width, int height) // // assign an icon to main form - unsigned int w, h; - Pixmap lyx_p, lyx_mask; - lyx_p = fl_create_from_pixmapdata(fl_root, - const_cast(lyx_xpm), - &w, - &h, - &lyx_mask, - 0, - 0, - 0); // this leaks - fl_set_form_icon(form_, lyx_p, lyx_mask); + string iconname = LibFileSearch("images", "lyx", "xpm"); + if (!iconname.empty()) { + unsigned int w, h; + Pixmap lyx_p, lyx_mask; + lyx_p = fl_read_pixmapfile(fl_root, + iconname.c_str(), + &w, + &h, + &lyx_mask, + 0, + 0, + 0); // this leaks + fl_set_form_icon(form_, lyx_p, lyx_mask); + } // set min size fl_set_form_minsize(form_, 50, 50); diff --git a/src/Makefile.am b/src/Makefile.am index 1fafd15471..f44020a309 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,7 +10,7 @@ lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(LYX_LIBS) $(SIGC_LIBS) \ @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@ EXTRA_DIST = config.h.in stamp-h.in cheaders ETAGS_ARGS = --lang=c++ -INCLUDES = -I${top_srcdir}/images $(SIGC_CFLAGS) @FRONTEND_INCLUDES@ +INCLUDES = $(SIGC_CFLAGS) @FRONTEND_INCLUDES@ localedir = $(datadir)/locale lyx_SOURCES = \ BackStack.h \ diff --git a/src/bullet_forms.C b/src/bullet_forms.C index 5518283ab0..301f80b98e 100644 --- a/src/bullet_forms.C +++ b/src/bullet_forms.C @@ -29,7 +29,7 @@ FD_form_bullet *create_form_form_bullet(void) fl_set_object_boxtype(obj, FL_UP_BOX); fl_set_bmtable_pixmap_file(obj, 6, 6, LibFileSearch("images", - "standard.xpm").c_str()); + "standard", "xpm").c_str()); fl_set_border_width(-1); obj = fl_add_frame(FL_ENGRAVED_FRAME, 95, 20, 255, 70, ""); diff --git a/src/bullet_forms_cb.C b/src/bullet_forms_cb.C index 761f322514..a8b37a5bed 100644 --- a/src/bullet_forms_cb.C +++ b/src/bullet_forms_cb.C @@ -218,9 +218,10 @@ void BulletPanelCB(FL_OBJECT * /*ob*/, long data) new_panel = "standard"; break; } - new_panel += ".xpm"; - fl_set_bmtable_pixmap_file(fd_form_bullet->bmtable_bullet_panel, 6, 6, - LibFileSearch("images", new_panel.c_str()).c_str()); + fl_set_bmtable_pixmap_file(fd_form_bullet->bmtable_bullet_panel, + 6, 6, + LibFileSearch("images", new_panel, + "xpm").c_str()); fl_redraw_object(fd_form_bullet->bmtable_bullet_panel); fl_unfreeze_form(fd_form_bullet->form_bullet); } diff --git a/src/toolbar.C b/src/toolbar.C index fa756910d9..01a88558f8 100644 --- a/src/toolbar.C +++ b/src/toolbar.C @@ -145,8 +145,10 @@ void Toolbar::update() // know how to use transparency with // Xpm library. It seems pretty // complicated to me (JMarc) + fl_set_object_color(p->icon, FL_LEFT_BCOL, FL_BLUE); fl_set_object_boxtype(p->icon, FL_DOWN_BOX); } else { + fl_set_object_color(p->icon, FL_MCOL, FL_BLUE); fl_set_object_boxtype(p->icon, FL_UP_BOX); } @@ -287,7 +289,6 @@ void Toolbar::set(bool doingmain) NorthWestGravity); fl_set_object_callback(obj, C_Toolbar_ToolbarCB, static_cast(item->action)); - fl_set_object_color(obj, FL_MCOL, FL_BLUE); // Remove the blue feedback rectangle fl_set_pixmapbutton_focus_outline(obj, 0);