This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KLook and Debian Sid

Tags: None
(comma "," separated)
User avatar
Mte90
Registered Member
Posts
108
Karma
0
OS

KLook and Debian Sid

Tue Aug 07, 2012 12:57 pm
i have tryed to compile KLook and i can compile it with modify include of phonon file with absolute path but compile >:D .
Now i have a problem that i have sent to email of developer but he have responsed that not have time for verify so I ask you for help...

Code: Select all
Linking CXX executable klook
/usr/bin/ld: CMakeFiles/klook.dir/src/kpartswidget.cpp.o: undefined reference to symbol '_ZN6KParts8PartBaseD2Ev'
/usr/bin/ld: note: '_ZN6KParts8PartBaseD2Ev' is defined in DSO /usr/lib/libkparts.so.4 so try adding it to the linker command line
/usr/lib/libkparts.so.4: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status


i have search on internet and on kubuntu an user have the same problem.
http://irclogs.ubuntu.com/2012/06/30/%2 ... -devel.txt
this are the link for fix on kubuntu for compile that i have used for try to fix
http://www.kubuntuforums.net/showthread ... untu-12-04
http://www.kubuntuforums.net/showthread ... ok-KDE-4-9
Thanks for the help :-)


http://www.mte90.net/

Linux Counter.li #482442
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS

Re: KLook and Debian Sid  Topic is solved

Tue Aug 07, 2012 1:33 pm
Code: Select all
diff -urB klook/CMakeLists.txt new/CMakeLists.txt
--- a/CMakeLists.txt   2012-05-31 14:02:06.056487848 +0200
+++ b/CMakeLists.txt   2012-05-31 14:03:30.704576391 +0200
@@ -44,7 +44,8 @@
 target_link_libraries( klook ${KDE4_KIO_LIBS}
                                                         ${KDE4_PHONON_LIBS}
                                                         ${KDE4_PLASMA_LIBS}
-                                                        ${KDE4_KFILE_LIBS}
+                                                        kparts
+                     ${KDE4_KFILE_LIBS}
                                                         ${QT_LIBRARIES}
                                                         ${QT_QDECLARATIVE_LIBRARIES}
                                                         ${X11_LIBRARIES} )


Try with this patch
User avatar
Mte90
Registered Member
Posts
108
Karma
0
OS

Re: KLook and Debian Sid

Tue Aug 07, 2012 8:04 pm
thanks!!!!! ;D :) :D >:D ^-^
i have sent this fix to developer :-)

now i have patched the dolphin version of kdebase-apps on sid and compiled.
For install i have entered on the /kde-baseapps/dolphin/ and do it a make install.
but klook not start when i click on space bar...


http://www.mte90.net/

Linux Counter.li #482442
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: KLook and Debian Sid

Thu Aug 09, 2012 10:23 am
Where was the self-compiled Dolphin installed to?
It likely needs to be installed to /usr, although the default likely is /usr/local.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Mte90
Registered Member
Posts
108
Karma
0
OS

Re: KLook and Debian Sid

Thu Aug 09, 2012 1:25 pm
i have set cmake with -DCMAKE_INSTALL_PREFIX=/usr but not work.
i have redownlaoded the source of kdebase-apps on debian and retry to patch this is te log of patch operation:
Code: Select all
root@aptosid:/home/mte90/Desktop/kde/kde-baseapps/dolphin# patch -i ./kdebase-4.8.3-dolphin-klook-overlay-icon.patch
patching file CMakeLists.txt
Hunk #1 FAILED at 32.
1 out of 1 hunk FAILED -- saving rejects to file CMakeLists.txt.rej
can't find file to patch at input line 15
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/dolphinmainwindow.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/dolphinmainwindow.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/dolphinmainwindow.cpp   2012-06-01 14:42:38.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/dolphinmainwindow.cpp     2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: ^C

root@aptosid:/home/mte90/Desktop/kde/kde-baseapps/dolphin# patch -p0 -i ./kdebase-4.8.3-dolphin-klook-overlay-icon.patch
Ignoring potentially dangerous file name /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/CMakeLists.txt
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/CMakeLists.txt /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/CMakeLists.txt
|--- kde-baseapps-4.8.3_old/dolphin/src/CMakeLists.txt  2012-06-01 14:42:38.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/CMakeLists.txt    2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/CMakeLists.txt
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/CMakeLists.txt
Ignoring potentially dangerous file name /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/dolphinmainwindow.cpp
can't find file to patch at input line 15
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/dolphinmainwindow.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/dolphinmainwindow.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/dolphinmainwindow.cpp   2012-06-01 14:42:38.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/dolphinmainwindow.cpp     2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/dolphinmainwindow.cpp
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/dolphinmainwindow.cpp
Hunk #1 succeeded at 2123 (offset -42 lines).
Hunk #2 FAILED at 2356.
1 out of 2 hunks FAILED -- saving rejects to file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/dolphinmainwindow.cpp.rej
Ignoring potentially dangerous file name /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kfileitemlistwidget.cpp
can't find file to patch at input line 51
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kfileitemlistwidget.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kfileitemlistwidget.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kfileitemlistwidget.cpp      2012-04-30 00:38:55.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kfileitemlistwidget.cpp        2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kfileitemlistwidget.cpp
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kfileitemlistwidget.cpp
can't find file to patch at input line 112
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kfileitemlistwidget.h /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kfileitemlistwidget.h
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kfileitemlistwidget.h        2012-03-30 00:25:30.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kfileitemlistwidget.h  2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: 2
2: No such file or directory
Skip this patch? [y] n
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kfileitemlistwidget.h
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kfileitemlistwidget.h
can't find file to patch at input line 123
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistcontroller.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistcontroller.cpp      2012-04-30 00:38:55.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.cpp        2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.cpp
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.cpp
Hunk #2 succeeded at 493 (offset 8 lines).
can't find file to patch at input line 148
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistcontroller.h /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.h
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistcontroller.h        2012-01-18 22:07:34.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.h  2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.h
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.h
can't find file to patch at input line 160
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistklooktoggle.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistklooktoggle.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistklooktoggle.cpp     1970-01-01 03:00:00.000000000 +0300
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistklooktoggle.cpp       2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistklooktoggle.cpp
/home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistklooktoggle.cpp: No such file or directory
Skip this patch? [y] y
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 270
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistklooktoggle_p.h /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistklooktoggle_p.h
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistklooktoggle_p.h     1970-01-01 03:00:00.000000000 +0300
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistklooktoggle_p.h       2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistklooktoggle_p.h
/home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistklooktoggle_p.h: No such file or directory
Skip this patch? [y] y
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 335
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistview.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistview.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistview.cpp    2012-04-30 00:38:55.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistview.cpp      2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistview.cpp
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistview.cpp
can't find file to patch at input line 406
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistview.h /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistview.h
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistview.h      2012-03-30 00:25:30.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistview.h        2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistview.h
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistview.h
can't find file to patch at input line 435
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistwidget.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistwidget.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistwidget.cpp  2012-03-01 02:56:09.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistwidget.cpp    2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistwidget.cpp
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistwidget.cpp
can't find file to patch at input line 565
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistwidget.h /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistwidget.h
|--- kde-baseapps-4.8.3_old/dolphin/src/kitemviews/kitemlistwidget.h    2012-03-01 02:56:09.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistwidget.h      2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistwidget.h
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/kitemviews/kitemlistwidget.h
Ignoring potentially dangerous file name /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/dolphin_generalsettings.kcfg
can't find file to patch at input line 622
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/settings/dolphin_generalsettings.kcfg /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/dolphin_generalsettings.kcfg
|--- kde-baseapps-4.8.3_old/dolphin/src/settings/dolphin_generalsettings.kcfg   2012-04-30 00:38:55.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/dolphin_generalsettings.kcfg     2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/dolphin_generalsettings.kcfg
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/dolphin_generalsettings.kcfg
Ignoring potentially dangerous file name /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/general/behaviorsettingspage.cpp
can't find file to patch at input line 636
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/settings/general/behaviorsettingspage.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/general/behaviorsettingspage.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/settings/general/behaviorsettingspage.cpp       2011-12-03 01:17:41.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/general/behaviorsettingspage.cpp 2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/general/behaviorsettingspage.cpp
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/general/behaviorsettingspage.cpp
can't find file to patch at input line 688
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/settings/general/behaviorsettingspage.h /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/general/behaviorsettingspage.h
|--- kde-baseapps-4.8.3_old/dolphin/src/settings/general/behaviorsettingspage.h 2011-12-03 01:17:41.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/general/behaviorsettingspage.h   2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/general/behaviorsettingspage.h
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/settings/general/behaviorsettingspage.h
Ignoring potentially dangerous file name /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinitemlistcontainer.cpp
can't find file to patch at input line 699
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/views/dolphinitemlistcontainer.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinitemlistcontainer.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/views/dolphinitemlistcontainer.cpp      2012-04-30 00:38:55.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinitemlistcontainer.cpp        2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinitemlistcontainer.cpp
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinitemlistcontainer.cpp
Ignoring potentially dangerous file name /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.cpp
can't find file to patch at input line 718
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/views/dolphinview.cpp /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.cpp
|--- kde-baseapps-4.8.3_old/dolphin/src/views/dolphinview.cpp   2012-06-01 14:42:38.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.cpp     2012-06-01 15:58:28.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.cpp
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.cpp
Hunk #1 succeeded at 149 (offset -8 lines).
Hunk #2 succeeded at 1405 (offset -78 lines).
can't find file to patch at input line 745
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nuar kde-baseapps-4.8.3_old/dolphin/src/views/dolphinview.h /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.h
|--- kde-baseapps-4.8.3_old/dolphin/src/views/dolphinview.h     2012-06-01 14:42:38.000000000 +0400
|+++ /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.h       2012-06-01 16:02:39.000000000 +0400
--------------------------
File to patch: /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.h
patching file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.h
Hunk #1 FAILED at 350.
Hunk #2 succeeded at 544 (offset -13 lines).
1 out of 2 hunks FAILED -- saving rejects to file /home/mte90/Desktop/kde/kde-baseapps/dolphin/src/views/dolphinview.h.rej

i can see that not create the klook file requested :-/
also not find some code perhaps i use kde 4.8.4 and this patch are for 4.8.3....


http://www.mte90.net/

Linux Counter.li #482442
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: KLook and Debian Sid

Fri Aug 10, 2012 10:49 am
It appears that the patch is incompatible, due to code changes. I would suggest contacting the author of the patch, to get an updated version.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS

Re: KLook and Debian Sid

Sun Aug 12, 2012 3:24 pm
Builds fine with dolphin from trunk and this same patches, i would say you haven't applied them correctly.
You need to go kde-baseapps root directory, and then apply them, not dolphin dir.
User avatar
Mte90
Registered Member
Posts
108
Karma
0
OS

Re: KLook and Debian Sid

Thu Aug 16, 2012 3:05 pm
šumski wrote:Builds fine with dolphin from trunk and this same patches, i would say you haven't applied them correctly.
You need to go kde-baseapps root directory, and then apply them, not dolphin dir.

i have the same problem..
i get hunk failed error in some case..


http://www.mte90.net/

Linux Counter.li #482442
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS

Re: KLook and Debian Sid

Thu Aug 16, 2012 3:34 pm
You didn't write you current error message ;)
Code: Select all
diff -urB kde-baseapps/dolphin/src/dolphinmainwindow.cpp new/dolphin/src/dolphinmainwindow.cpp
--- kde-baseapps/dolphin/src/dolphinmainwindow.cpp   2012-05-29 16:48:15.220793977 +0200
+++ new/dolphin/src/dolphinmainwindow.cpp   2012-05-30 07:49:39.585543305 +0200
@@ -86,6 +86,8 @@
 #include <QClipboard>
 #include <QToolButton>
 #include <QSplitter>
+#include <QProcess>
+#include <QApplication>
 
 namespace {
     // Used for GeneralSettings::version() to determine whether
@@ -119,7 +121,8 @@
     m_settingsDialog(),
     m_controlButton(0),
     m_updateToolBarTimer(0),
-    m_lastHandleUrlStatJob(0)
+    m_lastHandleUrlStatJob(0),
+    m_isFocusOnTerminal(false)
 {
     // Workaround for a X11-issue in combination with KModifierInfo
     // (see DolphinContextMenu::initializeModifierKeyInfo() for
@@ -237,6 +240,8 @@
     if (!showMenu) {
         createControlButton();
     }
+
+    connect (qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), this, SLOT(focusChanged(QWidget*,QWidget*)));
 }
 
 DolphinMainWindow::~DolphinMainWindow()
@@ -401,6 +406,15 @@
         compareFilesAction->setEnabled(false);
     }
 
+
+    //KLook
+    QAction* openInKLook = actionCollection()->action("open_in_KLook");
+    if ((selectedUrlsCount > 0) && (!m_isFocusOnTerminal)){
+        openInKLook->setEnabled(true);
+    } else {
+        openInKLook->setEnabled(false);
+    }
+
     emit selectionChanged(selection);
 }
 
@@ -1652,6 +1666,14 @@
     openInNewWindow->setText(i18nc("@action:inmenu", "Open in New Window"));
     openInNewWindow->setIcon(KIcon("window-new"));
     connect(openInNewWindow, SIGNAL(triggered()), this, SLOT(openInNewWindow()));
+
+    // KLook
+    KAction* openInKLook = actionCollection()->addAction("open_in_KLook");
+    openInKLook->setText(i18nc("@action:inmenu", "Preview"));
+    openInKLook->setShortcut(Qt::Key_Space);
+    openInKLook->setIcon(KIcon("klook"));
+    openInKLook->setEnabled(false);
+    connect(openInKLook, SIGNAL(triggered()), this, SLOT(previewItem()));
 }
 
 void DolphinMainWindow::setupDockWidgets()
@@ -2131,4 +2153,44 @@
     }
 }
 
+void DolphinMainWindow::previewItem()
+{
+    const KFileItemList list = m_activeViewContainer->view()->selectedItems();
+    QStringList urlList;
+    foreach(KFileItem item, list)
+    {
+        urlList.append(item.url().path());
+    }
+    if (!list.isEmpty())
+    {
+        QProcess* process = new QProcess();
+        connect(process,SIGNAL(finished(int)),process,SLOT(deleteLater()));
+        process->start(QString("klook"), urlList);
+    }
+}
+
+void DolphinMainWindow::focusChanged(QWidget *old, QWidget *now)
+{
+#ifndef Q_OS_WIN
+    if (now)
+    {
+        if (QString(now->metaObject()->className()).contains("Konsole::TerminalDisplay"))
+        {
+            QAction* openInKLook = actionCollection()->action("open_in_KLook");
+            m_isFocusOnTerminal = true;
+            openInKLook->setEnabled(false);
+        }
+    }
+    if (old)
+    {
+        if (QString(old->metaObject()->className()).contains("Konsole::TerminalDisplay"))
+        {
+            QAction* openInKLook = actionCollection()->action("open_in_KLook");
+            m_isFocusOnTerminal = false;
+            openInKLook->setEnabled(true);
+        }
+    }
+#endif
+}
+
 #include "dolphinmainwindow.moc"
diff -urB kde-baseapps/dolphin/src/dolphinmainwindow.h new/dolphin/src/dolphinmainwindow.h
--- kde-baseapps/dolphin/src/dolphinmainwindow.h   2012-05-10 16:50:58.644232527 +0200
+++ new/dolphin/src/dolphinmainwindow.h   2012-05-30 07:49:39.586543304 +0200
@@ -36,6 +36,7 @@
 
 typedef KIO::FileUndoManager::CommandType CommandType;
 
+class DolphinDockWidget;
 class DolphinViewActionHandler;
 class DolphinApplication;
 class DolphinSettingsDialog;
@@ -51,6 +52,7 @@
 class QSplitter;
 class QToolButton;
 class QVBoxLayout;
+class Panel;
 
 /**
  * @short Main window for Dolphin.
@@ -367,6 +369,12 @@
     void openInNewTab();
 
     /**
+     * Opens the selected files in KLook.
+     */
+
+    void previewItem();
+
+    /**
      * Opens the selected folder in a new window.
      */
     void openInNewWindow();
@@ -461,6 +469,8 @@
      */
     void slotPanelErrorMessage(const QString& error);
 
+    void focusChanged(QWidget* old, QWidget* now);
+
 private:
     /**
      * Activates the given view, which means that
@@ -588,6 +598,8 @@
     QTimer* m_updateToolBarTimer;
 
     KIO::Job* m_lastHandleUrlStatJob;
+
+    bool m_isFocusOnTerminal;
 };
 
 inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const


This applies both to 4.9.0 and current master dolphin with offset -1
Code: Select all
patching file dolphin/src/dolphinmainwindow.cpp
Hunk #1 succeeded at 85 (offset -1 lines).
Hunk #2 succeeded at 120 (offset -1 lines).
Hunk #3 succeeded at 239 (offset -1 lines).
Hunk #4 succeeded at 405 (offset -1 lines).
Hunk #5 succeeded at 1665 (offset -1 lines).
Hunk #6 succeeded at 2152 (offset -1 lines).
patching file dolphin/src/dolphinmainwindow.h
User avatar
Mte90
Registered Member
Posts
108
Karma
0
OS

Re: KLook and Debian Sid

Fri Aug 17, 2012 8:08 pm
i have made anothers attempts to patch the file.
can help me with the correct command?
i have try to use kompare for apply the patch but i reset the path file with the origin folder...


http://www.mte90.net/

Linux Counter.li #482442
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: KLook and Debian Sid

Thu Aug 23, 2012 11:27 pm
Try running the patch command from /home/mte90/Desktop/kde - and use the patch posted by šumski.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Mte90
Registered Member
Posts
108
Karma
0
OS

Re: KLook and Debian Sid

Sat Sep 01, 2012 2:18 pm
the klook developer have been updated the patch for dolphin
now with the patch for space button i can compile on debian :-)


http://www.mte90.net/

Linux Counter.li #482442


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, mesutakcan, sandyvee, Sogou [Bot]