[chronojump] Added view menuitem and personsOnTop as first option
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Added view menuitem and personsOnTop as first option
- Date: Fri, 9 Feb 2018 16:55:53 +0000 (UTC)
commit 29e26e7b3493cd5538666c922dc9a4f6ee1c6ce3
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Feb 9 17:55:24 2018 +0100
Added view menuitem and personsOnTop as first option
glade/app1.glade | 29 +++++++++++++++++++++++++
src/Makefile.am | 1 +
src/gui/chronojumpPersons.cs | 47 ++++++++++++++++++++++++++++++++++++++++++
src/gui/networks.cs | 16 +++----------
4 files changed, 81 insertions(+), 12 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 5288334..c269c5e 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -501,6 +501,29 @@
</widget>
</child>
<child>
+ <widget class="GtkMenuItem" id="view_menuitem">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_View</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkCheckMenuItem" id="menuitem_view_persons_on_top">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Persons on top</property>
+ <property name="use_underline">True</property>
+ <signal name="toggled" handler="on_menuitem_view_persons_on_top_toggled"
swapped="no"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
<widget class="GtkMenuItem" id="help_menuitem">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -1548,6 +1571,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>
@@ -22782,6 +22808,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/Makefile.am b/src/Makefile.am
index cfcb36c..28763ef 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,6 +7,7 @@ LINK = $(REF_DEP_CHRONOJUMP)
SOURCES = \
gui/chronojump.cs\
gui/chronojumpIcons.cs\
+ gui/chronojumpPersons.cs\
gui/chronopic.cs\
gui/chronopicRegister.cs\
gui/confirm.cs\
diff --git a/src/gui/chronojumpPersons.cs b/src/gui/chronojumpPersons.cs
new file mode 100644
index 0000000..08c69d3
--- /dev/null
+++ b/src/gui/chronojumpPersons.cs
@@ -0,0 +1,47 @@
+/*
+ * This file is part of ChronoJump
+ *
+ * Chronojump 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.
+ *
+ * Chronojump 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Copyright (C) 2018 Xavier de Blas <xaviblas gmail com>
+ */
+
+//this file has methods of ChronoJumpWindow related to manage persons
+
+using System;
+using Gtk;
+using Glade;
+
+public partial class ChronoJumpWindow
+{
+ [Widget] Gtk.CheckMenuItem menuitem_view_persons_on_top;
+
+ private void on_menuitem_view_persons_on_top_toggled(object o, EventArgs args)
+ {
+ bool personsOnTop = menuitem_view_persons_on_top.Active;
+ LogB.Information("Toggled: " + personsOnTop.ToString());
+
+ SqlitePreferences.Update("personWinHide", personsOnTop.ToString(), false);
+ preferences.personWinHide = personsOnTop;
+ showPersonsOnTop(personsOnTop);
+ }
+
+ private void showPersonsOnTop(bool onTop)
+ {
+ notebook_session_person.Visible = ! onTop;
+ hbox_top_person.Visible = onTop;
+ hbox_top_person_encoder.Visible = onTop;
+ }
+}
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 2fa2226..acb99a8 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -316,18 +316,10 @@ public partial class ChronoJumpWindow
}
encoderUpdateTreeViewWhileCapturing = configChronojump.EncoderUpdateTreeViewWhileCapturing;
-
- if(configChronojump.PersonWinHide)
- {
- notebook_session_person.Visible = false;
- hbox_top_person.Visible = true;
- hbox_top_person_encoder.Visible = true;
- } else {
- notebook_session_person.Visible = true;
- hbox_top_person.Visible = false;
- hbox_top_person_encoder.Visible = false;
- }
-
+
+ showPersonsOnTop(configChronojump.PersonWinHide);
+ menuitem_view_persons_on_top.Active = configChronojump.PersonWinHide;
+
if(configChronojump.EncoderAnalyzeHide) {
hbox_encoder_sup_capture_analyze_two_buttons.Visible = false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]