Re: Rowspan Colspan in Javascript GridLayout

2010-02-25 Thread Aaron J. Seigo
On February 24, 2010, Mathieu Ducharme wrote:
 (However the crash with embedded layouts (bug #228165) is still
 present - using trunk too)

if you assign two layouts to the same widget and then use the first one, yes. 
this is a problem in qscript, but it's also something you shouldn't be doing 
in the first place. i'll be providing a defensive fix for this, but you should 
never be reating two layouts against the same graphicwidget in any case :)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Allow ComboBox.addItem to be used in script.

2010-02-25 Thread Aaron Seigo

---
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3056/#review4274
---

Ship it!


looks good; this should be added to 
http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/JavaScript/API
 as well

- Aaron


On 2010-02-25 03:38:25, Mathieu Ducharme wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://reviewboard.kde.org/r/3056/
 ---
 
 (Updated 2010-02-25 03:38:25)
 
 
 Review request for Plasma.
 
 
 Summary
 ---
 
 Allow ComboBox.addItem to be used in script. (Bug #228174).
 
 Hopefully in time for 4.4.1 tagging...
 
 
 This addresses bug 228174.
 https://bugs.kde.org/show_bug.cgi?id=228174
 
 
 Diffs
 -
 
   /trunk/KDE/kdelibs/plasma/widgets/combobox.h 1095787 
 
 Diff: http://reviewboard.kde.org/r/3056/diff
 
 
 Testing
 ---
 
 
 Thanks,
 
 Mathieu
 


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[GSoC 2010] Plasma Media Center Idea

2010-02-25 Thread Alessandro Diaferia
Hello people,
it's been a while since the last time you heard about me :-) I'm busy with
my thesis and everything will be over by the end of April. In the meantime,
anyway, i'd like to see the mediacenter stuff back again :-).
I have some ideas here and there in my mind to make concrete for the
mediacenter but one thing that reached a good point of maturity was the
backend library. I'd like to suggest this as GSoC project for the
mediacenter and i'd like to be mentor for this.

*The idea briefly*:
there's some sort of complete api already that allows people to write
backends able to retrieve media stuff from services like youtube, picasa,
flickr and so on.. I was working on some generic dataengines for this
together with kde-silk people and i'd like to see this part complete.
YouTube, Flicker and Picasa have their own backends already even if some
work is still there to be done. The project would be about making these
backends ready and develop the relevant models for the model/view stuff of
the mediabrowser applet in order to allow browsing media contents from web
services. This way we reach 2 goals: a good example of how kde-silk is
important and one brick more in the huge wall media center land is.

Ideas are really really welcome.

Cheers everybody

P.S.: I miss you all and i'm really sad i'm not there at tokamak with you :(

-- 
Alessandro Diaferia
KDE Developer
KDE e.V. member
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [GSoC 2010] Plasma Media Center Idea

2010-02-25 Thread Marco Martin
On Thu, Feb 25, 2010 at 11:14 AM, Alessandro Diaferia
alediafe...@gmail.com wrote:
 Hello people,
 it's been a while since the last time you heard about me :-) I'm busy with
 my thesis and everything will be over by the end of April. In the meantime,
 anyway, i'd like to see the mediacenter stuff back again :-).
 I have some ideas here and there in my mind to make concrete for the
 mediacenter but one thing that reached a good point of maturity was the
 backend library. I'd like to suggest this as GSoC project for the
 mediacenter and i'd like to be mentor for this.

i would be very happy to see this going

 The idea briefly:
 there's some sort of complete api already that allows people to write
 backends able to retrieve media stuff from services like youtube, picasa,
 flickr and so on.. I was working on some generic dataengines for this
 together with kde-silk people and i'd like to see this part complete.
 YouTube, Flicker and Picasa have their own backends already even if some
 work is still there to be done. The project would be about making these
 backends ready and develop the relevant models for the model/view stuff of
 the mediabrowser applet in order to allow browsing media contents from web
 services. This way we reach 2 goals: a good example of how kde-silk is
 important and one brick more in the huge wall media center land is.

 Ideas are really really welcome.

another important thing is getting the ui really going.
probably it would be easier this year since we actually have qml in a
near release state (see plasma-mobile), compared to last year

Cheers,
Marco MArtin
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [GSoC 2010] Plasma Media Center Idea

2010-02-25 Thread Alessandro Diaferia
2010/2/25 Marco Martin notm...@gmail.com

 On Thu, Feb 25, 2010 at 11:14 AM, Alessandro Diaferia
 alediafe...@gmail.com wrote:
  Hello people,
  it's been a while since the last time you heard about me :-) I'm busy
 with
  my thesis and everything will be over by the end of April. In the
 meantime,
  anyway, i'd like to see the mediacenter stuff back again :-).
  I have some ideas here and there in my mind to make concrete for the
  mediacenter but one thing that reached a good point of maturity was the
  backend library. I'd like to suggest this as GSoC project for the
  mediacenter and i'd like to be mentor for this.

 i would be very happy to see this going

  The idea briefly:
  there's some sort of complete api already that allows people to write
  backends able to retrieve media stuff from services like youtube, picasa,
  flickr and so on.. I was working on some generic dataengines for this
  together with kde-silk people and i'd like to see this part complete.
  YouTube, Flicker and Picasa have their own backends already even if some
  work is still there to be done. The project would be about making these
  backends ready and develop the relevant models for the model/view stuff
 of
  the mediabrowser applet in order to allow browsing media contents from
 web
  services. This way we reach 2 goals: a good example of how kde-silk is
  important and one brick more in the huge wall media center land is.
 
  Ideas are really really welcome.
 
 another important thing is getting the ui really going.
 probably it would be easier this year since we actually have qml in a
 near release state (see plasma-mobile), compared to last year


Then that could be one idea more i think! :-) And of course you are adding
yourself as mentor, right? =) (because i'm not so experienced with qml).



 Cheers,
 Marco MArtin
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel



I'm going to try qml deeply soon then.. In the while can i add those ideas
to the wiki page?
-- 
Alessandro Diaferia
KDE Developer
KDE e.V. member
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Concerning the KDE 4 Digital Clock widget

2010-02-25 Thread John Layt
 On Saturday 13 February 2010 05:16:50 Maki Jaderborg wrote:
  I was wondering if the digital clock widget present in KDE 4, which lists
  you as the author, could be configured like the PHP date() option.
  http://php.net/manual/en/function.date.php

I have been slowly looking at the config options in the digital clock for a 
while, but have yet to come up with a fully satisfactory solution.  We have a 
couple of outstanding wishes in bugs.kde.org against this already with very 
vocal users :-)

We basically need to balance keeping the clock config simple for the majority 
of users versus supporting our power-users desire to tweak everything.

KDE already supports the full POSIX date format standard in our date 
formatting API, which is very similar to that used in PHP.  However forcing 
the average user to learn and enter format strings like %d %M %Yis not a 
nice way to do things, and is prone to error.  In our Regional System Settings 
when setting the system date format we wrap this in an easier syntax like DD 
MONTH  but that fails for the same reasons.

I did try an interim step where I replaced the current configuration tickboxes 
with a combo box which allowed you to choose between the system short date 
format and several standard variations show as examples rather than formats, 
but I was never happy with it as there were too many options listed.  I also 
tried a combination of a combo and tickboxes but that just felt clunky, and 
adding lots of tickboxes for each option gets messy and also has localisation 
issues.

I have blogged in the past about how OSX does it using a drag-and-drop gui 
widget (http://www.layt.net/john/blog/odysseus/a_challenge) and how we could 
do even better, but I've had little chance to take it further.

I'm open to suggestions :-)

Cheers!

John.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Allow ComboBox.addItem to be used in script.

2010-02-25 Thread Mathieu Ducharme


 On 2010-02-25 08:57:50, Aaron Seigo wrote:
  looks good; this should be added to 
  http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/JavaScript/API
   as well

Committed. (techbase updated as well).

Sorry it was not clear but is it ok to backport to the 4.4 branch?


- Mathieu


---
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3056/#review4274
---


On 2010-02-25 03:38:25, Mathieu Ducharme wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://reviewboard.kde.org/r/3056/
 ---
 
 (Updated 2010-02-25 03:38:25)
 
 
 Review request for Plasma.
 
 
 Summary
 ---
 
 Allow ComboBox.addItem to be used in script. (Bug #228174).
 
 Hopefully in time for 4.4.1 tagging...
 
 
 This addresses bug 228174.
 https://bugs.kde.org/show_bug.cgi?id=228174
 
 
 Diffs
 -
 
   /trunk/KDE/kdelibs/plasma/widgets/combobox.h 1095787 
 
 Diff: http://reviewboard.kde.org/r/3056/diff
 
 
 Testing
 ---
 
 
 Thanks,
 
 Mathieu
 


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Concerning the KDE 4 Digital Clock widget

2010-02-25 Thread Riccardo Iaconelli
On Thursday 25 February 2010 10:27:12 Maki Jaderborg wrote:
 But the KDE 3.5 clock at least allowed the following configuration options:
 
 Time format:
 HH:MM:SS
 pH:MM:SS AMPM
 
 Date format:
 WEEKDAY DD MONTH 
 SHORTWEEKDAY MONTH dD 
 
 Short date format:
  -MM-DD
 dD.mM.
 DD.MM.
 
 Why didn't those move over into the KDE 4 clock?

Well, this is reasonable, and we can probably implement a similar feature in 
the default clock. See below for details.

 Seems to me like the most
 basic of configuration options to have. Personally I would at the very
 least look at ISO 8601, which is a standard that should at least be
 considered to allow for KDE to appeal to a broader market out of the
 box.
 
 I must confess I'm not too knowledgeable about how to even begin work on
 such an applet, so it will take a long time before I can even attempt to
 release even a beta of it. Doesn't mean I won't look at it, but the KDE
 team surprised me by losing configuration options going from KDE 3.5 to
 KDE 4.x. It just feels like something went wrong somewhere that normal
 users don't see.

Actually, writing a Plasmoid is a really easy task nowadays. If you want a 
quick and dirty thing, you can just pick the code of the clock and modify the 
time to make it be displayed to fit your needs. However, my response was 
concentrated on the feature you asked, which was to implement the PHP date 
format in the default clock.

While this is certainly not feasible, it doesn't mean we shouldn't allow the 
user to tweak the way their clock shows them the time. This shouldn't however 
be a nerdy and unaccessible PHP string, but more similar to what you can see 
here:
http://www.layt.net/john/blog/odysseus/a_challenge

I personally wouldn't be aganist such a widget. If you would like to start on 
trying to implement such a thing, I'm pretty sure we could benefit from it in 
the whole KDE, and it's probably a nice, simple and rewarding job to do.

 Sorry, just my two cents on the subject. I honestly am thankful for your
 time in responding to my original query. KDE is, for the most part, a nice
 DE to work with. A bit bulky at times, and I have some issues with how
 some KDE 4.x stuff works, but for the most part it's just trying to get to
 terms with the new way of doing things. Overall it's still my DE of
 choice.
 
 So nice work on the whole, just not sure why the decisions regarding the
 clock were made. @_@

I'm also CC'ing plasma-devel@kde.org, so that other developers are aware of 
your suggestion. I hope you don't actually mind. =)

-Riccardo
-- 
Pace Peace Paix Paz Frieden Pax Pokój Friður Fred Béke 和平
Hasiti Lapé Hetep Malu Mир Wolakota Santiphap Irini Peoch שלום
Shanti Vrede Baris Rój Mír Taika Rongo Sulh Mir Py'guapy 평화
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [GSoC 2010] Plasma Media Center Idea

2010-02-25 Thread Marco Martin
On Thu, Feb 25, 2010 at 11:34 AM, Alessandro Diaferia
alediafe...@gmail.com wrote:


 
 another important thing is getting the ui really going.
 probably it would be easier this year since we actually have qml in a
 near release state (see plasma-mobile), compared to last year

 Then that could be one idea more i think! :-) And of course you are adding
 yourself as mentor, right? =) (because i'm not so experienced with qml).


sure!, we can either try to do a big one with 2 mentors or try 2 projects.
anyways, add it to
http://community.kde.org/GSoC/2010/Ideas  ASAP :)

Cheers,
Marco Martin
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [GSoC 2010] Plasma Media Center Idea

2010-02-25 Thread Artur Souza (MoRpHeUz)
On Thursday 25 February 2010, 12:23 Marco Martin wrote:
 sure!, we can either try to do a big one with 2 mentors or try 2 projects.
 anyways, add it to
 http://community.kde.org/GSoC/2010/Ideas  ASAP :)

I can help mentoring and having 2 projects sounds nice anyway :)

Cheers,

--
Artur Duque de Souza
openBossa
INdT - Instituto Nokia de Tecnologia
--
Blog: http://blog.morpheuz.cc
PGP: 0xDBEEAAC3 @ wwwkeys.pgp.net
--


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [GSoC 2010] Plasma Media Center Idea

2010-02-25 Thread Shantanu Tushar Jha
On Thu, Feb 25, 2010 at 3:39 PM, Artur Souza (MoRpHeUz) 
morph...@openbossa.org wrote:

 On Thursday 25 February 2010, 12:23 Marco Martin wrote:
  sure!, we can either try to do a big one with 2 mentors or try 2
 projects.
  anyways, add it to
  http://community.kde.org/GSoC/2010/Ideas  ASAP :)

 I can help mentoring and having 2 projects sounds nice anyway :)


Great news!! Last time i couldn't apply as I didn't know stuff. it'll be
exciting to do it this time :)


 Cheers,

 --
 Artur Duque de Souza
 openBossa
 INdT - Instituto Nokia de Tecnologia
 --
 Blog: http://blog.morpheuz.cc
 PGP: 0xDBEEAAC3 @ wwwkeys.pgp.net
 --

 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel




-- 
Shantanu Tushar(UTC +0530)
http://www.shantanutushar.com
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [GSoC 2010] Plasma Media Center Idea

