//************************************
void DIA_Calculator(uint32_t *sizeInMeg, uint32_t *avgBitrate )
{
	if(!avifileinfo) return ;
	
	dialog=create_Calculator();
        gtk_signal_connect(GTK_OBJECT(WID(optionmenu1)), "changed",
                      GTK_SIGNAL_FUNC(cb_mod),   (void *) 0);
        gtk_signal_connect(GTK_OBJECT(WID(optionmenu2)), "changed",
                      GTK_SIGNAL_FUNC(cb_mod2),   (void *) 0);
	prepare();
	update();
        gtk_widget_set_sensitive(WID(entryCustom),0);
	while(1)
	{
		if(GTK_RESPONSE_APPLY==gtk_dialog_run(GTK_DIALOG(dialog)))
		{
			update();
                        videoCodecSetFinalSize(videoSize);
                        
		}
	else
		{
			break;
		}
	}
	gtk_widget_destroy(dialog);
	*sizeInMeg=videoSize;
	*avgBitrate=videoBitrate;
	
}
Пример #2
0
void DIA_Calculator(uint32_t *sizeInMeg, uint32_t *avgBitrate)
{
    if (!avifileinfo)
        return;

    calculatorDialog dialog(qtLastRegisteredDialog());
    qtRegisterDialog(&dialog);

    if (dialog.exec() == QDialog::Accepted)
        videoCodecSetFinalSize(dialog.videoSize());

    qtUnregisterDialog(&dialog);

    *sizeInMeg = dialog.videoSize();
    *avgBitrate = dialog.videoBitrate();
}
Пример #3
0
//************************************
void DIA_Calculator(uint32_t *sizeInMeg, uint32_t *avgBitrate )
{
	if(!avifileinfo) return ;

	glade.init();
	if (!glade.loadFile("calculator.gtkBuilder"))
	{
		GUI_Error_HIG(QT_TR_NOOP("Cannot load dialog"), 
		              QT_TR_NOOP("File \"calculator.gtkBuilder\" could not be loaded."));
		return;
	}
	GtkWidget *dialog = GW(dialogCalculator);
	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dialog),
										GTK_RESPONSE_CANCEL,
										GTK_RESPONSE_APPLY,
										-1);
	gtk_register_dialog(dialog);
	g_signal_connect(GW(comboboxFormat), "changed", G_CALLBACK(cb_mod), (void *) 0);
	g_signal_connect(GW(comboboxMedium), "changed", G_CALLBACK(cb_mod2), (void *) 0);
	prepare();
	update();
        gtk_widget_set_sensitive(GW(spinbuttonCustom),0);
	while(1)
	{

		if(GTK_RESPONSE_APPLY==gtk_dialog_run(GTK_DIALOG(dialog)))
		{
			update();
                        videoCodecSetFinalSize(videoSize);

		}
	else
		{
			break;
		}
	}
	gtk_unregister_dialog(dialog);
	gtk_widget_destroy(dialog);
	*sizeInMeg=videoSize;
	*avgBitrate=videoBitrate;

}