tv_rename/gui.cpp

32 lines
838 B
C++

#include "functions.hpp"
#include <errno.h>
#include <error.h>
#include <gtkmm/application.h>
#include <libintl.h>
#include <locale.h>
#include "mainwindow.hpp"
#include "resources_linux.h"
#include "tv_rename.hpp"
#define API_KEY "42B66F5E-C6BF-423F-ADF9-CC97163472F6"
#define DOMAIN "tv_rename"
int main( int argc, char **argv ) {
auto app = Gtk::Application::create(
argc, argv, "org.idonthaveanorganization.tvrename" );
if ( setlocale( LC_ALL, "" ) == NULL )
error( 1, errno, _( INVALID_LOCALE ).c_str() );
if ( bindtextdomain( DOMAIN, "./locale" ) == NULL )
error( 1, errno, _( MEM_ALLOC_FAILED ).c_str() );
if ( textdomain( DOMAIN ) == NULL )
error( 1, errno, _( MEM_ALLOC_FAILED ).c_str() );
authenticate( API_KEY );
MainWindow mw( app );
return app->run( mw );
}