Re: some erros
- From: Allin Cottrell <cottrell wfu edu>
- To: frederico schardong <frede sch gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: some erros
- Date: Thu, 15 Jan 2009 20:41:42 -0500 (EST)
On Thu, 15 Jan 2009, frederico schardong wrote:
anybody can help me to resolve this?
GtkFileFilter *filtro;
GtkWidget *chooser;
//GtkFileChooser *chooser;
gtk_file_filter_set_name(filtro,"bmp");
chooser = gtk_file_chooser_dialog_new ("Open File",
parent_window,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_add_filter(*chooser, *filtro);
gtk_widget_show(chooser);
if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_ACCEPT)
{
char *filename;
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
g_print (filename);
}
gtk_widget_destroy (chooser);
how I can add filter to my chooser??
By using gtk_file_chooser_set_filter().
Allin Cottrell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]