char * nautilus_get_templates_directory_uri (void) { char *directory, *uri; directory = nautilus_get_templates_directory (); uri = g_filename_to_uri (directory, NULL, NULL); g_free (directory); return uri; }
void nautilus_create_templates_directory (void) { char *dir; dir = nautilus_get_templates_directory (); if (!g_file_test (dir, G_FILE_TEST_EXISTS)) { g_mkdir (dir, DEFAULT_NAUTILUS_DIRECTORY_MODE); } g_free (dir); }
static void action_go_to_templates_callback (GtkAction *action, gpointer user_data) { char *path; GFile *location; path = nautilus_get_templates_directory (); location = g_file_new_for_path (path); g_free (path); nautilus_window_go_to (NAUTILUS_WINDOW (user_data), location); g_object_unref (location); }
static void action_go_to_templates_callback (GtkAction *action, gpointer user_data) { NautilusWindow *window; NautilusWindowSlot *slot; char *path; GFile *location; window = NAUTILUS_WINDOW (user_data); slot = nautilus_window_get_active_slot (window); path = nautilus_get_templates_directory (); location = g_file_new_for_path (path); g_free (path); nautilus_window_slot_open_location (slot, location, nautilus_event_get_window_open_flags ()); g_object_unref (location); }