void XAP_UnixDialog_Image::runModal(XAP_Frame * pFrame) { // build the dialog GtkWidget * cf = _constructWindow(); UT_return_if_fail(cf); setHeightEntry(); setWidthEntry(); double height = UT_convertToInches(getHeightString()); double width = UT_convertToInches(getWidthString()); if((height > 0.0001) && (width > 0.0001)) m_dHeightWidth = height/width; else { m_dHeightWidth = 0.0; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (m_wAspectCheck), FALSE); } setWrappingGUI(); setPositionToGUI(); wrappingChanged(); switch ( abiRunModalDialog ( GTK_DIALOG(cf), pFrame, this, BUTTON_CANCEL, false ) ) { case GTK_RESPONSE_OK: event_Ok (); break; default: event_Cancel (); break; } abiDestroyWidget (cf); }
void XAP_UnixDialog_Encoding::runModal(XAP_Frame * pFrame) { // Build the window's widgets and arrange them GtkWidget * mainWindow = _constructWindow(); UT_return_if_fail(mainWindow); // Populate the window's data items _populateWindowData(); switch ( abiRunModalDialog ( GTK_DIALOG(mainWindow), pFrame, this, GTK_RESPONSE_CANCEL, false ) ) { case GTK_RESPONSE_OK: event_Ok (); break; default: event_Cancel (); break; } abiDestroyWidget ( mainWindow ) ; }