KParts Plugin

Browser

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

25
Score 85.3%
Description:

This software implements a plugin for Netscape-compatible browsers in a Unix environment. This plugin uses KDE's KParts technology to embed file viewers (e.g. for PDF files) into non-KDE browsers. Tested browsers include both Mozilla Firefox and Opera.
With this plugin, you can e.g. view PDF files in Firefox using Okular as an embedded plugin.
Last changelog:

7 years ago

2012-07-23
* Applying patch by Arno Rehn to avoid blacklisting in
Oxygen-transparent style

2012-06-05
* Using URL to create a default filename when saving
copy of document
* Minor change in UI to place long mime type labels
in one line
* Adding push button to copy URL into clipboard

2012-05-29
* Fixing some minor compilation errors
* Adding KCModule (System Settings module) to configure
which mime types shall be supported, removing this
option from the plugin itself

2012-05-24
* Rearranging GUI to be more compact vertically
* Porting from KBibTeX support for custom keyboard shorts
* Refactoring drop-down menu to tree view for mime type
configuration

2012-04-22
* Adding patch by Rex Dieter
set installation directory by parameter to cmake
* Fixing print menu item issue for Okular part
* Menus and toolbars know separators now

2012-04-19
* Various minor changes
* Adding experimental support for menus and toolbars
from embedded part

2012-04-11
* Adding various mimetypes to blacklist

2011-08-23
* Blacklisting some more Java mimetypes: application/java-archive and video/x-javafx

2011-08-06
* Minor code clean-up and refactoring (no functional changes)

2011-06-06
* Added .pot file for translations
(no actual translations yet)

2010-12-16
* Adding "application/googletalk" to blacklisted mime types

2010-12-08
* Adding "application/futuresplash" to blacklisted mime types
* Checking if mime type is valid when reading data to avoid crash
* Minor tweaks in user interface strings

2010-07-23
* Manually raising dialog to select part (if multiple
KParts available for same mime type)
* Minor GUI improvements

2010-07-22
* Showing current mime type in GUI (right to buttons)
* Adding more mime types to built-in blacklisted list
("application/force-download", everything starting
with "x-")
* Adding release date to internal description
(see "about:plugins" in Firefox)

2010-07-06
* Marking some mime types as built-in blacklisted, e.g.
application/x-shockwave-flash
* Adding more mime types to built-in blacklist to avoid
problems with Thunderbird

2010-06-29
* Adding dialog to choose which KPart to use if several
parts are available. User can set preference to avoid
getting this dialog again for the same mime type.

2010-06-27
* Adding comments throughout the code
* Enabling/disabling mime types possible in GUI
(new push button with menu)
* Improved focus handling using code from Jeremy Sanders
* Make installation path 32/64-bit aware
* Minor GUI improvements

2010-06-04
* Major refactoring
* Supported mime types determined through KDE-internal
functions; hard-coded list no longer necessary
* Adding support for keyboard focus.
Tip from Jeremy Sanders (http://barmag.net/)

2010-06-02
* Saving file failed if part was not loaded properly.

2010-06-01
* CMakeLists.txt contains a variable with installation
directory
* New script src/generate-mimetype-includes.sh to enhance
"raw" source files to final files containing a list of
objects (one for each supported mime type)
List of mime types can be controlled via text file
src/mimetypes.txt
* Showing a list of compiled-in/supported mime types
while waiting for the file's data
* Open and save buttons are available even if no part
is available to show the file's data
* Fixing warnings

2010-05-21
* Initial release

9

stavallo

7 years ago

Thank you!

Report

assalane1

7 years ago

Hi
First thanks for this great app. The solution will surely shape up to be superior to anything available atm.
I tried building it on opensuse as I was unable to find any package for it. The plugin was installed in /usr/lib64/nsbrowser/plugin/ so I made a symbolic link to /usr/lib64/browser-plugins/.

But now when I open a PDF the okular app appear border-less and not embedded into the firefox window. Did I do something wrong? Or is it a bug?

Report

assalane1

7 years ago

correction: the kpart window do appear with kwin windows decoration

Report

C

fischer

7 years ago

I am not sure if I understood your problem correctly. You are trying to open a PDF file in Firefox and instead of the plugin, Okular opens as an application? Please check which plugin settings you are using for PDF in Firefox (i.e. open externally or inside a plugin)

Report

assalane

6 years ago

Hi and sorry for the late reply.
No, okular doesn't open as the standalone. its the kpart of the application that open in a new window instead of being imbedded in the browser tab.
In firefox pdf files are mapped to kparts plugin as normal. But it happens in chrome and rekonq too.

Report

9

auxsvr

8 years ago

First of all, thanks for this extremely useful plugin.

The problem is that every browser crashes on load. Here's the backtrace:

Quote:#0 KSycocaEntry::name (this=0x0) at /usr/src/debug/kdelibs-4.7.2/kdecore/sycoca/ksycocaentry.cpp:159
#1 0x9edc4d29 in mimeTypeLessThan (m1=..., m2=...) at /usr/src/debug/kpartsplugin-20110823/src/kpartsplugin.cpp:51
#2 0x9edca352 in QAlgorithmsPrivate::qSortHelper<QList<KSharedPtr<KMimeType> >::iterator, KSharedPtr<KMimeType>, bool (*)(KSharedPtr<KMimeType> const&, KSharedPtr<KMimeType> const&)> (start=
..., end=..., t=..., lessThan=0x9edc4ce0 <mimeTypeLessThan(Ptr const&, Ptr const&)>) at /usr/include/QtCore/qalgorithms.h:366
#3 0x9edc5818 in qSort<QList<KSharedPtr<KMimeType> >::iterator, bool (*)(KSharedPtr<KMimeType> const&, KSharedPtr<KMimeType> const&)> (lessThan=
0x9edc4ce0 <mimeTypeLessThan(Ptr const&, Ptr const&)>, end=<optimized out>, start=<optimized out>) at /usr/include/QtCore/qalgorithms.h:187
#4 initAllMimeTypes () at /usr/src/debug/kpartsplugin-20110823/src/kpartsplugin.cpp:74
#5 initAllMimeTypes () at /usr/src/debug/kpartsplugin-20110823/src/kpartsplugin.cpp:64
#6 0x9edc6135 in QtNPClassList (this=0xb93a7290) at /usr/src/debug/kpartsplugin-20110823/src/kpartsplugin.cpp:496
#7 qtns_instantiate () at /usr/src/debug/kpartsplugin-20110823/src/kpartsplugin.cpp:519
#8 0x9edcb295 in qtNPFactory () at /usr/src/debug/kpartsplugin-20110823/src/qtbrowserplugin.cpp:89
#9 0x9edcd65b in NP_GetMIMEDescription () at /usr/src/debug/kpartsplugin-20110823/src/qtbrowserplugin.cpp:867

Report

9

auxsvr

8 years ago

Running kbuildsycoca4 --noincremental fixed it.

Report

poomerang

8 years ago

Ehm, how did you archive the source?

$ bunzip2 kpartsplugin-20110823.tar.bz2
bunzip2: kpartsplugin-20110823.tar.bz2 is not a bzip2 file.

$ file kpartsplugin-20110823.tar.bz2
kpartsplugin-20110823.tar.bz2: POSIX tar archive (GNU)

:S

Report

C

fischer

8 years ago

Fixed

Report

gbowden

8 years ago

Hi would it be possible to add a print button?

Thanks, the plugin is great!

Report

C

fischer

8 years ago

No, printing is a feature specific to individual KParts used in this plugin and not accessible for KPartsPlugin. You have to open a file in an external view (use this button) to get access to the printing function.

The function may become available once I have figured out how to embed menus and toolbars of KParts inside the plugin.

Report

C

fischer

7 years ago

It may work now, please test again. If it is not working, please wait another year so that I can come up with a new idea...

Report

poomerang

8 years ago

Kpartsplugin is now in unstable distribution in Debian: http://packages.debian.org/unstable/main/kpartsplugin
If i'm not wrong, this should mean that it will be in next Ubuntu release too.

Report

C

fischer

8 years ago

Nice. I hope they will update to the most recent version. 201100606 is already a little bit outdated ...

Report

poomerang

8 years ago

ehm, it's actually my due but i changed my computer recently and i only got linux back today :D i'll update it asap

Report

9

aspotashev

8 years ago

I want to translate KPartsPlugin into Russian.

I see that you use i18n() calls, but there is no script for extracting message into a .pot file (like Messages.sh).

Report

C

fischer

8 years ago

I just uploaded a new release that contains a .pot file and a simple script for translations. No functional changes, though

Report

9

aspotashev

8 years ago

Thanks, I've started working on Russian translation.

The strings "Extension" and "Description" are not translatable. See kpartsplugin.cpp, line 395.

Report

9

aspotashev

8 years ago

Done. The translation is available at http://l10n.kde.ru/system/contents/148/original/kpartsplugin-ru.po

I tried to complile the .po file into kpartsplugin.mo and put it to ~/.kde4/share/locale/ru/LC_MESSAGES/, but KPartsPlugin is still in English.
You might need to use insertCatalog to insert the "kpartsplugin" translation catalog (or whatever you want to name it), and probably "shared-mime-info" and "xml_mimetypes" to make the MIME types descriptions also translated.

Report

9

aspotashev

8 years ago

See https://git.reviewboard.kde.org/r/101504/diff/#index_header for an example on using insertCatalog.

Report

C

fischer

8 years ago

I am using an untranslated KDE and cannot quickly change my language to test translations. Can you please insert
KGlobal::locale()->insertCatalog("kpartsplugin");
at the beginning of KPartsPlugin's constructor (around line 180) and test if it is working?

Report

C

fischer

8 years ago

I was looking into the lack of translation and I can confirm all your observations, e.g. that locale seems to be fixed on "en_US" despite being manually set to another language.
I tried to manually create KApplication or KComponentData objects, but this either did not make any difference or crashed the browser.

Report

9

aspotashev

8 years ago

Yesterday I opened some type of file in Konqueror (I don't remember what type exactly), and localization worked!
I think, it doesn't work in Firefox (and also doesn't work in Opera, I've just tried it), because it is not a KDE application, and KLocale needs to be initialized manually. May be you just need to create a KApplication instance?

P.S.: https://www.desktopsummit.org/program/sessions/kparts-browser-plugin-–-bringing-kde-components-all-browsers :)

Report

9

aspotashev

8 years ago

Here is the problem: KGlobal::locale()->language() called in the KPartsPlugin constructor returns "en_US".

~/.kde/share/config/defaultconfig contains Language=ru and all other parameters from Russian/RussianFederation (ru_RU) locale.

Report

9

aspotashev

8 years ago

Doesn't work after adding that line into the ctor, rebuild and installation. I don't know why it doesn't work.

Report

7 years ago

2012-07-23
* Applying patch by Arno Rehn to avoid blacklisting in
Oxygen-transparent style

2012-06-05
* Using URL to create a default filename when saving
copy of document
* Minor change in UI to place long mime type labels
in one line
* Adding push button to copy URL into clipboard

2012-05-29
* Fixing some minor compilation errors
* Adding KCModule (System Settings module) to configure
which mime types shall be supported, removing this
option from the plugin itself

2012-05-24
* Rearranging GUI to be more compact vertically
* Porting from KBibTeX support for custom keyboard shorts
* Refactoring drop-down menu to tree view for mime type
configuration

2012-04-22
* Adding patch by Rex Dieter
set installation directory by parameter to cmake
* Fixing print menu item issue for Okular part
* Menus and toolbars know separators now

2012-04-19
* Various minor changes
* Adding experimental support for menus and toolbars
from embedded part

2012-04-11
* Adding various mimetypes to blacklist

2011-08-23
* Blacklisting some more Java mimetypes: application/java-archive and video/x-javafx

2011-08-06
* Minor code clean-up and refactoring (no functional changes)

2011-06-06
* Added .pot file for translations
(no actual translations yet)

2010-12-16
* Adding "application/googletalk" to blacklisted mime types

2010-12-08
* Adding "application/futuresplash" to blacklisted mime types
* Checking if mime type is valid when reading data to avoid crash
* Minor tweaks in user interface strings

2010-07-23
* Manually raising dialog to select part (if multiple
KParts available for same mime type)
* Minor GUI improvements

2010-07-22
* Showing current mime type in GUI (right to buttons)
* Adding more mime types to built-in blacklisted list
("application/force-download", everything starting
with "x-")
* Adding release date to internal description
(see "about:plugins" in Firefox)

2010-07-06
* Marking some mime types as built-in blacklisted, e.g.
application/x-shockwave-flash
* Adding more mime types to built-in blacklist to avoid
problems with Thunderbird

2010-06-29
* Adding dialog to choose which KPart to use if several
parts are available. User can set preference to avoid
getting this dialog again for the same mime type.

2010-06-27
* Adding comments throughout the code
* Enabling/disabling mime types possible in GUI
(new push button with menu)
* Improved focus handling using code from Jeremy Sanders
* Make installation path 32/64-bit aware
* Minor GUI improvements

2010-06-04
* Major refactoring
* Supported mime types determined through KDE-internal
functions; hard-coded list no longer necessary
* Adding support for keyboard focus.
Tip from Jeremy Sanders (http://barmag.net/)

2010-06-02
* Saving file failed if part was not loaded properly.

2010-06-01
* CMakeLists.txt contains a variable with installation
directory
* New script src/generate-mimetype-includes.sh to enhance
"raw" source files to final files containing a list of
objects (one for each supported mime type)
List of mime types can be controlled via text file
src/mimetypes.txt
* Showing a list of compiled-in/supported mime types
while waiting for the file's data
* Open and save buttons are available even if no part
is available to show the file's data
* Fixing warnings

2010-05-21
* Initial release

12345678910
30
product-maker nazir May 12 2015 9 excellent
product-maker auxsvr Apr 06 2014 9 excellent
product-maker Telperien Oct 12 2013 9 excellent
product-maker alvanx Jun 22 2013 9 excellent
product-maker l0ll0lll Mar 28 2013 9 excellent
product-maker avlas Oct 19 2012 9 excellent
product-maker kaznovac Oct 04 2012 9 excellent
product-maker pondogor Jun 06 2012 9 excellent
product-maker ChichipioWilson Jun 04 2012 9 excellent
product-maker caig Jun 02 2012 9 excellent
product-maker boastt May 30 2012 9 excellent
product-maker step-2 Apr 29 2012 9 excellent
product-maker ObiWahn Apr 23 2012 9 excellent
product-maker stavallo Dec 19 2011 9 excellent
product-maker AlexeyK Aug 23 2011 9 excellent
product-maker andrew9888 Jul 14 2011 9 excellent
product-maker integr8e Jun 08 2011 9 excellent
product-maker unikum111 Jun 06 2011 9 excellent
product-maker birdflesh May 23 2011 9 excellent
product-maker valsinats Mar 07 2011 9 excellent
product-maker pmoir Jan 04 2011 9 excellent
product-maker margueritesu Dec 31 2010 9 excellent
product-maker nerdykid Dec 18 2010 9 excellent
product-maker drdanz Dec 15 2010 9 excellent
product-maker aspotashev Dec 11 2010 9 excellent
product-maker kudlaty Dec 10 2010 9 excellent
product-maker Nikoli Nov 06 2010 9 excellent
product-maker jackyohh Oct 31 2010 9 excellent
product-maker roctheme Oct 19 2010 9 excellent
product-maker franciscot Oct 16 2010 9 excellent
product-maker Base: 4 x 5.0 Ratings
nazir
May 12 2015
alvanx
Jun 22 2013
pierigno
Jun 07 2012
AlmaTlust
May 15 2012
ObiWahn
Apr 23 2012
birdflesh
May 23 2011
pmoir
Jan 04 2011
margueritesu
Dec 22 2010
drdanz
Dec 15 2010
aspotashev
Dec 11 2010
poomerang
Sep 24 2010
csousa
Jul 26 2010
marcotangaro
Jul 24 2010
kudlaty
Jul 24 2010
jackyohh
Jul 11 2010
mfuhrer
Jul 06 2010
AlejandroNova
Jul 06 2010
lumitoro
Jun 28 2010
Vistausss
Jun 04 2010
trapni
Jun 04 2010
dtritscher
Jun 04 2010
netcelli
Jun 04 2010
zvonSully
Jun 02 2010
dejazmach
May 25 2010
thomasjfedora
May 21 2010
File (click to download) Version Description PackagetypeArchitectureRelease Channel Downloads Date Filesize DL OCS-Install MD5SUM
*Needs ocs-url or ocs-store to install things
Pling
0 Affiliates
Details
license
version
20120723
updated Jul 23 2012
added May 21 2010
downloads 24h
0
pageviews 24h 5
System Tags app software