Don't open a display connection.

2006-06-18  Matthias Clasen  <mclasen@redhat.com>

	* tests/testnouiprint.c (main): Don't open a display connection.

	* gtk/gtkprintbackend.c (gtk_print_backend_load_modules): Make
	this work without a display connection.  (339702, Alexander Larsson)
This commit is contained in:
Matthias Clasen 2006-06-19 03:52:10 +00:00 committed by Matthias Clasen
parent b57f1571de
commit e6cdab1bfc
4 changed files with 16 additions and 8 deletions

View File

@ -1,5 +1,10 @@
2006-06-18 Matthias Clasen <mclasen@redhat.com>
* tests/testnouiprint.c (main): Don't open a display connection.
* gtk/gtkprintbackend.c (gtk_print_backend_load_modules): Make
this work without a display connection. (339702, Alexander Larsson)
* gtk/gtkwindow.c (gtk_window_move): Small doc addition.
(#345275, Behdad Esfahbod)

View File

@ -1,5 +1,10 @@
2006-06-18 Matthias Clasen <mclasen@redhat.com>
* tests/testnouiprint.c (main): Don't open a display connection.
* gtk/gtkprintbackend.c (gtk_print_backend_load_modules): Make
this work without a display connection. (339702, Alexander Larsson)
* gtk/gtkwindow.c (gtk_window_move): Small doc addition.
(#345275, Behdad Esfahbod)

View File

@ -284,8 +284,10 @@ gtk_print_backend_load_modules (void)
gtk_print_backend_initialize ();
settings = gtk_settings_get_default ();
g_object_get (settings, "gtk-print-backends", &setting, NULL);
if (settings)
g_object_get (settings, "gtk-print-backends", &setting, NULL);
else
setting = g_strdup (GTK_PRINT_BACKENDS);
backends = g_strsplit (setting, ",", -1);

View File

@ -84,12 +84,8 @@ main (int argc, char **argv)
GtkPrintOperationResult res;
GtkPrintSettings *settings;
/* Unfortunately we need a display for the XSettings to get the
list of backends... */
/* gtk_parse_args (&argc, &argv); */
gtk_init (&argc, &argv);
g_type_init ();
loop = g_main_loop_new (NULL, TRUE);
settings = gtk_print_settings_new ();