diff options
author | Alexander Larsson <alexl@src.gnome.org> | 2007-09-13 14:56:03 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2007-09-13 14:56:03 +0000 |
commit | f7c6d4c150984aa28be2a8f983d7f1429b525c12 (patch) | |
tree | 825f95ccfc377313ea6afb15dda2e65b384cbc73 | |
parent | df46bb0635c8a4cdf0db289d5d0b7e8416edd4ca (diff) | |
download | gvfs-f7c6d4c150984aa28be2a8f983d7f1429b525c12.tar.gz |
Rename g_file_get_for_XXX to g_file_new_for_XXX
Original git commit by Alexander Larsson <alexl@redhat.com> at 1188214830 +0200
svn path=/trunk/; revision=812
-rw-r--r-- | client/gvfsfusedaemon.c | 2 | ||||
-rw-r--r-- | common/gvfsdaemonprotocol.c | 2 | ||||
-rw-r--r-- | gio/fam/fam-helper.c | 4 | ||||
-rw-r--r-- | gio/gdesktopappinfo.c | 2 | ||||
-rw-r--r-- | gio/gfile.c | 12 | ||||
-rw-r--r-- | gio/gfile.h | 6 | ||||
-rw-r--r-- | gio/gunixvolume.c | 2 | ||||
-rw-r--r-- | gio/inotify/inotify-helper.c | 8 | ||||
-rwxr-xr-x | gio/test-gio.c | 12 | ||||
-rw-r--r-- | programs/gvfs-cat.c | 2 | ||||
-rw-r--r-- | programs/gvfs-copy.c | 4 | ||||
-rw-r--r-- | programs/gvfs-info.c | 2 | ||||
-rw-r--r-- | programs/gvfs-ls.c | 4 | ||||
-rw-r--r-- | programs/gvfs-monitor-dir.c | 2 | ||||
-rw-r--r-- | programs/gvfs-monitor-file.c | 2 | ||||
-rw-r--r-- | programs/gvfs-mount.c | 2 | ||||
-rw-r--r-- | programs/gvfs-move.c | 4 | ||||
-rw-r--r-- | programs/gvfs-rm.c | 2 | ||||
-rw-r--r-- | programs/gvfs-save.c | 2 | ||||
-rw-r--r-- | programs/gvfs-trash.c | 2 | ||||
-rw-r--r-- | test/benchmark-gvfs-big-files.c | 2 | ||||
-rw-r--r-- | test/benchmark-gvfs-small-files.c | 2 |
22 files changed, 41 insertions, 41 deletions
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c index f0c2e3ec..e4f9409a 100644 --- a/client/gvfsfusedaemon.c +++ b/client/gvfsfusedaemon.c @@ -654,7 +654,7 @@ file_from_mount_record_and_path (MountRecord *mount_record, const gchar *path) mount_uri = mount_spec_to_uri (mount_record->info->mount_spec); escaped_path = escape_uri_component (path); base_uri = g_strconcat (mount_uri, escaped_path, NULL); - file = g_file_get_for_uri (base_uri); + file = g_file_new_for_uri (base_uri); g_free (mount_uri); g_free (escaped_path); diff --git a/common/gvfsdaemonprotocol.c b/common/gvfsdaemonprotocol.c index 92713c5b..01e41486 100644 --- a/common/gvfsdaemonprotocol.c +++ b/common/gvfsdaemonprotocol.c @@ -346,7 +346,7 @@ _g_dbus_get_file_attribute (DBusMessageIter *iter, G_DBUS_TYPE_CSTRING, &str, 0)) { - GFile *file = g_file_get_for_path (str); + GFile *file = g_file_new_for_path (str); value->u.obj = G_OBJECT (g_file_icon_new (file)); g_free (str); } diff --git a/gio/fam/fam-helper.c b/gio/fam/fam-helper.c index 05081855..cab03749 100644 --- a/gio/fam/fam-helper.c +++ b/gio/fam/fam-helper.c @@ -103,7 +103,7 @@ fam_do_iter_unlocked (void) path = g_strdup (ev.filename); else path = g_strdup_printf ("%s/%s", sub->pathname, ev.filename); - GFile* child = g_file_get_for_path (path); + GFile* child = g_file_new_for_path (path); GFile* parent = g_file_get_parent (child); g_directory_monitor_emit_event (monitor, child, NULL, eflags); g_free (path); @@ -117,7 +117,7 @@ fam_do_iter_unlocked (void) if (eflags == -1) continue; path = g_strdup (ev.filename); - GFile* child = g_file_get_for_path (path); + GFile* child = g_file_new_for_path (path); g_file_monitor_emit_event (monitor, child, NULL, eflags); g_free (path); g_object_unref (child); diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c index 5c6f3a24..fed7c1a2 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c @@ -324,7 +324,7 @@ g_desktop_app_info_get_icon (GAppInfo *appinfo) return NULL; if (g_path_is_absolute (info->icon)) { - file = g_file_get_for_path (info->icon); + file = g_file_new_for_path (info->icon); icon = g_file_icon_new (file); g_object_unref (file); } else { diff --git a/gio/gfile.c b/gio/gfile.c index f96e5644..b29900d7 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -1701,14 +1701,14 @@ g_file_real_replace_finish (GFile *file, ********************************************/ GFile * -g_file_get_for_path (const char *path) +g_file_new_for_path (const char *path) { return g_vfs_get_file_for_path (g_vfs_get (), path); } GFile * -g_file_get_for_uri (const char *uri) +g_file_new_for_uri (const char *uri) { return g_vfs_get_file_for_uri (g_vfs_get (), uri); @@ -1745,7 +1745,7 @@ has_valid_scheme (const char *uri) } GFile * -g_file_get_for_commandline_arg (const char *arg) +g_file_new_for_commandline_arg (const char *arg) { GFile *file; char *filename; @@ -1754,16 +1754,16 @@ g_file_get_for_commandline_arg (const char *arg) g_return_val_if_fail (arg != NULL, NULL); if (g_path_is_absolute (arg)) - return g_file_get_for_path (arg); + return g_file_new_for_path (arg); if (has_valid_scheme (arg)) - return g_file_get_for_uri (arg); + return g_file_new_for_uri (arg); current_dir = g_get_current_dir (); filename = g_build_filename (current_dir, arg, NULL); g_free (current_dir); - file = g_file_get_for_path (filename); + file = g_file_new_for_path (filename); g_free (filename); return file; diff --git a/gio/gfile.h b/gio/gfile.h index 2106ef6c..23a7aeac 100644 --- a/gio/gfile.h +++ b/gio/gfile.h @@ -212,10 +212,10 @@ struct _GFileIface GType g_file_get_type (void) G_GNUC_CONST; -GFile * g_file_get_for_path (const char *path); -GFile * g_file_get_for_uri (const char *uri); +GFile * g_file_new_for_path (const char *path); +GFile * g_file_new_for_uri (const char *uri); +GFile * g_file_new_for_commandline_arg (const char *arg); GFile * g_file_parse_name (const char *parse_name); -GFile * g_file_get_for_commandline_arg (const char *arg); GFile * g_file_dup (GFile *file); guint g_file_hash (gconstpointer file); gboolean g_file_equal (GFile *file1, diff --git a/gio/gunixvolume.c b/gio/gunixvolume.c index d5cb1c40..328e083c 100644 --- a/gio/gunixvolume.c +++ b/gio/gunixvolume.c @@ -274,7 +274,7 @@ g_unix_volume_get_root (GVolume *volume) { GUnixVolume *unix_volume = G_UNIX_VOLUME (volume); - return g_file_get_for_path (unix_volume->mountpoint); + return g_file_new_for_path (unix_volume->mountpoint); } static GIcon * diff --git a/gio/inotify/inotify-helper.c b/gio/inotify/inotify-helper.c index 3f27749e..a46ac8b0 100644 --- a/gio/inotify/inotify-helper.c +++ b/gio/inotify/inotify-helper.c @@ -150,14 +150,14 @@ static void ih_event_callback (ik_event_t *event, inotify_sub *sub) GFile* child; eflags = ih_mask_to_EventFlags (event->mask); - parent = g_file_get_for_path (sub->dirname); + parent = g_file_new_for_path (sub->dirname); if (event->name) { fullpath = g_strdup_printf ("%s/%s", sub->dirname, event->name); } else { fullpath = g_strdup_printf ("%s/", sub->dirname); } - child = g_file_get_for_path (fullpath); + child = g_file_new_for_path (fullpath); g_free(fullpath); if (G_IS_DIRECTORY_MONITOR(sub->user_data)) @@ -185,7 +185,7 @@ static void ih_not_missing_callback (inotify_sub *sub) guint32 mask; GFile* parent; GFile* child; - parent = g_file_get_for_path (sub->dirname); + parent = g_file_new_for_path (sub->dirname); if (sub->filename) { @@ -202,7 +202,7 @@ static void ih_not_missing_callback (inotify_sub *sub) } eflags = ih_mask_to_EventFlags (mask); - child = g_file_get_for_path (fullpath); + child = g_file_new_for_path (fullpath); g_free(fullpath); if (G_IS_DIRECTORY_MONITOR(sub->user_data)) diff --git a/gio/test-gio.c b/gio/test-gio.c index 52a39915..5d60d719 100755 --- a/gio/test-gio.c +++ b/gio/test-gio.c @@ -51,7 +51,7 @@ test_out () unlink ("/tmp/test"); - file = g_file_get_for_path ("/tmp/test"); + file = g_file_new_for_path ("/tmp/test"); out = (GOutputStream *)g_file_create (file, NULL, NULL); left = sizeof(buffer); @@ -98,7 +98,7 @@ test_sync (char *uri, gboolean dump) c = g_cancellable_new (); - file = g_file_get_for_uri (uri); + file = g_file_new_for_uri (uri); if (0) g_thread_create (cancel_thread, c, FALSE, NULL); error = NULL; in = (GInputStream *)g_file_read (file, c, &error); @@ -227,7 +227,7 @@ test_async (char *uri, gboolean dump) data->buffer = g_malloc (1025); data->c = g_cancellable_new (); - file = g_file_get_for_uri (uri); + file = g_file_new_for_uri (uri); g_file_read_async (file, 0, data->c, test_async_open_callback, data); if (0) g_thread_create (cancel_thread, data->c, FALSE, NULL); } @@ -256,7 +256,7 @@ test_seek (void) GError *error; GCancellable *c; - file = g_file_get_for_uri ("test:///etc/passwd"); + file = g_file_new_for_uri ("test:///etc/passwd"); error = NULL; in = (GInputStream *)g_file_read (file, NULL, &error); @@ -521,7 +521,7 @@ test_load_content (void) { GFile *file; - file = g_file_get_for_path ("/etc/passwd"); + file = g_file_new_for_path ("/etc/passwd"); g_file_load_contents_async (file, NULL, get_contents_callback, NULL); @@ -580,7 +580,7 @@ main (int argc, char *argv[]) g_print ("main loop quit\n"); } - file = g_file_get_for_path ("/tmp"); + file = g_file_new_for_path ("/tmp"); if (0) test_sync ("test:///etc/passwd", FALSE); if (1) test_async ("test:///etc/passwd", TRUE); if (0) test_out (); diff --git a/programs/gvfs-cat.c b/programs/gvfs-cat.c index e62c9823..2f0925b1 100644 --- a/programs/gvfs-cat.c +++ b/programs/gvfs-cat.c @@ -95,7 +95,7 @@ main (int argc, char *argv[]) int i; for (i = 1; i < argc; i++) { - file = g_file_get_for_commandline_arg (argv[i]); + file = g_file_new_for_commandline_arg (argv[i]); cat (file); g_object_unref (file); } diff --git a/programs/gvfs-copy.c b/programs/gvfs-copy.c index b6218979..127b5f17 100644 --- a/programs/gvfs-copy.c +++ b/programs/gvfs-copy.c @@ -76,7 +76,7 @@ main (int argc, char *argv[]) return 1; } - dest = g_file_get_for_commandline_arg (argv[argc-1]); + dest = g_file_new_for_commandline_arg (argv[argc-1]); if (no_target_directory && argc > 3) { @@ -96,7 +96,7 @@ main (int argc, char *argv[]) for (i = 1; i < argc - 1; i++) { - source = g_file_get_for_commandline_arg (argv[i]); + source = g_file_new_for_commandline_arg (argv[i]); if (dest_is_dir && !no_target_directory) { diff --git a/programs/gvfs-info.c b/programs/gvfs-info.c index 4e4d3bec..4ed45972 100644 --- a/programs/gvfs-info.c +++ b/programs/gvfs-info.c @@ -313,7 +313,7 @@ main (int argc, char *argv[]) int i; for (i = 1; i < argc; i++) { - file = g_file_get_for_commandline_arg (argv[i]); + file = g_file_new_for_commandline_arg (argv[i]); if (writable) get_writable_info (file); else diff --git a/programs/gvfs-ls.c b/programs/gvfs-ls.c index a943c957..81ac723c 100644 --- a/programs/gvfs-ls.c +++ b/programs/gvfs-ls.c @@ -129,7 +129,7 @@ main (int argc, char *argv[]) int i; for (i = 1; i < argc; i++) { - file = g_file_get_for_commandline_arg (argv[i]); + file = g_file_new_for_commandline_arg (argv[i]); list (file); g_object_unref (file); } @@ -139,7 +139,7 @@ main (int argc, char *argv[]) char *cwd; cwd = g_get_current_dir (); - file = g_file_get_for_path (cwd); + file = g_file_new_for_path (cwd); g_free (cwd); list (file); g_object_unref (file); diff --git a/programs/gvfs-monitor-dir.c b/programs/gvfs-monitor-dir.c index 07455b71..bd624561 100644 --- a/programs/gvfs-monitor-dir.c +++ b/programs/gvfs-monitor-dir.c @@ -65,7 +65,7 @@ main (int argc, char *argv[]) if (argc > 1) { - file = g_file_get_for_commandline_arg (argv[1]); + file = g_file_new_for_commandline_arg (argv[1]); dmonitor = g_file_monitor_directory (file); g_signal_connect (dmonitor, "changed", (GCallback)dir_monitor_callback, NULL); } diff --git a/programs/gvfs-monitor-file.c b/programs/gvfs-monitor-file.c index 27eb3659..f8c538fe 100644 --- a/programs/gvfs-monitor-file.c +++ b/programs/gvfs-monitor-file.c @@ -65,7 +65,7 @@ main (int argc, char *argv[]) if (argc > 1) { - file = g_file_get_for_commandline_arg (argv[1]); + file = g_file_new_for_commandline_arg (argv[1]); fmonitor = g_file_monitor_file (file); g_signal_connect (fmonitor, "changed", (GCallback)file_monitor_callback, NULL); } diff --git a/programs/gvfs-mount.c b/programs/gvfs-mount.c index 693877c8..d3ab6164 100644 --- a/programs/gvfs-mount.c +++ b/programs/gvfs-mount.c @@ -169,7 +169,7 @@ main (int argc, char *argv[]) int i; for (i = 1; i < argc; i++) { - file = g_file_get_for_commandline_arg (argv[i]); + file = g_file_new_for_commandline_arg (argv[i]); mount (file); g_object_unref (file); } diff --git a/programs/gvfs-move.c b/programs/gvfs-move.c index eb21cc3e..8bced962 100644 --- a/programs/gvfs-move.c +++ b/programs/gvfs-move.c @@ -72,7 +72,7 @@ main (int argc, char *argv[]) return 1; } - dest = g_file_get_for_commandline_arg (argv[argc-1]); + dest = g_file_new_for_commandline_arg (argv[argc-1]); if (no_target_directory && argc > 3) { @@ -92,7 +92,7 @@ main (int argc, char *argv[]) for (i = 1; i < argc - 1; i++) { - source = g_file_get_for_commandline_arg (argv[i]); + source = g_file_new_for_commandline_arg (argv[i]); if (dest_is_dir && !no_target_directory) { diff --git a/programs/gvfs-rm.c b/programs/gvfs-rm.c index 02813631..1fb7c14e 100644 --- a/programs/gvfs-rm.c +++ b/programs/gvfs-rm.c @@ -32,7 +32,7 @@ main (int argc, char *argv[]) int i; for (i = 1; i < argc; i++) { - file = g_file_get_for_commandline_arg (argv[i]); + file = g_file_new_for_commandline_arg (argv[i]); error = NULL; if (!g_file_delete (file, NULL, &error)) { diff --git a/programs/gvfs-save.c b/programs/gvfs-save.c index 4fdd4266..1e9f36b0 100644 --- a/programs/gvfs-save.c +++ b/programs/gvfs-save.c @@ -136,7 +136,7 @@ main (int argc, char *argv[]) if (argc > 1) { - file = g_file_get_for_commandline_arg (argv[1]); + file = g_file_new_for_commandline_arg (argv[1]); res = save (file); g_object_unref (file); } diff --git a/programs/gvfs-trash.c b/programs/gvfs-trash.c index d42882c3..60ee2f7c 100644 --- a/programs/gvfs-trash.c +++ b/programs/gvfs-trash.c @@ -32,7 +32,7 @@ main (int argc, char *argv[]) int i; for (i = 1; i < argc; i++) { - file = g_file_get_for_commandline_arg (argv[i]); + file = g_file_new_for_commandline_arg (argv[i]); error = NULL; if (!g_file_trash (file, NULL, &error)) { diff --git a/test/benchmark-gvfs-big-files.c b/test/benchmark-gvfs-big-files.c index 3fcc1fc1..d8cb157a 100644 --- a/test/benchmark-gvfs-big-files.c +++ b/test/benchmark-gvfs-big-files.c @@ -141,7 +141,7 @@ benchmark_run (gint argc, gchar *argv []) return 1; } - base_dir = g_file_get_for_commandline_arg (argv [1]); + base_dir = g_file_new_for_commandline_arg (argv [1]); if (!is_dir (base_dir)) { diff --git a/test/benchmark-gvfs-small-files.c b/test/benchmark-gvfs-small-files.c index f0b0adcd..58e19f8d 100644 --- a/test/benchmark-gvfs-small-files.c +++ b/test/benchmark-gvfs-small-files.c @@ -141,7 +141,7 @@ benchmark_run (gint argc, gchar *argv []) return 1; } - base_dir = g_file_get_for_commandline_arg (argv [1]); + base_dir = g_file_new_for_commandline_arg (argv [1]); if (!is_dir (base_dir)) { |