WIP: deploy new logging flags in gui

This commit is contained in:
Christian Thaeter 2009-01-24 03:13:54 +01:00
parent 6a5951bad6
commit 9aefc2e971
10 changed files with 21 additions and 12 deletions

View file

@ -24,6 +24,7 @@
#include "render.hpp"
#include "dialog.hpp"
#include "common/logging.h"
using namespace Gtk;

View file

@ -43,7 +43,7 @@ extern "C" {
#include <gavl/gavltime.h>
}
NOBUG_DECLARE_FLAG(gui);
//NOBUG_DECLARE_FLAG(gui);
#ifdef ENABLE_NLS
# include <libintl.h>

View file

@ -48,7 +48,7 @@
#include <locale> // need to include this to prevent errors when libintl.h defines textdomain (because gtk-lumiera removes the def when ENABLE_NLS isn't defined)
#include "gui/gtk-lumiera.hpp" // need to include this before nobugcfg.h, because types.h from GTK tries to shaddow the ERROR macro from windows, which kills nobug's ERROR macro
#include "include/nobugcfg.h"
// TODO not needed? #include "common/logging.h"
#include "lib/error.hpp"
#include "gui/guifacade.hpp"
#include "gui/notification-service.hpp"

View file

@ -21,6 +21,7 @@
* *****************************************************/
#include "sequence.hpp"
#include "common/logging.h"
// TEST CODE
#include "group-track.hpp"

View file

@ -23,7 +23,7 @@
#include "gui/notification-service.hpp"
#include "lib/singleton.hpp"
#include "include/nobugcfg.h"
#include "common/logging.h"
#include "lib/util.hpp"
extern "C" {
@ -44,7 +44,7 @@ namespace gui {
void
NotificationService::displayInfo (string const& text)
{
INFO (operate, "@GUI: display '%s' as notification message.", cStr(text));
INFO (gui, "@GUI: display '%s' as notification message.", cStr(text));
////////////////////////TODO actually push the information to the GUI
}
@ -52,7 +52,7 @@ namespace gui {
void
NotificationService::triggerGuiShutdown (string const& cause)
{
NOTICE (operate, "@GUI: shutdown triggered with explanation '%s'....", cStr(cause));
NOTICE (gui, "@GUI: shutdown triggered with explanation '%s'....", cStr(cause));
TODO ("actually request a shutdown from the GUI");
}
@ -173,7 +173,7 @@ namespace gui {
: implInstance_(this,_instance),
serviceInstance_( LUMIERA_INTERFACE_REF (lumieraorg_GuiNotification, 1,lumieraorg_GuiNotificationFacade))
{
INFO (operate, "GuiNotification Facade opened.");
INFO (gui, "GuiNotification Facade opened.");
}

View file

@ -27,6 +27,7 @@
#include <gdk/gdkx.h>
#include "xvdisplayer.hpp"
#include "common/logging.h"
namespace gui {
namespace output {
@ -126,13 +127,13 @@ XvDisplayer::XvDisplayer( Gtk::Widget *drawing_area, int width, int height ) :
{
Atom val_atom = XInternAtom( display, xvattr[k].name, False );
if ( XvSetPortAttribute( display, grabbedPort, val_atom, 1 ) != Success )
ERROR(gui, "Couldn't set Xv attribute %s\n", xvattr[k].name);
NOBUG_ERROR(gui, "Couldn't set Xv attribute %s\n", xvattr[k].name);
}
else if ( strcmp( xvattr[k].name, "XV_COLORKEY") == 0 )
{
Atom val_atom = XInternAtom( display, xvattr[k].name, False );
if ( XvSetPortAttribute( display, grabbedPort, val_atom, 0x010102 ) != Success )
ERROR(gui, "Couldn't set Xv attribute %s\n", xvattr[k].name);
NOBUG_ERROR(gui, "Couldn't set Xv attribute %s\n", xvattr[k].name);
}
}
}
@ -173,7 +174,7 @@ XvDisplayer::XvDisplayer( Gtk::Widget *drawing_area, int width, int height ) :
XvDisplayer::~XvDisplayer()
{
ERROR(gui, "Destroying XV Displayer");
NOBUG_ERROR(gui, "Destroying XV Displayer");
if ( gotPort )
{

View file

@ -29,6 +29,7 @@
#include "timeline-arrow-tool.hpp"
#include "timeline-ibeam-tool.hpp"
#include "common/logging.h"
using namespace Gtk;
using namespace std;

View file

@ -27,6 +27,7 @@
#include "../timeline-widget.hpp"
#include "../../window-manager.hpp"
#include "../../dialogs/name-chooser.hpp"
#include "common/logging.h"
using namespace boost;
using namespace Gtk;
@ -209,7 +210,8 @@ Track::get_expander_style() const
return EXPANDER_SEMI_COLLAPSED;
}
ERROR(gui, "Track::get_expander_style() final return reached");
NOBUG_ERROR(gui, "Track::get_expander_style() final return reached");
return EXPANDER_COLLAPSED; // This should never happen
}

View file

@ -21,6 +21,7 @@
* *****************************************************/
#include "window-manager.hpp"
#include "common/logging.h"
using namespace Gtk;
using namespace Glib;
@ -41,7 +42,8 @@ WindowManager::set_theme(Glib::ustring path)
{
if(access(path.c_str(), R_OK))
{
ERROR(gui, "WindowManger: Unable to load rc file \"%s\"",
// gdk defines 'ERROR' need to prefix it with 'NOBUG_' here
NOBUG_ERROR(gui, "WindowManger: Unable to load rc file \"%s\"",
path.c_str());
return false;
}

View file

@ -34,6 +34,7 @@
#include "../gtk-lumiera.hpp"
#include "workspace-window.hpp"
#include "common/logging.h"
using namespace Gtk;
using namespace gui::model;
@ -142,7 +143,7 @@ WorkspaceWindow::create_ui()
}
catch(const Glib::Error& ex)
{
ERROR(gui, "Building menus failed: %s", ex.what().data());
NOBUG_ERROR(gui, "Building menus failed: %s", ex.what().data());
return;
}