[chronojump] Nice no-photo icon when person has no photo
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Nice no-photo icon when person has no photo
- Date: Thu, 1 Feb 2018 17:46:46 +0000 (UTC)
commit a1946e23181a956afecb386f764013689004c055
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Feb 1 18:46:19 2018 +0100
Nice no-photo icon when person has no photo
glade/app1.glade | 8 +++++++-
images/md/ic_photo_camera_blue_24dp_2x.png | Bin 0 -> 786 bytes
src/Makefile.am | 1 +
src/gui/chronojump.cs | 21 +++++++++------------
src/gui/chronojumpIcons.cs | 3 +++
5 files changed, 20 insertions(+), 13 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index f92ff5f..16ab3b3 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1527,6 +1527,9 @@
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkLabel"
id="label_start_selector_jumps">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -2751,7 +2754,7 @@ EncoderInertialCapture</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox245">
+ <widget class="GtkHBox"
id="hbox_persons_bottom_person">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">3</property>
@@ -22635,6 +22638,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/images/md/ic_photo_camera_blue_24dp_2x.png b/images/md/ic_photo_camera_blue_24dp_2x.png
new file mode 100644
index 0000000..4fe0590
Binary files /dev/null and b/images/md/ic_photo_camera_blue_24dp_2x.png differ
diff --git a/src/Makefile.am b/src/Makefile.am
index 18ab667..89d9ea8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -396,6 +396,7 @@ RESOURCES = \
../images/md/ic_developer_board_blue_24dp_2x.png,image_chronopic_connect_big.png \
../images/md/ic_person_blue_24dp_1x.png,image_person.png \
../images/md/ic_person_logout_blue_24dp_1x.png,image_person_logout.png \
+ ../images/md/ic_photo_camera_blue_24dp_2x.png,image_no_photo.png \
../images/md/ic_cached_blue_24dp_1x.png,image_recalculate.png \
../images/md/ic_delete_blue_24dp_1x.png,stock_delete.png \
../images/md/ic_create_new_folder_blue_24dp_2x.png,folder_new_big.png \
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 2d9531f..dcf14ef 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -304,6 +304,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Frame frame_persons;
[Widget] Gtk.Frame frame_persons_top;
[Widget] Gtk.VBox vbox_persons_bottom;
+ [Widget] Gtk.HBox hbox_persons_bottom_person;
[Widget] Gtk.Button button_recuperate_person;
[Widget] Gtk.Button button_recuperate_persons_from_session;
[Widget] Gtk.Button button_person_add_single;
@@ -1026,7 +1027,9 @@ public partial class ChronoJumpWindow
image_current_person.Pixbuf = pixbuf;
button_image_current_person_zoom.Sensitive = true;
} else {
- image_current_person.Pixbuf = null;
+ //image_current_person.Pixbuf = null;
+ Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_no_photo.png");
+ image_current_person.Pixbuf = pixbuf;
button_image_current_person_zoom.Sensitive = false;
}
}
@@ -2299,9 +2302,7 @@ public partial class ChronoJumpWindow
//for sure, jumpsExists is false, because we create a new session
- button_edit_current_person.Sensitive = false;
- button_show_all_person_events.Sensitive = false;
- button_delete_current_person.Sensitive = false;
+ hbox_persons_bottom_person.Sensitive = false;
//update report
report.SessionID = currentSession.UniqueID;
@@ -2474,9 +2475,7 @@ public partial class ChronoJumpWindow
sensitiveGuiYesSession();
definedSession = true;
- button_edit_current_person.Sensitive = false;
- button_show_all_person_events.Sensitive = false;
- button_delete_current_person.Sensitive = false;
+ hbox_persons_bottom_person.Sensitive = false;
//if there are persons
if(foundPersons) {
@@ -7006,9 +7005,8 @@ LogB.Debug("X");
{
button_persons_up.Sensitive = option;
button_persons_down.Sensitive = option;
- button_edit_current_person.Sensitive = option;
- button_show_all_person_events.Sensitive = option;
- button_delete_current_person.Sensitive = option;
+
+ hbox_persons_bottom_person.Sensitive = option;
}
private void sensitiveGuiNoSession ()
@@ -7027,8 +7025,7 @@ LogB.Debug("X");
button_recuperate_persons_from_session.Sensitive = false;
button_person_add_single.Sensitive = false;
button_person_add_multiple.Sensitive = false;
- button_edit_current_person.Sensitive = false;
- button_delete_current_person.Sensitive = false;
+ hbox_persons_bottom_person.Sensitive = false;
button_contacts_person_change.Sensitive = false;
button_encoder_person_change.Sensitive = false;
diff --git a/src/gui/chronojumpIcons.cs b/src/gui/chronojumpIcons.cs
index 8d97363..e4138d4 100644
--- a/src/gui/chronojumpIcons.cs
+++ b/src/gui/chronojumpIcons.cs
@@ -183,6 +183,9 @@ public partial class ChronoJumpWindow
image_current_person_zoom.Pixbuf = pixbuf;
image_force_sensor_check_version.Pixbuf = pixbuf;
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_no_photo.png");
+ image_current_person.Pixbuf = pixbuf;
+
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_gravity.png");
image_mode_encoder_gravitatory.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_inertia.png");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]