Re: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Hari krishna Anandhan
On Sat, Aug 8, 2009 at 11:22 AM, Ivan Čukićivan.cukic+...@gmail.com wrote:
 what would you do with an activity type that you couldn't do with just the
 activity name?
 The type could be used by the /activity switching/ plasmoid - to group the
 activites, or to show only a certain type of activity...

Activity Type can be used to covey a concrete semantic meaning about
what the activity actually is; While 'activity name' can be used to
restrict display to information pertaining to the current activity
(like emails, people, apps, etc related to that activity), activity
type gives another dimension to it which enables certain display
changes to happen by default (i.e some defaults can be shared by all
your 'official work'-related activities), without any customisation
needed from the user. What comes immediately to my mind is...

Suppose we have three activities:
1. P's Birthday card - a personal activity in which you are
designing a card for your child
2. Plasma Netbook - a community development activity in which you
are developing the plasma netbook version
3. Acme Business Project - an official work which you would need
serious concentration and should not have any distractions

There is a slight difference in the way the desktop can adjust itself
for each activity type. Suppose you are doing...

Activity 1: When an email or IM comes from any of your friends, fellow
OSS developers or anyone, you are notified immediately. The contact
plasmoid on the desktop shows your recent or fav. contacts.
Kickoff/Lancelot/Raptor shows all apps

Activity 2: In this, messages from your fellow developers take
precedence and are notified immediately, but emails from other friends
can also be indicated in a non-intrusive way, by just showing an
unread count. The contacts plasmoid on the desktop shows just the
developers.  Kickoff/Lancelot/Raptor displays just the apps you need
for development work (by default, without any customisation from user;
but allows for user customisation, if needed)

Activity 3: When you switch to this activity, the system sets your
status as busy and queues any messages (other than from your company
colleges, if configured) until you have finished with your activity.
As you should not be disturbed, the system hides any non-urgent
notifications till you finish or switch the activity.
Kickoff/Lancelot/Raptor displays just the apps you need for
productivity work (by default, without any customisation from user;
but allows for user customisation, if needed)

Hope I have made my point clear ;)

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


Re: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Marco Martin
On Saturday 08 August 2009, Hari krishna Anandhan wrote:
 On Sat, Aug 8, 2009 at 11:22 AM, Ivan Čukićivan.cukic+...@gmail.com wrote:
  what would you do with an activity type that you couldn't do with just
  the activity name?
 
  The type could be used by the /activity switching/ plasmoid - to group
  the activites, or to show only a certain type of activity...

 Activity Type can be used to covey a concrete semantic meaning about
 what the activity actually is; While 'activity name' can be used to
 restrict display to information pertaining to the current activity
 (like emails, people, apps, etc related to that activity), activity
 type gives another dimension to it which enables certain display
 changes to happen by default (i.e some defaults can be shared by all
 your 'official work'-related activities), without any customisation
 needed from the user. What comes immediately to my mind is...

ook, so to recap:
i'm thinking about how to fit the thing into plasma...
would still activities be associated 1:1 with containments?

so a containment like now has associated an activity name and an activity 
type..
now the name is contained in the Context class that yeah, maybe is an 
incorrect name but is in the public api unfortunately, so this stuff would be 
in it anyways, the contextChanged signal would have the new context, that 
would contain not only the activity name but also the type..

seems sound? missing something in the big picture? :)


 Suppose we have three activities:
 1. P's Birthday card - a personal activity in which you are
 designing a card for your child
 2. Plasma Netbook - a community development activity in which you
 are developing the plasma netbook version
 3. Acme Business Project - an official work which you would need
 serious concentration and should not have any distractions

 There is a slight difference in the way the desktop can adjust itself
 for each activity type. Suppose you are doing...

 Activity 1: When an email or IM comes from any of your friends, fellow
 OSS developers or anyone, you are notified immediately. The contact
 plasmoid on the desktop shows your recent or fav. contacts.
 Kickoff/Lancelot/Raptor shows all apps

 Activity 2: In this, messages from your fellow developers take
 precedence and are notified immediately, but emails from other friends
 can also be indicated in a non-intrusive way, by just showing an
 unread count. The contacts plasmoid on the desktop shows just the
 developers.  Kickoff/Lancelot/Raptor displays just the apps you need
 for development work (by default, without any customisation from user;
 but allows for user customisation, if needed)

 Activity 3: When you switch to this activity, the system sets your
 status as busy and queues any messages (other than from your company
 colleges, if configured) until you have finished with your activity.
 As you should not be disturbed, the system hides any non-urgent
 notifications till you finish or switch the activity.
 Kickoff/Lancelot/Raptor displays just the apps you need for
 productivity work (by default, without any customisation from user;
 but allows for user customisation, if needed)

 Hope I have made my point clear ;)

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


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


