Browse Source

working on #43

sisyphus
Dustin Falgout 9 years ago
parent
commit
6f00d7a08d
  1. 5
      src/lightdm-webkit2-greeter-ext.c
  2. 10
      src/lightdm-webkit2-greeter.c

5
src/lightdm-webkit2-greeter-ext.c

@ -171,7 +171,6 @@ arg_to_string(JSContextRef context, JSValueRef arg, JSValueRef *exception) {
* Replace one substring with another. NOTE: This has the side effect
* of freeing it's passed text.
*/
static gchar *
g_strreplace (gchar *txt, gchar *from, gchar *to) {
gchar **split;
@ -1659,6 +1658,10 @@ webkit_web_extension_initialize(WebKitWebExtension *extension) {
g_signal_connect(G_OBJECT(greeter), "show-prompt", G_CALLBACK(show_prompt_cb), extension);
g_signal_connect(G_OBJECT(greeter), "show-message", G_CALLBACK(show_message_cb), extension);
/* TODO: This function was deprecated in lightdm 1.11.x.
* New function is lightdm_greeter_connect_to_daemon_sync
* Wait until it makes it into Debian Stable before making the change.
*/
lightdm_greeter_connect_sync(greeter, NULL);
/* load greeter settings from config file */

10
src/lightdm-webkit2-greeter.c

@ -243,6 +243,14 @@ message_received_cb(WebKitUserContentManager *manager,
}
static void
quit_cb(void) {
gtk_widget_destroy(WEBKIT_WEB_VIEW(web_view));
gtk_widget_destroy(GTK_WINDOW(window));
gtk_main_quit();
}
int
main(int argc, char **argv) {
GdkScreen *screen;
@ -269,7 +277,7 @@ main(int argc, char **argv) {
textdomain (GETTEXT_PACKAGE);
gtk_init(&argc, &argv);
g_unix_signal_add(SIGTERM, (GSourceFunc) gtk_main_quit, NULL);
g_unix_signal_add(SIGTERM, (GSourceFunc) quit_cb, NULL);
/* Apply greeter settings from config file */
keyfile = g_key_file_new();

Loading…
Cancel
Save