2010-02-25 Thread Alessandro Diaferia
2010/2/25 Artur Souza (MoRpHeUz) morph...@openbossa.org

 On Thursday 25 February 2010, 12:23 Marco Martin wrote:
  sure!, we can either try to do a big one with 2 mentors or try 2
 projects.
  anyways, add it to
  http://community.kde.org/GSoC/2010/Ideas  ASAP :)

 I can help mentoring and having 2 projects sounds nice anyway :)

 Cheers,

 --
 Artur Duque de Souza
 openBossa
 INdT - Instituto Nokia de Tecnologia
 --
 Blog: http://blog.morpheuz.cc
 PGP: 0xDBEEAAC3 @ wwwkeys.pgp.net
 --

 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel


Great! Just added the ideas.. feel free to correct mistakes or whatever of
course :-)


-- 
Alessandro Diaferia
KDE Developer
KDE e.V. member
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Additional style options for TaskManager e.g. Icon only

2010-02-25 Thread Ralf Engels

---
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1342/
---

(Updated 2010-02-25 15:53:26.343239)


Review request for Plasma.


Changes
---

New patch only fixing the text space of the task item.
If the space is below 3em only the icons will be displayed.


Summary
---

The attached diff adds three style options to the task manager widget.

In addition to the normal icon-and-text style you can now have a icon-only, 
text-only or text-under-icon style.

This means that e.g. the tasks are displayed by icon only (a much bigger icon 
though).

The additional styles are especially useful if you have a vertical panel. In 
the icon-and-text style I only had five characters of the task name left.

The new styles can be selected in the Task Manager Settings. Default is the 
Windows like icon-and-text.

Heyho...
Don't anyone want to review this?


Diffs (updated)
-

  trunk/KDE/kdebase/workspace/plasma/desktop/applets/tasks/abstracttaskitem.cpp 
