calvados/recompress_files.c

82 lines
2.1 KiB
C
Raw Normal View History

#include <gtk/gtk.h>
#include "calvados.h"
/*
*
* recompress_files()
*
*/
void recompress_files(GtkWidget *widget, gpointer data)
{
GtkWidget *dialog;
GtkWidget *ok_button;
GtkWidget *cancel_button;
g_print("recompress files goes here\n");
/* --- Create the dialog --- */
dialog = gtk_dialog_new();
/* --- Trap the window close signal to release the grab --- */
gtk_signal_connect(GTK_OBJECT(dialog), "destroy",
GTK_SIGNAL_FUNC(closing_dialog),
&dialog);
/* --- Set the title --- */
gtk_window_set_title(GTK_WINDOW(dialog), "Recompress Files");
/* --- Add a small border --- */
gtk_container_border_width(GTK_CONTAINER(dialog), 5);
/*
* --- OK button
*/
/* --- Create the "OK" button --- */
ok_button = gtk_button_new_with_label("OK");
gtk_signal_connect(GTK_OBJECT(ok_button), "clicked",
GTK_SIGNAL_FUNC(okfunc_select_volume),
dialog);
/* --- Allow "Cancel" to be a default --- */
GTK_WIDGET_SET_FLAGS(ok_button, GTK_CAN_DEFAULT);
/* --- Add the OK button to the bottom hbox2 --- */
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), ok_button, TRUE, TRUE, 0);
/* --- Make the "OK" the default --- */
gtk_widget_grab_default(ok_button);
/* --- Make the button visible --- */
gtk_widget_show(ok_button);
/*
* --- Cancel button
*/
/* --- Create the "Cancel" button --- */
cancel_button = gtk_button_new_with_label("Cancel");
gtk_signal_connect(GTK_OBJECT(cancel_button), "clicked",
GTK_SIGNAL_FUNC(close_dialog),
dialog);
/* --- Allow "Cancel" to be a default --- */
GTK_WIDGET_SET_FLAGS(cancel_button, GTK_CAN_DEFAULT);
/* --- Add the "Cancel" button to the dialog --- */
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), cancel_button, TRUE, TRUE, 0);
/* --- Make the button visible. --- */
gtk_widget_show(cancel_button);
/* --- Show the dialog --- */
gtk_widget_show(dialog);
/* --- Only this window can be used for now --- */
gtk_grab_add(dialog);
}