/***************************************************************************
* Copyright (C) 2004 by umputun *
* esvn@umputun.com *
* *
* 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, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
***************************************************************************/
#include "mainwindow.h"
#include "commitwindow.h"
#include "esvn_utils.h"
C_MainWindow::C_MainWindow(QWidget* parent , const char* name )
: frm_main(parent, name), hide_unknown_(true), show_flat_view_(false), show_changed_items_only_(false)
{
in_timer_now_ = false;
baseCaption_ = QString(caption() + " " + (char*)VERSION).stripWhiteSpace();
setCaption(baseCaption_);
setPopupMenu();
diff_tmp_file_ = "";
//workspace_ = ""; // moved to C_DirPath which should give empty path
for (int i = 0; i < MAX_RECENT_FILES; ++i)
recent_file_ids_[i] = -1;
/* style for non resizable dlgs */
int dlg_Style = WStyle_Customize|WStyle_DialogBorder|WStyle_SysMenu|WStyle_Title|WStyle_ContextHelp;
last_item_ = NULL;
dirs_list_ = new C_DirsList(svn_dir_);
dlg_update_ = new dlg_update(this);
dlg_info_ = new dlg_info(this);
dlg_copy_ = new dlg_copy(this, NULL, TRUE, dlg_Style);
dlg_switch_ = new dlg_switch(this, NULL, TRUE, dlg_Style);
dlg_merge_ = new C_MergeWindow(this);
dlg_diff_setup_ = new C_DiffWindow(this, NULL, TRUE, dlg_Style);
dlg_diff_ = new dlg_diff(this);
dlg_view_ = new dlg_view(this);
dlg_about_ = new dlg_about(this);
dlg_options_ = new dlg_options(this, NULL, TRUE, dlg_Style);
dlg_checkout_ = new dlg_checkout(this, NULL, TRUE, dlg_Style);
dlg_import_ = new dlg_import(this);
dlg_export_ = new dlg_export(this, NULL, TRUE, dlg_Style);
dlg_startup_ = new dlg_startup(this);
dlg_help_ = new dlg_help(this);
dlg_help_->tx_help->mimeSourceFactory()->addFilePath("/usr/share/doc/esvn/html-docs");
dlg_verupdate_ = new dlg_verupdate(this);
dlg_verupdate_->lb_stable_url->hide();
dlg_verupdate_->lb_testing_url->hide();
dlg_verupdate_->lb_browser->hide();
dlg_workspace_ = new C_WsWindow(this);
svn_commands_ = new C_SvnCommands(textBrowser, this);
svn_commands_->setUserPassw(user_, passwd_);
svn_status_ = new C_SvnStatus(svn_commands_);
dlg_commit_ = new C_CommitWindow(svn_status_, this);
dlg_log_ = new C_LogWindow();
dlg_log_->setParams(svn_commands_, dlg_view_, dlg_diff_);
dlg_prop_ = new C_PropWindow(this);
dlg_repos_ = new C_ReposWindow(this);
dlg_repos_->setParams(svn_commands_, dlg_view_, dlg_checkout_);
dlg_diff_setup_->setParams(svn_commands_, dlg_view_);
dlg_merge_->setParams(svn_commands_, dlg_view_);
dlg_changed_ = new C_ChangedWindow(this);
dlg_changed_->setParams(svn_commands_, dlg_view_, dlg_diff_);
refresh_timer_ = new QTimer(this);
connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(onTimer()) );
connect(&http_, SIGNAL(done(bool)), this, SLOT(httpDone(bool)) );
//selected_path_ = ""; // now C_DirPath which is cleaned
list_stat_ = new C_LSParser(C_LSParser::LSP_STATUS, svn_commands_, list_dirs);
list_dirs->header()->hide();
list_files->setColumnAlignment(2, Qt::AlignRight);
list_files->setColumnAlignment(3, Qt::AlignRight);
list_files->setColumnAlignment(4, Qt::AlignRight);
list_files->setColumnAlignment(5, Qt::AlignRight);
list_files->setColumnAlignment(6, Qt::AlignHCenter);
list_files->setColumnAlignment(7, Qt::AlignHCenter);
list_files->setColumnWidthMode(0, QListView::Manual);
list_files->setColumnWidthMode(1, QListView::Manual);
list_files->setColumnWidthMode(2, QListView::Manual);
list_files->setColumnWidthMode(3, QListView::Manual);
list_files->setColumnWidthMode(4, QListView::Manual);
list_files->setColumnWidthMode(5, QListView::Manual);
list_files->setColumnWidthMode(6, QListView::Manual);
list_files->setColumnWidthMode(7, QListView::Manual);
C_Options::instance()->setDlg(dlg_options_);
dir_refresh_disable_ = true;
auto_refresh_disable_ = false;
refresh_timer_->start(1000);
}
C_MainWindow::~C_MainWindow() {
}
void C_MainWindow::setPopupMenu() {
mnu_popup_ = new QPopupMenu;
mnu_popup_->insertItem(QPixmap::fromMimeSource("update_16x16.xpm"), "Update ",this,
SLOT(modifyUpdateAction_activated()));
mnu_popup_->insertItem(QPixmap::fromMimeSource("update_16x16.xpm"), "Update revision ...",this,
SLOT(modifyUpdate_revision_Action_activated()));
mnu_popup_->insertItem(QPixmap::fromMimeSource("commit_16x16.xpm"), "Commit ...",this,
SLOT(modifyCommitAction_activated()));
mnu_popup_->insertSeparator();
mnu_popup_->insertItem(QPixmap::fromMimeSource("edit.png"), "Edit", this,
SLOT(modifyEditAction_activated()));
mnu_popup_->insertItem(QPixmap::fromMimeSource("kdar.png"), "Properties ...", this,
SLOT(queryProperties_activated()));
mnu_popup_->insertItem(QPixmap::fromMimeSource("module_add_16x16.xpm"),"Add", this,
SLOT(modifyAddAction_activated()));
mnu_popup_->insertItem(QPixmap::fromMimeSource("Delete16x16.xpm"),"Delete", this,
SLOT(modifyDeleteAction_activated()));
mnu_popup_->insertItem(QPixmap::fromMimeSource("revert.png"),"Revert", this,
SLOT(modifyRevertAction_activated()));
mnu_popup_->insertSeparator();
mnu_popup_->insertItem(QPixmap::fromMimeSource("ktip.png"), "Quick Diff", this,
SLOT(queryQuick_DiffAction_activated()));
mnu_popup_->insertItem(QPixmap::fromMimeSource("services.png"), "Diff ...", this,
SLOT(queryDiffAction_activated()));
mnu_popup_->insertSeparator();
mnu_popup_->insertItem(QPixmap::fromMimeSource("merge_16x16.xpm"), "Merge ...", this,
SLOT(modifyMegreAction_activated()));
mnu_popup_->insertItem(QPixmap::fromMimeSource("backimage.png"),"Switch ...", this,
SLOT(modifySwitchAction_activated()));
mnu_popup_->insertSeparator();
mnu_popup_->insertItem(QPixmap::fromMimeSource("cvs_annotate_16x16.xpm"), "Info", this,
SLOT(queryInfoAction_activated()));
mnu_popup_->insertItem(QPixmap::fromMimeSource("LogTree16x16.xpm"), "Log", this,
SLOT(queryLogAction_activated()));
}
void C_MainWindow::loadWorkspace(const C_DirPath& path, QString name, bool append)
{
if (path.FullPath().isEmpty() && workspace_.FullPath().isEmpty()) {
workspace_ = QDir::homeDirPath();
if (dlg_startup_->exec() == QDialog::Accepted ) {
if (dlg_startup_->rb_open_ws->isChecked()) {
fileOpen_workspaceAction_activated();
return;
}
if (dlg_startup_->rb_checkout->isChecked()) {
fileCheckoutAction_activated();
return;
}
if (dlg_startup_->rb_import->isChecked()) {
fileImport_Action_activated();
return;
}
}
}
if (path.FullPath().isEmpty() || !QDir(path.FullPath()).exists()) {
QMessageBox::information(this, "Open failed", "Workspace/directory does not exist");
return;
}
QDir old_workspace_dir(workspace_.FullPath());
workspace_ = path;
// selected_path_ = path; // now dynamic-cast selected dir item to C_DirPath and use the result
if (name == "noname") {
//int pos = workspace_.findRev('/');
if (workspace_.Name().isEmpty()) {
name = workspace_.Path();
} el
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
SVN在Linux下的GUI图形化客户端 (533个子文件)
AUTHORS 219B
ChangeLog 14KB
COPYING 18KB
mainwindow.cpp 69KB
dirs_list.cpp 18KB
entries_parser.cpp 17KB
check_lbi.cpp 7KB
esvn-diff-wrapper.cpp 7KB
commitwindow.cpp 7KB
reposwindow.cpp 7KB
list_stat_parser.cpp 5KB
svn_status.cpp 3KB
svn_commands.cpp 3KB
esvn.cpp 2KB
cmd_lineedit.cpp 2KB
options.cpp 1KB
diffwindow.cpp 1KB
corpstyle.css 3KB
corpstyle.css 3KB
eSvn.desktop 235B
global.ent 4KB
esvn-big.gif 3KB
esvn-big.gif 3KB
esvn-big.gif 3KB
home.gif 1KB
home.gif 1KB
next.gif 336B
prev.gif 336B
next.gif 336B
prev.gif 336B
up.gif 332B
up.gif 332B
svn_commands.h 24KB
logwindow.h 11KB
mainwindow.h 9KB
changedwindow.h 6KB
dirs_list.h 5KB
propwindow.h 5KB
frm_main.ui.h 5KB
entries_parser.h 4KB
workspacewindow.h 4KB
reposwindow.h 4KB
mergewindow.h 3KB
dlg_options.ui.h 3KB
esvn_utils.h 3KB
check_lbi.h 3KB
list_stat_parser.h 3KB
dlg_switch.ui.h 2KB
esvn-diff-wrapper.h 2KB
dlg_url.ui.h 2KB
diffwindow.h 2KB
options.h 2KB
commitwindow.h 2KB
dlg_merge.ui.h 2KB
svn_status.h 2KB
dlg_commit.ui.h 2KB
dlg_diff_setup.ui.h 2KB
dlg_copy.ui.h 2KB
cmd_lineedit.h 1KB
url_wizard.h 1KB
dlg_ws_edit.ui.h 1KB
dlg_verupdate.ui.h 1KB
dlg_log.ui.h 1KB
dlg_repository.ui.h 1KB
dlg_workspace.ui.h 1KB
dlg_map_edit.ui.h 866B
dlg_checkout.ui.h 845B
dlg_import.ui.h 840B
dlg_view.ui.h 776B
dlg_prop.ui.h 773B
dlg_mapping.ui.h 625B
ui_frm_main.h 0B
ch02s02.html 50KB
pr01s02.html 24KB
ch03s07.html 19KB
index.html 15KB
faq.html 14KB
ch03s18.html 12KB
ch02.html 11KB
ch03s02.html 11KB
ch03s28.html 10KB
apa.html 10KB
ch03s26.html 10KB
apb.html 9KB
ch03s03.html 9KB
ch03s19.html 9KB
ch03s24.html 8KB
ch03s06.html 8KB
ch03s30.html 8KB
ch03s16.html 8KB
ch03.html 8KB
ch03s25.html 8KB
ch03s15.html 8KB
ch03s17.html 8KB
ch03s05.html 7KB
ch03s10.html 7KB
apbs06.html 7KB
pr01.html 6KB
ch03s32.html 6KB
ch01.html 6KB
共 533 条
- 1
- 2
- 3
- 4
- 5
- 6
jacklee_6297
- 粉丝: 13
- 资源: 29
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 1040g0cg310ravpiu6ibg5pg00tsipsln3ju2d0g 2
- 基于Python的SAR图像去噪CNN-NLM设计源码
- redhat6升级到redhat7,过程redhat6.x-> redhat6.10->rehat7.9 主版本最高版本
- 基于Django的流程引擎设计源码
- 基于Node.js的Express框架与MySQL的后台管理系统设计源码
- 基于Java的Flink流批一体数据处理快速集成开发框架设计源码
- FirstFilterOrderCompare
- Screenshot_2024-03-28-19-17-25-020_com.ss.android.lark.jpg
- 基于Java的车辆违章信息查询系统设计源码
- wqeAFSDADWDAESD
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论7