]> Pileus Git - ~andy/gtk/blobdiff - tests/testnouiprint.c
Bump GLib dependency to 2.35
[~andy/gtk] / tests / testnouiprint.c
index 0dcc489a8d85d86be6e6c578c6d35ad007407fae..885fa243ba2ad45d55a50181268b144cf3a711dc 100644 (file)
@@ -3,19 +3,18 @@
  *
  * Copyright (C) 2006 Alexander Larsson <alexl@redhat.com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public Lesser
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
@@ -71,7 +70,7 @@ draw_page (GtkPrintOperation *operation,
   /* Font Fill */
   cairo_set_source_rgb (cr, 0, 0.0, 1.0);
   cairo_fill (cr);
-  
+
   g_object_unref (layout);
 }
 
@@ -79,24 +78,18 @@ draw_page (GtkPrintOperation *operation,
 int
 main (int argc, char **argv)
 {
-  GMainLoop *loop;
   GtkPrintOperation *print;
-  GtkPrintOperationResult res;
   GtkPrintSettings *settings;
 
-  g_type_init (); 
-  loop = g_main_loop_new (NULL, TRUE);
-
   settings = gtk_print_settings_new ();
   /* gtk_print_settings_set_printer (settings, "printer"); */
-  
+
   print = gtk_print_operation_new ();
   gtk_print_operation_set_print_settings (print, settings);
   gtk_print_operation_set_n_pages (print, 1);
   gtk_print_operation_set_unit (print, GTK_UNIT_MM);
   g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
-  res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL);
+  gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL);
 
   return 0;
 }