mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Fix bug in colour print initialisation.
The callback function for switching colour printing on/off was registered after the initial activation of the button. This meant the first attempt to print was compromised. We move the registration so that printing works as the user specifies from the first attempt. Tested by printing both B/W and colour images to file with minimal mouse clicks. Spotted by Salva - thanks. Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									03c21b0a92
								
							
						
					
					
						commit
						d6e77cd168
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		
							
								
								
									
										4
									
								
								print.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								print.c
									
										
									
									
									
								
							| 
						 | 
					@ -924,10 +924,10 @@ static GtkWidget *print_dialog(GtkPrintOperation *operation, gpointer user_data)
 | 
				
			||||||
			G_CALLBACK(print_selection_toggle), NULL);
 | 
								G_CALLBACK(print_selection_toggle), NULL);
 | 
				
			||||||
		GtkWidget *colorButton;
 | 
							GtkWidget *colorButton;
 | 
				
			||||||
		colorButton = gtk_check_button_new_with_label(_("Print in color"));
 | 
							colorButton = gtk_check_button_new_with_label(_("Print in color"));
 | 
				
			||||||
		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(colorButton),TRUE);
 | 
					 | 
				
			||||||
		gtk_box_pack_start(GTK_BOX(box), colorButton, FALSE, FALSE, 2);
 | 
					 | 
				
			||||||
		g_signal_connect(G_OBJECT(colorButton), "toggled",
 | 
							g_signal_connect(G_OBJECT(colorButton), "toggled",
 | 
				
			||||||
			G_CALLBACK(color_selection_toggle), NULL);
 | 
								G_CALLBACK(color_selection_toggle), NULL);
 | 
				
			||||||
 | 
							gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(colorButton),TRUE);
 | 
				
			||||||
 | 
							gtk_box_pack_start(GTK_BOX(box), colorButton, FALSE, FALSE, 2);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	gtk_widget_show_all(vbox);
 | 
						gtk_widget_show_all(vbox);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue