[Feature] Add python plugin MiddleClickLoader
ClosedPublic

Authored by SGOrava on Jul 16 2018, 10:50 AM.

Details

Summary

This plugin loads text from selection clipboard in tab after pressing mouse middle button (pressing mouse wheel).
Url / text from selection clipboard can be loaded in: Current Tab, New Tab, New Window
There is an option to use only valid url otherwise it will search using default search engine.

FEATURE: 395688

Diff Detail

Repository
R875 Falkon
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
SGOrava created this revision.Jul 16 2018, 10:50 AM
Restricted Application added a subscriber: falkon. · View Herald TranscriptJul 16 2018, 10:50 AM
SGOrava requested review of this revision.Jul 16 2018, 10:50 AM
drosca requested changes to this revision.Jul 16 2018, 1:36 PM

Looks good, but please rename the folder to lowercase middleclickloader.

src/scripts/MiddleClickLoader/mcl_settings.ui
59 ↗(On Diff #37861)

Open url in

77 ↗(On Diff #37861)

Should use more descriptive name than just "comboBox".

82 ↗(On Diff #37861)

Same here, better name.

This revision now requires changes to proceed.Jul 16 2018, 1:36 PM
drosca added inline comments.Jul 16 2018, 1:39 PM
src/scripts/MiddleClickLoader/mcl_settings.ui
35 ↗(On Diff #37861)

Translatable strings currently cannot be in UI files for Python extensions as it uses gettext and not Qt translation system (tr), so please move the strings to Python code (as you can see in runaction - settingsdialog.py).

SGOrava updated this revision to Diff 37902.EditedJul 16 2018, 8:01 PM

Update after review

  • Change folder name to lowercase
  • Use self-explanatory names for objects in ui file
  • Copy translatable strings to python file and keep right strings in ui file
  • Change some wording
drosca added a comment.EditedJul 17 2018, 9:28 AM

Changes looks fine, but I can't apply it because you updated it incorrectly.

arc patch D14155 fails with

INFO  Base commit is not in local repository; trying to fetch.
Created and checked out branch arcpatch-D14155.
Checking patch src/scripts/MiddleClickLoader/metadata.desktop => src/scripts/middleclickloader/metadata.desktop...
error: src/scripts/MiddleClickLoader/metadata.desktop: does not exist in index
...

You should upload full diff (against master).

SGOrava updated this revision to Diff 37941.Jul 17 2018, 9:38 AM

Attempt to fix diff so KDE can understand my will.

It's ok now. Your full name and e-mail please so I can commit it.

Name: Juraj Oravec
Email: sgd.orava@gmail.com

drosca accepted this revision.Jul 17 2018, 10:13 AM
This revision is now accepted and ready to land.Jul 17 2018, 10:13 AM
This revision was automatically updated to reflect the committed changes.