summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-06-19 03:52:10 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-06-19 03:52:10 +0000
commite6cdab1bfc10eb334ac5a8b5a4696c19dbcba1e0 (patch)
tree2b3524ba2013a27d2d65181f785e51eeb975ae21 /gtk
parentb57f1571de1bd09e849ec44e2c9823c1c6c42fc8 (diff)
downloadgtk+-e6cdab1bfc10eb334ac5a8b5a4696c19dbcba1e0.tar.gz
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)
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkprintbackend.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c
index a70582b7a1..613d88d4be 100644
--- a/gtk/gtkprintbackend.c
+++ b/gtk/gtkprintbackend.c
@@ -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);