Permalink
Browse files

Added scrotdaemon and a basic timer

  • Loading branch information...
1 parent 5f3917b commit 0d6013f8e3fa79c3a06910b492ba49aee98126b8 Anirudh Sanjeev committed Oct 25, 2009
Showing with 298 additions and 2 deletions.
  1. +22 −0 ScreenLapse.userprefs
  2. +13 −0 ScreenLapse/ScreenLapse.csproj
  3. +83 −0 ScreenLapse/ScrotDaemon.cs
  4. +180 −2 ScreenLapse/gtk-gui/gui.stetic
View
@@ -0,0 +1,22 @@
+<Properties>
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" ctype="Workspace" />
+ <MonoDevelop.Ide.DebuggingService>
+ <BreakpointStore />
+ </MonoDevelop.Ide.DebuggingService>
+ <MonoDevelop.Ide.Workbench ActiveDocument="ScreenLapse/PreferencesDialog.cs" ctype="Workbench">
+ <Files>
+ <File FileName="ScreenLapse/Main.cs" Line="1" Column="1" />
+ <File FileName="ScreenLapse/MainWindow.cs" Line="1" Column="1" />
+ <File FileName="ScreenLapse/PreferencesDialog.cs" Line="1" Column="1" />
+ </Files>
+ <Pads>
+ <Pad Id="ProjectPad">
+ <State expanded="True">
+ <Node name="ScreenLapse" expanded="True" selected="True">
+ <Node name="Resources" expanded="True" />
+ </Node>
+ </State>
+ </Pad>
+ </Pads>
+ </MonoDevelop.Ide.Workbench>
+</Properties>
@@ -53,6 +53,19 @@
<Compile Include="AssemblyInfo.cs" />
<Compile Include="PreferencesDialog.cs" />
<Compile Include="gtk-gui\ScreenLapse.PreferencesDialog.cs" />
+ <Compile Include="ScrotDaemon.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ProjectExtensions>
+ <MonoDevelop>
+ <Properties>
+ <Policies>
+ <DotNetNamingPolicy DirectoryNamespaceAssociation="Hierarchical" ResourceNamePolicy="FileFormatDefault" />
+ <TextStylePolicy TabWidth="4" inheritsSet="Mono" inheritsScope="text/plain" scope="text/x-csharp" />
+ <CSharpFormattingPolicy inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />
+ <StandardHeader inheritsSet="MITX11License" />
+ </Policies>
+ </Properties>
+ </MonoDevelop>
+ </ProjectExtensions>
</Project>
View
@@ -0,0 +1,83 @@
+//
+// ScrotDaemon.cs
+//
+// Author:
+// Anirudh Sanjeev <anirudh@anirudhsanjeev.org>
+//
+// Copyright (c) 2009 Anirudh Sanjeev
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+
+
+namespace ScreenLapse
+{
+
+ public class ScrotDaemon
+ {
+
+ static readonly ScrotDaemon instance = new ScrotDaemon();
+
+ private System.Timers.Timer timer;
+
+ public ScrotDaemon Instance
+ {
+ get { return instance; }
+ }
+
+
+ /// <summary>
+ /// Property to check whether screenshots can be taken
+ ///
+ /// use Activate() and Deactivate() to modify behaviour
+ /// </summary>
+ public bool IsActive
+ {
+ get; private set;
+ }
+
+ /// <summary>
+ /// Activate the screenshot timer
+ /// </summary>
+ public void Activate()
+ {
+ }
+
+ /// <summary>
+ /// Deactivate the screenshot timer
+ /// </summary>
+ public void Deactivate()
+ {
+
+ }
+
+ private ScrotDaemon ()
+ {
+ timer = new System.Timers.Timer();
+ timer.Enabled = false;
+ timer.Elapsed += OnTimerTick;
+ }
+
+ void OnTimerTick (object sender, Timers.ElapsedEventArgs e)
+ {
+
+ }
+ }
+}
@@ -24,7 +24,7 @@
<placeholder />
</child>
</widget>
- <widget class="Gtk.Dialog" id="ScreenLapse.PreferencesDialog" design-size="307 468">
+ <widget class="Gtk.Dialog" id="ScreenLapse.PreferencesDialog" design-size="374 205">
<property name="MemberName" />
<property name="WindowPosition">CenterOnParent</property>
<property name="Buttons">2</property>
@@ -34,7 +34,185 @@
<property name="MemberName" />
<property name="BorderWidth">2</property>
<child>
- <placeholder />
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entry2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.FileChooserButton" id="filechooserbutton2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Save screenshots to:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Screenshot interval:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Scale Percentage:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">label4</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="spinbutton1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="spinbutton2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
</child>
</widget>
</child>

0 comments on commit 0d6013f

Please sign in to comment.