mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
draft shutdown event
This commit is contained in:
parent
37f109bec4
commit
b891678dbc
2 changed files with 29 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ namespace app
|
|||
Browser::HEIGHT
|
||||
);
|
||||
|
||||
// Init requirements
|
||||
// Init components
|
||||
this->header = new browser::Header(
|
||||
this
|
||||
);
|
||||
|
|
@ -42,5 +42,25 @@ namespace app
|
|||
this->gtk
|
||||
)
|
||||
);
|
||||
|
||||
// Connect signals
|
||||
g_signal_connect(
|
||||
G_APPLICATION(
|
||||
this->application
|
||||
),
|
||||
"shutdown",
|
||||
G_CALLBACK(
|
||||
_shutdown
|
||||
),
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
// Events
|
||||
void Browser::_shutdown(
|
||||
GtkApplication *application
|
||||
) {
|
||||
// @TODO save session, clean cache, etc
|
||||
g_print("Shutdown..\n");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,9 +31,17 @@ namespace app
|
|||
const guint WIDTH = 640;
|
||||
const guint HEIGHT = 480;
|
||||
|
||||
// Constructor
|
||||
Browser(
|
||||
GtkApplication *application
|
||||
);
|
||||
|
||||
private:
|
||||
|
||||
// Events
|
||||
static void _shutdown(
|
||||
GtkApplication *application
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue