Logo Search packages:      
Sourcecode: ygraph version File versions  Download package

void image_export_file_select ( GtkWidget *  select_button,
GdkEvent *  event,
Plot plot 
)

Create a file selection dialog for exporting plots.

Parameters:
select_button The button calling for the file selector.
event The initiating event.
plot The Plot to be exported.
Returns:
TRUE if successful, otherwise crash.

Definition at line 947 of file callbacks.c.

References file_select_export().

Referenced by image_dir_export_dialog(), and image_export_dialog().

{
  GtkWidget* fs;
  gchar* filename;

  UNUSED(select_button);
  UNUSED(event);
  fs = gtk_file_selection_new(EXPORT_TO_FILE_TITLE);
  filename = gtk_entry_get_text(GTK_ENTRY(file_entry_A));
  if (filename != NULL)
    gtk_file_selection_set_filename(GTK_FILE_SELECTION(fs), filename);

  gtk_object_set_data(GTK_OBJECT(fs), "plot", plot);

  gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button),
                     "clicked", GTK_SIGNAL_FUNC(file_select_export), fs);
  gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button),
                            "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy),
                            (gpointer) fs);
  gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(fs)->cancel_button),
                            "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy),
                            (gpointer) fs);
  gtk_widget_show(fs);
}


Generated by  Doxygen 1.6.0   Back to index