Fwd: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Hari krishna Anandhan
Sorry, forgot to CC nepomuk-kde ml ;(

On Sat, Aug 8, 2009 at 11:22 AM, Ivan Čukićivan.cukic+...@gmail.com wrote:
 what would you do with an activity type that you couldn't do with just the
 activity name?
 The type could be used by the /activity switching/ plasmoid - to group the
 activites, or to show only a certain type of activity...

Activity Type can be used to covey a concrete semantic meaning about
what the activity actually is; While 'activity name' can be used to
restrict display to information pertaining to the current activity
(like emails, people, apps, etc related to that activity), activity
type gives another dimension to it which enables certain display
changes to happen by default (i.e some defaults can be shared by all
your 'official work'-related activities), without any customisation
needed from the user. What comes immediately to my mind is...

Suppose we have three activities:
1. P's Birthday card - a personal activity in which you are
designing a card for your child
2. Plasma Netbook - a community development activity in which you
are developing the plasma netbook version
3. Acme Business Project - an official work which you would need
serious concentration and should not have any distractions

There is a slight difference in the way the desktop can adjust itself
for each activity type. Suppose you are doing...

Activity 1: When an email or IM comes from any of your friends, fellow
OSS developers or anyone, you are notified immediately. The contact
plasmoid on the desktop shows your recent or fav. contacts.
Kickoff/Lancelot/Raptor shows all apps

Activity 2: In this, messages from your fellow developers take
precedence and are notified immediately, but emails from other friends
can also be indicated in a non-intrusive way, by just showing an
unread count. The contacts plasmoid on the desktop shows just the
developers.  Kickoff/Lancelot/Raptor displays just the apps you need
for development work (by default, without any customisation from user;
but allows for user customisation, if needed)

Activity 3: When you switch to this activity, the system sets your
status as busy and queues any messages (other than from your company
colleges, if configured) until you have finished with your activity.
As you should not be disturbed, the system hides any non-urgent
notifications till you finish or switch the activity.
Kickoff/Lancelot/Raptor displays just the apps you need for
productivity work (by default, without any customisation from user;
but allows for user customisation, if needed)

Hope I have made my point clear ;)

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


Re: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Ivan Čukić

  be in it anyways, the contextChanged signal would have the new context,
  that would contain not only the activity name but also the type..
I'd rather have a typeForActivity(String activityName) than having the 
parameter type as a part of the signal. (since type is defined by the activity 
name which should be unique)

Cheers

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


Re: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Ivan Čukić

 The activity type can have the following options (these need be set
 only while defining a new activity type, not while creating every
 activity!)
 - Activity Type Name (user given string)
 - Show apps (in menu) related to productivity, etc
 - Allow / Disallow / Provide hint about messages from anyone
 - Allow / Disallow / Provide hint about messages from people of a
 specific team (apart from those in the current activity)
 - Requires full concentration, set user status as busy

Although this would be perfect to have, I'm concerned about the interface to 
it. The users are already confused with activities, what would happen if we 
introduced activity types (as configurable) as well?

I'd rather have a 'create a new activity based on the current' than making a 
template system like that.

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


Re: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Marco Martin
On Saturday 08 August 2009, Hari krishna Anandhan wrote:
 On Sat, Aug 8, 2009 at 1:50 PM, Marco Martinnotm...@gmail.com wrote:
  would this types something static or just strings given by the user?
  i fear if it's something static, while it's something that has a more
  clear semantic value could be something too rigid that won't be used that
  much in the end?

 Till now, I was thinking of making them static types. But, now that
 you bring this possibility up, I think we can make it configurable...
 ;)

 The activity type can have the following options (these need be set
 only while defining a new activity type, not while creating every
 activity!)
 - Activity Type Name (user given string)
 - Show apps (in menu) related to productivity, etc