1096015 

Diff: http://reviewboard.kde.org/r/1342/diff


Testing
---

Tried all possible combinations of style options.

Note: Manual grouping does not seem but work, but I couldn't get this to work 
with the original either.


Thanks,

Ralf

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Concerning the KDE 4 Digital Clock widget

2010-02-25 Thread John Layt
On Thursday 25 Feb 2010 15:03:04 Riccardo Iaconelli wrote:
 On Thursday 25 February 2010 10:27:12 Maki Jaderborg wrote:
  But the KDE 3.5 clock at least allowed the following configuration
  options:
  
  Time format:
  HH:MM:SS
  pH:MM:SS AMPM
  
  Date format:
  WEEKDAY DD MONTH 
  SHORTWEEKDAY MONTH dD 
  
  Short date format:
   -MM-DD
  
  dD.mM.
  DD.MM.
  
  Why didn't those move over into the KDE 4 clock?
 
 Well, this is reasonable, and we can probably implement a similar feature
 in the default clock. See below for details.

Let the bike-shedding commence :-)

The 'replace tickboxes with combo box' option I've been trying has the 
following options (where the example date/time shown is as at that moment):

Show Time:
  System default format - 16:11
  24 hour clock, no seconds - 16:11
  24 hour clock, with seconds - 16:11:23
  12 hour clock, no seconds - 16:11 pm
  12 hour clock, with seconds - 16:11:23 pm

I think this might be simpler with 3 radio buttons for choosing System Format, 
24 Hour, or 12 Hour (or just those options in the combo), with a tickbox for 
Show Seconds as currently done.  If Date Format uses a combo, then using radio 
buttons might look inconsistent.

Show Date:
  Do not show date
  System default short date - 25/02/2010
  ISO standard short date - 2010-02-25
  Short weekday - Thu
  Long weekday - Thursday
  Day and Month - 25/02
  Day, Month and Year - 25/02/2010
  Weekday, Day and Month - Thu 25/02
  Weekday, Day, Month and Year - Thu 25/02/2010
  Day and Month Name - 25 Feb
  Day, Month Name and Year - 25 Feb 2010
  Weekday, Day and Month Name - Thu 25 Feb
  Weekday, Day, Month Name and Year - Thu 25 Feb 2010
  ... and many many more...

Each of those date formats is translated so are sort-of localised for regional 
customs with regards to ordering (mm/dd or dd/mm?) and separators (spaces, 
commas, dashes, slashes, dots or combinations there-of?).  However language 
based localisation is not the same as region based localisation, e.g. a 
Spanish speaker in the USA would get the wrong format.

It then just becomes a question of which combinations to include in the list, 
trying to cater for them all would get overwhelming.  One solution to both 
this and the localisation issue might be to add a list of preferred date 
formats to the locale file for each country and just show those with a few 
standard options.

It's been suggested in bko that in addition to setting the Long Date and Short 
Date formats in System Settings we have a new option for Short Display Date 
that the clock could use, but that's just moving the problem elsewhere.

Using a bunch of tickboxes and/or radio buttons for Show Weekday, Show Year, 
Use Month Name, Use Short Numbers, Use Short Names, Show Month First, etc, 
would I think look messy and overwhelming and localising all the possible 
combinations would make for a long translation list.  Using both a combo and a 
few tickboxes might work but I haven't tried it yet as it seems an awkward 
process to me.

Allowing the user to edit their own format strings avoids all these issues but 
is bad usability, which is where a simple drag-and-drop config wizard would be 
a good thing.

Cheers!

John.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Creating a rectangular icon

2010-02-25 Thread Antony Loebs
 I have been trying to figure out how to display a rectangular image in the
panel to use as a button. The image itself is 30x120, but I can't get it to
display to my satisfaction. If I use IconWidget, the image is squashed into
a square. If I use PushButton, the image is likewise squashed by the
button's borders. I tried changing the stylesheet for the button, setting
margin and padding to 0, but with no success. Below is the sample code (the
PushButton code is commented out).

