gnome-url-show



in the aim talk someone mentioned a littls script to open files with
gnome and so here's a first version.

i suppose libgnome needs to be branched before this can go in?

havoc, what stupid things have i done with this?

 - jacob
#include <config.h>

#include <glib.h>
#include <stdio.h>
#include <libgnome/gnome-url.h>
#include <libgnome/gnome-program.h>
#include <libgnome/gnome-init.h>

int
main (int argc, char *argv[])
{
  GError *err = NULL;

  if (argc < 2)
    {
      fprintf (stderr, "Usage: %s <url>\n", argv[0]);
      return 1;
    }

  gnome_program_init ("gnome-url-show", VERSION,
		      LIBGNOME_MODULE,
		      argc, argv,
		      NULL);

  if (gnome_url_show (argv[1], &err))
    return 0;

  fprintf (stderr, "Error showing url: %s\n", err->message);
  g_error_free (err);

  return 1;
}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]