for this the keywords entry in the desktop file of the apps wuld be sooo 
useful, too bad they are all empty :/
 - Allow / Disallow / Provide hint about messages from anyone
 - Allow / Disallow / Provide hint about messages from people of a
 specific team (apart from those in the current activity)
 - Requires full concentration, set user status as busy

 Anything else ?
 Some predefined activity types can be shipped by default to ease thing...
yeah, this for sure

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


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


Re: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Hari krishna Anandhan
On Sat, Aug 8, 2009 at 2:47 PM, Ivan Čukićivan.cukic+...@gmail.com wrote:
 Although this would be perfect to have, I'm concerned about the interface to
 it. The users are already confused with activities, what would happen if we
 introduced activity types (as configurable) as well?

I think the main reason casual users are confused is that they are not
able to differentiate virtual desktops with plasma activities. When
you see reviews of plasma activities, they inadvertently compare
virtual desktops to plasma activities. Ideally they expect those to be
coupled together by default...That is how casual users look at it
normally...

I read somewhere that users adjust themselves to something different
as long as it feels different. And, they panic when they see something
similar to what they had known already, but it does something entirely
different. That is because when they see something similar they expect
to use it like they have used before, but as it performs a different
function, they just become confused and start to panic...

I don't know why I am bringing this now ! But, anyway ...

 I'd rather have a 'create a new activity based on the current' than making a
 template system like that.

Exactly, the normal users will not be required to temper with the
above template features. What we can do is, have an Activities tab in
Kickoff/Lancelot/Raptor which would list all the current Activity
templates as icons with description. When the user clicks on it, we
can start an activity based on that template ;)

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


Re: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Leo Sauermann

A short reminder:

a completly working implementation with applications on top (such as 
clicked-link history, etc, ...) was done open source complete with 
ontologies and algorithms:


http://usercontext.opendfki.de/
http://lists.opendfki.de/cgi-bin/mailman/listinfo/usercontext
http://dev.nepomuk.semanticdesktop.org/wiki/UserWorkContext

I think this thread is currently reinventing this.

best
Leo



It was Ivan Čukić who said at the right time 08.08.2009 11:13 the 
following words:

 be in it anyways, the contextChanged signal would have the new context,
 that would contain not only the activity name but also the type..

I'd rather have a typeForActivity(String activityName) than having the 
parameter type as a part of the signal. (since type is defined by the activity 
name which should be unique)


Cheers

___
nepomuk-kde mailing list
nepomuk-...@semanticdesktop.org
http://lists.semanticdesktop.org/mailman/listinfo/nepomuk-kde
  



--
_
Dr. Leo Sauermann   http://www.dfki.de/~sauermann 

Deutsches Forschungszentrum fuer 
Kuenstliche Intelligenz DFKI GmbH

Trippstadter Strasse 122
P.O. Box 2080   Fon:   +43 6991 gnowsis
D-67663 Kaiserslautern  Fax:   +49 631 20575-102
Germany Mail:  leo.sauerm...@dfki.de

Geschaeftsfuehrung:
Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
_

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


Re: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Lukas Appelhans
Am Freitag 07 August 2009 21:57:56 schrieb Ivan Čukić:
Btw, a bit offtopic, but shall we share favourites between those
menus?
  
   you're not sharing them? :(

 There are both pros and cons for this. Pros are easy to recognize.

 The main con (and the reason why Lancelot only loads the favs from Kickoff
 on first start, but doesn't share them) is that you could use more than one
 menu at a time - for different purposes, so you'd possibly want a different
 set of applications to show up in different menus.

 The other thing is that my intention is to have some kind of rating system
 (like the Raptor guys want) while Kickoff doesn't have that.
So that's another point we could work together... :) 

  Or tag applications in Nepomuk.
+1 as well, we could just add another property to the already existing 
Application-Ontology we're using in Raptor...

Lukas

 +1

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


[PATCH] Adds posting private picture to imagebin.ca from the pastebin plasmoid

2009-08-08 Thread Patrick Aljord
Hey all,

This is my first patch, it just adds posting private picture to
imagebin.ca from the pastebin plasmoid as the title says, it needs to
be applied from kdeplasma-addons, hope it works for you.

Cheers,

Pat
Index: applets/pastebin/pastebin.cpp
===
--- applets/pastebin/pastebin.cpp   (revision 1008583)
+++ applets/pastebin/pastebin.cpp   (working copy)
@@ -463,6 +463,15 @@ void Pastebin::createConfigurationInterf

 QString imageshackURL = cg.readEntry(imageshack, http://imageshack.us;);
 uiServers.imageshack-setText(imageshackURL);
+
+uiConfig.textServer-setCurrentIndex(m_textBackend);
+
+QWidget *serversoptions = new QWidget();
+uiServersOptions.setupUi(serversoptions);
+int imagebinPrivacy = cg.readEntry(imagebinPrivacy, 0).toInt();
+uiServersOptions.imagebinPrivacy-setCurrentIndex(imagebinPrivacy);
+
+parent-addPage(serversoptions, i18n(Servers Options), Applet::icon());
 }

 void Pastebin::configAccepted()
@@ -477,6 +486,8 @@ void Pastebin::configAccepted()
 QString imagebincaURL = uiServers.imagebinca-text();
 QString imageshackURL = uiServers.imageshack-text();

+int imagebinPrivacy = uiServersOptions.imagebinPrivacy-currentIndex();
+
 cg.writeEntry(TextBackend, textBackend);
 cg.writeEntry(ImageBackend, imageBackend);
 cg.writeEntry(HistorySize, historySize);
@@ -486,6 +497,8 @@ void Pastebin::configAccepted()
 cg.writeEntry(imagebinca, imagebincaURL);
 cg.writeEntry(imageshack, imageshackURL);

+cg.writeEntry(imagebinPrivacy, imagebinPrivacy);
+
 setTextServer(textBackend);
 setImageServer(imageBackend);
 setHistorySize(historySize);
Index: applets/pastebin/backends/imagebinca.cpp
===
--- applets/pastebin/backends/imagebinca.cpp(revision 1008583)
+++ applets/pastebin/backends/imagebinca.cpp(working copy)
@@ -35,8 +35,8 @@
 ImagebinCAServer::ImagebinCAServer(const KConfigGroup config)
 : PastebinServer()
 {
+m_privacy = config.readEntry(imagebinPrivacy, 0);
 m_server = config.readEntry(imagebinca, http://imagebin.ca;);
-
 m_boundary  = --;
 m_boundary += KRandom::randomString(42 + 13).toAscii();
 }
@@ -168,10 +168,17 @@ void ImagebinCAServer::post(const QStrin
 addPair(tags, plasma);
 url.addQueryItem(tags, plasma);

-addPair(adult, f);
-url.addQueryItem(adult, f);
+if(m_privacy == 0){
+  adult = f;
+} else {
+  adult = t;
+}
+
+addPair(adult, adult);
+url.addQueryItem(adult, adult);

 addFile(f, content);
+
 finish();

 _data.clear();
Index: applets/pastebin/backends/imagebinca.h
===
--- applets/pastebin/backends/imagebinca.h  (revision 1008583)
+++ applets/pastebin/backends/imagebinca.h  (working copy)
@@ -42,6 +42,8 @@ public:
 void finish();
 bool addPair(const QString name, const QString value);
 bool addFile(const QString name,const QString path);
+QString adult;
+QString m_privacy;

 protected:
 QByteArray m_buffer;
Index: applets/pastebin/pastebin.h
===
--- applets/pastebin/pastebin.h (revision 1008583)
+++ applets/pastebin/pastebin.h (working copy)
@@ -23,6 +23,7 @@
 #include backends/backends.h
 #include ui_pastebinConfig.h
 #include ui_pastebinServersConfig.h
+#include ui_pastebinServersOptionsConfig.h

 #include KDE/KIO/TransferJob
 #include KDE/KIO/Job
@@ -153,6 +154,7 @@ private:

 Ui::pastebinConfig uiConfig;
 Ui::pastebinServersConfig uiServers;
+Ui::pastebinServersOptionsConfig uiServersOptions;
 };

 K_EXPORT_PLASMA_APPLET(pastebin, Pastebin)
Index: applets/pastebin/CMakeLists.txt
===
--- applets/pastebin/CMakeLists.txt (revision 1008583)
+++ applets/pastebin/CMakeLists.txt (working copy)
@@ -1,5 +1,8 @@
 project(plasma-pastebin)

+cmake_minimum_required(VERSION 2.6)
+find_package(KDE4 REQUIRED)
+
 set(pastebin_SRCS
   backends/server.cpp
   backends/pastebinca.cpp
@@ -10,6 +13,7 @@ set(pastebin_SRCS

 kde4_add_ui_files(pastebin_SRCS pastebinConfig.ui)
 kde4_add_ui_files(pastebin_SRCS pastebinServersConfig.ui)
+kde4_add_ui_files(pastebin_SRCS pastebinServersOptionsConfig.ui)

 kde4_add_plugin(plasma_applet_pastebin ${pastebin_SRCS})
 target_link_libraries(plasma_applet_pastebin ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
Index: applets/pastebin/pastebinServersOptionsConfig.ui
===
--- applets/pastebin/pastebinServersOptionsConfig.ui(revision 0)
+++ applets/pastebin/pastebinServersOptionsConfig.ui(revision 0)
@@ -0,0 +1,49 @@
+?xml version=1.0 encoding=UTF-8?
+ui version=4.0
+ classpastebinServersOptionsConfig/class
+ widget class=QWidget 

Re: [nepomuk-kde] Plasma activities and Nepomuk

2009-08-08 Thread Hari krishna Anandhan
Hi Leo,

On Sat, Aug 8, 2009 at 5:52 PM, Leo Sauermannleo.sauerm...@dfki.de wrote:
 a completly working implementation with applications on top (such as
 clicked-link history, etc, ...) was done open source complete with
 ontologies and algorithms:

 http://usercontext.opendfki.de/
 http://lists.opendfki.de/cgi-bin/mailman/listinfo/usercontext
 http://dev.nepomuk.semanticdesktop.org/wiki/UserWorkContext

 I think this thread is currently reinventing this.

Leo, the contexts discussed there are more in line with 'Gnome
Zeitgeist', where the actual user operations (called NOPs in nepomuk)
done in individual applications are observed and the user context is
guessed. But, as per what we have agreed earlier, for the first phase
of implementation, we are looking at a more higher-level 'User
Activity' which is explicitly invoked by the user, which just
remembers the apps or applets the user might use to do his specific
activity. I am sure we will cover NOPs at a later phase and use
UserContext onto for it, but for a start, let us just stick to
ActivityContext at a higher level. I think the plasma team is also
thinking in those lines ;)

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


Re: [PATCH] Adds posting private picture to imagebin.ca from the pastebin plasmoid

2009-08-08 Thread Chani
On August 8, 2009 09:40:28 Patrick Aljord wrote:
 Hey all,

 This is my first patch, it just adds posting private picture to
 imagebin.ca from the pastebin plasmoid as the title says, it needs to
 be applied from kdeplasma-addons, hope it works for you.

 Cheers,

 Pat

thanks for the patch :)

the code looks generally ok, although kompare won't load the diff for some 
reason...

one thing I don't get is how you managed to use a string (0) as the default 
value for an int ;)

can you give us a screenshot of the new config?

btw, next time put your patch on reviewboard.kde.org, less chance of us losing 
it there :)

-- 
This message brought to you by eevil bananas and the number 3.
www.chani3.com


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: 4.3 Previewer or Icon?

2009-08-08 Thread David Baron
On Friday 07 August 2009 14:23:26 Matteo Agostinelli wrote:
 Maybe I understood what is the point of the OP. If you drag and drop a PDF
 file to the Desktop, you get the choice between the Previewer and the Icon.
 But if you choose the Preview it actually creates an empty previewer
 plasmoid, i.e. it doesn't show the contents of the PDF. On the contrary,
 the preview is working correctly for other file formats, such as images of
 text files.


OK.

Assuming it does work. What will be on the desktop? A previewer plasmoid to 
which I can drag another file if I wish? One dedicated to this file?

If the placement is a general previewer plasmoid, why would I place it at this 
point? I put on the panel or desktop if I want it and drage the file there to 
view it.

If the placement is dedicated, why not just the icon which takes up far less 
space?
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [PATCH] Adds posting private picture to imagebin.ca from the pastebin plasmoid

2009-08-08 Thread Artur Souza (MoRpHeUz)
On Saturday 08 August 2009, 13:40 Patrick Aljord wrote:
 This is my first patch, it just adds posting private picture to
 imagebin.ca from the pastebin plasmoid as the title says, it needs to
 be applied from kdeplasma-addons, hope it works for you.

Thanks for the patch! As Chani asked, can you provide a screenshot of the 
config 
dialog ?

Some comments on code:

Index: applets/pastebin/backends/imagebinca.h
===
--- applets/pastebin/backends/imagebinca.h  (revision 1008583)
+++ applets/pastebin/backends/imagebinca.h  (working copy)
@@ -42,6 +42,8 @@ public:
 void finish();
 bool addPair(const QString name, const QString value);
 bool addFile(const QString name,const QString path);
+QString adult;


It seems that you do not need to store this string in the object and can 
declare it when you setup this string, something like this:

QString adult;
+if(m_privacy == 0){
+  adult = f;
+} else {
+  adult = t;
+}

 one thing I don't get is how you managed to use a string (0) as the default 
 value for an int ;)
