[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] using standard icon sizes and wxArtProvider
From: |
Vaclav Slavik |
Subject: |
Re: [lmi] using standard icon sizes and wxArtProvider |
Date: |
Thu, 02 Oct 2008 17:09:24 +0200 |
On Sun, 2008-08-24 at 14:23 +0000, Greg Chicares wrote:
> Let me ask you to convert them, too, please. Consistency is a good
> enough reason. Another good reason is that firefox doesn't display the
> XPM icons that I have embedded in html help (though wxHTML does), and
> I'd like the user manual to be browsable online. Using your PNG icons
> in the html solves the firefox problem.
Here's how to do it:
1. Convert remaining XPM files into PNGs with ImageMagick:
$ for i in *.xpm ; do convert $i `basename $i .xpm`.png ; done
$ rm -f *.xpm
2. Change references to XPMs to PNGs in data files:
$ sed --in-place -e 's/\.xpm/.png/g' *.html
$ sed --in-place -e 's/\.xpm/.png/g' *.xrc
(in docs and sources local copies respectively)
3. Apply the patch below to remove XPMs stuff from makefiles and
sources.
I think it would be best for me to do this myself so that you don't have
to redo the steps I already did, but I would appreciate your review of
the patch from step 3. and its test_coding_rules* part in particular.
Thanks,
Vaclav
Index: Makefile.am
===================================================================
RCS file: /sources/lmi/lmi/Makefile.am,v
retrieving revision 1.60
diff -u -u -r1.60 Makefile.am
--- Makefile.am 2 Oct 2008 14:29:32 -0000 1.60
+++ Makefile.am 2 Oct 2008 14:52:18 -0000
@@ -58,7 +58,7 @@
# data files
xrcdir = $(pkgdatadir)
-dist_xrc_DATA = $(shell ls -1 $(srcdir)/*.png $(srcdir)/*.xrc $(srcdir)/*.xpm)
+dist_xrc_DATA = $(shell ls -1 $(srcdir)/*.png $(srcdir)/*.xrc)
xsldir = $(pkgdatadir)
dist_xsl_DATA = $(shell ls -1 $(srcdir)/*.xsl)
Index: README
===================================================================
RCS file: /sources/lmi/lmi/README,v
retrieving revision 1.6
diff -u -u -r1.6 README
--- README 2 Oct 2008 01:12:13 -0000 1.6
+++ README 2 Oct 2008 14:52:18 -0000
@@ -23,7 +23,7 @@
* Copyright and license notices for graphics files
-The following graphics files (*.ico *.xpm *.png) in this directory are
+The following graphics files (*.ico *.png) in this directory are
copyrighted and subject to the
GNU General Public License version 2
as stated at the top of this file. They are original works except for
Index: autogen.sh
===================================================================
RCS file: /sources/lmi/lmi/autogen.sh,v
retrieving revision 1.7
diff -u -u -r1.7 autogen.sh
--- autogen.sh 1 Jan 2008 18:29:35 -0000 1.7
+++ autogen.sh 2 Oct 2008 14:52:18 -0000
@@ -25,7 +25,7 @@
# $Id: autogen.sh,v 1.7 2008/01/01 18:29:35 chicares Exp $
-if [ ! -f configure.ac -o ! -f Makefile.am -o ! -f lmi.xpm ]; then
+if [ ! -f configure.ac -o ! -f Makefile.am -o ! -f lmi.png ]; then
echo "Please run this script from the lmi source directory."
exit 2
fi
Index: configure.ac
===================================================================
RCS file: /sources/lmi/lmi/configure.ac,v
retrieving revision 1.40
diff -u -u -r1.40 configure.ac
--- configure.ac 2 Oct 2008 14:29:32 -0000 1.40
+++ configure.ac 2 Oct 2008 14:52:18 -0000
@@ -27,7 +27,7 @@
AC_INIT(LMI, 1.0.0, address@hidden)
AM_INIT_AUTOMAKE()
-AC_CONFIG_SRCDIR([lmi.xpm])
+AC_CONFIG_SRCDIR([lmi.png])
AC_CONFIG_HEADER([config.h])
dnl remember, "build" is where we compile, "host" is where the resulting
Index: main_wx.cpp
===================================================================
RCS file: /sources/lmi/lmi/main_wx.cpp,v
retrieving revision 1.121
diff -u -u -r1.121 main_wx.cpp
--- main_wx.cpp 2 Oct 2008 01:55:31 -0000 1.121
+++ main_wx.cpp 2 Oct 2008 14:52:19 -0000
@@ -107,10 +107,6 @@
# include <gtk/gtk.h>
#endif
-#if !defined LMI_MSW
-# include "lmi.xpm"
-#endif // !defined LMI_MSW
-
IMPLEMENT_APP_NO_MAIN(Skeleton)
IMPLEMENT_WX_THEME_SUPPORT
@@ -467,7 +463,7 @@
// '.ico' file; but this shows the color icon:
frame_->SetIcons(wxICON(AAAAAAAA));
#else // Not defined LMI_MSW.
- frame_->SetIcon(wxICON(lmi));
+ frame_->SetIcon(wxIcon(AddDataDir("lmi.png")));
#endif // Not defined LMI_MSW.
}
Index: test_coding_rules.cpp
===================================================================
RCS file: /sources/lmi/lmi/test_coding_rules.cpp,v
retrieving revision 1.77
diff -u -u -r1.77 test_coding_rules.cpp
--- test_coding_rules.cpp 25 Jun 2008 23:51:30 -0000 1.77
+++ test_coding_rules.cpp 2 Oct 2008 14:52:20 -0000
@@ -97,7 +97,6 @@
,e_touchstone = 1 << 14
,e_xml_input = 1 << 15
,e_xml_other = 1 << 16
- ,e_xpm = 1 << 17
};
enum enum_kingdom
@@ -199,7 +198,6 @@
: ".xrc" == extension() ? e_xml_other
: ".xsd" == extension() ? e_xml_other
: ".xsl" == extension() ? e_xml_other
- : ".xpm" == extension() ? e_xpm
: phyloanalyze("^COPYING$") ? e_gpl
: phyloanalyze("^quoted_gpl") ? e_gpl
: phyloanalyze("Log$") ? e_log
@@ -323,7 +321,6 @@
( !f.is_of_phylum(e_gpl)
&& !f.is_of_phylum(e_make)
&& !f.is_of_phylum(e_patch)
- && !f.is_of_phylum(e_xpm)
&& std::string::npos != f.data().find('\t')
)
{
@@ -413,7 +410,6 @@
|| f.is_of_phylum(e_patch)
|| f.is_of_phylum(e_touchstone)
|| f.is_of_phylum(e_xml_input)
- || f.is_of_phylum(e_xpm)
)
{
return;
@@ -499,7 +495,7 @@
void check_defect_markers(file const& f)
{
- if(f.is_of_phylum(e_xpm) || f.phyloanalyze("^test_coding_rules_test.sh$"))
+ if(f.phyloanalyze("^test_coding_rules_test.sh$"))
{
return;
}
@@ -674,7 +670,6 @@
|| f.is_of_phylum(e_patch)
|| f.is_of_phylum(e_touchstone)
|| f.is_of_phylum(e_xml_input)
- || f.is_of_phylum(e_xpm)
)
{
return;
@@ -854,22 +849,6 @@
}
}
-void check_xpm(file const& f)
-{
- if(!f.is_of_phylum(e_xpm))
- {
- return;
- }
-
- std::string const name = boost::regex_replace
- (f.leaf_name()
- ,boost::regex("[.-]")
- ,"_"
- );
- std::string const z = "static char const\\* " + name + "\\[\\] = \\{";
- require(f, z, "lacks proper variable assignment.");
-}
-
void enforce_taboos(file const& f)
{
if(f.phyloanalyze("test_coding_rules"))
@@ -980,7 +959,6 @@
|| f.is_of_phylum(e_patch)
|| f.is_of_phylum(e_touchstone)
|| f.is_of_phylum(e_xml_input)
- || f.is_of_phylum(e_xpm)
|| f.phyloanalyze("^INSTALL")
|| f.phyloanalyze("^README")
)
@@ -1045,7 +1023,6 @@
check_logs (f);
check_preamble (f);
check_reserved_names (f);
- check_xpm (f);
enforce_taboos (f);
Index: test_coding_rules_test.sh
===================================================================
RCS file: /sources/lmi/lmi/test_coding_rules_test.sh,v
retrieving revision 1.40
diff -u -u -r1.40 test_coding_rules_test.sh
--- test_coding_rules_test.sh 25 Jun 2008 23:51:30 -0000 1.40
+++ test_coding_rules_test.sh 2 Oct 2008 14:52:20 -0000
@@ -375,30 +375,6 @@
${ascii_ht}
EOF
-# X pixmaps.
-
-cat >eraseme_xpm_000.xpm <<EOF
-No boilerplate is required.
-static char const* eraseme_xpm_000_xpm[] = {
-EOF
-
-cat >eraseme_xpm_001.xpm <<EOF
-'const' is required.
-static char* eraseme_xpm_001_xpm[] = {
-EOF
-
-cat >eraseme_xpm_002.xpm <<EOF
-Variable name must match file name, with an underscore in place of any
-character that isn't allowed in a variable name.
-static char const* wrong_file_002_xpm[] = {
-EOF
-
-cat >eraseme_xpm_003-dot.dash-dot.xpm <<EOF
-Hyphens in file name must be changed to underscores in variable name.
-static char const* eraseme_xpm_003_dot_dash_dot_xpm[] = {
-Furthermore, this file's name is excessively long.
-EOF
-
touch an_expungible_file.bak
touch an_unexpected_file
touch another.unexpected.file
@@ -477,9 +453,6 @@
Exception--file 'eraseme_whitespace_002': File contains '\r' or '\v'.
Exception--file 'eraseme_whitespace_003': File contains '\t'.
Exception--file 'eraseme_whitespace_004': File contains '\r' or '\v'.
-File 'eraseme_xpm_001.xpm' lacks proper variable assignment.
-File 'eraseme_xpm_002.xpm' lacks proper variable assignment.
-File 'eraseme_xpm_003-dot.dash-dot.xpm' exceeds 31-character file-name limit.
EOF
diff --unified=0 eraseme_expected eraseme_observed && rm --force \
Index: workhorse.make
===================================================================
RCS file: /sources/lmi/lmi/workhorse.make,v
retrieving revision 1.129
diff -u -u -r1.129 workhorse.make
--- workhorse.make 1 Oct 2008 23:17:24 -0000 1.129
+++ workhorse.make 2 Oct 2008 14:52:20 -0000
@@ -805,7 +805,7 @@
touchstone_dir := $(exec_prefix)/touchstone
data_files := \
- $(wildcard $(addprefix $(src_dir)/,*.png *.xml *.xpm *.xrc *.xsd *.xsl)) \
+ $(wildcard $(addprefix $(src_dir)/,*.png *.xml *.xrc *.xsd *.xsl)) \
help_files := \
$(wildcard $(addprefix $(htmldir)/,*.html *.hhc *.hhp)) \
Re: [lmi] using standard icon sizes and wxArtProvider, Greg Chicares, 2008/10/04