[chronojump] + presentation (navigat. WebKit). Fixed report bug
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] + presentation (navigat. WebKit). Fixed report bug
- Date: Fri, 8 Jun 2012 17:33:10 +0000 (UTC)
commit f9234483117398e0ff85ce512d87da3beb34912b
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Jun 8 19:30:00 2012 +0200
+ presentation (navigat. WebKit). Fixed report bug
configure.ac | 1 +
glade/chronojump.glade | 187 ++++++++++++++++++++++++++++++++++++++++++++++-
src/Makefile.am | 2 +
src/gui/chronojump.cs | 11 ++-
src/gui/encoder.cs | 6 ++
src/gui/presentation.cs | 96 ++++++++++++++++++++++++
src/report.cs | 6 ++
7 files changed, 304 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9f256ac..193b209 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,6 +77,7 @@ dnl package checks, common for all configs
PKG_CHECK_MODULES([GLIB_SHARP_20], [glib-sharp-2.0])
PKG_CHECK_MODULES([GTK_SHARP_20], [gtk-sharp-2.0])
PKG_CHECK_MODULES([GLADE_SHARP_20], [glade-sharp-2.0])
+PKG_CHECK_MODULES([WEBKIT_SHARP_10], [webkit-sharp-1.0])
PKG_CHECK_MODULES(CESARPLAYER, [gtk+-2.0 >= 2.8 gdk-2.0 gio-2.0 glib-2.0 gstreamer-0.10 gstreamer-audio-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gobject-2.0 gstreamer-interfaces-0.10])
AC_SUBST(CESARPLAYER_CFLAGS)
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 8b8160e..f3856f9 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -14375,7 +14375,7 @@ by you</property>
<widget class="GtkVBox" id="vbox69">
<property name="visible">True</property>
<child>
- <widget class="GtkMenuBar" id="C">
+ <widget class="GtkMenuBar" id="main_menu">
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="session_menuitem">
@@ -25509,6 +25509,191 @@ Evaluator can use real name or nickname.</property>
<property name="type">tab</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox" id="hbox93">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkVBox" id="vbox65">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkButton" id="button_presentation_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip">Maximize view</property>
+ <signal name="clicked" handler="on_button_presentation_screen_clicked"/>
+ <child>
+ <widget class="GtkImage" id="image25">
+ <property name="visible">True</property>
+ <property name="stock">gtk-fullscreen</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">2</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_presentation_restore_screen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip">Restore view</property>
+ <signal name="clicked" handler="on_button_presentation_screen_clicked"/>
+ <child>
+ <widget class="GtkImage" id="image27">
+ <property name="visible">True</property>
+ <property name="stock">gtk-leave-fullscreen</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHSeparator" id="hseparator3">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_presentation_first">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip">First slide</property>
+ <signal name="clicked" handler="on_button_presentation_first_clicked"/>
+ <child>
+ <widget class="GtkImage" id="image28">
+ <property name="visible">True</property>
+ <property name="stock">gtk-goto-first</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_presentation_previous">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip">Previous slide</property>
+ <signal name="clicked" handler="on_button_presentation_previous_clicked"/>
+ <child>
+ <widget class="GtkImage" id="image29">
+ <property name="visible">True</property>
+ <property name="stock">gtk-go-back</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_presentation_next">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip">Next slide</property>
+ <signal name="clicked" handler="on_button_presentation_next_clicked"/>
+ <child>
+ <widget class="GtkImage" id="image30">
+ <property name="visible">True</property>
+ <property name="stock">gtk-go-forward</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_presentation_num">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">1</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_presentation_stop">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_button_presentation_stop_clicked"/>
+ <child>
+ <widget class="GtkImage" id="image31">
+ <property name="visible">True</property>
+ <property name="stock">gtk-stop</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">7</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">1</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow_presentation">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label95">
+ <property name="visible">True</property>
+ <property name="label">Presentacià tesi doctoral</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="position">0</property>
diff --git a/src/Makefile.am b/src/Makefile.am
index 25d5dc2..7406b12 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -85,6 +85,7 @@ FILES = \
gui/preferences.cs\
gui/session.cs\
gui/stats.cs\
+ gui/presentation.cs\
gui/report.cs\
gui/about.cs\
gui/helpPorts.cs\
@@ -342,6 +343,7 @@ REFERENCES = \
$(GTK_SHARP_20_LIBS) \
$(GLIB_SHARP_20_LIBS) \
$(GLADE_SHARP_20_LIBS) \
+ $(WEBKIT_SHARP_10_LIBS) \
System\
System.Data\
System.Drawing\
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 0a8b561..852cd9f 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -30,11 +30,13 @@ using System.Collections; //ArrayList
using LongoMatch.Gui;
using LongoMatch.Video.Capturer;
using LongoMatch.Video.Common;
-
+using WebKit;
public partial class ChronoJumpWindow
{
[Widget] Gtk.Window app1;
+ [Widget] Gtk.MenuBar main_menu;
+ [Widget] Gtk.Notebook notebook_sup;
//gui for small screens
[Widget] Gtk.Viewport viewport_mode_small;
@@ -60,7 +62,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_mode_pulses_small;
[Widget] Gtk.Label label_mode_multi_chronopic_small;
-
[Widget] Gtk.Image image_persons_new_1;
[Widget] Gtk.Image image_persons_new_plus;
[Widget] Gtk.Image image_persons_open_1;
@@ -499,6 +500,8 @@ public partial class ChronoJumpWindow
//stats_win_initializeSession();
encoderInitializeStuff();
+
+ presentationInit();
}
@@ -2246,9 +2249,9 @@ public partial class ChronoJumpWindow
//update report
report.SessionID = currentSession.UniqueID;
report.StatisticsRemove();
- try {
+
+ if(reportWin != null)
reportWin.FillTreeView();
- } catch {} //reportWin is still not created, not need to Fill again
}
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index eebc600..2264afb 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -142,6 +142,10 @@ public partial class ChronoJumpWindow
//TODO: capture also with webcam an attach it to signal or curve
//
//TODO: peak power in eccentric in absolute values
+ //
+ //TODO: on cross, spline and force speed and power speed should have a spar value higher, like 0.7. On the other hand, the other cross graphs, haveload(mass) in the X lot more discrete, there is good to put 0.5
+ //TODO: put also the Load as Load(mass) or viceversa, and put the units on the xlab, ylab
+ //TODO: put a save graph and a html report
private void encoderInitializeStuff() {
@@ -1351,6 +1355,7 @@ public partial class ChronoJumpWindow
//called when a person changes
private void encoderPersonChanged() {
+Log.WriteLine("A");
ArrayList data = SqliteEncoder.Select(false, -1, currentPerson.UniqueID, currentSession.UniqueID, "curve");
label_encoder_user_curves_num.Text = data.Count.ToString();
spin_encoder_analyze_curve_num.SetRange(1, data.Count);
@@ -1359,6 +1364,7 @@ public partial class ChronoJumpWindow
treeviewEncoderRemoveColumns();
image_encoder_capture.Sensitive = false;
image_encoder_analyze.Sensitive = false;
+Log.WriteLine("B");
}
private void encoderButtonsSensitive(encoderSensEnum option) {
diff --git a/src/gui/presentation.cs b/src/gui/presentation.cs
new file mode 100644
index 0000000..3413465
--- /dev/null
+++ b/src/gui/presentation.cs
@@ -0,0 +1,96 @@
+/*
+ * 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) 2004-2012 Xavier de Blas <xaviblas gmail com>
+ */
+
+using System;
+using System.IO;
+using Gtk;
+using Gdk;
+using Glade;
+using System.Collections;
+using System.Threading;
+using Mono.Unix;
+
+
+///http://archive09.linux.com/feature/154784
+
+
+public partial class ChronoJumpWindow
+{
+ //presentation
+ [Widget] Gtk.ScrolledWindow scrolledwindow_presentation;
+ [Widget] Gtk.Button button_presentation_fullscreen;
+ [Widget] Gtk.Button button_presentation_restore_screen;
+// [Widget] Gtk.Button button_presentation_first;
+// [Widget] Gtk.Button button_presentation_previous;
+// [Widget] Gtk.Button button_presentation_next;
+// [Widget] Gtk.Button button_presentation_stop;
+ [Widget] Gtk.Label label_presentation_num;
+
+ static WebKit.WebView presentation;
+ Thread presentationThread;
+ bool presentationCancel;
+ string presentationURL;
+
+
+ private void presentationInit() {
+ button_presentation_restore_screen.Sensitive = false;
+// button_presentation_stop.Sensitive = false;
+
+ presentation = new WebKit.WebView();
+ scrolledwindow_presentation.Add(presentation);
+
+ //presentation.Open("file:///home/xavier/informatica/progs_meus/mono/navegador-gtk-html/prova.html");
+ presentationOpenStatic("http://www.chronojump.org");
+
+ presentation.ShowAll();
+ }
+
+ private static void presentationOpenStatic(string url) {
+ presentation.Open(url);
+ }
+
+ void on_button_presentation_screen_clicked (object o, EventArgs args) {
+ Gtk.Button button = (Gtk.Button) o;
+ main_menu.Visible = ( button != button_presentation_fullscreen);
+ vbox_persons.Visible = ( button != button_presentation_fullscreen);
+ notebook_sup.ShowTabs = ( button != button_presentation_fullscreen);
+ button_presentation_fullscreen.Sensitive = ( button != button_presentation_fullscreen);
+ button_presentation_restore_screen.Sensitive = ( button == button_presentation_fullscreen);
+ }
+
+ void on_button_presentation_first_clicked (object o, EventArgs args) {
+ // presentationOpenPre("http://www.chronojump.org");
+ }
+
+ void on_button_presentation_previous_clicked (object o, EventArgs args) {
+ // presentationOpenPre("http://www.xckd.org");
+ }
+
+ void on_button_presentation_next_clicked (object o, EventArgs args) {
+ // presentationOpenPre("http://www.gnome.org");
+ }
+
+ void on_button_presentation_stop_clicked (object o, EventArgs args) {
+ // presentationCancel = true;
+ //presentation.Destroy();
+ }
+
+}
+
diff --git a/src/report.cs b/src/report.cs
index d8634f3..6b10e0f 100644
--- a/src/report.cs
+++ b/src/report.cs
@@ -68,7 +68,9 @@ public class Report : ExportSession
StatisticsData = new ArrayList(1);
+Log.WriteLine("r1");
mySession = SqliteSession.Select(sessionID.ToString());
+Log.WriteLine("r2");
}
/*
@@ -274,8 +276,10 @@ public class Report : ExportSession
ArrayList sendSelectedSessions = new ArrayList(1);
string [] sessionsStrFull = sessionsString.Split(new char[] {':'});
for (int j=0; j < sessionsStrFull.Length ; j++) {
+Log.WriteLine("r3");
Session tempSession = SqliteSession.Select(sessionsStrFull[j]);
sendSelectedSessions.Add(tempSession.UniqueID + ":" + tempSession.Name + ":" + tempSession.DateShort);
+Log.WriteLine("r4");
}
return sendSelectedSessions;
}
@@ -421,7 +425,9 @@ public class Report : ExportSession
public int SessionID {
set {
sessionID = value;
+Log.WriteLine("r5");
mySession = SqliteSession.Select(sessionID.ToString());
+Log.WriteLine("r6");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]