+QString m_privacy;

m_privacy seems to be a QString :)

Cheers!

--
Artur Duque de Souza
openBossa Research Labs
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: [PATCH] Adds posting private picture to imagebin.ca from the pastebin plasmoid

2009-08-08 Thread Artur Souza (MoRpHeUz)
On Saturday 08 August 2009, 16:35 Chani wrote:
 oh.
 but we also have this:
 int imagebinPrivacy = uiServersOptions.imagebinPrivacy-currentIndex();
 
 so, either make it always an int, or make it an enum. don't use a string.
 especially a string that just contains a number anyways...

+1 for always int

--
Artur Duque de Souza
openBossa Research Labs
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


KDE/kdelibs/plasma

2009-08-08 Thread Sebastian Kügler
SVN commit 1009004 by sebas:

Make dropping remote content onto Plasma work

The idea is that you drop a file from a webpage, or basically a URL onto Plasma 
and Plasma creates a suitable applet to display this URL. For example an image 
frame for picture, or a previewer for pdf files. Downloading the data itself 
(and possibly saving it) is left to the applets. The mimetype needs to be 
retrieved as it cannot be determined from the URL.

The code pathes I've changed or added are, roughly:
- something is dropped onto Plasma
- if it's a remote URL, we don't know the mimetype of the object behind the URL 
yet
- a KIO::TransferJob is used to retrieve the mimetype asynchronously, and will 
call back
- we open a QMenu that says Fetching file type...
- If the user closes the menu while the mimetype is being retrieved, we will 
open a new one
- When the TransferJob calls back, and we have our mimetype, we offer a list of 
applets suitable for this kind of content
- If the user chooses to create an applet, we put the transfer job on hold to 
make it available for recycling by the applet
- If the user dismisses the offering, we kill the job

Thanks to marco for reviewing and everybody else for the input :)

Next steps are making some more applets work with this.

CCMAIL:plasma-devel@kde.org



 M  +102 -11   containment.cpp  
 M  +11 -1 containment.h  
 M  +4 -0  private/containment_p.h  


--- trunk/KDE/kdelibs/plasma/containment.cpp #1009003:1009004
@@ -43,6 +43,9 @@
 #include kstandarddirs.h
 #include ktemporaryfile.h
 #include kwindowsystem.h
+#include kio/jobclasses.h // for KIO::JobFlags
+#include kio/job.h
+#include kio/scheduler.h
 
 #include animator.h
 #include context.h
@@ -611,7 +614,7 @@
 //if there is only one, don't create a submenu
 if(enabled  2) {
 foreach(QAction *action, containmentMenu-actions()) {
-desktopMenu.addAction(action); 
+desktopMenu.addAction(action);
 }
 } else {
 desktopMenu.addMenu(containmentMenu);
@@ -1058,6 +1061,7 @@
 
 QGraphicsSceneDragDropEvent *dropEvent = 
dynamic_castQGraphicsSceneDragDropEvent*(event);
 QGraphicsSceneMouseEvent *mouseEvent = 
dynamic_castQGraphicsSceneMouseEvent*(event);
+//kDebug()  Something dropped mimetype, -data:   appletMimetype  
event-mimeData()-text();
 
 QPointF pos;
 QPointF scenePos;
@@ -1081,7 +1085,7 @@
 }
 
 if (!mimeData) {
-//Selection is either empty or not sopported on this OS
+//Selection is either empty or not supported on this OS
 kDebug()  no mime data;
 return;
 }
