linuxmint / xed

X-Apps [Text] Editor (Cross-DE, backward-compatible, GTK3, traditional UI)
GNU General Public License v2.0
447 stars 84 forks source link

xed prints multiple opened files #379

Open cocoontop opened 4 years ago

cocoontop commented 4 years ago
 * Xed version (xed version 2.4.2)
 * Distribution - (Linux Mint 19.3, Cinnamon V. 4.4.8)
 * Installed wireless network printer (Brother DCP-7055W)

Issue xed prints all currently opened documents.

Steps to reproduce Two text files opened in xed. (Both files are shown as tabs in xed.) Select the right tab. Ctrl+P Check the print preview. It will show page 1/1 (the file of your right tab). Confirm to print, and it prints out the opened text of your right tab, and directly upfollowing the text of your opened file of the left tab.

Expected behaviour Prints only the tab I am "active in" and that I see in the print preview.

Other information My right tab was a 1pager, my left tab was a multipage textfile.

icarter09 commented 4 years ago

@cocoontop are you clicking the "Print the document" (print) button from the print preview view when you are seeing this issue? If so, can you test to see if you still have this issue when only clicking "Print" from Ctrl+P? Thanks.

cocoontop commented 4 years ago

@icarter09 sorry that my description was insufficient.

Scenario 1) I used "crtl-p", in this appearing "printer selection window" I clicked on preview, and then in the preview I clicked on "print". Just re-tested some minutes ago. It prints out both documents.

Next test, as you requested: Scenario 2) If I select "print" directly from the "printer selection window" it only prints the document of the tab that I am currently "working in" - so the behaviour is absolutely correct. (It doesn't print the other document.)

(Must be something with the preview then.)

(If of interest (I guess not) - I am using the German version.)

icarter09 commented 4 years ago

@cocoontop no worries on the description. I just wanted to make sure I was performing the same steps. Thanks for the update. While debugging the issue yesterday, I noticed some odd behavior with the print button from preview. Wanted to make sure with you that was the case before digging further. Thanks again.

icarter09 commented 4 years ago

@cocoontop the issue looks to be that when printing from the preview, every current tab's print operation is called by default, but should only print the selected tab that is currently in preview. When not printing from preview, only the selected tab's print operation is called, while any other open tabs are never called. I'm currently working through how not to have the other tabs print operations be triggered at all during preview.

cocoontop commented 4 years ago

@icarter09 good luck!!!