⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filestab.cc

📁 About: Paco (pacKAGE oRGANIZER) is a simple, yet powerful tool to aid package management when insta
💻 CC
字号:
//=======================================================================// FilesTab.cc//-----------------------------------------------------------------------// This file is part of the package paco// Copyright (C) 2004-2007 David Rosal <david.3r@gmail.com>// For more information visit http://paco.sourceforge.net//=======================================================================#include "config.h"#include "globals.h"#include "Lock.h"#include "FilesTab.h"#include "Pkg.h"#include <gtkmm/buttonbox.h>#include <gtkmm/scrolledwindow.h>#include <gtkmm/separator.h>#include <gtkmm/tooltips.h>using sigc::mem_fun;using Glib::ustring;using namespace Gpaco;FilesTab::FilesTab(Pkg& pkg):	Gtk::VBox(),	mPkg(pkg),	mLabel("", 0.02, 0.5),	mProgressBar(),	mTreeView(pkg),	mButtonInst("View _installed", true),	mButtonMiss("View _missing", true){	mButtonMiss.set_active(mPkg.listFilesMiss());	mButtonMiss.signal_toggled().connect(mem_fun(*this,		&FilesTab::onSwitchMissing));	gpTips->set_tip(mButtonMiss,		"List the missing files (those files installed by the package "		"but removed afterwards)");	mButtonInst.set_active(mPkg.listFilesInst());	mButtonInst.signal_toggled().connect(mem_fun(*this,		&FilesTab::onSwitchInstalled));	gpTips->set_tip(mButtonInst, "List the currently installed files");	Gtk::HButtonBox* pHButtonBox(Gtk::manage		(new Gtk::HButtonBox(Gtk::BUTTONBOX_START, 8)));	pHButtonBox->set_border_width(2);	pHButtonBox->pack_start(mButtonInst);	pHButtonBox->pack_start(mButtonMiss);	Gtk::ScrolledWindow* pScrolledWindow(Gtk::manage(new Gtk::ScrolledWindow()));	pScrolledWindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);	pScrolledWindow->add(mTreeView);	Gtk::HBox* pHBox(Gtk::manage(new Gtk::HBox())); 	pHBox->pack_start(mLabel, Gtk::PACK_SHRINK, 8);	pHBox->pack_end(mProgressBar, Gtk::PACK_SHRINK);	mProgressBar.set_size_request(-1, 0);	pack_start(*pHButtonBox, Gtk::PACK_SHRINK);	pack_start(*pScrolledWindow);	pack_start(*(Gtk::manage(new Gtk::HSeparator)), Gtk::PACK_SHRINK, 1);	pack_start(*pHBox, Gtk::PACK_SHRINK);	checkLock();	Glib::signal_timeout().connect(mem_fun(*this, &FilesTab::checkLock), 500,		Glib::PRIORITY_HIGH);		show_all();	mProgressBar.hide();}FilesTab::~FilesTab(){ }void FilesTab::setLabelText(ustring const& text){	mLabel.set_text(text);}//---------//// private ////---------//bool FilesTab::checkLock(){	Lock::setLock(mButtonInst);	Lock::setLock(mButtonMiss);	return true;}void FilesTab::onSwitchInstalled(){	mPkg.switchListFilesInst();	if (mPkg.filesInst())		mTreeView.resetModel();}void FilesTab::onSwitchMissing(){	mPkg.switchListFilesMiss();	if (mPkg.filesMiss())		mTreeView.resetModel();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -