Retrieve the selected filter name when having more than one
- From: Colossus <colossus 3000 it>
- To: gtk-app-devel-list gnome org
- Subject: Retrieve the selected filter name when having more than one
- Date: Tue, 24 May 2005 08:09:20 +0200
Hi,
I have a gtk_file_filter this way:
for (i = 0; i <= 3; i++)
{
filter = gtk_file_filter_new ();
if (ArchiveType[i].name !=NULL) gtk_file_filter_set_name (filter,
ArchiveType[i].name);
if (ArchiveType[i].ext !=NULL) gtk_file_filter_add_pattern (filter,
ArchiveType[i].ext);
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (File_Selector), filter);
}
ArchiveType[0].name = g_strdup ("Bzip2 format");
ArchiveType[0].ext = g_strdup ("*.bz2");
ArchiveType[1].name = g_strdup ("Rar format");
ArchiveType[1].ext = g_strdup ("*.rar");
ArchiveType[2].name = g_strdup ("Tar format");
ArchiveType[2].ext = g_strdup ("*.tar");
ArchiveType[3].name = g_strdup ("Zip format");
ArchiveType[3].ext = g_strdup ("*.zip");
The problem: when I use gtk_file_filter_get_name it always return the
last one, the zip even do I select Bzip2 for example. Is it possible to
do what I'm asking ?
Thank you,
--
Colossus
Cpsed, a Linux OpenGL 3D scene editor
http://cpsed.sourceforge.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]