Bug 315541

Summary: Add opacity to account icons in the delegate
Product: [Unmaintained] telepathy Reporter: Martin Klapetek <mklapetek>
Component: contactlistAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED FIXED    
Severity: task CC: kde, michal
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: Future   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 0.6.0
Sentry Crash Report:

Description Martin Klapetek 2013-02-20 20:29:53 UTC
As the title says, add 20% opacity to the account icon displayed in contact list. The code is in abstract-contact-delegate.cpp in paintHeader function.

This is done with QPainter and composition mode (SourceOver should be your friend). Read the docs[1] and play around.

[1]  - http://qt-project.org/doc/qt-4.8/qpainter.html#CompositionMode-enum
Comment 1 Michal Zajacik 2013-02-23 20:31:10 UTC
Hi,
I could try to look at this issue. I'm a student pursuing his msc degree in Artificial intelligence. Currently I'm visiting a course of Opensource Programming, where we learn how to participate on open projects and how to communicate with other developers. This issue seems to be perfect for a newbie like me.

Michal
Comment 2 Martin Klapetek 2013-02-23 22:54:21 UTC
Great!

Let us know if you need any help (you can leave comments here or join our mailing list - kde-telepathy@kde.org).
Comment 3 Michal Zajacik 2013-02-25 19:32:28 UTC
Hi,
where should I download actual snapshot? From git://anongit.kde.org/ktp-contact-list ?

(Sorry for newbie question like this)

Michal
Comment 4 Martin Klapetek 2013-02-25 19:33:35 UTC
Yes.

If you haven't build anything yet, you'll probably need this - http://community.kde.org/KTp/Getting_Set_Up
Comment 5 Michal Zajacik 2013-02-25 22:01:00 UTC
Thank you for the answer.

I tried to follow the guide of setting KTp up and do manual build and I ran into a problem during compilation of ktp-common-internals:

I successfully cloned the repo, then created build dir and from that dir run

cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=debugfull

as suggested. I have working installation of KDE 4.9.5 on Gentoo 64 bit.

CMake Error at CMakeLists.txt:17 (find_package):
  By not providing "FindTelepathyLoggerQt4.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "TelepathyLoggerQt4", but CMake did not find one.

  Could not find a package configuration file provided by
  "TelepathyLoggerQt4" with any of the following names:

    TelepathyLoggerQt4Config.cmake
    telepathyloggerqt4-config.cmake

  Add the installation prefix of "TelepathyLoggerQt4" to CMAKE_PREFIX_PATH or
  set "TelepathyLoggerQt4_DIR" to a directory containing one of the above
  files.  If "TelepathyLoggerQt4" provides a separate development package or
  SDK, be sure it has been installed.

So I installed telepathy-logger-qt to my distro, but it didn't solve the issue. I tried to localize the *.cmake files, but none were found.

Only after cloning telepathy-logger-qt from repo the *.cmake.in file was present, but building logger-qt from sources also failed:

-- The following REQUIRED packages have not been found:

 * TelepathyLogger (required version >= 0.8.0) , Daemon for logging Telepathy conversations , <http://telepathy.freedesktop.org>

CMake Error at /usr/share/cmake/Modules/FeatureSummary.cmake:430 (MESSAGE):
  feature_summary() Error: REQUIRED package(s) are missing, aborting CMake
  run.
Call Stack (most recent call first):
  CMakeLists.txt:265 (feature_summary)

I think that failed beause my distro has only version 0.6 of telepathy-logger. So i cloned logger from git://anongit.freedesktop.org/telepathy/telepathy-logger, run autogen.sh, ./configure, then make, but make failed:

make[2]: Entering directory `/home/michal/tmp/telepathy/telepathy-logger/extensions'
  GEN    _gen/cli-misc-body.h
Traceback (most recent call last):
  File "../tools/glib-client-gen.py", line 31, in <module>
    from libglibcodegen import Signature, type_to_gtype, cmp_by_name, \
  File "/home/michal/tmp/telepathy/telepathy-logger/tools/libglibcodegen.py", line 157
    raise Exception, "can't index a hashtable off non-basic type " + s
                   ^
SyntaxError: invalid syntax
make[2]: *** [_gen/cli-misc-body.h] Error 1
make[2]: Leaving directory `/home/michal/tmp/telepathy/telepathy-logger/extensions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/michal/tmp/telepathy/telepathy-logger'
make: *** [all] Error 2

So it looks I'm kind of stuck here. Any ideas?
Comment 6 Martin Klapetek 2013-02-26 07:50:48 UTC
The deps of the logger should be libglib and libtelepathy-glib, possibly some dconf-settings-backend and/or gsettings-backend. Can you check you have those installed?
Comment 7 Michal Zajacik 2013-02-26 09:44:52 UTC
I have glib 2.34.3, telepathy-glib 0.20.1-r1, dconf 0.14.1 installed on my system.
Comment 8 Martin Klapetek 2013-02-26 09:51:58 UTC
Let's take this discussion of this bug, it creates unrelated noise.
Comment 9 Martin Klapetek 2013-03-11 16:24:56 UTC
Git commit 5f2c13a822f1a86ee3635dbe5e98d83a496088b9 by Martin Klapetek, on behalf of Michal Zajačík.
Committed on 11/03/2013 at 17:24.
Pushed by mklapetek into branch 'master'.

Add opacity to account icons in the delegate

Reviewed-by: Martin Klapetek

M  +4    -0    abstract-contact-delegate.cpp

http://commits.kde.org/telepathy-contact-list/5f2c13a822f1a86ee3635dbe5e98d83a496088b9