Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
In src/viewer/gui-gtk:
Browse files Browse the repository at this point in the history
2005-01-16  Ben Maurer  <bmaurer@ximian.com>

	* Shell.cs (OnOpen): Add filter for heap prof files

In .:
2005-01-16  Ben Maurer  <bmaurer@ximian.com>

	* configure.in: Add some checks for mime type crap

	* Makefile.am (SUBDIRS): Add mime-data

In mime-data:
2005-01-16  Ben Maurer  <bmaurer@ximian.com>

	* Makefile.am, mono-heap-prof.xml: install mime data for the
	profile dump.


svn path=/trunk/heap-prof/; revision=38994
  • Loading branch information
Ben Maurer committed Jan 16, 2005
1 parent 562a593 commit 9954cce
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2005-01-16 Ben Maurer <bmaurer@ximian.com>

* configure.in: Add some checks for mime type crap

* Makefile.am (SUBDIRS): Add mime-data

2005-01-15 Ben Maurer <bmaurer@ximian.com>

* mono.patch: update the patch for looking at the gc heap size.
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
@@ -1 +1 @@
SUBDIRS = src
SUBDIRS = src mime-data
27 changes: 26 additions & 1 deletion configure.in
Expand Up @@ -6,13 +6,38 @@ AC_PROG_LIBTOOL
PKG_CHECK_MODULES(CCOMPILE, mono glib-2.0)
PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0 gtk-dotnet-2.0)

AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)

if test "x$UPDATE_MIME_DATABASE" = "xno" ; then
enable_xdgmime="no"
else
enable_xdgmime="yes"
fi

AM_CONDITIONAL(ENABLE_XDGMIME, test "x$enable_xdgmime" = "xyes")

AC_PATH_PROG(MCS, mcs)
AC_PATH_PROG(MONO, mono)

AC_OUTPUT([
Makefile
mime-data/Makefile
src/Makefile
src/runtime-profiler/Makefile
src/viewer/Makefile
src/viewer/mono-heap-prof-view
])
])

echo "---"
echo "Configuration summary"
echo ""
echo " * Installation prefix = $prefix"
echo " * XDG Mime Data = $enable_xdgmime"
echo ""
echo " NOTE: if any of the above say 'no' you may install the"
echo " corresponding development packages for them, and"
echo " rerun autogen.sh. If you are sure the proper"
echo " libraries are installed, use PKG_CONFIG_PATH to"
echo " point to their .pc files"
echo ""
echo "---"
5 changes: 5 additions & 0 deletions mime-data/ChangeLog
@@ -0,0 +1,5 @@
2005-01-16 Ben Maurer <bmaurer@ximian.com>

* Makefile.am, mono-heap-prof.xml: install mime data for the
profile dump.

14 changes: 14 additions & 0 deletions mime-data/Makefile.am
@@ -0,0 +1,14 @@

if ENABLE_XDGMIME

xdgmimedir = $(prefix)/share/mime/packages
xdgmime_DATA = mono-heap-prof.xml

install-data-hook:
$(UPDATE_MIME_DATABASE) $(prefix)/share/mime


uninstall-hook:
$(UPDATE_MIME_DATABASE) $(prefix)/share/mime

endif
12 changes: 12 additions & 0 deletions mime-data/mono-heap-prof.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-mono-heap-prof">
<comment>Mono Heap Profile</comment>
<comment xml:lang="en">Mono Heap Profile</comment>
<magic priority="40">
<match type="string" offset="0"
value="\x68\x30\xa4\x57\x18\xec\xd6\xa1\x61\x9c\x1d\x43\xe1\x47\x27\xb6"/>

</magic>
</mime-type>
</mime-info>
4 changes: 4 additions & 0 deletions src/viewer/gui-gtk/ChangeLog
@@ -1,3 +1,7 @@
2005-01-16 Ben Maurer <bmaurer@ximian.com>

* Shell.cs (OnOpen): Add filter for heap prof files

2005-01-11 Ben Maurer <bmaurer@ximian.com>

* TypeGraphViewer.cs: Make the TypeListTreeNode a list only node
Expand Down
12 changes: 12 additions & 0 deletions src/viewer/gui-gtk/Shell.cs
Expand Up @@ -84,6 +84,18 @@ void OnOpen (object obj, EventArgs args)
fd.AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel);
fd.AddButton (Gtk.Stock.Open, Gtk.ResponseType.Ok);

FileFilter filter_all = new FileFilter ();
filter_all.AddPattern ("*");
filter_all.Name = "All Files";

FileFilter filter_prof = new FileFilter ();
filter_prof.AddMimeType ("application/x-mono-heap-prof");
filter_prof.Name = "Mono Heap Profiles";

fd.AddFilter (filter_all);
fd.AddFilter (filter_prof);
fd.Filter = filter_prof;

if (fd.Run () == (int) ResponseType.Ok)
s = fd.Filename;

Expand Down

0 comments on commit 9954cce

Please sign in to comment.