[Spice-devel] [PATCH spice] spicec: Make cegui log to <app_data_dir>/cegui.log

Alon Levy alevy at redhat.com
Sun Nov 7 01:43:20 PST 2010


ACK

On Fri, Nov 05, 2010 at 08:57:55PM +0100, Hans de Goede wrote:
> This stops the client from dropping CEGUI.log files into the cwd all
> the time, and stops it from crashing when the cwd is not writable
> (rhbz#650253).
> ---
>  client/gui/gui.cpp |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/client/gui/gui.cpp b/client/gui/gui.cpp
> index f1ca13d..d8513c6 100644
> --- a/client/gui/gui.cpp
> +++ b/client/gui/gui.cpp
> @@ -891,7 +891,6 @@ GUI::GUI(Application& app, Application::State state)
>      , _pixmap (new RedPixmapSw(MAIN_GUI_WIDTH, MAIN_GUI_HEIGHT, RedDrawable::RGB32, true, 0))
>      , _renderer (new CEGUI::SoftRenderer(_pixmap->get_data(), MAIN_GUI_WIDTH, MAIN_GUI_HEIGHT,
>                                           _pixmap->get_stride()))
> -    , _gui_system (new CEGUI::System(_renderer, new CEGUIResourceProvider()))
>      , _dialog (NULL)
>      , _prev_time (Platform::get_monolithic_time())
>  
> @@ -919,6 +918,14 @@ GUI::~GUI()
>  
>  void GUI::init_cegui()
>  {
> +    std::string log_file_name;
> +
> +    Platform::get_app_data_dir(log_file_name, "spicec");
> +    Platform::path_append(log_file_name, "cegui.log");
> +
> +    _gui_system = new CEGUI::System(_renderer, new CEGUIResourceProvider(),
> +                                    NULL, NULL, "", log_file_name);
> +
>      CEGUI::SchemeManager::getSingleton().loadScheme("TaharezLook.scheme");
>      _gui_system->setDefaultMouseCursor("TaharezLook", "MouseArrow");
>      _gui_system->setDefaultTooltip("TaharezLook/Tooltip");
> -- 
> 1.7.3.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list