Browse Source

drop lightdm from config and desktop file names.

sisyphus
Dustin Falgout 8 years ago
parent
commit
9a1d916918
  1. 0
      data/com.antergos.webkit2-greeter.appdata.xml
  2. 0
      data/com.antergos.webkit2-greeter.desktop
  3. 9
      data/meson.build
  4. 0
      data/webkit2-greeter.conf
  5. 8
      meson.build
  6. 31
      src/greeter.c

0
data/com.antergos.lightdm-webkit2-greeter.appdata.xml → data/com.antergos.webkit2-greeter.appdata.xml

0
data/com.antergos.lightdm-webkit2-greeter.desktop → data/com.antergos.webkit2-greeter.desktop

9
data/meson.build

@ -1,12 +1,15 @@
appdata_file = 'com.antergos.lightdm-webkit2-greeter.appdata.xml'
id = 'com.antergos.webkit2-greeter'
appdata_file = '@0@.appdata.xml'.format(id)
desktop_file = '@0@.desktop'.format(id)
install_data(
'com.antergos.lightdm-webkit2-greeter.desktop',
desktop_file,
install_dir: get_option('with-desktop-dir')
)
install_data(
'lightdm-webkit2-greeter.conf',
'webkit2-greeter.conf',
install_dir: get_option('with-config-dir')
)

0
data/lightdm-webkit2-greeter.conf → data/webkit2-greeter.conf

8
meson.build

@ -37,6 +37,8 @@ has_gtk_3_22 = gtk3.version().version_compare('>=3.22')
# =================================== #
conf = configuration_data()
config_file = 'webkit2-greeter.conf'
config_file_legacy = 'lightdm-webkit2-greeter.conf'
conf.set('VERSION', as_version)
conf.set('PACKAGE_VERSION', as_version)
@ -52,11 +54,15 @@ conf.set('THEME_DIR', '"@0@"'.format(get_option('with-theme-dir')))
conf.set('CONFIG_DIR', '"@0@"'.format(get_option('with-config-dir')))
conf.set('CONFIG_FILE', '"@0@/@1@"'.format(get_option('with-config-dir'), config_file)
conf.set('CONFIG_FILE_LEGACY', '"@0@/@1@"'.format(get_option('with-config-dir'), config_file_legacy)
conf.set('DESKTOP_DIR', '"@0@"'.format(get_option('with-desktop-dir')))
conf.set('WEBEXT_DIR', '"@0@"'.format(get_option('with-webext-dir')))
conf.set('GRESOURCE_PATH', '"/com/antergos/lightdm-webkit2-greeter"')
conf.set('GRESOURCE_PATH', '"/com/antergos/webkit2-greeter"')
if has_webkitgtk_2_14
conf.set('HAS_WEBKITGTK_2_14', has_webkitgtk_2_14)

31
src/greeter.c

@ -364,17 +364,24 @@ main(int argc, char **argv) {
g_unix_signal_add(SIGINT, (GSourceFunc) quit_cb, NULL);
g_unix_signal_add(SIGHUP, (GSourceFunc) quit_cb, NULL);
/* BEGIN Greeter Config File */
/* BEGIN Load Greeter Config */
/* TODO: Handle config values and fallbacks some other way, this is ugly! */
keyfile = g_key_file_new();
g_key_file_load_from_file(
keyfile,
CONFIG_DIR "/lightdm-webkit2-greeter.conf",
G_KEY_FILE_NONE,
NULL
);
g_key_file_load_from_file(keyfile, CONFIG_FILE, G_KEY_FILE_NONE, &err);
if (NULL != err) {
g_clear_error(&err);
g_key_file_load_from_file(keyfile, CONFIG_FILE_LEGACY, G_KEY_FILE_NONE, &err);
if (NULL != err) {
// Unable to load config file. Use defaults.
theme = "antergos";
config_timeout = 300;
debug_mode = FALSE;
}
}
/* TODO: Handle config values and fallbacks some other way, this is garbage! */
theme = g_key_file_get_string(keyfile, "greeter", "webkit_theme", &err);
if ( NULL != err) {
@ -395,15 +402,15 @@ main(int argc, char **argv) {
config_timeout = g_key_file_get_integer(keyfile, "greeter", "screensaver-timeout", &err);
if ( NULL != err) {
g_error_free(err);
g_clear_error(&err);
config_timeout = 300;
}
}
debug_mode = g_key_file_get_boolean(keyfile, "greeter", "debug_mode", NULL);
debug_mode = g_key_file_get_boolean(keyfile, "greeter", "debug_mode", &err);
if (NULL != err) {
g_clear_error(&err);
g_error_free(err);
debug_mode = FALSE;
}
/* END Greeter Config File */
@ -439,7 +446,7 @@ main(int argc, char **argv) {
g_resources_register(greeter_resources);
gtk_css_provider_load_from_resource(
GTK_CSS_PROVIDER(css_provider),
"/com/antergos/lightdm-webkit2-greeter/css/style.css"
"/com/antergos/webkit2-greeter/css/style.css"
);
gtk_style_context_add_provider_for_screen(
screen,

Loading…
Cancel
Save