GNOME Bugzilla – Bug 632283
Typing command, 'glade newfile.glade' on command line doesn't use 'newfile.glade' as default name
Last modified: 2018-03-26 15:15:41 UTC
At the command line, I type: >glade newfile.glade But it opens "Unsaved 1" as the default name. It should save the name of the file, so when you opt to save the file, the proper name is already filled-in. This is a very important feature to me because I'm writing a IDE where users will have a file called "myFile.rb", and it needs to have a corresponding "myFile.glade." The IDE will expect to have matching names. When the user clicks, "create gui" on the .rb file, I want to be able to shell out the command: >glade myFile.glade If he/she will be presented with a blank box, they will make up a name. (you know how that goes :? ) This is the only way other programmers can create named files. Also, on the command line it displays a "WARNING file not found" It would be nice to have glade operate just like any text editor, and open a blank file with the given name. Thanks for your great work, Eric Cunningham
Interesting feature. For the usability of the glade frontend itself I agree something like this could be added. However, if you are writing an IDE, you should *please* just use libgladeui for this and dont fire up our frontend, the libgladeui library was created expressly for this reason. See Anjuta project and see glade3/src/glade-window.c for expamples of how to use the library. For your purposes I think simply calling glade_project_new() glade_project_save() should do the trick (for a GladeProject to have a name, it must have an associated project path; the display name is only derived from the path to which it was saved, note that Glade may have multiple projects open with the same filename but in separate paths).
If you have problems with using the libgladeui core API, please file bugs and help us make Glade more embeddable into you IDE. See our docs also here : http://library.gnome.org/devel/gladeui/3.6/
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/70.