[maemo-commits] [maemo-commits] r12770 - projects/haf/trunk/hildon-fm/hildon-fm
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Jul 18 19:36:49 EEST 2007
- Previous message: [maemo-commits] r12769 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r12771 - projects/haf/trunk/hildon-fm/hildon-fm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: marivoll
Date: 2007-07-18 19:36:48 +0300 (Wed, 18 Jul 2007)
New Revision: 12770
Modified:
projects/haf/trunk/hildon-fm/hildon-fm/t.c
Log:
Modified: projects/haf/trunk/hildon-fm/hildon-fm/t.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/t.c 2007-07-18 16:28:08 UTC (rev 12769)
+++ projects/haf/trunk/hildon-fm/hildon-fm/t.c 2007-07-18 16:36:48 UTC (rev 12770)
@@ -1,90 +1,22 @@
-#define GTK_FILE_SYSTEM_ENABLE_UNSUPPORTED
-
#include <gtk/gtk.h>
-#include <gtk/gtkfilesystem.h>
-#include <libgnomevfs/gnome-vfs.h>
+#include <libgnomevfs/gnome-vfs-init.h>
+#include <hildon-widgets/hildon-file-system-storage-dialog.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-GtkFileSystem *fs;
-
-static void
-list_gnome_vfs_volumes ()
+int
+main(int argc, char **argv)
{
- GnomeVFSVolumeMonitor *monitor;
- GList *volumes, *drives;
+ GtkWidget *dlg = NULL;
- monitor = gnome_vfs_get_volume_monitor ();
+ if (argc < 2) return 1;
- fprintf (stderr, "Root entries:\n");
+ gtk_init(&argc, &argv);
- volumes = gnome_vfs_volume_monitor_get_mounted_volumes (monitor);
- while (volumes)
- {
- GnomeVFSVolume *volume = volumes->data;
+ gnome_vfs_init ();
- if (gnome_vfs_volume_is_user_visible (volume)
- && gnome_vfs_volume_is_mounted (volume))
- fprintf (stderr,
- " %s %s\n",
- gnome_vfs_volume_get_device_path (volume),
- gnome_vfs_volume_get_activation_uri (volume));
- else
- fprintf (stderr,
- " (%s %s)\n",
- gnome_vfs_volume_get_device_path (volume),
- gnome_vfs_volume_get_activation_uri (volume));
+ gtk_dialog_run(GTK_DIALOG(dlg = hildon_file_system_storage_dialog_new(NULL,
+argv[1])));
- volumes = volumes->next;
- }
+ gtk_widget_destroy(dlg);
- drives = gnome_vfs_volume_monitor_get_connected_drives (monitor);
- while (drives)
- {
- GnomeVFSDrive *drive = drives->data;
-
- if (gnome_vfs_drive_is_user_visible (drive)
- && gnome_vfs_drive_is_connected (drive)
- && !gnome_vfs_drive_is_mounted (drive))
- fprintf (stderr,
- " %s\n",
- gnome_vfs_drive_get_device_path (drive));
- else
- fprintf (stderr,
- " (%s)\n",
- gnome_vfs_drive_get_device_path (drive));
-
-
- drives = drives->next;
- }
-
- fprintf (stderr, "\n");
-
-}
-
-static void
-volumes_changed ()
-{
- printf ("changed\n");
- list_gnome_vfs_volumes ();
-}
-
-int
-main (int argc, char **argv)
-{
- gtk_init (&argc, &argv);
-
- fs = gtk_file_system_create ("gnome-vfs");
- if (fs == NULL)
- exit (1);
-
- volumes_changed ();
-
- g_signal_connect (fs, "volumes_changed",
- G_CALLBACK (volumes_changed), NULL);
-
- gtk_main ();
return 0;
}
-
- Previous message: [maemo-commits] r12769 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r12771 - projects/haf/trunk/hildon-fm/hildon-fm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
