Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
59 KB
Referenced Files
None
Subscribers
None
diff --git a/src/MainWindow.ui b/src/MainWindow.ui
index 34b5cd7..b5494df 100644
--- a/src/MainWindow.ui
+++ b/src/MainWindow.ui
@@ -1,1701 +1,1702 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>848</width>
<height>596</height>
</rect>
</property>
<property name="windowTitle">
<string>Guitar</string>
</property>
<property name="animated">
<bool>false</bool>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout_8">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="frame_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>56</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>56</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="MyToolButton" name="toolButton_clone">
<property name="minimumSize">
<size>
<width>64</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>48</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Clone</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/clone.svg</normaloff>:/image/clone.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="MyToolButton" name="toolButton_fetch">
<property name="minimumSize">
<size>
<width>64</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>48</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Fetch</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/fetch.svg</normaloff>:/image/fetch.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="MyToolButton" name="toolButton_pull">
<property name="minimumSize">
<size>
<width>64</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>48</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Pull</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/pull.svg</normaloff>:/image/pull.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="MyToolButton" name="toolButton_push">
<property name="minimumSize">
<size>
<width>64</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>48</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Push</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/push.svg</normaloff>:/image/push.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>8</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="MyToolButton" name="toolButton_status">
<property name="minimumSize">
<size>
<width>64</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>48</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Status</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/status.svg</normaloff>:/image/status.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>8</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="MyToolButton" name="toolButton_terminal">
<property name="minimumSize">
<size>
<width>64</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>48</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Terminal</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/terminal.svg</normaloff>:/image/terminal.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="MyToolButton" name="toolButton_explorer">
<property name="minimumSize">
<size>
<width>64</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>48</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Explorer</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/explorer.svg</normaloff>:/image/explorer.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>8</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>503</width>
<height>48</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="RepositoryInfoFrame" name="frame_3">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>48</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QLabel" name="label_repo_name">
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Repository</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_branch_name">
<property name="text">
<string>Branch Name</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>4</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
<number>4</number>
</property>
<item>
<widget class="QRadioButton" name="radioButton_remote_online">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Online</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_remote_offline">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Offline</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="ReadOnlyLineEdit" name="lineEdit_remote">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QSplitter" name="splitter_v">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="childrenCollapsible">
<bool>false</bool>
</property>
<widget class="QStackedWidget" name="stackedWidget_leftpanel">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page_repos">
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="RepositoriesTreeWidget" name="treeWidget_repos">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="acceptDrops">
<bool>true</bool>
</property>
<property name="editTriggers">
<set>QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
</property>
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::InternalMove</enum>
</property>
<property name="defaultDropAction">
<enum>Qt::MoveAction</enum>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_5">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="lineEdit_filter">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
</widget>
</item>
<item>
<widget class="ClearButton" name="toolButton_erase_filter">
<property name="minimumSize">
<size>
<width>22</width>
<height>17</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>15</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_collapsed">
<layout class="QVBoxLayout" name="verticalLayout_9">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="toolButton">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="widget" native="true"/>
</item>
</layout>
</widget>
</widget>
<widget class="QSplitter" name="splitter_h">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="childrenCollapsible">
<bool>false</bool>
</property>
<widget class="LogTableWidget" name="tableWidget_log">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="horizontalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
<widget class="QStackedWidget" name="stackedWidget_filelist">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page_uncommited">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,1">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="FilesListWidget" name="listWidget_unstaged">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout" columnstretch="1,1">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>3</number>
</property>
<item row="2" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="MyToolButton" name="toolButton_unstage">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="text">
<string>Unstage</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/unstage.svg</normaloff>:/image/unstage.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="MyToolButton" name="toolButton_select_all">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="text">
<string>Select all</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/selall.svg</normaloff>:/image/selall.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>18</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="MyToolButton" name="toolButton_stage">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="text">
<string>Stage</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/stage.svg</normaloff>:/image/stage.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="MyToolButton" name="toolButton_commit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="text">
<string>Commit</string>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/commit.svg</normaloff>:/image/commit.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="FilesListWidget" name="listWidget_staged">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_files">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="FilesListWidget" name="listWidget_files">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QFrame" name="frame_6">
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="FileDiffWidget" name="widget_diff_view" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>100</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>848</width>
- <height>22</height>
+ <height>18</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
<property name="title">
<string>&amp;File</string>
</property>
<addaction name="action_open_existing_working_copy"/>
<addaction name="action_create_a_repository"/>
<addaction name="separator"/>
<addaction name="action_stop_process"/>
<addaction name="separator"/>
<addaction name="action_exit"/>
</widget>
<widget class="QMenu" name="menu_View">
<property name="title">
<string>&amp;View</string>
</property>
<addaction name="action_view_refresh"/>
</widget>
<widget class="QMenu" name="menu_Edit">
<property name="title">
<string>&amp;Edit</string>
</property>
<addaction name="action_edit_gitignore"/>
<addaction name="action_edit_git_config"/>
<addaction name="action_edit_global_gitconfig"/>
<addaction name="action_set_config_user"/>
<addaction name="action_set_gpg_signing"/>
<addaction name="separator"/>
<addaction name="action_find"/>
<addaction name="action_find_next"/>
<addaction name="separator"/>
<addaction name="action_edit_settings"/>
</widget>
<widget class="QMenu" name="menu_Help">
<property name="title">
<string>&amp;Help</string>
</property>
<addaction name="action_about"/>
</widget>
<widget class="QMenu" name="menu_Window">
<property name="title">
<string>&amp;Window</string>
</property>
<addaction name="action_window_log"/>
</widget>
<widget class="QMenu" name="menu_Repository">
<property name="title">
<string>&amp;Repository</string>
</property>
<widget class="QMenu" name="menuStash">
<property name="title">
<string>Stash</string>
</property>
<addaction name="action_stash"/>
<addaction name="action_stash_apply"/>
+ <addaction name="separator"/>
<addaction name="action_stash_drop"/>
</widget>
<addaction name="action_repository_status"/>
<addaction name="action_commit"/>
<addaction name="separator"/>
<addaction name="action_repo_jump"/>
<addaction name="action_repo_jump_to_head"/>
<addaction name="action_repo_checkout"/>
<addaction name="menuStash"/>
<addaction name="action_delete_branch"/>
<addaction name="action_delete_remote_branch"/>
<addaction name="action_edit_tags"/>
<addaction name="action_reflog"/>
<addaction name="separator"/>
<addaction name="action_terminal"/>
<addaction name="action_explorer"/>
<addaction name="separator"/>
<addaction name="action_repository_property"/>
</widget>
<widget class="QMenu" name="menuRe_mote">
<property name="title">
<string>Re&amp;mote</string>
</property>
<addaction name="action_fetch"/>
<addaction name="action_pull"/>
<addaction name="action_push"/>
<addaction name="action_push_u"/>
<addaction name="action_push_all_tags"/>
<addaction name="action_fetch_tags_f"/>
<addaction name="separator"/>
<addaction name="action_clone"/>
<addaction name="separator"/>
<addaction name="action_online"/>
<addaction name="action_offline"/>
</widget>
<widget class="QMenu" name="menuDestructive_3">
<property name="title">
<string>&amp;Destructive</string>
</property>
<addaction name="action_reset_HEAD_1"/>
<addaction name="separator"/>
<addaction name="action_reset_hard"/>
<addaction name="separator"/>
<addaction name="action_fetch_prune"/>
<addaction name="separator"/>
<addaction name="action_clean_df"/>
</widget>
<addaction name="menu_File"/>
<addaction name="menu_View"/>
<addaction name="menu_Edit"/>
<addaction name="menu_Repository"/>
<addaction name="menuRe_mote"/>
<addaction name="menuDestructive_3"/>
<addaction name="menu_Window"/>
<addaction name="menu_Help"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<widget class="QDockWidget" name="dockWidget_log">
<property name="floating">
<bool>false</bool>
</property>
<property name="features">
<set>QDockWidget::DockWidgetFeatureMask</set>
</property>
<property name="allowedAreas">
<set>Qt::BottomDockWidgetArea|Qt::TopDockWidgetArea</set>
</property>
<property name="windowTitle">
<string>Log</string>
</property>
<attribute name="dockWidgetArea">
<number>8</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="frame_8">
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin">
<number>1</number>
</property>
<property name="topMargin">
<number>1</number>
</property>
<property name="rightMargin">
<number>1</number>
</property>
<property name="bottomMargin">
<number>1</number>
</property>
<item>
<widget class="QToolButton" name="toolButton_stop_process">
<property name="minimumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/redsquare.svg</normaloff>:/image/redsquare.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>12</width>
<height>12</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>45</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="1">
<widget class="QScrollBar" name="verticalScrollBar_log">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="TextEditorWidget" name="widget_log" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QScrollBar" name="horizontalScrollBar_log">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
<action name="action_open_existing_working_copy">
<property name="text">
<string>&amp;Open existing working copy...</string>
</property>
<property name="toolTip">
<string>Add existing working copy</string>
</property>
</action>
<action name="action_view_refresh">
<property name="text">
<string>Refresh</string>
</property>
<property name="toolTip">
<string>Refresh</string>
</property>
<property name="shortcut">
<string>F5</string>
</property>
</action>
<action name="action_commit">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/commit.svg</normaloff>:/image/commit.svg</iconset>
</property>
<property name="text">
<string>&amp;Commit</string>
</property>
</action>
<action name="action_push">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/push.svg</normaloff>:/image/push.svg</iconset>
</property>
<property name="text">
<string>&amp;Push</string>
</property>
<property name="autoRepeat">
<bool>false</bool>
</property>
</action>
<action name="action_test">
<property name="text">
<string>test</string>
</property>
<property name="shortcut">
<string>Ctrl+T</string>
</property>
</action>
<action name="action_pull">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/pull.svg</normaloff>:/image/pull.svg</iconset>
</property>
<property name="text">
<string>Pu&amp;ll</string>
</property>
</action>
<action name="action_fetch">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/fetch.svg</normaloff>:/image/fetch.svg</iconset>
</property>
<property name="text">
<string>&amp;Fetch</string>
</property>
</action>
<action name="action_edit_global_gitconfig">
<property name="text">
<string>Edit global .gitconfig</string>
</property>
<property name="toolTip">
<string>Edit global .gitconfig</string>
</property>
</action>
<action name="action_edit_git_config">
<property name="text">
<string>Edit .git/config</string>
</property>
</action>
<action name="action_edit_gitignore">
<property name="text">
<string>Edit .gitignore</string>
</property>
</action>
<action name="action_edit_settings">
<property name="text">
<string>&amp;Settings...</string>
</property>
<property name="toolTip">
<string>Settings</string>
</property>
</action>
<action name="action_clone">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/clone.svg</normaloff>:/image/clone.svg</iconset>
</property>
<property name="text">
<string>Clone</string>
</property>
<property name="toolTip">
<string>Clone</string>
</property>
</action>
<action name="action_about">
<property name="text">
<string>&amp;About</string>
</property>
</action>
<action name="action_edit_tags">
<property name="text">
<string>Edit tags...</string>
</property>
<property name="toolTip">
<string>Edit tags</string>
</property>
</action>
<action name="action_push_all_tags">
<property name="text">
<string>Push all tags</string>
</property>
</action>
<action name="action_set_config_user">
<property name="text">
<string>Set config user</string>
</property>
</action>
<action name="action_window_log">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>&amp;Log</string>
</property>
</action>
<action name="action_repo_jump">
<property name="text">
<string>&amp;Jump...</string>
</property>
<property name="shortcut">
<string>Ctrl+J</string>
</property>
</action>
<action name="action_repo_checkout">
<property name="text">
<string>Check&amp;out...</string>
</property>
</action>
<action name="action_delete_branch">
<property name="text">
<string>Delete branch...</string>
</property>
</action>
<action name="action_push_u">
<property name="text">
<string>Push upstream</string>
</property>
</action>
<action name="action_reset_HEAD_1">
<property name="text">
<string>Reset HEAD~1</string>
</property>
<property name="toolTip">
<string>Reset HEAD~1</string>
</property>
</action>
<action name="action_create_a_repository">
<property name="text">
<string>Create a repository</string>
</property>
</action>
<action name="action_stop_process">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/redsquare.svg</normaloff>:/image/redsquare.svg</iconset>
</property>
<property name="text">
<string>Stop process</string>
</property>
</action>
<action name="action_exit">
<property name="text">
<string>E&amp;xit</string>
</property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
</action>
<action name="action_reflog">
<property name="text">
<string>Reflog...</string>
</property>
</action>
<action name="action_repository_property">
<property name="text">
<string>Property...</string>
</property>
</action>
<action name="action_set_gpg_signing">
<property name="text">
<string>Set GPG signing</string>
</property>
<property name="toolTip">
<string>Set GPG signing</string>
</property>
</action>
<action name="action_delete_remote_branch">
<property name="text">
<string>Delete remote branch...</string>
</property>
</action>
<action name="action_fetch_prune">
<property name="text">
<string>Fetch --prune</string>
</property>
</action>
<action name="action_terminal">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/terminal.svg</normaloff>:/image/terminal.svg</iconset>
</property>
<property name="text">
<string>Terminal</string>
</property>
</action>
<action name="action_explorer">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/explorer.svg</normaloff>:/image/explorer.svg</iconset>
</property>
<property name="text">
<string>Explorer</string>
</property>
</action>
<action name="action_clean_df">
<property name="text">
<string>Clean -df</string>
</property>
</action>
<action name="action_reset_hard">
<property name="text">
<string>Reset --hard</string>
</property>
</action>
<action name="action_stash">
<property name="text">
<string>Stash</string>
</property>
</action>
<action name="action_stash_apply">
<property name="text">
<string>Apply</string>
</property>
</action>
<action name="action_stash_drop">
<property name="text">
<string>Drop</string>
</property>
</action>
<action name="action_online">
<property name="text">
<string>Online</string>
</property>
</action>
<action name="action_offline">
<property name="text">
<string>Offline</string>
</property>
</action>
<action name="action_repositories_panel">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Repositories panel</string>
</property>
<property name="shortcut">
<string>Ctrl+R</string>
</property>
</action>
<action name="action_find">
<property name="text">
<string>&amp;Find...</string>
</property>
<property name="shortcut">
<string>Ctrl+F</string>
</property>
</action>
<action name="action_find_next">
<property name="text">
<string>Find next</string>
</property>
<property name="shortcut">
<string>F3</string>
</property>
</action>
<action name="action_repository_status">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/image/status.svg</normaloff>:/image/status.svg</iconset>
</property>
<property name="text">
<string>Status</string>
</property>
</action>
<action name="action_repo_jump_to_head">
<property name="text">
<string>Jump to &amp;HEAD</string>
</property>
<property name="shortcut">
<string>Ctrl+H</string>
</property>
</action>
<action name="action_fetch_tags_f">
<property name="text">
<string>Fetch tags -f</string>
</property>
<property name="toolTip">
<string>Fetch tags -f</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>FileDiffWidget</class>
<extends>QWidget</extends>
<header>FileDiffWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ReadOnlyLineEdit</class>
<extends>QLineEdit</extends>
<header>ReadOnlyLineEdit.h</header>
</customwidget>
<customwidget>
<class>TextEditorWidget</class>
<extends>QWidget</extends>
<header>TextEditorWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ClearButton</class>
<extends>QToolButton</extends>
<header>ClearButton.h</header>
</customwidget>
<customwidget>
<class>LogTableWidget</class>
<extends>QTableWidget</extends>
<header>LogTableWidget.h</header>
</customwidget>
<customwidget>
<class>RepositoryInfoFrame</class>
<extends>QFrame</extends>
<header>RepositoryInfoFrame.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>MyToolButton</class>
<extends>QToolButton</extends>
<header>MyToolButton.h</header>
</customwidget>
<customwidget>
<class>RepositoriesTreeWidget</class>
<extends>QTreeWidget</extends>
<header>RepositoriesTreeWidget.h</header>
</customwidget>
<customwidget>
<class>FilesListWidget</class>
<extends>QListWidget</extends>
<header>FilesListWidget.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>tableWidget_log</tabstop>
<tabstop>listWidget_unstaged</tabstop>
<tabstop>toolButton_select_all</tabstop>
<tabstop>toolButton_stage</tabstop>
<tabstop>toolButton_unstage</tabstop>
<tabstop>toolButton_commit</tabstop>
<tabstop>listWidget_staged</tabstop>
<tabstop>listWidget_files</tabstop>
<tabstop>widget_diff_view</tabstop>
<tabstop>toolButton_stop_process</tabstop>
<tabstop>widget_log</tabstop>
</tabstops>
<resources>
<include location="resources/resources.qrc"/>
</resources>
<connections/>
</ui>
diff --git a/src/unix/UnixPtyProcess.cpp b/src/unix/UnixPtyProcess.cpp
index 6dff398..351bee9 100644
--- a/src/unix/UnixPtyProcess.cpp
+++ b/src/unix/UnixPtyProcess.cpp
@@ -1,242 +1,248 @@
#include "UnixPtyProcess.h"
#include <QDir>
#include <QMutex>
#include <csignal>
#include <cstdlib>
#include <deque>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <termios.h>
#include <unistd.h>
namespace {
void make_argv(char *command, std::vector<char *> *out)
{
char *dst = command;
char *src = command;
char *arg = command;
bool quote = false;
bool accept = false;
while (1) {
char c = *src;
if (c == '\"') {
if (src[1] == '\"' && src[2] == '\"') {
*dst++ = c;
src += 3;
} else {
quote = !quote;
accept = true;
src++;
}
} else if (quote && c != 0) {
*dst++ = *src++;
} else if (c == 0 || isspace(c & 0xff)) {
*dst++ = 0;
if (accept || *arg) {
out->push_back(arg);
}
if (c == 0) break;
accept = false;
arg = dst;
src++;
} else {
*dst++ = *src++;
}
}
}
class OutputReaderThread : public QThread {
private:
QMutex *mutex;
int pty_master;
std::deque<char> *output_queue;
std::vector<char> *output_vector;
protected:
void run() override
{
while (1) {
if (isInterruptionRequested()) break;
char buf[1024];
int len = read(pty_master, buf, sizeof(buf));
if (len < 1) break;
{
QMutexLocker lock(mutex);
output_queue->insert(output_queue->end(), buf, buf + len);
output_vector->insert(output_vector->end(), buf, buf + len);
}
}
}
public:
void start(QMutex *mutex, int pty_master, std::deque<char> *outq, std::vector<char> *outv)
{
this->mutex = mutex;
this->pty_master = pty_master;
this->output_queue = outq;
this->output_vector = outv;
QThread::start();
}
};
} // namespace
// UnixPtyProcess
struct UnixPtyProcess::Private {
QMutex mutex;
std::string command;
int pty_master;
std::deque<char> output_queue;
std::vector<char> output_vector;
OutputReaderThread th_output_reader;
int exit_code = -1;
};
UnixPtyProcess::UnixPtyProcess()
: m(new Private)
{
}
UnixPtyProcess::~UnixPtyProcess()
{
stop();
delete m;
}
bool UnixPtyProcess::isRunning() const
{
return QThread::isRunning();
}
void UnixPtyProcess::writeInput(char const *ptr, int len)
{
int r = write(m->pty_master, ptr, len);
(void)r;
}
int UnixPtyProcess::readOutput(char *ptr, int len)
{
QMutexLocker lock(&m->mutex);
int n = m->output_queue.size();
if (n > len) {
n = len;
}
if (n > 0) {
auto it = m->output_queue.begin();
std::copy(it, it + n, ptr);
m->output_queue.erase(it, it + n);
}
return n;
}
void UnixPtyProcess::start(QString const &cmd, QVariant const &userdata)
{
if (isRunning()) return;
m->command = cmd.toStdString();
user_data = userdata;
QThread::start();
}
bool UnixPtyProcess::wait(unsigned long time)
{
return QThread::wait(time);
}
void UnixPtyProcess::run()
{
struct termios orig_termios;
struct winsize orig_winsize;
tcgetattr(STDIN_FILENO, &orig_termios);
ioctl(STDIN_FILENO, TIOCGWINSZ, (char *)&orig_winsize);
m->pty_master = posix_openpt(O_RDWR);
grantpt(m->pty_master);
unlockpt(m->pty_master);
pid_t pid = fork();
if (pid == 0) {
setsid();
setenv("LANG", "C", 1);
char *pts_name = ptsname(m->pty_master);
int pty_slave = open(pts_name, O_RDWR);
close(m->pty_master);
struct termios tio;
memset(&tio, 0, sizeof(tio));
cfmakeraw(&tio);
tio.c_cc[VMIN] = 1;
tio.c_cc[VTIME] = 0;
tio.c_lflag |= ECHO;
tcsetattr(pty_slave, TCSANOW, &tio);
ioctl(pty_slave, TIOCSWINSZ, &orig_winsize);
dup2(pty_slave, STDIN_FILENO);
dup2(pty_slave, STDOUT_FILENO);
dup2(pty_slave, STDERR_FILENO);
close(pty_slave);
QDir::setCurrent(change_dir);
char *command = (char *)alloca(m->command.size() + 1);
strcpy(command, m->command.c_str());
std::vector<char *> argv;
make_argv(command, &argv);
argv.push_back(nullptr);
execvp(argv[0], &argv[0]);
} else {
bool ok = false;
m->th_output_reader.start(&m->mutex, m->pty_master, &m->output_queue, &m->output_vector);
while (1) {
if (isInterruptionRequested()) break;
int status = 0;
int r = waitpid(pid, &status, WNOHANG);
if (r < 0) break;
QThread::msleep(1);
if (r > 0) {
if (WIFEXITED(status)) {
m->exit_code = WEXITSTATUS(status);
ok = true;
break;
}
if (WIFSIGNALED(status)) {
break;
}
}
}
kill(pid, SIGTERM);
m->th_output_reader.requestInterruption();
m->th_output_reader.wait();
close(m->pty_master);
m->pty_master = -1;
emit completed(ok, user_data);
}
}
void UnixPtyProcess::stop()
{
requestInterruption();
wait();
}
int UnixPtyProcess::getExitCode() const
{
return m->exit_code;
}
QString UnixPtyProcess::getMessage() const
{
QString s;
if (!m->output_vector.empty()) {
s = QString::fromUtf8(&m->output_vector[0], m->output_vector.size());
}
return s;
}
+
+void UnixPtyProcess::readResult(std::vector<char> *out)
+{
+ *out = m->output_vector;
+ m->output_vector.clear();
+}
diff --git a/src/unix/UnixPtyProcess.h b/src/unix/UnixPtyProcess.h
index bbfaf3e..fafaaad 100644
--- a/src/unix/UnixPtyProcess.h
+++ b/src/unix/UnixPtyProcess.h
@@ -1,26 +1,27 @@
#ifndef UNIXPTYPROCESS_H
#define UNIXPTYPROCESS_H
#include "AbstractProcess.h"
#include <QThread>
class UnixPtyProcess : public AbstractPtyProcess, public QThread {
private:
struct Private;
Private *m;
protected:
void run() override;
public:
UnixPtyProcess();
~UnixPtyProcess() override;
bool isRunning() const override;
void writeInput(char const *ptr, int len) override;
int readOutput(char *ptr, int len) override;
void start(QString const &cmd, QVariant const &userdata) override;
bool wait(unsigned long time = ULONG_MAX) override;
void stop() override;
int getExitCode() const override;
QString getMessage() const override;
+ void readResult(std::vector<char> *out);
};
#endif // UNIXPTYPROCESS_H

File Metadata

Mime Type
text/x-diff
Expires
Wed, Jun 17, 9:25 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70818
Default Alt Text
(59 KB)

Event Timeline