New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new file extensions to the Open and Save dialogs #659

Closed
jmucchiello opened this Issue Jul 19, 2016 · 18 comments

Comments

Projects
None yet
6 participants
@jmucchiello
Copy link

jmucchiello commented Jul 19, 2016

Would it be possible to add file types to the preferences so that the choices of file types is not just .db and *.? A low priority item, I realize. But if somewhere in the preference there were a place to add additional file types that would show up in the file open/save dialogs, that would be great.

Maybe even make those items open automatically in the shell. (lower priority)

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Jul 19, 2016

Sure. In theory 😄, they're pretty easy to add. The list that's supposed to be showing up at the moment is this:

    https://github.com/sqlitebrowser/sqlitebrowser/blob/master/src/FileDialog.h#L20

Though I kind of remember there have been issues on some OS's at times. eg they don't show up correctly on some OSX versions, so we disabled them all there. Made it *.* for Mac.

Which extra extensions do you reckon would be useful? 😄

Btw, which OS and version of DB4S are you using?

@jmucchiello

This comment has been minimized.

Copy link
Author

jmucchiello commented Jul 19, 2016

I would prefer an editable list of extensions somewhere in the preference dialog, which is nowhere near as simple as editing a .h file, I know. But. I use various extensions for various different projects and I doubt they are common with other users. *.PACKAGE, *.CFG, *.OBJECT. See, I doubt many other people would need these.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Jul 19, 2016

Yep, sounds like the kind of thing that belongs in the Preferences dialog.

Shouldn't be super hard to code up. 😄

@jmucchiello do you have C++/Qt programming skill (or interest to learn)? 😁

If not, no worries, maybe @revolter would be interested?

@jmucchiello

This comment has been minimized.

Copy link
Author

jmucchiello commented Jul 19, 2016

Only 25+years of C/C++ experience (no Qt experience but I understand the gist of it) but I lack the time to work on the browser. If no one gets around to it in a few months to a year, I might find some time. I agree, though, it is probably a good "get your feet wet" project for someone new to the your code base.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Jul 19, 2016

Yeah, time is generally the thing that's hard to come by. 😄

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Jul 20, 2016

@jmucchiello Does this seem like it would cover all the needed bits?

edit file extensions concept 1

It's just a quick concept mock up in Balsamiq, so it's easy to change elements in if something needs changing. 😄

@jmucchiello

This comment has been minimized.

Copy link
Author

jmucchiello commented Jul 20, 2016

It doesn't need to be prefilled with my needs. Just prefill it with the current defaults.

Databases (*.db)

And then the dialog also adds All Files (.) and if someone wants to delete *.db they can. If they want to add new ones they can. And the up and down arrows are also cool.

@revolter

This comment has been minimized.

Copy link
Member

revolter commented Jul 20, 2016

It's a little more work that the default row type preference feature, and as you know, I don't have time now :( So if no one gets it done in 3 weeks, I'll start working on it.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Jul 20, 2016

@jmucchiello Like this?

edit file extensions concept 2

@revolter Yeah, it's probably yours or @innermous's. After I get #480 done, I have an idea of other stuff I need to focus on already. 😄

@justinclift justinclift changed the title Open Database dialog Add new file extensions to the Open and Save dialogs Jul 20, 2016

@chrisjlocke

This comment has been minimized.

Copy link
Contributor

chrisjlocke commented Jul 21, 2016

I would change the order of the OK and Cancel buttons... but only because I'm used to Windows.... 😉

@revolter

This comment has been minimized.

Copy link
Member

revolter commented Jul 21, 2016

@chrisjlocke, Qt automatically puts the buttons in the OS's default order, so they won't show up exactly like in the mockup on Windows.

@chrisjlocke

This comment has been minimized.

Copy link
Contributor

chrisjlocke commented Jul 21, 2016

Good ol' Qt! Saving the day again, one dialog window at a time!
Thanks for the clarification. One needs that on a Thursday.

@GortiZ6

This comment has been minimized.

Copy link
Contributor

GortiZ6 commented Dec 15, 2017

I took the care to implement it, let me know if this is fine or you prefer something different :)
0001-Implemented-feature-request-659.zip

@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Dec 15, 2017

Great! I've applied it and for me it's what is expected, I'd only propose some minor adjustments. I think it would be ideal that you opened a pull request so it is analysed and discussed. But I'm the last one to have arrived this team, maybe it's not needed 😉 Would you need help for that? I may open it in your name.

I've managed to broken it, that would be first needed change 😄
ASSERT failure in QList<T>::operator[]: "index out of range", file /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h, line 518 Abortado (core' generado)
`

This was removing the last added row.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Dec 15, 2017

@GortiZ6 Thank you. 😄

For us, the ideal approach is to create a "Pull Request" with the code you're proposing. There are a few tutorials on GitHub for how to do this, and other people around the net have written tutorials too.

That being said, that's just a preference. If you're wanting to contribute code and aren't yet all that familiar with GitHub we're pretty relaxed about stuff and can help guide you. 😄

@GortiZ6

This comment has been minimized.

Copy link
Contributor

GortiZ6 commented Dec 16, 2017

Thanks for the feedback. I'll fix the bug and submit a pull request on Monday :)

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Dec 16, 2017

Awesome. 😄

GortiZ6 pushed a commit to GortiZ6/sqlitebrowser that referenced this issue Dec 18, 2017

MKleusberg added a commit that referenced this issue Jan 13, 2018

File Extension management interface (#659)
[NEW] Add new interface and functionality to manage database file
extension. (Implements feature request #659)
@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Jan 13, 2018

@jmucchiello This request has just been implemented by @GortiZ6, and will be in tomorrow's nightly builds (onwards). Any interest in testing it out, and making sure it works well for you? 😄

If so, the nightly builds are here:

    https://nightlies.sqlitebrowser.org/latest/

MKleusberg added a commit that referenced this issue May 20, 2018

KUbuntu 14.04 support restored (#1298)
* - [NEW] Add new interface and functionality to manage database file extension. (Implements feature request #659)

* - [FIX] Fixed CMake file to src.pro

* - Applied changes requested by mgrojo to uniform code with sqlitebrowser standards
- Add "history" when closing editor window, but reopen before closing preferences
- Revert some changes done by QtCreator

* Refuse from previous commit

* Additional changes requested by MKleusberg:
- [CHG] Always add "All files (*)" to filters
- [FIX] Removed unused include

* merged from master

* Merge sqlitebrowser master

* [FIX] Fixed compatibility to compile on KUbuntu 14.04 with Qt 5.2.1

* [FIX] Fix Qt version for QOpenGLWidget support on previous commit

* [CHG] Uniformed QT_VERSION_CHECK style
[CHG] Reverted macOS check on Mainwindow for OpenGL context creation

@mgrojo mgrojo closed this May 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment