mirror of
https://github.com/jtheoof/swappy.git
synced 2024-10-26 15:44:47 +03:00
res: have font awesome working
This commit is contained in:
parent
58aa1c4db4
commit
8424397130
@ -45,7 +45,9 @@ struct swappy_box {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct swappy_state {
|
struct swappy_state {
|
||||||
|
GResource *resource;
|
||||||
GtkApplication *app;
|
GtkApplication *app;
|
||||||
|
|
||||||
GtkWindow *window;
|
GtkWindow *window;
|
||||||
GtkWidget *area;
|
GtkWidget *area;
|
||||||
GtkPopover *popover;
|
GtkPopover *popover;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#popover .drawing {
|
.drawing .text-button {
|
||||||
font-family: 'Waybar';
|
font-family: "FontAwesome 5 Free Solid";
|
||||||
}
|
}
|
@ -25,6 +25,7 @@ void application_finish(struct swappy_state *state) {
|
|||||||
g_free(state->storage_path);
|
g_free(state->storage_path);
|
||||||
g_free(state->geometry_str);
|
g_free(state->geometry_str);
|
||||||
g_free(state->geometry);
|
g_free(state->geometry);
|
||||||
|
g_resources_unregister(state->resource);
|
||||||
g_object_unref(state->app);
|
g_object_unref(state->app);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,6 +338,7 @@ static gint command_line_handler(GtkApplication *app,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool application_init(struct swappy_state *state) {
|
bool application_init(struct swappy_state *state) {
|
||||||
|
GError *error = NULL;
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
||||||
const GOptionEntry cli_options[] = {
|
const GOptionEntry cli_options[] = {
|
||||||
@ -361,6 +363,15 @@ bool application_init(struct swappy_state *state) {
|
|||||||
|
|
||||||
g_application_add_main_option_entries(G_APPLICATION(state->app), cli_options);
|
g_application_add_main_option_entries(G_APPLICATION(state->app), cli_options);
|
||||||
|
|
||||||
|
state->resource = g_resource_load("build/meson-out/swappy.gresource", &error);
|
||||||
|
|
||||||
|
if (error != NULL) {
|
||||||
|
g_error("unable to load swappy resource file: %s", error->message);
|
||||||
|
g_error_free(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_resources_register(state->resource);
|
||||||
|
|
||||||
g_signal_connect(state->app, "command-line", G_CALLBACK(command_line_handler),
|
g_signal_connect(state->app, "command-line", G_CALLBACK(command_line_handler),
|
||||||
state);
|
state);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user