[gitg] Higify a bit the author details dialog
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Higify a bit the author details dialog
- Date: Sat, 8 Aug 2015 10:28:42 +0000 (UTC)
commit 43babd0b363d22d346eb8aaf8db72d4f843201df
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Sat Aug 8 12:28:17 2015 +0200
Higify a bit the author details dialog
gitg/gitg-author-details-dialog.vala | 26 +----
gitg/resources/ui/gitg-author-details-dialog.ui | 137 +++++++++--------------
2 files changed, 56 insertions(+), 107 deletions(-)
---
diff --git a/gitg/gitg-author-details-dialog.vala b/gitg/gitg-author-details-dialog.vala
index 2deb796..2bba81e 100644
--- a/gitg/gitg-author-details-dialog.vala
+++ b/gitg/gitg-author-details-dialog.vala
@@ -31,11 +31,8 @@ namespace Gitg
[GtkChild (name = "input_email")]
private Gtk.Entry d_input_email;
- [GtkChild (name = "label_view")]
- private Gtk.Label d_label_view;
-
- [GtkChild (name = "label_dash")]
- private Gtk.Label d_label_dash;
+ [GtkChild (name = "label_info")]
+ private Gtk.Label d_label_info;
private string? d_repository_name;
@@ -80,9 +77,7 @@ namespace Gitg
if (d_repository_name == null)
{
title = _("Author Details");
-
- d_label_view.hide();
- d_label_dash.show();
+ d_label_info.label = _("Enter default details used for all repositories:");
if (Ggit.Config.find_global().get_path() == null)
{
@@ -93,10 +88,9 @@ namespace Gitg
else
{
title = "%s - %s".printf(d_repository_name, _("Author Details"));
- d_label_view.label = d_label_view.label.printf(d_repository_name);
- d_label_view.show();
- d_label_dash.hide();
+ // Translators: %s is the repository name
+ d_label_info.label = _("Enter details for repository
'%s':").printf(d_repository_name);
}
string author_name = "";
@@ -130,8 +124,6 @@ namespace Gitg
d_input_email.set_text(author_email.chomp());
}
- set_response_sensitive(Gtk.ResponseType.OK, false);
-
d_input_name.activate.connect((e) => {
response(Gtk.ResponseType.OK);
});
@@ -139,14 +131,6 @@ namespace Gitg
d_input_email.activate.connect((e) => {
response(Gtk.ResponseType.OK);
});
-
- d_input_name.changed.connect((e) => {
- set_response_sensitive(Gtk.ResponseType.OK, true);
- });
-
- d_input_email.changed.connect((e) => {
- set_response_sensitive(Gtk.ResponseType.OK, true);
- });
}
public override void response(int id) {
diff --git a/gitg/resources/ui/gitg-author-details-dialog.ui b/gitg/resources/ui/gitg-author-details-dialog.ui
index d70692f..c53dca5 100644
--- a/gitg/resources/ui/gitg-author-details-dialog.ui
+++ b/gitg/resources/ui/gitg-author-details-dialog.ui
@@ -1,60 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
<interface>
- <!-- interface-requires gtk+ 3.3 -->
- <!-- interface-requires gitg 0.0 -->
- <!-- interface-requires gd 1.0 -->
+ <requires lib="gtk+" version="3.3"/>
<template class="GitgAuthorDetailsDialog" parent="GtkDialog">
- <property name="resizable">False</property>
<property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Author Details</property>
<property name="type_hint">dialog</property>
+ <property name="border_width">18</property>
+ <property name="title" translatable="yes">Author Details</property>
+ <property name="resizable">False</property>
<property name="modal">True</property>
- <property name="gravity">north</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="box_user_details">
+ <property name="use_header_bar">1</property>
+ <child internal-child="headerbar">
+ <object class="GtkHeaderBar" id="dialog-header_bar">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="show_close_button">False</property>
<child>
- <object class="GtkLabel" id="label_file_not_found">
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Note: The Git config file '%s' does not
exist.</property>
+ <object class="GtkButton" id="button_cancel">
+ <property name="label" translatable="yes">_Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <style>
+ <class name="text-button"/>
+ </style>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="padding">4</property>
- <property name="position">0</property>
+ <property name="pack_type">start</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label_dash">
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Enter details to set as default for all
repositories:</property>
+ <object class="GtkButton" id="button_save">
+ <property name="label" translatable="yes">_Save</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <style>
+ <class name="text-button"/>
+ <class name="suggested-action"/>
+ </style>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">5</property>
- <property name="position">1</property>
+ <property name="pack_type">end</property>
</packing>
</child>
+ </object>
+ </child>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="box_user_details">
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label_view">
+ <object class="GtkLabel" id="label_info">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="label" translatable="yes">Enter details for repository '%s':</property>
+ <property name="label">Enter details for repository '%s':</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="padding">5</property>
- <property name="position">2</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -63,9 +76,8 @@
<property name="height_request">0</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_end">5</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkEntry" id="input_name">
<property name="visible">True</property>
@@ -76,8 +88,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -90,87 +100,42 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_email">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">E-mail: </property>
+ <property name="label" translatable="yes">E-mail:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Name: </property>
+ <property name="label" translatable="yes">Name:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="author_action_area">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button_cancel">
- <property name="label" translatable="yes">Cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button_save">
- <property name="label" translatable="yes">Save</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="can_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">4</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
- <action-widget response="-5">button_save</action-widget>
<action-widget response="-6">button_cancel</action-widget>
+ <action-widget response="-5">button_save</action-widget>
</action-widgets>
</template>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]