Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 06:32 AM   #1
feuille
Connoisseur
feuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enough
 
Posts: 56
Karma: 666
Join Date: May 2020
Location: Germany
Device: android smartphone + tablet
Value for QSpinBox in calibre/src/calibre/gui2/metadata/config.py

Hello Kovid,

in calibre/src/calibre/gui2/metadata/config.py the max value for the number option (spin box) is not set:

Code:
class ConfigWidget(QWidget):
...
def create_widgets(self, opt):
        val = self.plugin.prefs[opt.name]
        if opt.type == 'number':
            c = QSpinBox if isinstance(opt.default, numbers.Integral) else QDoubleSpinBox
            widget = c(self)
            widget.setValue(val)
So the max value, that is visible in the generated config GUI, is set to the default value for QSpinBox (99), as indicated in the Qt docs (https://doc.qt.io/qtforpython-5/PySi.../QSpinBox.html).

Could you please add the statement:
Code:
            widget.setMaximum(val)
to let the user increase the default value?

Thanks!
feuille is offline   Reply With Quote
Old Today, 07:07 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,902
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The best way to make something like this happen is to do it yourself in a forked source repo, test it, then submit a PR to Kovid. That process permits detailed discussion, keeps a trace of who did what, and as a side benefit runs the unit tests.

I do this by using a forked repo on github then a checked-out repo on my local machine. I pull all changes into the github fork, pull changes to the local repo, do the work, push the changes back, then submit the PR from github.
chaley is offline   Reply With Quote
Advert
Old Today, 11:06 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,249
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...b5d817b2c60415
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relocate calibre config folder Mervian Calibre 3 09-03-2015 02:00 PM
Recover Calibre config settings from XP? wendy5 Calibre 17 05-28-2014 05:05 PM
ZipImportError: can't find module calibre.gui2.preferences.behavior mom34spartan Library Management 2 07-19-2013 09:56 PM
Bug: Calibre doen't include 'src' in css adrian783 Calibre 0 07-05-2010 10:57 PM
Media/Calibre Error GUI2 kassa Calibre 5 06-04-2009 07:43 PM


All times are GMT -4. The time now is 03:14 PM.


MobileRead.com is a privately owned, operated and funded community.