mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-31 13:32:33 +02:00
Minor cleanups.
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
#if defined(Hiro_Application)
|
||||
|
||||
#include <nall/terminal.hpp>
|
||||
|
||||
namespace hiro {
|
||||
|
||||
auto Log_Ignore(const char* logDomain, GLogLevelFlags logLevel, const char* message, void* userData) -> void {
|
||||
}
|
||||
|
||||
auto Log_Filter(const char* logDomain, GLogLevelFlags logLevel, const char* message, void* userData) -> void {
|
||||
//FreeBSD 12.0: caused by gtk_combo_box_size_allocate() internal function being defective
|
||||
if(string{message}.find("gtk_widget_size_allocate():")) return;
|
||||
|
||||
//prin all other messages
|
||||
print(terminal::color::yellow("hiro: "), logDomain, "::", message, "\n");
|
||||
}
|
||||
|
||||
auto pApplication::modal() -> bool {
|
||||
return Application::state().modal > 0;
|
||||
}
|
||||
@@ -92,6 +102,8 @@ auto pApplication::initialize() -> void {
|
||||
//prevent useless terminal messages:
|
||||
//GVFS-RemoteVolumeMonitor: "invoking List() failed for type GProxyVolumeMonitorHal: method not implemented"
|
||||
g_log_set_handler("GVFS-RemoteVolumeMonitor", G_LOG_LEVEL_MASK, Log_Ignore, nullptr);
|
||||
//Gtk: gtk_widget_size_allocate(): attempt to allocate widget with (width or height < 1)
|
||||
g_log_set_handler("Gtk", G_LOG_LEVEL_MASK, Log_Filter, nullptr);
|
||||
|
||||
//set WM_CLASS to Application::name()
|
||||
auto name = Application::state().name ? Application::state().name : string{"hiro"};
|
||||
|
Reference in New Issue
Block a user