Rudra Banerjee wrote: > 1) putting the above block inside "if (argv[1] != "NULL")" is giving a > segmentation fault:
Are you checking argc? If you are not passing an argument argv[1] does not exist so, yes, you will get a segfault for running beyond the argv[] array. if ( argc > 1 && argv[1] != NULL ) foo else return 0; > and 2) How I can open the file using file menu, instead of commandline > argument? I have defined the menu as follows: [snip] > which is opening the file selector, but *NOT* writing it in the > textview. I wish to open the file in textview and save it aswell after I > edit that. Are you checking for a filename returned from the file chooser dialog? You are going to need more code to do what you want. GTK won't do it automatically for you. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list