Skip to content

Instantly share code, notes, and snippets.

View onlyshk's full-sized avatar

Kuleshov Alexander onlyshk

View GitHub Profile
gboolean image_list_open_dir( ImageList* il, const char* path,
GCancellable* generator_cancellable, GError** error )
{
const char* name = NULL;
if( il->dir_path && 0 == strcmp( path, il->dir_path ) )
return TRUE;
image_list_close( il );
GList* elements = gtk_icon_view_get_selected_items (mw->view);
int i = atoi(gtk_tree_path_to_string(elements->data));
const char* del_path = g_list_nth_data(thumbnail_path_list, i);
GtkTreeIter iter;
GtkTreePath* path = g_list_nth_data(elements,0);
gtk_tree_model_get_iter((GtkTreeModel*)mw->model, &iter, path);
gtk_list_store_remove(mw->model, &iter);
libXdamage-devel
//* BSDL license
//* Copyright (c) Kuleshov Alexander <2010, <[email protected]>
//*
//* Ра[email protected]:onlyshk/[email protected]:onlyshk/reversi.gitзрешается повторное распространение и использование как в виде исходника так и в
//* двоичной форме, с изменениями или без, при соблюдении следующих условий:
//*
//* ЭТА ПРОГРАММА ПРЕДОСТАВЛЕНА БЕСПЛАТНО ВЛАДЕЛЬЦАМИ АВТОРСКИХ ПРАВ И/ИЛИ ДРУГИМИ СТОРОНАМИ
//* "КАК ОНА ЕСТЬ" БЕЗ КАКОГО-ЛИБО ВИДА ГАРАНТИЙ, ВЫРАЖЕННЫХ ЯВНО ИЛИ ПОДРАЗУМЕВАЕМЫХ,
//* ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ИМИ, ПОДРАЗУМЕВАЕМЫЕ ГАРАНТИИ КОММЕРЧЕСКОЙ ЦЕННОСТИ И
//* ПРИГОДНОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ. НИ В КОЕМ СЛУЧАЕ, ЕСЛИ НЕ ТРЕБУЕТСЯ СООТВЕТСТВУЮЩИМ
int x = 0;
int y = 0;
int w = 40;
int h = 40;
for (int i = 0; i < 8; i++)
{
for (int j = 0; j < 8; j++)
{
painter.drawRect(x,y,w,h);
//*******************************
// Calculating what rect we click
// cout << (int)(e->x() / 40);
// cout << (int)(e->y() / 40);
//*******************************
i = 0;
j = 0;
QPainter painter_elipse(this);
painter_elipse.setPen(QPen(Qt::black));
painter_elipse.setBrush(QBrush(Qt::white));
//
// white
//
@onlyshk
onlyshk / Wordpress syntax hightlighting
Created October 28, 2010 14:34
Wordpress syntax hightlighting
[sourcecode language="css"]
your code here
[/sourcecode]
@onlyshk
onlyshk / makefile
Created October 31, 2010 12:46
try make minimacs
[shk@myhost Minimacs]$ make
cc -o mm -Wall -Os -pedantic -std=c99 -lcurses autoexec.c basic.c buffer.c cinfo.c dir.c dired.c display.c echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c line.c macro.c main.c match.c modes.c paragraph.c random.c re_search.c region.c search.c spawn.c tty.c ttyio.c ttykbd.c undo.c window.c word.c yank.c grep.c util.c messages.c strtonum.c user-messages.c
In file included from def.h:12:0,
from autoexec.c:5:
sysdef.h:29:18: error: field ‘mtime’ has incomplete type
autoexec.c: In function ‘add_autoexec’:
autoexec.c:20:2: warning: implicit declaration of function ‘strdup’
autoexec.c:20:11: warning: assignment makes pointer from integer without a cast
In file included from def.h:12:0,
from basic.c:14:
if (field[x][y] != field[x + 1][y] && fields[x+1][y].checked)