Home

Advertisement

Customize
ereslibre
12 January 2007 @ 02:07 pm
Hi,

I hope this is the last change I do to my blog. Since I want to update files sometimes, and with the free version of livejournal is impossible, I am forced to update the file on my personal server and write on livejournal. If I install the wordpress on my personal server I won't be able to add or modify new entries to the blog, only from the internet, so I'm moving to a low cost hosting that provides me some php functionality.

I will tell clee about the change. Sorry clee, and thanks from here for your patience with this changes...

The new address is http://www.ereslibre.es
 
 
ereslibre
09 January 2007 @ 07:57 pm
I was asked by trolls to write a test for the problem I'm experiencing with Editor/Delegate. I have done so, despite how much I hate writing tests :P

I hope this focus the problem very clear, and lets you find the problem faster than other way. I have written the simplest test that came to my mind.

You can find the whole "readme"/"test"/"patch to fix" pack here.

Thank you.
 
 
ereslibre
In order to have feedback from developers (and possible brave users) before having it finished (well it won't be finished ever I think, there is always things to improve), despite the problem kio_uiserver can't be shown on the system tray (since it doesn't work), I have added a commented line that you have to uncomment in order to have kio_uiserver running in your KDE4 environment.

At file kdelibs/kio/misc/uiserver.cpp, on lines #118 and #119 you'll find:

    // Uncomment if you want to see kio_uiserver in action (ereslibre)
    // if (isHidden()) show();

Just uncomment the line #119 to have it running. You will have to close it manually (it is easy to make it autoclosing), you just have to change method

void UIServer::jobFinished(int id)
{
    if (id < 1) return;

    progressListModel->finishJob(id);
}

with this one:

void UIServer::jobFinished(int id)
{
    if (id < 1) return;

    progressListModel->finishJob(id);

    if (!progressListModel->rowCount())
       hide();
}

Bye !
 
 
ereslibre
Despite today I'm going some shopping... vacations are over, and is time to go back to University (high school) and see how many hours of study I missed for doing some other things.

Well, time has ran out really fast these days... and lots of new stuff have been added to the uiserver. I'm glad I'm committing my changes this Monday. Some things need to be more polished, but it really works very nice now.

The thing is that uiserver is registered on the system tray, but since it doesn't work you won't be able to make it visible. When I commit the code I have (it may change from today to Monday a bit) to tell you what you have to write and where to have it running (is only a line, or two if you want it to auto-hide when no jobs are left).

Right now, when jobs are finished they disappear from the list. I've to think a bit more about this. It would be nice if it just is there till it was explicit removed by the user. Maybe is the time to write a configuration dialog, for letting user configure this kind of behaviours.

I won't have so many time for KDE from now, because exams are coming (February) and it's time to work on studies. But take in count I will be working on KDE on my little free time.
 
 
ereslibre
05 January 2007 @ 02:41 pm
I'm very glad to announce I've almost finished (faster than I expected) the actions support on the kio_uiserver.

Right now, slots are not really called when buttons are clicked, but I hope that will be easy. I have to leave right now ;)

The given screenshot was taken with some added code to Kopete. This is the change for having it working in Kopete (for example):

Index: kopete/kopete/kopeteapplication.cpp
===================================================================
--- kopete/kopete/kopeteapplication.cpp (revisión: 619499)
+++ kopete/kopete/kopeteapplication.cpp (copia de trabajo)
@@ -50,10 +50,16 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-
+#include <kio/observer.h>
 KopeteApplication::KopeteApplication()
 : KUniqueApplication( true, true )
 {
+    int newJob = Observer::self()->newJob();
+    Observer::self()->slotInfoMessage(newJob, "Receiving file");
+    Observer::self()->slotPercent(newJob, 75);
+    Observer::self()->addAction(newJob, "Cancel transfer", this, SLOT(quitKopete()));
+    Observer::self()->addAction(newJob, "Pause transfer", this, SLOT(quitKopete()));
+
        m_isShuttingDown = false;
        m_mainWindow = new KopeteWindow( 0, "mainWindow" );
 
 
ereslibre
05 January 2007 @ 05:35 am
I have been doing for a while a bit of bugbusting on Qt (4.2) code. Now I see why the problem of the delegate/editor of what I was talking about came up.

You can take a look at the patch to see why this was happening. I will notice trolls about this patch, to know what they think, but I would really like to know your point of view of the patch too.

The main problem I think is that this code was developed thinking that the editor would have the same size as the delegate. Well we know is not necessary, and Qt gives the tools for resizing it into the delegate, and letting some space into the delegate for other things (like real-time changing data while editor is opened).

You can find the patch here.
 
 
ereslibre
04 January 2007 @ 01:29 am
In order to fully support any kind of job, or what's more, a generic KJob itself the adapt to KJob into the kio_uiserver has been finished. I think I'm committing this on monday.

The adapt time has been really fast. Just some replacements, and it was almost done. The only problem came when trying to read metadata from a job, where only KIO::Jobs has the method to retrieve metadata, and KJobs shouldn't have metadata. It was easy anyway.

Now I should fully work on the actions support for jobs on the uiserver, despite the (bug?) found on delegate/editor.
 
 
ereslibre
After some working, I've managed to move the kio_uiserver branch to trunk (Horray !!).

The kio_uiserver is basically a KDE Application that communicates through DBUS calls with KIO::Jobs and with other applications with the Observer help. The Observer peeks on KIO::Jobs behaviours, and what they are doing, so it can inform the kio_uiserver. Maybe some day I can extend it to KJobs only, as Olivier Goffart suggested me.

The goal of this application is to show all progresses (jobs) that are being processed on the system. From reading mail or downloading files to burning CD's or DVD's.

Applications that are doing some kind of work (that is not a KIO::Job) can also inform the framework of the job that is being processed evolution. They only need to write a code like this:

// The icon can be specified in a QString on the newJob() call,
// if no specified, the icon of the application that launched
// the job will be picked up
int theNewJob = Observer::self()->newJob();
Observer::self()->slotInfoMessage(theNewJob, "Retrieving data from server...");

This way the progress can be also set with slotPercent(), and so on.

Take in count this framework can change. Is very probably it will change. Right now, Observer just forwards the call to the kio_uiserver if the call is like in the example (with an int provided). David Faure suggested me some day to remove Observer indeed. I think that could be possible with some work.

There are no "actions" support (cancel, pause... button) yet, because that will be developed on trunk.

Right now, I'm having locally some advances on this area (the actions support), but I've found some kind of strange bug on Qt 4.2. I will wait to Qt 4.3 being on qt-copy and see if it automagically was fixed. If not, I will have to peek more into the problem (well I have some sort of patch for the problem, but it is not a valid patch, since when the delegate is deleted, the editor is not).

So the code that I've written about actions is an editor that is opened through openPersistentEditor() for all indexes, so actions are showed as a QWidget with a QHBoxLayout showing all buttons (actions).

The strange painting problem occurs when you open the editor through openPersistentEditor(), that seems that the delegate itself is never redrawn, so progress bar and values just get freezed. As I said before removing a line on qabstractitemview.cpp it is solved, but it leads to other problems, since commenting that line has no sense.

I've plans to contact the Mathusalem team too, to see if in KDE we can show Gnome's apps jobs, and in Gnome can be showed KDE's apps jobs too. Since we are both working on top of DBUS, it should be easy to integrate. But I will write them when this works correctly with the actions support too, since it is the main goal for me right now.
 
 
ereslibre
01 January 2007 @ 12:56 am
Hi !!

First of all, I wish you the best for this new year.

Second, thanks for visiting my blog. I will be writing here some advances on the part of KDE where I'm coding, so you can see the progress of some nice/handy new/renewed features.

Hope to see you soon !!
 
 
 
 

Advertisement

Customize