2022-06-28 14:07:12 +00:00
|
|
|
// This file Copyright © 2005-2022 Transmission authors and contributors.
|
2022-01-20 18:27:56 +00:00
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2021-10-31 21:04:31 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-12-26 21:13:21 +00:00
|
|
|
#include <libtransmission/tr-macros.h>
|
2021-10-31 21:04:31 +00:00
|
|
|
|
2022-12-27 01:43:20 +00:00
|
|
|
#include <giomm/file.h>
|
|
|
|
#include <glibmm/refptr.h>
|
|
|
|
#include <glibmm/ustring.h>
|
|
|
|
#include <gtkmm/application.h>
|
2021-10-31 21:04:31 +00:00
|
|
|
|
2022-12-26 21:13:21 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2021-12-14 08:43:27 +00:00
|
|
|
|
2021-10-31 21:04:31 +00:00
|
|
|
class Application : public Gtk::Application
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Application(std::string const& config_dir, bool start_paused, bool is_iconified);
|
|
|
|
~Application() override;
|
|
|
|
|
2021-12-14 08:43:27 +00:00
|
|
|
TR_DISABLE_COPY_MOVE(Application)
|
|
|
|
|
|
|
|
friend void gtr_actions_handler(Glib::ustring const& action_name, gpointer user_data);
|
2021-10-31 21:04:31 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void on_startup() override;
|
|
|
|
void on_activate() override;
|
|
|
|
void on_open(std::vector<Glib::RefPtr<Gio::File>> const& f, Glib::ustring const& hint) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
class Impl;
|
|
|
|
std::unique_ptr<Impl> const impl_;
|
|
|
|
};
|