<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>237353</bug_id>
          
          <creation_ts>2010-05-12 10:47:30 +0000</creation_ts>
          <short_desc>&quot;open with...&quot; uses wrong filename (filename + 1)</short_desc>
          <delta_ts>2013-05-07 17:52:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>ksnapshot</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>258431</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="S. Burmeister">sven.burmeister</reporter>
          <assigned_to name="Richard Moore">rich</assigned_to>
          <cc>amihere007</cc>
    
    <cc>balazs</cc>
    
    <cc>bugzilla</cc>
    
    <cc>de.meyer.maarten</cc>
    
    <cc>hr.denzler</cc>
    
    <cc>jjm</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>10</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>960823</commentid>
    <comment_count>0</comment_count>
    <who name="S. Burmeister">sven.burmeister</who>
    <bug_when>2010-05-12 10:47:30 +0000</bug_when>
    <thetext>Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

In openSUSE pressing &quot;Print&quot; opens ksnaphot which takes a screenshot. If one saves that screenshot as e.g. screenshot to some folder and uses &quot;open with...&quot; after that, the application is given the wrong filename, i.e. the filename that would be used for the next screenshot, in this case it would be screenshot1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>961183</commentid>
    <comment_count>1</comment_count>
    <who name="Hans-Rudi Denzler">hr.denzler</who>
    <bug_when>2010-05-12 22:52:48 +0000</bug_when>
    <thetext>I think &quot;open with&quot; means create a /tmp/kde-user/file and open file in e.g. gimp to modify it. Then you can save it in /home/user/file. This command is not &quot;connected&quot; to &quot;save&quot;. Clicking save... changes the name for the next screenshot in the title bar.
a.) screenshot -&gt; save &gt; screenshot &gt; save
b.) screenshot -&gt; open with... gimp &gt; save as..., repeat b.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>961292</commentid>
    <comment_count>2</comment_count>
    <who name="S. Burmeister">sven.burmeister</who>
    <bug_when>2010-05-13 07:03:22 +0000</bug_when>
    <thetext>I just described the buggy behaviour. And of course they are &quot;connected&quot; as after I saved the image and did not take a new one &quot;open with&quot; must refer to what ksnapshot shows that instant which is what I saved.

Even if not, which would be a bug IMHO, ksnapshot uses a non-existent filename when opening the external app which most certainly is a bug in some technique used for that feature.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>961373</commentid>
    <comment_count>3</comment_count>
    <who name="Hans-Rudi Denzler">hr.denzler</who>
    <bug_when>2010-05-13 11:36:21 +0000</bug_when>
    <thetext>Open with is a &quot;follow up&quot; action of what you &quot;see&quot; in ksnapshot, not what is on the hard disk. If you want to open your saved file, you must use another app. Your &quot;Open saved file with...&quot; button would be located right of &quot;Save as...&quot;, since it has another meaning. If you modify your saved file, what do you &quot;Open with...&quot; now ?
a) the modified file [you]
b) what you see in ksnapshot in the preview window [me]

The &quot;non-existent filename&quot; in the title bar is the filename in the /tmp folder or the proposed filename for the next &quot;Save as...&quot; if you want to have multiple copies/screenshots.

Different views -&gt; different thoughts</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>961882</commentid>
    <comment_count>4</comment_count>
    <who name="S. Burmeister">sven.burmeister</who>
    <bug_when>2010-05-14 09:39:19 +0000</bug_when>
    <thetext>Sorry, but you are simply wrong. No matter what, open with... should open a file, be it the temp file or what I saved. Yet it does not, that&apos;s a bug.

It worked before, it stopped, it&apos;s a bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>961969</commentid>
    <comment_count>5</comment_count>
    <who name="Hans-Rudi Denzler">hr.denzler</who>
    <bug_when>2010-05-14 12:55:53 +0000</bug_when>
    <thetext>&quot;What you see, is what you get&quot;. When you click &quot;open with&quot;, the &quot;internal snapshot&quot; is saved to the /tmp/kde-user/ folder and that file as shown in the title bar is opened. There is no logic like:
&quot;if there is a file saved within the last 20 secs but not modified, then do open that file instead of a copy of the &quot;internal snapshot&quot;.

Why not satisfy your wish by first clicking &quot;Open with&quot; and then in the external app you can choose &quot;Save as...&quot; when you are happy with the result.
Choose &quot;Save as...&quot; in ksnapshot if no checking or modifying is necessary.

gimp: select -&gt; copy -&gt; insert as &gt; new picture &gt; save</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>961984</commentid>
    <comment_count>6</comment_count>
    <who name="S. Burmeister">sven.burmeister</who>
    <bug_when>2010-05-14 13:12:17 +0000</bug_when>
    <thetext>Please read before you write!

ksnaphot does _not_ open the tempfile it shows in its GUI. It does _not_ open _any_ file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>962005</commentid>
    <comment_count>7</comment_count>
    <who name="Hans-Rudi Denzler">hr.denzler</who>
    <bug_when>2010-05-14 14:03:41 +0000</bug_when>
    <thetext>In openSUSE 11.2 it does. I have dolphin with /tmp/kde-hrd/ and ksnapshot open, and then I press in ksnapshot &quot;Open with...&quot; gwenview or gimp and whoop the file appears in dolphin and gwenview shows the snapshot. Maybe your system is different and then you may forget what I wrote, sorry.
&quot;What I see, is what I get&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>962047</commentid>
    <comment_count>8</comment_count>
    <who name="Hans-Rudi Denzler">hr.denzler</who>
    <bug_when>2010-05-14 15:45:08 +0000</bug_when>
    <thetext>If you want evidence, you can use the &quot;strace&quot; command in konsole:
&gt; strace -e open -o output ksnapshot
&gt; kwrite output

open(&quot;/tmp/kde-hrd/Bug 237353 - 4.png&quot;, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 11</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>962270</commentid>
    <comment_count>9</comment_count>
    <who name="S. Burmeister">sven.burmeister</who>
    <bug_when>2010-05-15 08:26:17 +0000</bug_when>
    <thetext>Are you using the packages from unstable, i.e. kde trunk? This bug is not about KDE 4.3 or KDE 4.4 it&apos;s about KDE 4.5 revision 1123195 as you can see in the headers of my first comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>962293</commentid>
    <comment_count>10</comment_count>
    <who name="Hans-Rudi Denzler">hr.denzler</who>
    <bug_when>2010-05-15 11:45:50 +0000</bug_when>
    <thetext>http://download.opensuse.org/repositories/KDE:/KDE4:/Factory:/Desktop/openSUSE_11.2/
When I carefully try to read the Description of Bug 237353, and use the strace command in Comment #8 and then
&gt; cat output|grep &quot;Bug 23735&quot;
open(&quot;/home/hrd/Dokumente/Bug 237353.png&quot;, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 14 -&gt; &quot;Save as...&quot;
open(&quot;/tmp/kde-hrd/Bug 237354.png&quot;, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 14 -&gt; &quot;Open with...&quot; gwenview

I get evidence of your Description.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>965100</commentid>
    <comment_count>11</comment_count>
    <who name="Jonathan Marten">jjm</who>
    <bug_when>2010-05-21 14:00:14 +0000</bug_when>
    <thetext>Can confirm that the problem summarised in comment #6 still exists with current KDE trunk (as of r1122514).

Open KSnapshot with an empty ksnapshotrc file (i.e. no file name history).  An image will be captured and the window title says &quot;snapshot1.png&quot;.

Click &quot;Open With - Okular&quot;.  Okular reports &quot;Could not open file:///home/user/snapshot1.png&quot;.  Not surprising, because it doesn&apos;t exist.

Click &quot;Save As&quot; then &quot;Save&quot; with the default name.  The file is created, and the window title changes to &quot;snapshot2.png&quot;.

Click &quot;Open With - Okular&quot; again.  Okular reports &quot;Could not open file:///home/user/snapshot2.png&quot;.

Now here&apos;s another twist.  Click &quot;New Snapshot&quot;, the title now says &quot;snapshot2.png [modified]&quot;.  Click &quot;Open With - Okular&quot; and the file is opened from /tmp/kde-user (no file of that name has been saved in the default save location, i.e. home directory).

Possible solution: the initial snapshot taken when ksnapshot starts should set the &quot;[modified]&quot; status, as this is true (the file does not exist on disc), so that &quot;Open With&quot; will use a temporary file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>965115</commentid>
    <comment_count>12</comment_count>
      <attachid>43775</attachid>
    <who name="Jonathan Marten">jjm</who>
    <bug_when>2010-05-21 14:44:33 +0000</bug_when>
    <thetext>Created attachment 43775
Patch to fix

Proposed patch to fix.

Set the initial snapshot state to &quot;modified&quot;, clear this when the snapshot is saved as before.  Auto-increment the file name only when a new snapshot is taken, not when it is saved (whether under the default name or &quot;as&quot;).

Tested following the above scenario, the title bar and modified state correctly reflect whether the file has been saved and its on-disc file name.  Open With works as expected whether the file has been saved or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>965117</commentid>
    <comment_count>13</comment_count>
    <who name="Richard Moore">rich</who>
    <bug_when>2010-05-21 14:52:27 +0000</bug_when>
    <thetext>Does this patch cause a problem if the snapshot is saved twice? It sounds like the filename wouldn&apos;t be increamented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>965118</commentid>
    <comment_count>14</comment_count>
    <who name="Jonathan Marten">jjm</who>
    <bug_when>2010-05-21 14:58:42 +0000</bug_when>
    <thetext>Regarding comment #13: yes, that is true.  But then that is the same as the behaviour of any other application (e.g. KWrite) - repeatedly saving the same file doesn&apos;t increment the file name.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>983539</commentid>
    <comment_count>15</comment_count>
    <who name="Petr Zmek">amihere007</who>
    <bug_when>2010-06-27 12:44:11 +0000</bug_when>
    <thetext>Hello, I&apos;m not sure if my bug is related to this one, but I presume it is:

1. Initial state: in ksnapshotrc in [GENERAL] section there is line filename[$e]=file://$HOME/tmp/AAA/snapshot.png
2. 
- take a screenshot and save it with different name in different directory as $HOME/picture.png 
--&gt; a new name of new created screenshot is suggested as picture1.png
--&gt; the filename line in ksnapshotrc changes to filename[$e]=file://$HOME/picture1.png
3. after every &quot;save as&quot; operation the default directory changes to last saved one and the screenshot name changes to last saved one+1.

Is this correct behaviour? I think the filename line has to stay unchanged. Or is there any reason to dynamicly changed filename line? I understand the counting of names in case of multiples screenshots, but why to change the whole address?

KDE 4.5 RC1, Fedora12 x86_64, installed from kde-redhat-unstable repo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1002236</commentid>
    <comment_count>16</comment_count>
    <who name="Hans-Rudi Denzler">hr.denzler</who>
    <bug_when>2010-08-12 16:35:14 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I think &quot;open with&quot; means create a /tmp/kde-user/file and open file in e.g.
&gt; gimp to modify it. Then you can save it in /home/user/file. This command is not
&gt; &quot;connected&quot; to &quot;save&quot;. Clicking save... changes the name for the next
&gt; screenshot in the title bar.
&gt; a.) screenshot &gt; save &gt; screenshot &gt; save
&gt; b.) screenshot &gt; open with... gimp &gt; save as..., repeat b.)

KDE 4.5.0 doesn&apos;t pass test case b.) anymore (Could not open file).
c.) screenshot &gt; save &gt; open with... doesn&apos;t work either (Could not open file).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1016185</commentid>
    <comment_count>17</comment_count>
    <who name="Terényi, Balázs">balazs</who>
    <bug_when>2010-09-08 18:04:28 +0000</bug_when>
    <thetext>Same problem here with KDE 4.5.1 on OpenSuSE 11.3, testcase b.) doesn&apos;t work. It worked before with KDE 4.4.X</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066200</commentid>
    <comment_count>18</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2010-12-31 16:52:05 +0000</bug_when>
    <thetext>*** Bug 261039 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1076982</commentid>
    <comment_count>19</comment_count>
    <who name="S. Burmeister">sven.burmeister</who>
    <bug_when>2011-01-22 11:12:21 +0000</bug_when>
    <thetext>Still valid for KDE 4.6 RC2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1367037</commentid>
    <comment_count>20</comment_count>
    <who name="Maarten De Meyer">de.meyer.maarten</who>
    <bug_when>2013-05-07 17:52:12 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 258431 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>43775</attachid>
            <date>2010-05-21 14:44:33 +0000</date>
            <delta_ts>2010-05-21 14:44:33 +0000</delta_ts>
            <desc>Patch to fix</desc>
            <filename>237353.patch</filename>
            <type>text/plain</type>
            <size>985</size>
            <attacher name="Jonathan Marten">jjm</attacher>
            
              <data encoding="base64">SW5kZXg6IGtkZWdyYXBoaWNzL2tzbmFwc2hvdC9rc25hcHNob3QuY3BwCj09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0t
IGtkZWdyYXBoaWNzL2tzbmFwc2hvdC9rc25hcHNob3QuY3BwCShyZXZpc2lvbiAxMTI3ODA2KQor
Kysga2RlZ3JhcGhpY3Mva3NuYXBzaG90L2tzbmFwc2hvdC5jcHAJKHdvcmtpbmcgY29weSkKQEAg
LTczLDcgKzczLDcgQEAKIH07CiAKIEtTbmFwc2hvdDo6S1NuYXBzaG90KFFXaWRnZXQgKnBhcmVu
dCwgIEtTbmFwc2hvdE9iamVjdDo6Q2FwdHVyZU1vZGUgbW9kZSApCi0gIDogS0RpYWxvZyhwYXJl
bnQpLCBLU25hcHNob3RPYmplY3QoKSwgbW9kaWZpZWQoZmFsc2UpLCBzYXZlZFBvc2l0aW9uKFFQ
b2ludCgtMSwgLTEpKQorICA6IEtEaWFsb2cocGFyZW50KSwgS1NuYXBzaG90T2JqZWN0KCksIG1v
ZGlmaWVkKHRydWUpLCBzYXZlZFBvc2l0aW9uKFFQb2ludCgtMSwgLTEpKQogewogICAgIHNldENh
cHRpb24oICIiICk7CiAgICAgc2V0TW9kYWwoIHRydWUgKTsKQEAgLTIxOCw3ICsyMTgsNiBAQAog
ewogICAgIGlmICggc2F2ZShmaWxlbmFtZSwgdGhpcykgKSB7CiAgICAgICAgIG1vZGlmaWVkID0g
ZmFsc2U7Ci0gICAgICAgIGF1dG9pbmNGaWxlbmFtZSgpOwogICAgICAgICB1cGRhdGVDYXB0aW9u
KCk7CiAgICAgfQogfQpAQCAtMjQyLDcgKzI0MSw2IEBACiAgICAgaWYgKCBzYXZlKHVybCx0aGlz
KSApIHsKICAgICAgICAgZmlsZW5hbWUgPSB1cmw7CiAgICAgICAgIG1vZGlmaWVkID0gZmFsc2U7
Ci0gICAgICAgIGF1dG9pbmNGaWxlbmFtZSgpOwogICAgICAgICB1cGRhdGVDYXB0aW9uKCk7CiAg
ICAgfQogfQpAQCAtMjY1LDYgKzI2Myw4IEBACiAKIHZvaWQgS1NuYXBzaG90OjpzbG90R3JhYigp
CiB7CisgICAgYXV0b2luY0ZpbGVuYW1lKCk7CisKICAgICBzYXZlZFBvc2l0aW9uID0gcG9zKCk7
CiAgICAgaGlkZSgpOwogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>