use gdk_threads_add_idle instead of g_idle_add

This commit is contained in:
Sebastian Ramacher 2012-02-16 16:18:12 +01:00
parent 0767aa85bf
commit 0251fb75dd
2 changed files with 4 additions and 4 deletions

View file

@ -263,13 +263,13 @@ cb_password_dialog(GtkEntry* entry, zathura_password_dialog_info_t* dialog)
g_free(input); g_free(input);
} }
g_idle_add(password_dialog, dialog); gdk_threads_add_idle(password_dialog, dialog);
return false; return false;
} }
/* try to open document again */ /* try to open document again */
if (document_open(dialog->zathura, dialog->path, input) == false) { if (document_open(dialog->zathura, dialog->path, input) == false) {
g_idle_add(password_dialog, dialog); gdk_threads_add_idle(password_dialog, dialog);
} else { } else {
g_free(dialog->path); g_free(dialog->path);
free(dialog); free(dialog);

View file

@ -244,7 +244,7 @@ zathura_init(int argc, char* argv[])
document_info->zathura = zathura; document_info->zathura = zathura;
document_info->path = argv[1]; document_info->path = argv[1];
document_info->password = (argc >= 2) ? argv[2] : NULL; document_info->password = (argc >= 2) ? argv[2] : NULL;
g_idle_add(document_info_open, document_info); gdk_threads_add_idle(document_info_open, document_info);
} }
return zathura; return zathura;
@ -537,7 +537,7 @@ page_set_delayed(zathura_t* zathura, unsigned int page_id)
page_set_delayed_t* p = g_malloc(sizeof(page_set_delayed_t)); page_set_delayed_t* p = g_malloc(sizeof(page_set_delayed_t));
p->zathura = zathura; p->zathura = zathura;
p->page = page_id; p->page = page_id;
g_idle_add(page_set_delayed_impl, p); gdk_threads_add_idle(page_set_delayed_impl, p);
return true; return true;
} }