GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Jul 31, 2014 3:32 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Problems with GtkFileChooserButton
PostPosted: Mon May 26, 2014 7:53 am 
Offline
Familiar Face

Joined: Fri Apr 04, 2014 11:39 am
Posts: 7
Hi,

I am programing in Windows version GTK a GtkFileChooserButton and I have next code:

Code:

//---------------------------------------------------------------

GtkWidget *createPickerFileChooser(
            const char *fileName)
{
    GtkWidget *pickerFileChooser;
    GtkFileChooserAction action;
    const gchar *title;

    title = "Select a file";
    action = GTK_FILE_CHOOSER_ACTION_OPEN;

    pickerFileChooser = gtk_file_chooser_button_new(title, action);
    gtk_widget_show(pickerFileChooser);

    gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(pickerFileChooser), fileName);

    g_signal_connect(G_OBJECT(pickerFileChooser), "file-set",
                G_CALLBACK(prv_changeFile), NULL);

    return pickerFileChooser;
}



The problem is that the chooser doesn´t select the fileName. For example, c:\c300\c300.txt is´nt selected in file chooser button.

Anyone can help me, please?

Thank you very much.

Gabriel.


Top
 Profile  
 
 Post subject: Re: Problems with GtkFileChooserButton
PostPosted: Mon May 26, 2014 9:41 pm 
Offline
GTK+ Guru

Joined: Sun Apr 06, 2008 6:43 pm
Posts: 286
Location: Fortress of solitude
any errors are posted on the console?

_________________
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.


Top
 Profile  
 
 Post subject: Re: Problems with GtkFileChooserButton
PostPosted: Tue May 27, 2014 7:37 am 
Offline
Familiar Face

Joined: Fri Apr 04, 2014 11:39 am
Posts: 7
Sorry everyone,

My problem was an insensitive case of file name. My string was c:\c300\c300.txt and the file was c:\c300\c300.TXT and I think that the gtk_file_chooser_set_filename isn´t insentive file name beacause linux is sensitive case file name but window isn´t.

Thank you, for you help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group