---
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyKDE4.plasma import Plasma
from PyKDE4 import plasmascript

class PanelButton(plasmascript.Applet):
def __init__(self,parent,args=None):
plasmascript.Applet.__init__(self,parent)

def init(self):
self.setAspectRatioMode(Plasma.KeepAspectRatio)
# No configuration interface supported
self.setHasConfigurationInterface(False)
self.theme = Plasma.Svg(self)
self.theme.setImagePath(widgets/background)
self.setBackgroundHints(Plasma.Applet.DefaultBackground)

self.layout = QGraphicsLinearLayout(Qt.Horizontal, self.applet)

#self.button = Plasma.PushButton(self.applet)
#self.button.setImage(self.package().path() +
contents/images/image.png)
#self.button.setStyleSheet = (margin: 0px; padding: 0px;)
#self.connect(self.button, SIGNAL(clicked()), self.notify)

self.button = Plasma.IconWidget(self.applet)
self.button.setIcon(self.package().path() +
contents/images/image.png)
self.connect(self.button, SIGNAL(clicked()), self.notify)

self.layout.addItem(self.button)
self.applet.setLayout(self.layout)
self.resize(120, 30)

def notify(self):
pass

def CreateApplet(parent):
return PanelButton(parent)
---
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Plugins in WebView

2010-02-25 Thread Mathieu Ducharme
Hi,

I would like to propose allowing plasmoids to enable plugins (ie.
Flash) in the WebView widget.
I can tell that I personally expected the current Web Browser to be
able to play flash videos when I tried it...

Anyway, I'm not sure if it is currently possible in C++ (does not seem
so), but the scripting API does not have access to WebView settings so
I added the following functions to Plasma::WebView

- bool pluginsEnabled()
- void setPluginsEnabled(bool)

[Attached is a .diff to apply in trunk/KDE/kdelibs/plasma/widgets]

It works fine for me I could see youtube videos in a test javascript plasmoid:

var layout = new LinearLayout();
var web = new WebView();
web.pluginsEnabled = true; // Yay!
web.url('http://www.youtube.com');
layout.addItems(web);

There was a few issues with video position in the page which would
have to be found  fixed but are obviously unrelated to this patch,
which only enables the plugin.
(BTW Could those be the same issues that the VideoWidget have?)
Those issues could also only be local, as flash is already unstable on
my development VBox image... [that is, more than its usual
instability]

I was wondering if this was appropriate or if it opens the gates to
too many such helper functions, as there are other settings that might
be interesting to have access to:
http://doc.trolltech.com/4.6/qwebsettings.html

I guess the alternative could be to allow access the the
QWebView::settings() object.

So I would like to open the discussion on this feature, I know a few
participants in the javascript jam would love to have this ;)

Mathieu
Index: webview.h
===
--- webview.h	(revision 1096015)
+++ webview.h	(working copy)
@@ -54,6 +54,7 @@
 Q_PROPERTY(QSizeF contentsSize READ contentsSize)
 Q_PROPERTY(QRectF viewportGeometry READ viewportGeometry)
 Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor)
+Q_PROPERTY(bool pluginsEnabled READ pluginsEnabled WRITE setPluginsEnabled)
 
 public:
 explicit WebView(QGraphicsItem *parent = 0);
@@ -138,6 +139,20 @@
 void setZoomFactor(const qreal zoom);
 
 /**
+ * The enabled state of the plugins
+ *
+ * @param page the page to set in this view
+ */
+Q_INVOKABLE bool pluginsEnabled();
+
+/**
+ * Enables or disables plugins
+ *
+ * @param page the page to set in this view
+ */
+Q_INVOKABLE bool setPluginsEnabled(bool enabled);
+
+/**
  * Sets the page to use in this item. The owner of the webpage remains,
  * however if this WebView object is the owner of the current page,
  * then the current page is deleted
Index: webview.cpp
===
--- webview.cpp	(revision 1096015)
+++ webview.cpp	(working copy)
@@ -152,6 +152,16 @@
 d-webView-setZoomFactor(zoom);
 }
 
+bool WebView::pluginsEnabled()
+{
+return d-webView-settings()-testAttribute(QWebSettings::PluginsEnabled);
+}
+
+void WebView::setPluginsEnabled(bool enabled)
+{
+d-webView-settings()-setAttribute(QWebSettings::PluginsEnabled, enabled);
+}
+
 void WebView::setPage(QWebPage *page)
 {
 d-webView-setPage(page);
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [Kde-hardware-devel] Status of encrypted devices in Plasma / Solid

2010-02-25 Thread Jacopo De Simoi
   looking forward to check the validity of a bug regarding the device
  notifier and encrypted devices (containers) I noticed several issues with
  them in the current implementation of the dataengines
  The imporant thing to know about them is that they show up in solid as a
  StorageVolume such that StorageVolume.usage is 'Encrypted'. When they are
  mounted solid asks for a password and if the password is correct, then
  the partitions which are stored inside the device pop up and are correctly
  collected by the hotplug dataengine. Then the user can use them normally;
  the encrypted device (container) is closed (i.e. cannot be used anymore
  without providing the password again) by unmounting it.
 
 Indeed, pretty good summary of the behavior.
  
  A few issues arise in this situation:
  1) Solid cannot provide us with a signal when an encrypted container is
  correctly mounted or opened
 
 I'm not sure what makes encrypted containers special in this regard... The 
 setupDone() signal is emitted just like for any device supporting the 
 StorageAccess interface.

Correct, however if I remember correctly there is no signal such as 
accessibilityChanged which is catched by the dataengine to trigger a status 
change, since the object referred by the engine is not the one that requested 
the setup. 

 Now if you're talking about the missing {setup,teardown}RequestStarted signal 
 which would work accross process boundaries and that we discussed in 
 september, yes that's the same issue. But again, just to clarify, it has 
 nothing specific to the encrypted case.

No, indeed; moreover these signals are indeed quite useless if they are not 
emitted for all object referring to the same device. We would need to have 
those for all such objects to make good use of them. I'll post a new thread 
about this eventually.

 
  2) The encrypted containers are currently
  shown by the dataengine since they match the open with file manager
  predicate, however this action does really nothing, since a container
  simply contains partitions, so we can't really open the file manager on
  unmounted partitions. Moreover, there is no real static action we can
  associate with them. 3) The user is (imHo) misled by strings such as
  mount/unmount and icons such as mounted/unmounted/eject
  
  My proposed solutions:
  1) A solution (bad, but that's all we can do) to solve issue #1 is to let
  the hotplug engine check if a newly added or removed device is inside an
  encrypted container and trigger an update of the status of the container
  accordingly.  If new devices are added it means that the container has
  been opened if they are removed, it means that the container has been
  closed.
 
 Indeed nasty, I'd prefer to see it fixed below in the stack.

This is the workaround implemented in 4.4 for the dataengine

 
  2) Rather than cheating giving a completely fake action we could
  implement an exception for the hotplug engine, letting it populate devices
  with encrypted devices even if they have no action associated with them.
 
 It's definitely my favorite one.

Currently implemented in 4.4.

 
  This of course need adjustments to the two (that I know) users of the
  dataengine (device notifier and solid runner) to make sure they don't
  assume the existence of at least one action and in order for them to
  properly handle such situation.
 
 Well, it's really about making sure they don't make a (now) wrong assumption. 
 As a bonus that would shield them against a misbehaving engine, so that's 
 probably not a bad thing.
 
  3) Nuno already kindly provided emblems/icons for the open/close status
  (locked/unlocked); as for the strings I already asked for an exception for
  string freeze regarding solid::Device::description() which should say
  encrypted container instead of removable media. I might as well ask
  for an exception to add Lock the container and unlock the container if
  felt needed. If string freeze exceptions for these are not granted I'd
  rather leave descriptions empty rather than providing false information..
 
 Since I suck and took months to get back to you I guess the string freeze is 
 not a problem anymore. :-)

The exception has been granted and the strings appear now in 4.4
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel