D19852: Change default Klipper behavior to accept images

2019-03-26 Thread Karlo Dautović
kdautovic updated this revision to Diff 54871.
kdautovic added a comment.


  Add m_bIgnoreImage to get the correct behavior

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19852?vs=54717&id=54871

BRANCH
  clipboard

REVISION DETAIL
  https://phabricator.kde.org/D19852

AFFECTED FILES
  klipper/klipper.cpp

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: ngraham, davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, 
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D19852: Change default Klipper behavior to accept images

2019-03-26 Thread Karlo Dautović
kdautovic added a comment.


  Any updates? This is buildable and works. Is it acceptable to merge?

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19852

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: ngraham, davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, 
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D19852: Change default Klipper behavior to accept images

2019-03-24 Thread Karlo Dautović
kdautovic updated this revision to Diff 54717.
kdautovic added a comment.


  Use arcanist to get context

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19852?vs=54711&id=54717

BRANCH
  clipboard

REVISION DETAIL
  https://phabricator.kde.org/D19852

AFFECTED FILES
  klipper/klipper.cpp

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: ngraham, davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, 
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D19852: Change default Klipper behavior to accept images

2019-03-24 Thread Karlo Dautović
kdautovic updated this revision to Diff 54711.
kdautovic added a comment.


  Change QString to QStringLiteral

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19852?vs=54694&id=54711

REVISION DETAIL
  https://phabricator.kde.org/D19852

AFFECTED FILES
  klipper/klipper.cpp

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: ngraham, davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, 
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D19852: Change default Klipper behavior to accept images

2019-03-24 Thread Karlo Dautović
kdautovic added inline comments.

INLINE COMMENTS

> davidedmundson wrote in klipper.cpp:744
>   bIgnoreImages || !data-> ...

But bIgnoreImages is used later in the code, when determining whether to save 
images to history or not. Is it really necessary here? If it's added here then 
we're back to square one because copying screenshots to clipboard won't work 
with the default behavior of Klipper.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19852

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: ngraham, davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, 
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D19852: Change default Klipper behavior to accept images

2019-03-24 Thread Karlo Dautović
kdautovic updated this revision to Diff 54694.
kdautovic added a comment.


  Formatting.

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19852?vs=54692&id=54694

REVISION DETAIL
  https://phabricator.kde.org/D19852

AFFECTED FILES
  klipper/klipper.cpp

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: ngraham, davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, 
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D19852: Change default Klipper behavior to accept images

2019-03-24 Thread Karlo Dautović
kdautovic updated this revision to Diff 54692.
kdautovic added a comment.


  Add the "x-kde-force-image-copy" mime type hint.

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19852?vs=54239&id=54692

REVISION DETAIL
  https://phabricator.kde.org/D19852

AFFECTED FILES
  klipper/klipper.cpp

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: ngraham, davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, 
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D19852: Change default Klipper behavior to accept images

2019-03-24 Thread Karlo Dautović
kdautovic added a comment.


  Yeah, I'll add the mime hint.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19852

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: ngraham, davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, 
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D19852: Change default Klipper behavior to accept images

2019-03-21 Thread Karlo Dautović
kdautovic added a comment.


  Is this good enough to merge?

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19852

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, ragreen, 
Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
mart


D19852: Change default Klipper behavior to accept images

2019-03-18 Thread Karlo Dautović
kdautovic updated this revision to Diff 54239.
kdautovic added a comment.


  Removed the use of goto.

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19852?vs=54237&id=54239

REVISION DETAIL
  https://phabricator.kde.org/D19852

AFFECTED FILES
  klipper/klipper.cpp

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, ragreen, 
Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
mart


D19852: Change default Klipper behavior to accept images

2019-03-18 Thread Karlo Dautović
kdautovic updated this revision to Diff 54237.
kdautovic added a comment.


  Remove the image filter which stopped copying images to clipboard.

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19852?vs=54222&id=54237

REVISION DETAIL
  https://phabricator.kde.org/D19852

AFFECTED FILES
  klipper/klipper.cpp

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, ragreen, 
Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
mart


D19852: Change default Klipper behavior to accept images

2019-03-18 Thread Karlo Dautović
kdautovic added a comment.


  You mean line 739?
  
else if( data->hasImage() )
{
if( m_bIgnoreImages )
return;
}

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19852

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, ragreen, 
Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
mart


D19852: Change default Klipper behavior to accept images

2019-03-18 Thread Karlo Dautović
kdautovic updated this revision to Diff 54222.
kdautovic added a comment.


  Added a special case for not saving history when the data is an image and 
m_bIgnoreImages is set. This allows copying images to clipboard, and keeping 
the current default behavior of Klipper to not save images in history when 
m_bIgnoreImages is set.

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19852?vs=54210&id=54222

REVISION DETAIL
  https://phabricator.kde.org/D19852

AFFECTED FILES
  klipper/klipper.cpp

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, ragreen, 
Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
mart


D19852: Change default Klipper behavior to accept images

2019-03-18 Thread Karlo Dautović
kdautovic added a comment.


  The problem I see with that is that memory usage wasn't solved. Regardless of 
whether we use my approach or your approach, they're going to use the same 
amount of memory if people copy screenshots to clipboard. Your approach is just 
going to give the data a different MIME type.
  
  This way, all image handling applications get the same behavior.
  
  With all of this in mind, perhaps the best solution would be to never save 
images in history, so that once something else is copied, the image is 
forgotten.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19852

To: kdautovic, #plasma_workspaces, davidedmundson
Cc: davidedmundson, plasma-devel, #plasma_workspaces, jraleigh, GB_2, ragreen, 
Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
mart


D19852: Change default Klipper behavior to accept images

2019-03-18 Thread Karlo Dautović
kdautovic created this revision.
kdautovic added a reviewer: Plasma: Workspaces.
kdautovic added a project: Plasma: Workspaces.
Herald edited projects, added Plasma; removed Plasma: Workspaces.
Herald added a subscriber: plasma-devel.
kdautovic requested review of this revision.

REVISION SUMMARY
  Change the default Klipper behavior in order for 
https://phabricator.kde.org/D19715 to work.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19852

AFFECTED FILES
  klipper/klipper.kcfg

To: kdautovic, #plasma_workspaces
Cc: plasma-devel, #plasma_workspaces, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart