[xiph-commits] r12567 - trunk/sushivision

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Feb 26 01:48:57 PST 2007


Author: xiphmont
Date: 2007-02-26 01:48:56 -0800 (Mon, 26 Feb 2007)
New Revision: 12567

Modified:
   trunk/sushivision/panel-2d.c
   trunk/sushivision/panel.c
Log:
Correct an overranging bug in resample delta helper init.



Modified: trunk/sushivision/panel-2d.c
===================================================================
--- trunk/sushivision/panel-2d.c	2007-02-26 09:34:24 UTC (rev 12566)
+++ trunk/sushivision/panel-2d.c	2007-02-26 09:48:56 UTC (rev 12567)
@@ -258,7 +258,12 @@
       }
 
       del2 %= scaleden;
-      delB[i] = rem; // don't leak 
+      if(rem<0){
+	delA[i] += rem;
+	delB[i] = 0;
+      }else{
+	delB[i] = rem; // don't leak 
+      }
       posB[i] = bin+sizeceil;
 
     }else{

Modified: trunk/sushivision/panel.c
===================================================================
--- trunk/sushivision/panel.c	2007-02-26 09:34:24 UTC (rev 12566)
+++ trunk/sushivision/panel.c	2007-02-26 09:48:56 UTC (rev 12567)
@@ -224,9 +224,20 @@
   g_signal_connect (op, "draw-page", 
 		    G_CALLBACK (_print_handler), p);
 
+  GError *err;
   GtkPrintOperationResult ret = gtk_print_operation_run (op,GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
-							 NULL,NULL);
-  if (ret == GTK_PRINT_OPERATION_RESULT_APPLY){
+							 NULL,&err);
+
+  if (ret == GTK_PRINT_OPERATION_RESULT_ERROR) {
+    GtkWidget *error_dialog = gtk_message_dialog_new (NULL,0,GTK_MESSAGE_ERROR,
+					   GTK_BUTTONS_CLOSE,
+					   "Error printing file:\n%s",
+					   err->message);
+    g_signal_connect (error_dialog, "response", 
+		      G_CALLBACK (gtk_widget_destroy), NULL);
+    gtk_widget_show (error_dialog);
+    g_error_free (err);
+  }else if (ret == GTK_PRINT_OPERATION_RESULT_APPLY){
     if (printset != NULL)
       g_object_unref (printset);
     printset = g_object_ref (gtk_print_operation_get_print_settings (op));



More information about the commits mailing list