Skip to content

Commit

Permalink
GPG対応 (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
soramimi committed Jan 16, 2024
1 parent be56ea1 commit eb5261d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 33 deletions.
12 changes: 6 additions & 6 deletions src/CommitPropertyDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ void CommitPropertyDialog::init(MainWindow *mw)
auto s = mainwindow()->git()->log_show_signature(m->commit.commit_id);
if (s) {
sig = *s;
int n = sig.fingerprint.size();
if (n > 0) {
QList<gpg::Data> keys;
if (gpg::listKeys(global->appsettings.gpg_command, &keys)) {
QList<gpg::Data> keys;
if (gpg::listKeys(global->appsettings.gpg_command, &keys)) {
int n = sig.fingerprint.size();
if (n > 0) {
for (gpg::Data const &key : keys) {
if (n == key.fingerprint.size()) {
auto const *p1 = sig.fingerprint.data();
Expand Down Expand Up @@ -135,8 +135,8 @@ void CommitPropertyDialog::updateAvatar(bool request)
widget->setVisible(false);
}
};
// SetAvatar(ui->lineEdit_mail->text(), ui->widget_user_avatar);
// SetAvatar(ui->lineEdit_sign_mail->text(), ui->widget_sign_avatar);
SetAvatar(ui->lineEdit_mail->text(), ui->widget_user_avatar);
SetAvatar(ui->lineEdit_sign_mail->text(), ui->widget_sign_avatar);
}

void CommitPropertyDialog::avatarReady()
Expand Down
68 changes: 41 additions & 27 deletions src/CommitPropertyDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -131,37 +131,51 @@
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>ID</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="ReadOnlyLineEdit" name="lineEdit_sign_id"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Name</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>ID</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="ReadOnlyLineEdit" name="lineEdit_sign_id"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="ReadOnlyLineEdit" name="lineEdit_sign_name"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Mail</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="ReadOnlyLineEdit" name="lineEdit_sign_mail"/>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="ReadOnlyLineEdit" name="lineEdit_sign_name"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Mail</string>
<item>
<widget class="SimpleImageWidget" name="widget_sign_avatar" native="true">
<property name="minimumSize">
<size>
<width>80</width>
<height>80</height>
</size>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="ReadOnlyLineEdit" name="lineEdit_sign_mail"/>
</item>
</layout>
</item>
</layout>
Expand Down

0 comments on commit eb5261d

Please sign in to comment.