$HOME and gtk_file_chooser_set_current_folder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, this is most likely my failure to fully understand gtk. I have enclosed the following code snippets that work and fail to work. I have a work round so it is not too bad an issue for me.

gchar WorkingPath[500] = {"$HOME/Project/" }; //FAILS (this grows as sub-projects are selected in project)

gchar WorkingPath[500] = {"~/Project/" };    //Also fails

gchar WorkingPath[500] = {"/home/name/Project/" }; //Is OKAY but if name changes to Tom, Dick or Harry oops.

Mycode()

gtk_widget_show (ChooseProjectDialog);
gtk_file_chooser_set_current_folder(filechooser, WorkingPath);

MyWorkRound()

strcpy (WorkingPath, getenv("HOME"));
strcat (WorkingPath, "/Project/");

I am curious to hear expert comments.  Regards Ian.



_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux