PDA

View Full Version : New GTK NFO File viewer in Mono



NiceGuyUK
March 5th, 2007, 10:01 PM
I knocked up a quick NFO file viewer at lunchtime and tidied it up on the train home tonight. Its now in a condition where I'm brave enough to let other Ubuntu folks give it a try :-)

Not packaged up into a .deb yet, its a source tarball. I'll aim at nicer packaging when its ready for a wider audience. Its written in C# under Mono, so you'll need Mono and GTK# at the very least. Check the README for details

Please use this thread to leave *constructive* feedback.

INSTALL NOTES:
You'll need mono, mono-mcs and gtk-sharp2 packages from the repositories (I'm on Feisty, not tested on Edgy/Dapper).

To compile, change to the source directory (after extracting it) and type :-


mcs -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -out:GNFOView.exe ./gtk-gui/generated.cs MainWindow.cs main.cs

USAGE NOTES:
You can pass a filename to open as a command line parameter. In the viewer, CTRL-O to open a file, CTRL-I to invert the colours, CTRL-Q to quit. Or use the menus, its up to you.

Thanks guys,

NiceGuyUK

garrison
December 27th, 2007, 07:04 PM
It compiles without error on Gutsy AMD64, thanks.

I have two suggestions:


graceful handling of System.IO.FileNotFoundException
ability to save preferences or last state (inversion, window size)

garrison
December 28th, 2007, 12:08 AM
mcs -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -out:GNFOView.exe ./gtk-gui/generated.cs MainWindow.cs main.cs

That should read Main.cs rather than main.cs:


mcs -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -out:GNFOView.exe ./gtk-gui/generated.cs MainWindow.cs Main.cs

phrostbyte
December 28th, 2007, 12:19 AM
I can package it for you in a .deb file if you want.

NiceGuyUK
December 28th, 2007, 12:03 PM
It compiles without error on Gutsy AMD64, thanks.

I have two suggestions:


graceful handling of System.IO.FileNotFoundException
ability to save preferences or last state (inversion, window size)


I'll try to implement those features, I was looking for something to code this week :-)

NiceGuyUK
December 28th, 2007, 12:04 PM
I can package it for you in a .deb file if you want.

Thanks for the offer - maybe when I've added the features that Garrison requested?

germanio
April 28th, 2008, 10:57 AM
Hi NiceGuyUK,

I just found your app, and was looking forward to using it :) I'm using ubuntu 8.04, and it seemed to compile fine along with the dependencies, but when I tried to open an nfo file, I got this:


Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.NotSupportedException: CodePage 437 not supported
at System.Text.Encoding.GetEncoding (Int32 codePage) [0x00000]
at MainWindow.sel_OK_Clicked (System.Object obj, System.EventArgs args) [0x00000]
at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr data) [0x00000]
at GLib.ExceptionManager.RaiseUnhandledException(Syst em.Exception e, Boolean is_terminal)
at GLib.Signal.voidObjectCallback(IntPtr handle, IntPtr data)
at GLib.Signal.voidObjectCallback(IntPtr , IntPtr )
at Gtk.Dialog.gtk_dialog_run(IntPtr )
at Gtk.Dialog.gtk_dialog_run(IntPtr )
at Gtk.Dialog.Run()
at MainWindow.OnOpenActivated(System.Object sender, System.EventArgs e)
at GLib.Signal.voidObjectCallback(IntPtr handle, IntPtr data)
at GLib.Signal.voidObjectCallback(IntPtr , IntPtr )
at Gtk.Application.gtk_main()
at Gtk.Application.gtk_main()
at Gtk.Application.Run()
at GNFOView.MainClass.Main(System.String[] args)

Any suggestions? :confused:

Also, are you going to make a .deb? :D

NiceGuyUK
April 28th, 2008, 08:11 PM
Hi Germanio,

I'm currently a bit tied up with some coding that I get paid for (its how I earn a living), but gimme a couple of weeks and I'll look into it.

I've only just upgraded my Linux desktop to 8.04 myself but I haven't played with it yet. If you can bear with me, I'll investigate as soon as I've finished my customer's project.

Thanks

NiceGuyUK