@@ -1093,7 +1097,6 @@
 if (!appletMimetype.isEmpty()  mimeData-hasFormat(appletMimetype)) {
 QString data = mimeData-data(appletMimetype);
 const QStringList appletNames = data.split('\n', 
QString::SkipEmptyParts);
-
 foreach (const QString appletName, appletNames) {
 //kDebug()  doing  appletName;
 QRectF geom(q-mapFromScene(scenePos), QSize(0, 0));
@@ -1123,12 +1126,14 @@
 QRectF geom(pos, QSize());
 QVariantList args;
 args  url.url();
-// kDebug()  mimeName;
+//kDebug()  can decode  mimeName  args;
+//kDebug()  protocol:  url.protocol();
 KPluginInfo::List appletList = 
Applet::listAppletInfoForMimetype(mimeName);
 
 if (!appletList.isEmpty()) {
-//TODO: should we show a dialog here to choose which plasmoid 
load if
-//!appletList.isEmpty()
+// The mimetype is known, i.e. there are applet that can load 
this mimetype
+// Offer the applets in a popupmenu
+kDebug()  Local file.;
 QMenu choices;
 QHashQAction *, QString actionsToPlugins;
 foreach (const KPluginInfo info, appletList) {
@@ -1141,16 +1146,29 @@
 
 actionsToPlugins.insert(action, info.pluginName());
 }
+actionsToPlugins.insert(choices.addAction(i18n(Icon)), 
icon);
 
-actionsToPlugins.insert(choices.addAction(i18n(Icon)), 
icon);
 QAction *choice = choices.exec(screenPos);
 if (choice) {
 q-addApplet(actionsToPlugins[choice], args, geom);
 }
-} else if (url.protocol() != data) {
-// We don't try to do anything with data: URIs
-// no special applet associated with this mimetype, let's
-q-addApplet(icon, args, geom);
+
+} else if (url.protocol() != data) { // Why not data:?
+//kDebug()  Let's start a KIO::TransferJob to retrieve the 
mimetype  KMimeType::findByUrl(url)-name();
+
+
+// It may be a directory or a file, let's stat
+KIO::JobFlags flags = KIO::HideProgressInfo;
+KIO::TransferJob *job 

Re: [PATCH] Adds posting private picture to imagebin.ca from the pastebin plasmoid

2009-08-08 Thread Patrick Aljord
Thanks to all for your comments. I haven't coded anything in C++ for
at least 3 years so I guess it shows :)

I'll send the patch with your suggestions tomorrow, in the meantime
here is the screenshot http://imagebin.ca/view/fyaoR7T.html
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [PATCH] Adds posting private picture to imagebin.ca from the pastebin plasmoid

2009-08-08 Thread Chani
On August 8, 2009 18:41:32 Patrick Aljord wrote:
 Thanks to all for your comments. I haven't coded anything in C++ for
 at least 3 years so I guess it shows :)

 I'll send the patch with your suggestions tomorrow, in the meantime
 here is the screenshot http://imagebin.ca/view/fyaoR7T.html

hmmm.
I don't think we need a separate page for that option. there's not much on the 
first page, after all.

actually I'm not too keen on the existing servers page either. a very odd 
way to allow people to use other servers... I wonder why it was done that 
way...

-- 
This message brought to you by eevil bananas and the number 3.
www.chani3.com


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