Re: GtkFileChooser and filter example
- From: "Arne Pagel" <arne pagel gmx de>
- To: gtk-app-devel-list gnome org
- Subject: Re: GtkFileChooser and filter example
- Date: Tue, 20 Jan 2009 14:10:42 +0100
GtkWidget * dlg;
GtkFileFilter * ff, * ffa;
int ret;
char * name;
dlg = gtk_file_chooser_dialog_new("Select
File",GTK_WINDOW(gui.window),GTK_FILE_CHOOSER_ACTION_OPEN,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN,GTK_RESPONSE_ACCEPT,NULL);
ff = gtk_file_filter_new();
gtk_file_filter_set_name(ff,"txt");
gtk_file_filter_add_pattern(ff,"*.txt");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dlg),ff);
ffa = gtk_file_filter_new();
gtk_file_filter_set_name(ffa,"all");
gtk_file_filter_add_pattern(ffa,"*");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dlg),ffa);
ret = gtk_dialog_run(GTK_DIALOG(dlg));
--
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]