mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +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
|
Browser::HEIGHT
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init requirements
|
// Init components
|
||||||
this->header = new browser::Header(
|
this->header = new browser::Header(
|
||||||
this
|
this
|
||||||
);
|
);
|
||||||
|
|
@ -42,5 +42,25 @@ namespace app
|
||||||
this->gtk
|
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 WIDTH = 640;
|
||||||
const guint HEIGHT = 480;
|
const guint HEIGHT = 480;
|
||||||
|
|
||||||
|
// Constructor
|
||||||
Browser(
|
Browser(
|
||||||
GtkApplication *application
|
GtkApplication *application
|
||||||
);
|
);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Events
|
||||||
|
static void _shutdown(
|
||||||
|
GtkApplication *application
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue