Directory::Directory(Core *c, QString p_uri) : Core_ally(c), uri(p_uri) { connect(this, SIGNAL(watch(QString)), core->get_directory_watcher(), SLOT(add(QString))); connect(this, SIGNAL(unwatch(QString)), core->get_directory_watcher(), SLOT(remove(QString))); connect(core->get_directory_watcher(), SIGNAL(directory_changed(QString)), this, SLOT(directory_changed(QString))); async_result_type = async_result_unexpected; gcancellable = 0; need_update = false; watcher_created = false; uri = canonize(uri); Special_uri special_uri(uri); if (special_uri.name() == Special_uri::places) { connect(core->get_mount_manager(), SIGNAL(mounts_changed(QList<Gio_mount>)), this, SLOT(refresh())); connect(core->get_bookmarks(), SIGNAL(changed()), this, SLOT(refresh())); connect(core->get_user_dirs(), SIGNAL(changed()), this, SLOT(refresh())); } QTimer* t = new QTimer(this); connect(t, SIGNAL(timeout()), this, SLOT(refresh_timeout())); t->start(watcher_refresh_timeout); refresh_timer.restart(); }
static void clickButton(int b) { if (!blackout) { if (menu) { change_set(b, false); return; } if (size > 3) { size /= 3; if (b == TOP) end -= 2*size; else if (b == MID) { top += size; end -= size; } else if (b == BOT) top += 2*size; } else { text_buffer[pos++] = master[top+b]; if(pos==DESCRIPTION_LENGTH) --pos; drawNotepadText(); change_set(cur_set, false); next(); } drawSides(); } refresh_timeout(); }