Dear friends,In my project, I have created a SAVE AS file submenu.I have two question:1) This "save as" does not have any key board shortcut(Ctrl+S as standard) like open or new file submenu, which are also created in the same way, using accel group. Why this is so?2) Though the file copying is working fine, I would love to receive some comment about if this is a dependable(in sense of failsafe and fast) process of copying file.The code is as follows:

First, save as stock item has no predefined accelerator and this is why nothing is shown on the right. But solution to this one is really simple: just call gtk_widget_add_accelerator() function on your menu item and things will work as expected. Code will look something like this:

As for the second question, your solution is fine as long as you don't have a large file coming in. Then you better copy it in chunks to avoid depleting your memory. Also, your function is named "rename_file". Why would you name your function like that if function actually copies the file?

Who is online

Users browsing this forum: Google [Bot] and 2 guests

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