Skip to content

Commit

Permalink
Load default config before setting CLI options
Browse files Browse the repository at this point in the history
This prevents CLI options to be overridden by the default config.

Fixes <jgke#38>.
  • Loading branch information
lo48576 committed Jun 7, 2019
1 parent b72c6ab commit 070ba53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ static void startup(GtkApplication *app, gpointer user_data)
{
g_bus_get(G_BUS_TYPE_SYSTEM, NULL, dbus_connected, NULL);

config_load(app);
if(no_icon)
status_icon_enabled = FALSE;

Expand Down Expand Up @@ -687,6 +686,7 @@ int main(int argc, char *argv[])
(GDestroyNotify)remove_service_struct);

app = gtk_application_new(NULL, G_APPLICATION_FLAGS_NONE);
config_load(app);
g_application_add_main_option_entries(G_APPLICATION(app), options);
g_signal_connect(app, "startup", G_CALLBACK(startup), NULL);
g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
Expand Down

0 comments on commit 070ba53

Please sign in to comment.