- vik_window_statusbar_update ( vw, message );
-}
-
-static VikWindow *new_window ()
-{
- if ( window_count < MAX_WINDOWS )
- {
- VikWindow *vw = vik_window_new ();
-
- g_signal_connect (G_OBJECT (vw), "destroy",
- G_CALLBACK (destroy), NULL);
- g_signal_connect (G_OBJECT (vw), "newwindow",
- G_CALLBACK (new_window), NULL);
- g_signal_connect (G_OBJECT (vw), "openwindow",
- G_CALLBACK (open_window), NULL);
- g_signal_connect (G_OBJECT (vw), "statusbarupdate",
- G_CALLBACK (statusbar_update), NULL);
-
- gtk_widget_show_all ( GTK_WIDGET(vw) );
-
- window_count++;
-
- return vw;
- }
- return NULL;
-}
-
-static void open_window ( VikWindow *vw, GSList *files )
-{
- gboolean change_fn = (g_slist_length(files) == 1); /* only change fn if one file */
- GSList *cur_file = files;
- while ( cur_file ) {
- // Only open a new window if a viking file
- gchar *file_name = cur_file->data;
- if (vw != NULL && check_file_magic_vik ( file_name ) ) {
- VikWindow *newvw = new_window();
- if (newvw)
- vik_window_open_file ( newvw, file_name, change_fn );
- }
- else {
- vik_window_open_file ( vw, file_name, change_fn );
- }
- g_free (file_name);
- cur_file = g_slist_next (cur_file);
- }
- g_slist_free (files);
+ g_fprintf (stderr,
+ _("Ignoring Xlib error: error code %d request code %d\n"),
+ theEvent->error_code,
+ theEvent->request_code);
+ // No exit on X errors!
+ // mainly to handle out of memory error when requesting large pixbuf from user request
+ // see vikwindow.c::save_image_file ()
+ return 0;