After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 141193 - GnomeFileEntry doesn't write the file name in the save mode
GnomeFileEntry doesn't write the file name in the save mode
Status: RESOLVED OBSOLETE
Product: libgnomeui
Classification: Deprecated
Component: general
CVS HEAD
Other All
: Normal minor
: future
Assigned To: libgnomeui maintainers
libgnomeui maintainers
Depends on:
Blocks:
 
 
Reported: 2004-04-27 16:21 UTC by Arcterex
Modified: 2007-01-09 00:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
This is one solution for the bug #141193 .There is little problem in this see the next patch. (461.50 KB, patch)
2004-06-08 09:29 UTC, K.S.N.Murthy
none Details | Review
This is one solution for the bug #141193 (1.16 KB, patch)
2004-06-08 13:32 UTC, K.S.N.Murthy
none Details | Review
patch as described (737 bytes, patch)
2005-05-11 11:20 UTC, Kjartan Maraas
none Details | Review

Description Arcterex 2004-04-27 16:21:09 UTC
- Hit (default) prntscrn to take a screenshot.  Screenshot filename is given as Screenshot-
[application].png selected so the user can change it. 
 - click 'browse' to save the image in a different directory
 - filename is now gone

IMO the filename should stay and be selected ready to be changed by the user if they choose.  However, 
if the user is just wanting to put the screenshot in a different directory other than $HOME they have to 
retype the filename.  This should be a pretty simple fix which I'd provide a patch for if I could...
Comment 1 Mark McLoughlin 2004-05-13 11:32:43 UTC
Hmm, a quick glance at GnomeFileEntry shows that this should work, needs to be
debugged.

I'd expect this code (in gnome-file-entry.c:browse_clicked()) to make it happen:

  p = build_filename (fentry);
  if (p)
    {
      gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (fw), p);
      g_free (p);
    }
Comment 2 Kirti Sinha 2004-05-16 06:27:39 UTC
Well I don't really think that this will work.gtk_file_chooser_set_filename will 
print the filename only if the file exists or nothing will be done except for
the directory change. To pre-enter a filename for the user, as in a save-as
dialog,we need to use gtk_file_chooser_set_current_name().I'll attach a patch
for the same in a day or two
Comment 3 K.S.N.Murthy 2004-06-08 09:29:46 UTC
Created attachment 28455 [details] [review]
This  is one solution for the bug #141193 .There is little problem in this see the next patch.


I think the problem is in the glade file, 
This  patch will solve the problem. and you will get a different file selector
browser when you click on browse button.
Comment 4 K.S.N.Murthy 2004-06-08 13:32:59 UTC
Created attachment 28465 [details] [review]
This  is one solution for the bug #141193

There is problem in the previous patch.
This one will work properly.
Comment 5 Fernando Herrera 2004-10-21 16:58:12 UTC
Kirti comments are right, but patch is not. Moving to the old fileselection is
not a proper solution.

Then this is a bug on the libgnomeui GtkFileEntry save mode support, the code
should be:
                p = build_filename (fentry);
                if (p) {
                        gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (fw), p);
                        if (action == GTK_FILE_CHOOSER_ACTION_SAVE) {
                                char *f = g_path_get_basename (p);
                               
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER (fw), f);
                                g_free (f);
                        }
                        g_free (p);
                }

So I'm moving this bug to libgnomeui and poking andersca to apply the fix :)
Comment 6 Kjartan Maraas 2005-01-25 18:48:16 UTC
Anders, is this ok to commit?
Comment 7 Kjartan Maraas 2005-05-11 11:20:47 UTC
Created attachment 46324 [details] [review]
patch as described
Comment 8 Kjartan Maraas 2005-07-01 13:49:30 UTC
I don't see the original problem here with current CVS. Do we still need this?
Can someone come up with a different way to reproduce it?
Comment 9 Kjartan Maraas 2007-01-09 00:28:53 UTC
Marking as OBSOLETE based on feedback from Fernando.