[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] [PATCH] Don't hard code explicit wxDatePickerCtrl size
From: |
Greg Chicares |
Subject: |
Re: [lmi] [PATCH] Don't hard code explicit wxDatePickerCtrl size |
Date: |
Sun, 01 Feb 2015 16:23:19 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 |
On 02/01/2015 11:07 AM, Vadim Zeitlin wrote:
> On Sat, 31 Jan 2015 19:52:25 +0000 Greg Chicares <address@hidden> wrote:
[...]
> GC>
> GC> /opt/lmi/build[0]$LC_TIME="en_DK"
> LD_LIBRARY_PATH=/usr/local/lib:/opt/lmi/local/lib ./lmi_wx --ash_nazg
> GC> locale::facet::_S_create_c_locale name not valid
> GC>
> GC> That would appear to be a libstdc++ issue.
>
> I think it's a Boost.Filesystem one, see
> https://svn.boost.org/trac/boost/ticket/4688
Wow.
> If I understand this bug correctly, it should be possible to work around
> this by using en_DK.UTF-8 explicitly here instead of just en_DK. But I
> haven't had time to actually test this yet, will do a.s.a.p.
/opt/lmi/build[0]$LC_TIME="en_DK.UTF-8"
LD_LIBRARY_PATH=/usr/local/lib:/opt/lmi/local/lib ./lmi_wx --ash_nazg
You have new mail.
/opt/lmi/build[0]$
It doesn't abend, but it displays dates as "02/01/2015", not as in...
/opt/lmi/build[0]$LC_TIME="en_DK.UTF-8" date +%x
2015-02-01
And it sends me mail? Wait, it's from 'anacron', and it says:
/etc/cron.daily/man-db:
/usr/bin/mandb: can't set the locale; make sure $LC_* and $LANG are correct
$env |grep '^L'
LOGNAME=greg
LANG=en_US.UTF-8
LIBGLADE_MODULE_PATH=:
cat /etc/default/locale
# File generated by update-locale
LANG="en_US.UTF-8"
# Added by GWC.
LC_TIME="en_DK.UTF-8" date +%x
^^^^^^^^^
I copied and pasted to make sure I got it "right". I've corrected that now:
$grep TIME /etc/default/locale
LC_TIME="en_DK.UTF-8"
which ought to be correct by analogy with this:
https://wiki.debian.org/Locale
| To get this desired behaviour you can add the following to
/etc/default/locale:
| LC_TIME="en_GB.UTF-8"
But I still see "02/01/2015" in lmi, run as follows (this is still my gtk2
build):
/opt/lmi/build[0]$echo $LC_TIME
/opt/lmi/build[0]$. /etc/default/locale
/opt/lmi/build[0]$echo $LC_TIME
en_DK.UTF-8
/opt/lmi/build[0]$LC_TIME="en_DK.UTF-8"
LD_LIBRARY_PATH=/usr/local/lib:/opt/lmi/local/lib ./lmi_wx --ash_nazg
/opt/lmi/build[0]$LD_LIBRARY_PATH=/usr/local/lib:/opt/lmi/local/lib ./lmi_wx
--ash_nazg
It's "02/01/2015" whether or not I override LC_TIME on the command line.
> GC> > GC> Anyway, there are many other issues:
> GC> > GC> - Numeric textcontrols on "Inforce" tab (e.g.) are not wide enough.
> GC> >
> GC> > This is almost certainly due to hardcoding their width to 80 pixels.
> GC>
> GC> Yes, of course. That's under my control. I just won't have the time to
> GC> address all of this soon: doing it carefully takes a lot of work.
>
> Should I try to propose a patch fixing this?
Sure, subject to:
- With 'skin.xrc' at least, the tabbed dialog should fit on the screen even
at 800x600 resolution (it's about 735x544 already). Two reasons: (1) I
sometimes use that resolution; (2) this dialog is already arguably too big.
- Whatever favorable aesthetic properties the skins already possess should
not be impaired. Just now I compared gtk (with your date-control-width
patch) to msw (without that patch), and the only complaint I have is the
one above:
> GC> > GC> - Numeric textcontrols on "Inforce" tab (e.g.) are not wide enough.
in addition to a suspicion that the patch makes dialog width exceed 800.
> GC> /opt/lmi/wx-scratch[0]$/opt/lmi/wxWidgets/configure --with-gtk3
> --enable-std_string --disable-threads --disable-apple_ieee --without-libjpeg
> --without-libtiff --disable-gif --enable-stl --disable-joystick
> --prefix=/opt/lmi/local >log 2>&1
>
> Sorry, I totally failed to notice it the last time, but the option is
> wrong: it should be "--with-gtk=3". As unknown --with and --enable options
> are ignored by configure by design, this went unnoticed but GTK+ 2 was
> still the default.
>
> Unfortunately there doesn't seem to be much we can do about it, according
> to http://www.hep.by/gnu/autoconf/Option-Checking.html it is mostly under
> user control, e.g. you could do this:
>
> % $wx/configure --enable-option-checking=fatal --with-gtk3
> configure: error: unrecognized options: --with-gtk3
>
> GC> /opt/lmi/wx-scratch[0]$grep -i gtk log
> GC> checking for toolkit... gtk
> GC> checking for --without-gtkprint... no
> GC> checking for GTK+ version...
> GC> checking for GTK+ - version >= 2.6.0... yes (version 2.24.10)
>
> FWIW the output I get here (Debian Wheezy) is:
>
> checking for GTK+ version...
> checking for pkg-config... /usr/bin/pkg-config
> checking for GTK+ - version >= 3.0.0... yes (version 3.4.2)
Same here now:
checking for GTK+ version...
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 3.0.0... yes (version 3.4.2)
Here are all the warnings I see--all for deprecated gtk stuff:
/opt/lmi/wxWidgets/src/gtk/fontdlg.cpp:45:30: warning: ‘gchar*
gtk_font_selection_dialog_get_font_name(GtkFontSelectionDialog*)’ is deprecated
(declared at /usr/include/gtk-3.0/gtk/deprecated/gtkfontsel.h:151): Use
'GtkFontChooser' instead [-Wdeprecated-declarations]
/opt/lmi/wxWidgets/src/gtk/fontdlg.cpp:45:73: warning: ‘gchar*
gtk_font_selection_dialog_get_font_name(GtkFontSelectionDialog*)’ is deprecated
(declared at /usr/include/gtk-3.0/gtk/deprecated/gtkfontsel.h:151): Use
'GtkFontChooser' instead [-Wdeprecated-declarations]
/opt/lmi/wxWidgets/src/gtk/fontdlg.cpp:86:20: warning: ‘GtkWidget*
gtk_font_selection_dialog_new(const gchar*)’ is deprecated (declared at
/usr/include/gtk-3.0/gtk/deprecated/gtkfontsel.h:142): Use 'GtkFontChooser'
instead [-Wdeprecated-declarations]
/opt/lmi/wxWidgets/src/gtk/fontdlg.cpp:86:69: warning: ‘GtkWidget*
gtk_font_selection_dialog_new(const gchar*)’ is deprecated (declared at
/usr/include/gtk-3.0/gtk/deprecated/gtkfontsel.h:142): Use 'GtkFontChooser'
instead [-Wdeprecated-declarations]
/opt/lmi/wxWidgets/src/gtk/fontdlg.cpp:109:17: warning: ‘gboolean
gtk_font_selection_dialog_set_font_name(GtkFontSelectionDialog*, const gchar*)’
is deprecated (declared at
/usr/include/gtk-3.0/gtk/deprecated/gtkfontsel.h:153): Use 'GtkFontChooser'
instead [-Wdeprecated-declarations]
/opt/lmi/wxWidgets/src/gtk/fontdlg.cpp:109:82: warning: ‘gboolean
gtk_font_selection_dialog_set_font_name(GtkFontSelectionDialog*, const gchar*)’
is deprecated (declared at
/usr/include/gtk-3.0/gtk/deprecated/gtkfontsel.h:153): Use 'GtkFontChooser'
instead [-Wdeprecated-declarations]
/opt/lmi/wxWidgets/src/gtk/dataview.cpp:3511:5: warning: ‘void
gtk_widget_get_pointer(GtkWidget*, gint*, gint*)’ is deprecated (declared at
/usr/include/gtk-3.0/gtk/gtkwidget.h:747): Use 'gdk_window_get_device_position'
instead [-Wdeprecated-declarations]
/opt/lmi/wxWidgets/src/gtk/dataview.cpp:3511:61: warning: ‘void
gtk_widget_get_pointer(GtkWidget*, gint*, gint*)’ is deprecated (declared at
/usr/include/gtk-3.0/gtk/gtkwidget.h:747): Use 'gdk_window_get_device_position'
instead [-Wdeprecated-declarations]
But compiling lmi fails:
In file included from /usr/include/gtk-2.0/gdk/gdkscreen.h:32:0,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from /opt/lmi/src/lmi/skeleton.cpp:113:
/usr/include/gtk-2.0/gdk/gdktypes.h:114:39: error: conflicting declaration
'typedef struct _GdkDrawable GdkWindow'
In file included from /opt/lmi/local/include/wx-3.1/wx/event.h:14:0,
from /opt/lmi/local/include/wx-3.1/wx/app.h:19,
from /opt/lmi/src/lmi/skeleton.hpp:41,
from /opt/lmi/src/lmi/skeleton.cpp:39:
/opt/lmi/local/include/wx-3.1/wx/defs.h:3256:31: error: 'GdkWindow' has a
previous declaration as 'typedef struct _GdkWindow GdkWindow'
make[1]: *** [libskeleton_la-skeleton.lo] Error 1