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 336507 - "export to html" save dialog is an old style gtk file chooser
"export to html" save dialog is an old style gtk file chooser
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
: 320967 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-03-29 15:58 UTC by Jorge Urdaneta
Modified: 2008-02-26 20:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Possible fix that uses Gtk.FileChooserDialog (1.46 KB, patch)
2006-09-20 14:58 UTC, Boyd Timothy
none Details | Review
Working patch that uses Gtk.FileChooserDialog (3.09 KB, patch)
2006-09-20 15:39 UTC, Boyd Timothy
none Details | Review
Working patch w/o using custom bindings (1.46 KB, patch)
2006-09-20 18:14 UTC, Boyd Timothy
none Details | Review
Screenshot of new HTML Export save dialog (17.87 KB, image/png)
2006-09-20 18:14 UTC, Boyd Timothy
  Details

Description Jorge Urdaneta 2006-03-29 15:58:26 UTC
when the "export to html" feature ask where save the html file, tomboy shows an
old style gtk file chooser (maybe from gtk-1.0?)
Comment 1 Boyd Timothy 2006-09-20 14:58:03 UTC
Created attachment 73087 [details] [review]
Possible fix that uses Gtk.FileChooserDialog

Unfortunately, this patch does not work.  For some reason, I get the following:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
in <0x0019c> Gtk.FileChooserDialog:.ctor (System.String title, Gtk.Window parent, FileChooserAction action, System.Object[] button_data)
in <0x00029> ExportToHTMLDialog:.ctor (System.String default_file)
in <0x00094> ExportToHTMLPlugin:ExportButtonClicked (System.Object sender, System.EventArgs args)
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
in <0x00093> GLib.Signal:voidObjectCallback (IntPtr handle, IntPtr gch)
in (wrapper native-to-managed) GLib.Signal:voidObjectCallback (intptr,intptr)
in <0x00000> <unknown method>
in (wrapper managed-to-native) Gtk.Application:gtk_main ()
in <0x00007> Gtk.Application:Run ()
in <0x00007> Gnome.Program:Run ()
in <0x00011> Tomboy.Application:StartMainLoop ()
in <0x0003a> Tomboy.Tomboy:StartTrayIcon ()
in <0x00126> Tomboy.Tomboy:Main (System.String[] args)

I'm not sure exactly why.  Perhaps the Gtk# bindings are broken?  The patch included in openSUSE includes custom bindings.  I'll rework the patch to include that and post it here shortly.
Comment 2 Boyd Timothy 2006-09-20 15:38:10 UTC
Looks like this bug really ought to be a duplicate of http://bugzilla.gnome.org/show_bug.cgi?id=320967.  In any case, since that one is closed, I'll rework the patch that was already included there and include it here.
Comment 3 Boyd Timothy 2006-09-20 15:39:27 UTC
Created attachment 73093 [details] [review]
Working patch that uses Gtk.FileChooserDialog

This patch uses custom C# bindings and works.
Comment 4 Alex Graveley 2006-09-20 17:54:47 UTC
I'd really prefer not to perpetuate more broken bindings patches.  This was the point behind moving to Gtk#2.

With your original patch, which looks good, have you tried passing the button data in the constructor?  If that doesn't work, passing just an empty "new object[] { }" may fix the problem.
Comment 5 Alex Graveley 2006-09-20 17:55:31 UTC
*** Bug 320967 has been marked as a duplicate of this bug. ***
Comment 6 Boyd Timothy 2006-09-20 18:14:05 UTC
Created attachment 73100 [details] [review]
Working patch w/o using custom bindings

Alex, good call on passing in an empty object array.  This patch works now.  I'll attach a screenshot.
Comment 7 Boyd Timothy 2006-09-20 18:14:40 UTC
Created attachment 73101 [details]
Screenshot of new HTML Export save dialog
Comment 8 Alex Graveley 2006-09-20 18:23:21 UTC
Awesome.  Please test that trying to overwrite an existing file warns the user and that if accepted, the save actually overwrites it.  And feel free to commit when you're ready.
Comment 9 Boyd Timothy 2006-09-20 19:08:00 UTC
Tested the overwrite notification, verified that overwriting actually works, and made a couple last-minute fixes.  Checked-in to CVS HEAD.