Skip to content

Instantly share code, notes, and snippets.

View onlyshk's full-sized avatar

Kuleshov Alexander onlyshk

View GitHub Profile
/*
* pref.h
*
* Copyright (C) 2007 PCMan <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
GFileEnumerator* enumerator;
enumerator = g_file_enumerate_children(mw->loading_file,G_FILE_ATTRIBUTE_STANDARD_NAME,
G_FILE_QUERY_INFO_NONE,mw->generator_cancellable, NULL);
gboolean image_list_open_dir( ImageList* il, const char* path,
GCancellable* generator_cancellable, GError** error )
{
const char* name = NULL;
const char* file_path = NULL;
struct stat stbuf;
if( il->dir_path && 0 == strcmp( path, il->dir_path ) )
return TRUE;
gboolean image_list_open_dir( ImageList* il, const char* path,
GCancellable* generator_cancellable, GError** error )
{
const char* name = NULL;
struct stat stbuf;
if( il->dir_path && 0 == strcmp( path, il->dir_path ) )
return TRUE;
image_list_close( il );
gboolean image_list_open_dir( ImageList* il, const char* path,
GCancellable* generator_cancellable, GError** error )
{
const char* name = NULL;
struct stat stbuf;
if( il->dir_path && 0 == strcmp( path, il->dir_path ) )
return TRUE;
image_list_close( il );
/***************************************************************************
* Copyright (C) 2007, 2008 by PCMan (Hong Jen Yee) *
* [email protected] *
* 2010 Kuleshov Alexander <[email protected]> *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
/***************************************************************************
* Copyright (C) 2007, 2008 by PCMan (Hong Jen Yee) *
* [email protected] *
* 2010 Kuleshov Alexander <[email protected]> *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
GFile* file = g_file_new_for_path (image_list_get_current_file_path (mw->img_list));
mw->monitor = g_file_monitor_directory(NULL,G_FILE_MONITOR_NONE,NULL,NULL);
g_signal_connect (mw->monitor, "changed", G_CALLBACK (directory_monitor_changed), mw);
g_object_unref (file);
gboolean set_thumbnails(MainWin* mw)
{
GtkTreeIter* iter;
GdkPixbuf* pixbuf;
gtk_list_store_clear(mw->model);
gtk_icon_view_set_model(mw->view,GTK_TREE_MODEL(mw->model));
int i = 0;
int c = 0;
int i = atoi(gtk_tree_path_to_string(elements->data));
const char* del_path = g_list_nth_data(thumbnail_loaded_list, i);
GFile* file = g_file_new_for_path (del_path);
const char* a = g_file_get_basename(file);
image_list_set_current (mw->img_list,a);