Exemplo n.º 1
0
char *
caja_get_templates_directory_uri (void)
{
    char *directory, *uri;

    directory = caja_get_templates_directory ();
    uri = g_filename_to_uri (directory, NULL, NULL);
    g_free (directory);
    return uri;
}
Exemplo n.º 2
0
void
caja_create_templates_directory (void)
{
    char *dir;

    dir = caja_get_templates_directory ();
    if (!g_file_test (dir, G_FILE_TEST_EXISTS))
    {
        g_mkdir (dir, DEFAULT_CAJA_DIRECTORY_MODE);
    }
    g_free (dir);
}
Exemplo n.º 3
0
static void
action_go_to_templates_callback (GtkAction *action,
                                 gpointer user_data)
{
    CajaWindow *window;
    CajaWindowSlot *slot;
    char *path;
    GFile *location;

    window = CAJA_WINDOW (user_data);
    slot = caja_window_get_active_slot (window);

    path = caja_get_templates_directory ();
    location = g_file_new_for_path (path);
    g_free (path);
    caja_window_slot_go_to (slot,
                            location,
                            should_open_in_new_tab ());
    g_object_unref (location);
}