Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2017, 09:52 AM   #211
drawson1
Connoisseur
drawson1 began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Mar 2014
Device: Libra H20, Clara 2E
ViewManager view partially applied at startup

I'm using the current version of Calibre (3.14) and the View Manager plugin. I set up my new "default" view, and modified the sort, column widths, etc., then did "Save columns, widths and sorts". I set View manager to automatically apply the view at startup.

When I re-start calibre, the view is checked in ViewManager, but is only partially applied. I see my desired sorts and columns, but the column widths are wrong. If I click the view name in the ViewManager menu, THEN it's fully applied.

See the attached pic . . . .

How can I get this to (fully) apply at startup?

Thanks!

Dan
Moderator Notice
Merged with Plugin Thread
Attached Thumbnails
Click image for larger version

Name:	column_width.png
Views:	301
Size:	185.9 KB
ID:	160747  

Last edited by theducks; 12-18-2017 at 11:16 AM.
drawson1 is offline   Reply With Quote
Old 12-18-2017, 04:37 PM   #212
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,415
Karma: 25894272
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by drawson1 View Post
Moderator Notice
Merged with Plugin Thread
Moved to where it belongs, from Library Management back to Plugins

BR
BetterRed is online now   Reply With Quote
Advert
Old 12-20-2017, 12:26 PM   #213
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,262
Karma: 3675895
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
drawson1, I can reproduce your issue, but I'm not sure anything can be done about it.

VM is attempting to set the column order and sizes when the plugin's initialization_complete() is called. However, I don't think Calibre has finished setting up and displaying the library view yet and so the sizes are being ignored/replaced.

Personally, I set a keyboard shortcut for my most used view to 'spacebar'.
JimmXinu is offline   Reply With Quote
Old 12-20-2017, 12:41 PM   #214
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: 43,744
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@JimmXinu: I dont think any library view layouting is done after initialization_complete (it is called at line 409 in gui2/ui.py which is close to the end of that method). You can insert a print there and also a print in the apply_state function in library/views.py which is where the column layout for the book list is restored, to check.
kovidgoyal is offline   Reply With Quote
Old 12-20-2017, 12:52 PM   #215
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,262
Karma: 3675895
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
@kovidgoyal, I was just speculating as to the cause.

The same code in VM applies column size at start up (initialization_complete()) and library switch (library_changed() calls initialization_complete()). On library switch, the sizes are applied, on start up they are not. I don't see how anything the plugin does could change that.
JimmXinu is offline   Reply With Quote
Advert
Old 12-21-2017, 07:21 PM   #216
drawson1
Connoisseur
drawson1 began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Mar 2014
Device: Libra H20, Clara 2E
Did that, so I have a quick work-around :-), thanks!
drawson1 is offline   Reply With Quote
Old 02-09-2018, 07:26 PM   #217
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,262
Karma: 3675895
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Has anyone started thinking about how View Manager and the new "Split the book list" feature interact? And how they should interact?

Some quick initial testing seems to show VM effecting only the left side of the split list.
JimmXinu is offline   Reply With Quote
Old 02-09-2018, 07:56 PM   #218
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,415
Karma: 25894272
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by JimmXinu View Post
Has anyone started thinking about how View Manager and the new "Split the book list" feature interact? And how they should interact?

Some quick initial testing seems to show VM effecting only the left side of the split list.
Sort of - see https://www.mobileread.com/forums/sh...5&postcount=17 and following post between KG and me.

I haven't installed 3.17. Does Split View (SV) effect VM if you don't use SV, if it does I won't install the new version - my problem is that I don't use the latest VM because of the changes made last year.

BR
BetterRed is online now   Reply With Quote
Old 02-10-2018, 03:35 AM   #219
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,208
Karma: 11766195
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by BetterRed View Post
I haven't installed 3.17. Does Split View (SV) effect VM if you don't use SV, if it does I won't install the new version - my problem is that I don't use the latest VM because of the changes made last year.
I have calibre 3.17 and VM (last version). No change (without using SV, I don't know with SV because I see no use for me at this moment).
Terisa de morgan is offline   Reply With Quote
Old 02-10-2018, 05:13 AM   #220
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,415
Karma: 25894272
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by JimmXinu View Post
Has anyone started thinking about how View Manager and the new "Split the book list" feature interact? And how they should interact?

Some quick initial testing seems to show VM effecting only the left side of the split list.
I imagine that's what most folks would expect/want.

Quote:
Originally Posted by Terisa de morgan View Post
I have calibre 3.17 and VM (last version). No change (without using SV, I don't know with SV because I see no use for me at this moment).
Thanks - same for me, no current use for SV. I could have used it last year, and the year before, and ... but my old 'job' of collecting, cataloguing, and converting 'interesting' o'seas documents has been outsourced to the crew who do the domestic documents - at my request (insistence).

BR
BetterRed is online now   Reply With Quote
Old 02-13-2018, 04:03 PM   #221
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,262
Karma: 3675895
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Here's what I've found:

Code:
        # Internally, the second split view is referred to as the 'pin_view'.  
        # state can be gotten and appears the same as library_view.
        state = self.gui.library_view.get_state()
        pin_state = self.gui.library_view.pin_view.get_state()

        # it looks like apply_state(state) will also work the same.
        state = {'hidden_columns': hidden_cols,
                 'column_positions': positions,
                 # no sort_history in pin_view
                 'column_sizes': resize_cols}
        self.gui.library_view.pin_view.apply_state(state)

        # showing/hiding the pin_view is easy:
        # self.gui.library_view.pin_view.isVisible()
        self.gui.library_view.set_pin_view_visibility(bool)
As far as I can tell, calibre saves *whether* the view is split(), but doesn't save *where*. IE, on restart, the split bar is centered regardless of where it was last dragged. Is that intended, I wonder?

So saving and applying column data for both sides in View Manager looks doable, as does showing/not showing the splitter. Placement of the splitter, I haven't figured out.

Integrating split on/off and a second 'Columns in View' list in the plugin config dialog would be the hardest part.
JimmXinu is offline   Reply With Quote
Old 02-13-2018, 04:14 PM   #222
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: 43,744
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Splitter state is most definitely saved, see pin_columns.py PinContainer.save_state()
kovidgoyal is offline   Reply With Quote
Old 02-13-2018, 06:09 PM   #223
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,262
Karma: 3675895
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Kovid, I did see that, which is why I wonder if it's working correctly.

Whether the view is split or not is saved across calibre restart, but the right-left location of the splitter bar is not kept for me when I restart calibre.

Steps:
  1. Split book list
  2. Drag splitter bar right or left
  3. Restart calibre
  4. Splitter bar is there, but back in the center
JimmXinu is offline   Reply With Quote
Old 02-13-2018, 08:50 PM   #224
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: 43,744
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Works fine for me. And according to the qt docs saveState() saves the entire layout, https://doc.qt.io/qt-5/qsplitter.html#saveState
kovidgoyal is offline   Reply With Quote
Old 02-13-2018, 10:30 PM   #225
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,262
Karma: 3675895
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Hrm. It worked for me for a bit after uninstalling VM, then reset to center when I installed VM again, but now it doesn't work even after I removed VM again.

In fact, even while running with `calibre --ignore-plugins` I'm still seeing the split bar reset to center on restart.

So while it might be something to do with my computer, I don't think it's anything to do with the plugin...
JimmXinu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Open With kiwidude Plugins 402 03-16-2024 11:44 PM
[GUI Plugin] Goodreads Sync kiwidude Plugins 1713 03-16-2024 11:37 PM
[GUI Plugin] Generate Cover kiwidude Plugins 811 03-16-2024 11:31 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM
[GUI Plugin] Book Sync **Deprecated** kiwidude Plugins 111 06-07-2011 07:47 PM


All times are GMT -4. The time now is 12:29 AM.


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