./PaxHeaders.10129/gnome-do-0.9 0000644 0001750 0001750 00000000132 11724616775 014212 x ustar 00 0000000 0000000 30 mtime=1330847229.776504925
30 atime=1330847230.796504871
30 ctime=1330847229.776504925
gnome-do-0.9/ 0000775 0001750 0001750 00000000000 11724616775 013413 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/PaxHeaders.10129/Do.Interface.Linux 0000644 0001750 0001750 00000000132 11724616776 017415 x ustar 00 0000000 0000000 30 mtime=1330847230.020504912
30 atime=1330847230.796504871
30 ctime=1330847230.020504912
gnome-do-0.9/Do.Interface.Linux/ 0000775 0001750 0001750 00000000000 11724616776 016753 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Interface.Linux/PaxHeaders.10129/src 0000644 0001750 0001750 00000000132 11724616775 020203 x ustar 00 0000000 0000000 30 mtime=1330847229.976504915
30 atime=1330847230.796504871
30 ctime=1330847229.976504915
gnome-do-0.9/Do.Interface.Linux/src/ 0000775 0001750 0001750 00000000000 11724616775 017541 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Interface.Linux/src/PaxHeaders.10129/AssemblyInfo.cs.in 0000644 0001750 0001750 00000000074 11704304006 023567 x ustar 00 0000000 0000000 30 atime=1330831081.838265787
30 ctime=1330847229.180504957
gnome-do-0.9/Do.Interface.Linux/src/AssemblyInfo.cs.in 0000664 0001750 0001750 00000003304 11704304006 023043 0 ustar 00chris chris 0000000 0000000 // AssemblyInfo.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Do.Interface.Linux")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// If the build and revision are set to '*' they will be updated automatically.
[assembly: AssemblyVersion("@ABI_VERSION@.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
gnome-do-0.9/Do.Interface.Linux/src/PaxHeaders.10129/Do.Interface 0000644 0001750 0001750 00000000132 11724616776 022445 x ustar 00 0000000 0000000 30 mtime=1330847230.012504913
30 atime=1330847230.796504871
30 ctime=1330847230.012504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/ 0000775 0001750 0001750 00000000000 11724616776 022003 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/ClassicInterface 0000644 0001750 0001750 00000000132 11724616775 025646 x ustar 00 0000000 0000000 30 mtime=1330847229.980504914
30 atime=1330847230.796504871
30 ctime=1330847229.980504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/ClassicInterface/ 0000775 0001750 0001750 00000000000 11724616775 025204 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/ClassicInterface/PaxHeaders.10129/ClassicWindow.cs 0000644 0001750 0001750 00000000126 11724567307 031022 x ustar 00 0000000 0000000 27 mtime=1330835143.164289
29 atime=1330835145.29436341
30 ctime=1330847229.980504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/ClassicInterface/ClassicWindow.cs 0000664 0001750 0001750 00000027133 11724567307 030306 0 ustar 00chris chris 0000000 0000000 /* DoClassicWindow.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using System.Collections.Generic;
using System.Linq;
using Mono.Unix;
using Gdk;
using Gtk;
using Do.Universe;
using Do.Universe.Common;
using Do.Platform;
using Do.Interface.Widgets;
namespace Do.Interface {
public class ClassicWindow : Gtk.Window, IDoWindow {
//-------------------Class Members------------------
Do.Interface.Widgets.Frame frame;
SymbolDisplayLabel label;
ResultsWindow resultsWindow;
PositionWindow positionWindow;
HBox resultsHBox;
IconBox[] iconbox;
IDoController controller;
const int IconBoxIconSize = 128;
const uint IconBoxPadding = 6;
const int IconBoxRadius = 20;
const int NumberResultsDisplayed = 6;
const double WindowTransparency = 0.91;
Pane currentPane;
//-------------------Events-----------------------
public new event DoEventKeyDelegate KeyPressEvent;
//-------------------Properties-------------------
public new string Name {
get { return "Simple"; }
}
public Pane CurrentPane {
get {
return currentPane;
}
set {
if (currentPane == value) return;
currentPane = value;
iconbox[0].IsFocused = value == Pane.First;
iconbox[1].IsFocused = value == Pane.Second;
iconbox[2].IsFocused = value == Pane.Third;
Reposition ();
}
}
public PositionWindow PositionWindow {
get {
if (positionWindow == null)
positionWindow = new PositionWindow (this, resultsWindow);
return positionWindow;
}
}
//-------------------ctor----------------------
public ClassicWindow () : base (Gtk.WindowType.Toplevel)
{
}
public void Initialize (IDoController controller)
{
this.controller = controller;
Build ();
}
//-------------------methods------------------
protected void Build ()
{
VBox vbox;
Alignment align;
Gtk.Image settings_icon;
AppPaintable = true;
KeepAbove = true;
Decorated = false;
// This typehint gets the window to raise all the way to top.
TypeHint = WindowTypeHint.Splashscreen;
try {
SetIconFromFile ("/usr/share/icons/gnome/scalable/actions/system-run.svg");
} catch { }
SetColormap ();
resultsWindow = new ResultsWindow (BackgroundColor,
NumberResultsDisplayed);
resultsWindow.SelectionChanged += OnResultsWindowSelectionChanged;
currentPane = Pane.First;
frame = new GlossyRoundedFrame ();
frame.DrawFill = frame.DrawFrame = true;
frame.FillColor = frame.FrameColor = BackgroundColor;
frame.FillAlpha = frame.FrameAlpha = WindowTransparency;
frame.Radius = Screen.IsComposited ? IconBoxRadius : 0;
Add (frame);
frame.Show ();
vbox = new VBox (false, 0);
frame.Add (vbox);
vbox.BorderWidth = IconBoxPadding;
vbox.Show ();
settings_icon = new Gtk.Image (GetType().Assembly, "settings-triangle.png");
align = new Alignment (1.0F, 0.0F, 0, 0);
align.SetPadding (3, 0, 0, IconBoxPadding);
align.Add (settings_icon);
vbox.PackStart (align, false, false, 0);
settings_icon.Show ();
align.Show ();
resultsHBox = new HBox (false, (int) IconBoxPadding * 2);
resultsHBox.BorderWidth = IconBoxPadding;
vbox.PackStart (resultsHBox, false, false, 0);
resultsHBox.Show ();
iconbox = new IconBox[3];
iconbox[0] = new IconBox (IconBoxIconSize);
iconbox[0].IsFocused = true;
iconbox[0].Radius = IconBoxRadius;
resultsHBox.PackStart (iconbox[0], false, false, 0);
iconbox[0].Show ();
iconbox[1] = new IconBox (IconBoxIconSize);
iconbox[1].IsFocused = false;
iconbox[1].Radius = IconBoxRadius;
resultsHBox.PackStart (iconbox[1], false, false, 0);
iconbox[1].Show ();
iconbox[2] = new IconBox (IconBoxIconSize);
iconbox[2].IsFocused = false;
iconbox[2].Radius = IconBoxRadius;
resultsHBox.PackStart (iconbox[2], false, false, 0);
// iconbox[2].Show ();
align = new Alignment (0.5F, 0.5F, 1, 1);
align.SetPadding (0, 2, 0, 0);
label = new SymbolDisplayLabel ();
align.Add (label);
vbox.PackStart (align, false, false, 0);
label.Show ();
align.Show ();
ScreenChanged += OnScreenChanged;
ConfigureEvent += OnConfigureEvent;
SizeAllocated += delegate { Reposition (); };
iconbox[0].LinesChanged += OnLineChangedEvent;
iconbox[1].LinesChanged += OnLineChangedEvent;
iconbox[2].LinesChanged += OnLineChangedEvent;
Reposition ();
}
protected override bool OnKeyPressEvent (EventKey evnt)
{
KeyPressEvent (evnt);
return base.OnKeyPressEvent (evnt);
}
protected virtual void SetColormap ()
{
Gdk.Colormap colormap;
colormap = Screen.RgbaColormap;
if (colormap == null) {
colormap = Screen.RgbColormap;
Console.Error.WriteLine ("No alpha support.");
}
Colormap = colormap;
colormap.Dispose ();
}
private Gdk.Color BackgroundColor
{
get {
byte r, g, b;
Gdk.Color bgColor;
using (Gtk.Style style = Gtk.Rc.GetStyle (this)) {
bgColor = style.Backgrounds[(int) StateType.Selected];
}
r = (byte) ((bgColor.Red) >> 8);
g = (byte) ((bgColor.Green) >> 8);
b = (byte) ((bgColor.Blue) >> 8);
// Useful for making overbright themes less ugly. Still trying
// to find a happy balance between 50 and 90...
byte maxLum = 60;
double hue, sat, val;
Interface.Util.Appearance.RGBToHSV(r, g, b, out hue,
out sat, out val);
val = Math.Min (val, maxLum);
Interface.Util.Appearance.HSVToRGB(hue, sat, val, out r,
out g, out b);
return new Gdk.Color (r, g, b);
}
}
private void OnScreenChanged (object sender, EventArgs args)
{
SetColormap ();
}
private void OnConfigureEvent (object sender, ConfigureEventArgs args)
{
Reposition ();
}
protected override void OnStyleSet (Gtk.Style previous_style)
{
frame.FrameColor = frame.FillColor = BackgroundColor;
resultsWindow.UpdateColors (BackgroundColor);
base.OnStyleSet (previous_style);
}
public virtual void Reposition ()
{
Gtk.Application.Invoke (delegate {
Gdk.Rectangle offset;
int iconboxWidth;
offset = new Rectangle (IconBoxRadius, 0, 0 ,0);
iconboxWidth = IconBoxIconSize + 60;
PositionWindow.UpdatePosition (iconboxWidth, currentPane, offset);
});
}
protected void OnLineChangedEvent (object o, EventArgs a)
{
if ((int) o <= 2) return;
this.QueueDraw ();
this.Resize (1, 1);
Reposition ();
}
protected override bool OnButtonPressEvent (EventButton evnt)
{
int start_x, start_y, end_x, end_y;
int click_x, click_y;
bool click_on_window, click_near_settings_icon;
GetPosition (out start_x, out start_y);
GetSize (out end_x, out end_y);
end_x += start_x;
end_y += start_y;
click_x = (int) evnt.XRoot;
click_y = (int) evnt.YRoot;
click_on_window = start_x <= click_x && click_x < end_x &&
start_y <= click_y && click_y < end_y;
click_near_settings_icon = (end_x - 27) <= click_x && click_x < end_x &&
start_y <= click_y && click_y < (start_y + 27);
if (click_near_settings_icon) {
Services.Windowing.ShowMainMenu (end_x - 21, start_y + 16);
// Have to re-grab the pane from the menu.
Interface.Windowing.PresentWindow (this);
} else if (!click_on_window) {
controller.ButtonPressOffWindow ();
}
return base.OnButtonPressEvent (evnt);
}
private void OnResultsWindowSelectionChanged (object sender,
ResultsWindowSelectionEventArgs args)
{
controller.NewContextSelection (CurrentPane, args.SelectedIndex);
}
///////////////////////
// IDoWindow //
///////////////////////
public void Summon ()
{
frame.Radius = Screen.IsComposited ? IconBoxRadius : 0;
Resize (1, 1);
Reposition ();
Show ();
Interface.Windowing.PresentWindow (this);
}
public void Vanish ()
{
Interface.Windowing.UnpresentWindow (this);
Hide ();
}
public void Reset ()
{
resultsWindow.Clear ();
iconbox[0].Clear ();
iconbox[1].Clear ();
iconbox[2].Clear ();
QueueDraw ();
Resize (1, 1);
Reposition ();
iconbox[0].DisplayObject = new Do.Interface.Widgets.DefaultIconBoxItem ();
label.SetDisplayLabel (Catalog.GetString ("Type to begin searching"),
Catalog.GetString ("Type to start searching."));
}
public void Grow ()
{
iconbox[2].Show ();
Resize (1, 1);
}
public void Shrink ()
{
iconbox[2].Hide ();
Resize (1, 1);
}
public void GrowResults ()
{
if (!resultsWindow.Visible)
resultsWindow.Show ();
}
public void ShrinkResults ()
{
if (resultsWindow.Visible)
resultsWindow.Hide ();
}
public void SetPaneContext (Pane pane, IUIContext context)
{
if (!context.Results.Any () && !context.LargeTextDisplay) {
if (pane == Pane.First && context.ParentContext == null) {
iconbox[0].TextOverlay = context.LargeTextDisplay;
iconbox[0].DisplayObject = new Do.Interface.Widgets.DefaultIconBoxItem ();
label.SetDisplayLabel (Catalog.GetString ("Type to begin searching"),
Catalog.GetString ("Type to start searching."));
} else {
Do.Universe.Item noRes = new NoResultsFoundItem (context.Query);
for (int i = (int) pane; i < 3; i++) {
iconbox[i].Clear ();
iconbox[i].DisplayObject = noRes;
if (i == (int) CurrentPane) {
label.SetDisplayLabel (noRes.Name, noRes.Description);
resultsWindow.Clear ();
}
}
}
return;
}
if (string.IsNullOrEmpty (context.Query) && context.LargeTextDisplay) {
iconbox[(int) pane].TextOverlay = context.LargeTextDisplay;
iconbox[(int) pane].DisplayObject = new TextItem ("Enter Text") as Do.Universe.Item;
if (!context.Results.Any ()) return;
} else {
iconbox[(int) pane].TextOverlay = context.LargeTextDisplay;
iconbox[(int) pane].DisplayObject = context.Selection;
if (!context.LargeTextDisplay)
iconbox[(int) pane].Highlight = context.Query;
}
if (context.Selection == null) return;
if (pane == CurrentPane) {
resultsWindow.Context = context;
if (!context.LargeTextDisplay)
label.SetDisplayLabel (context.Selection.Name, context.Selection.Description);
else
label.SetDisplayLabel ("", "Raw Text Mode");
}
}
public void ClearPane (Pane pane)
{
iconbox[(int) pane].Clear ();
if (pane == CurrentPane)
resultsWindow.Clear ();
}
public bool ResultsCanHide { get { return true; } }
protected override bool OnExposeEvent (EventExpose evnt)
{
Cairo.Context cairo;
using (cairo = Gdk.CairoHelper.Create (GdkWindow)) {
cairo.Rectangle (evnt.Area.X, evnt.Area.Y, evnt.Area.Width, evnt.Area.Height);
cairo.Color = new Cairo.Color (1.0, 1.0, 1.0, 0.0);
cairo.Operator = Cairo.Operator.Source;
cairo.Paint ();
}
return base.OnExposeEvent (evnt);
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/Do.Interface.CairoUtils 0000644 0001750 0001750 00000000132 11724616775 026762 x ustar 00 0000000 0000000 30 mtime=1330847229.980504914
30 atime=1330847230.796504871
30 ctime=1330847229.980504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.CairoUtils/ 0000775 0001750 0001750 00000000000 11724616775 026320 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.CairoUtils/PaxHeaders.10129/CairoUtils0000644 0001750 0001750 00000000074 11704304006 031020 x ustar 00 0000000 0000000 30 atime=1330831085.958265886
30 ctime=1330847229.980504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.CairoUtils/CairoUtils.cs 0000664 0001750 0001750 00000024443 11704304006 030707 0 ustar 00chris chris 0000000 0000000 // CairoUtils.cs
//
// Copyright (C) 2008 GNOME Do
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using Cairo;
using Gdk;
using Do.Interface;
using Do.Universe;
namespace Do.Interface.CairoUtils
{
public static class CairoUtils
{
///
/// Sets a rounded rectangle path of the context
///
///
/// A
///
///
/// A
///
///
/// A
///
///
/// A
///
///
/// A
///
///
/// A
///
public static void SetRoundedRectanglePath (this Context cr, double x, double y,
double width, double height, double radius)
{
cr.MoveTo (x+radius, y);
cr.Arc (x+width-radius, y+radius, radius, Math.PI*1.5, Math.PI*2);
cr.Arc (x+width-radius, y+height-radius, radius, 0, Math.PI*.5);
cr.Arc (x+radius, y+height-radius, radius, Math.PI*.5, Math.PI);
cr.Arc (x+radius, y+radius, radius, Math.PI, Math.PI*1.5);
}
///
/// Set a rounded rectangle path from a Gdk.Rectangle. If stroke is set to true, the path will be
/// adjusted to allow for stroking with a single line width.
///
///
/// A
///
///
/// A
///
///
/// A
///
///
/// A
///
public static void SetRoundedRectanglePath (this Context cr, Gdk.Rectangle region, double radius, bool stroke)
{
if (stroke)
SetRoundedRectanglePath (cr, (double)region.X+.5, (double)region.Y+.5, (double)region.Width-1,
(double)region.Height-1, radius);
else
SetRoundedRectanglePath (cr, region.X, region.Y, region.Width, region.Height, radius);
}
public static void AlphaFill (this Context cr)
{
cr.Save ();
cr.Color = new Cairo.Color (0, 0, 0, 0);
cr.Operator = Operator.Source;
cr.Paint ();
cr.Restore ();
}
///
/// Convert a Gdk.Color to Cairo.Colo
///
///
/// A
///
///
/// A
///
///
/// A
///
public static Cairo.Color ConvertToCairo (this Gdk.Color color, double alpha)
{
return new Cairo.Color ((double) color.Red/ushort.MaxValue,
(double) color.Green/ushort.MaxValue,
(double) color.Blue/ushort.MaxValue,
alpha);
}
///
/// Convert a Cairo.Color to a Gdk.Color
///
///
/// A
///
///
/// A
///
public static Gdk.Color ConvertToGdk (this Cairo.Color color)
{
return new Gdk.Color (Convert.ToByte (color.R*byte.MaxValue),
Convert.ToByte (color.G*byte.MaxValue),
Convert.ToByte (color.B*byte.MaxValue));
}
///
/// Adjust the brightness of a Color
///
///
/// A
///
///
/// A
///
///
/// A
///
public static Cairo.Color ShadeColor (this Cairo.Color color, double brightness)
{
Gdk.Color gdk_color = ConvertToGdk (color);
byte r, g, b;
double h, s, v;
r = (byte) ((gdk_color.Red) >> 8);
g = (byte) ((gdk_color.Green) >> 8);
b = (byte) ((gdk_color.Blue) >> 8);
Util.Appearance.RGBToHSV (r, g, b, out h, out s, out v);
v = Math.Min (100, v * brightness);
Util.Appearance.HSVToRGB (h, s, v, out r, out g, out b);
return new Cairo.Color ((double) r/byte.MaxValue,
(double) g/byte.MaxValue,
(double) b/byte.MaxValue,
color.A);
}
///
/// Adjust the saturation of a color
///
///
/// A
///
///
/// A
///
///
/// A
///
public static Cairo.Color SaturateColor (this Cairo.Color color, double saturation)
{
Gdk.Color gdk_color = ConvertToGdk (color);
byte r, g, b;
double h, s, v;
r = (byte) ((gdk_color.Red) >> 8);
g = (byte) ((gdk_color.Green) >> 8);
b = (byte) ((gdk_color.Blue) >> 8);
Util.Appearance.RGBToHSV (r, g, b, out h, out s, out v);
s *= saturation;
Util.Appearance.HSVToRGB (h, s, v, out r, out g, out b);
return new Cairo.Color ((double) r/byte.MaxValue,
(double) g/byte.MaxValue,
(double) b/byte.MaxValue,
color.A);
}
///
/// Adjust the Hue of a color
///
///
/// A
///
///
/// A
///
///
/// A
///
public static Cairo.Color SetHue (this Cairo.Color color, double hue)
{
if (hue <= 0 || hue > 360)
return color;
Gdk.Color gdk_color = ConvertToGdk (color);
byte r, g, b;
double h, s, v;
r = (byte) ((gdk_color.Red) >> 8);
g = (byte) ((gdk_color.Green) >> 8);
b = (byte) ((gdk_color.Blue) >> 8);
Util.Appearance.RGBToHSV (r, g, b, out h, out s, out v);
h = hue;
Util.Appearance.HSVToRGB (h, s, v, out r, out g, out b);
return new Cairo.Color ((double) r/byte.MaxValue,
(double) g/byte.MaxValue,
(double) b/byte.MaxValue,
color.A);
}
///
/// Colorize grey colors to allow for better theme matching. Colors with saturation will
/// have nothing done to them
///
///
/// A
///
///
/// A
///
///
/// A
///
public static Cairo.Color ColorizeColor (this Cairo.Color color, Cairo.Color reference_color)
{
//Color has no saturation to it, we need to give it some
if (color.B == color.G && color.B == color.R) {
Gdk.Color gdk_color0 = ConvertToGdk (color);
Gdk.Color gdk_color1 = ConvertToGdk (reference_color);
byte r0, g0, b0, r1, g1, b1;
double h0, s0, v0, h1, s1, v1;
r0 = (byte) ((gdk_color0.Red) >> 8);
g0 = (byte) ((gdk_color0.Green) >> 8);
b0 = (byte) ((gdk_color0.Blue) >> 8);
r1 = (byte) ((gdk_color1.Red) >> 8);
g1 = (byte) ((gdk_color1.Green) >> 8);
b1 = (byte) ((gdk_color1.Blue) >> 8);
Util.Appearance.RGBToHSV (r0, g0, b0, out h0, out s0, out v0);
Util.Appearance.RGBToHSV (r1, g1, b1, out h1, out s1, out v1);
h0 = h1;
s0 = (s0+s1)/2;
Util.Appearance.HSVToRGB (h0, s0, v0, out r0, out g0, out b0);
return new Cairo.Color ((double) r0/byte.MaxValue,
(double) g0/byte.MaxValue,
(double) b0/byte.MaxValue,
color.A);
} else { //color is already saturated in some manner, do nothing
return color;
}
}
///
/// Set a color to use a maximum value
///
///
/// A
///
///
/// A
///
///
/// A
///
public static Gdk.Color SetMaximumValue (this Gdk.Color gdk_color, double max_value)
{
byte r, g, b;
double h, s, v;
r = (byte) ((gdk_color.Red) >> 8);
g = (byte) ((gdk_color.Green) >> 8);
b = (byte) ((gdk_color.Blue) >> 8);
Util.Appearance.RGBToHSV (r, g, b, out h, out s, out v);
v = Math.Min (v, max_value);
Util.Appearance.HSVToRGB (h, s, v, out r, out g, out b);
return new Gdk.Color (r, g, b);
}
///
/// Set a color to use a maximum value
///
///
/// A
///
///
/// A
///
///
/// A
///
public static Gdk.Color SetMinimumValue (this Gdk.Color gdk_color, double min_value)
{
byte r, g, b;
double h, s, v;
r = (byte) ((gdk_color.Red) >> 8);
g = (byte) ((gdk_color.Green) >> 8);
b = (byte) ((gdk_color.Blue) >> 8);
Util.Appearance.RGBToHSV (r, g, b, out h, out s, out v);
v = Math.Max (v, min_value);
Util.Appearance.HSVToRGB (h, s, v, out r, out g, out b);
return new Gdk.Color (r, g, b);
}
///
/// Convert a Gdk.color to a hex string
///
///
/// A
///
///
/// A
///
public static string ColorToHexString (this Gdk.Color gdk_color)
{
byte r, g, b;
r = (byte) ((gdk_color.Red) >> 8);
g = (byte) ((gdk_color.Green) >> 8);
b = (byte) ((gdk_color.Blue) >> 8);
return string.Format ("{0:X2}{1:X2}{2:X2}", r, g, b);
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/Do.Interface.Widgets 0000644 0001750 0001750 00000000132 11724616775 026312 x ustar 00 0000000 0000000 30 mtime=1330847229.992504914
30 atime=1330847230.796504871
30 ctime=1330847229.992504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/ 0000775 0001750 0001750 00000000000 11724616775 025650 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/PaxHeaders.10129/DefaultItems.0000644 0001750 0001750 00000000074 11704304006 030736 x ustar 00 0000000 0000000 30 atime=1330831085.958265886
30 ctime=1330847229.984504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/DefaultItems.cs 0000664 0001750 0001750 00000003446 11704304006 030547 0 ustar 00chris chris 0000000 0000000 // DefaultItems.cs
//
// Copyright (C) 2008 Jason Smith
//
// This program 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.
//
// This program 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
//
//
using System;
using Mono.Unix;
using Do.Universe;
namespace Do.Interface.Widgets
{
public class NoResultsFoundItem : Item
{
string query;
public NoResultsFoundItem (string query)
{
this.query = query;
}
public override string Icon { get { return "gtk-dialog-question"; } }
public override string Name { get { return Catalog.GetString (string.Format("No results for {0}", query)); } }
public override string Description {
get {
return string.Format (Catalog.GetString (string.Format("No results found for {0}", query)));
}
}
}
public class DefaultIconBoxItem : Item
{
public override string Icon { get { return "search"; } }
public override string Name { get { return ""; } }
public override string Description { get { return ""; } }
}
public class DefaultLabelBoxItem : Item
{
public override string Icon { get { return "search"; } }
public override string Name { get { return Catalog.GetString ("Type to begin searching"); } }
public override string Description { get { return ""; } }
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/PaxHeaders.10129/Frame.cs 0000644 0001750 0001750 00000000074 11704304006 027730 x ustar 00 0000000 0000000 30 atime=1330831085.962265886
30 ctime=1330847229.984504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/Frame.cs 0000664 0001750 0001750 00000015660 11704304006 027214 0 ustar 00chris chris 0000000 0000000 /* Frame.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using Gtk;
using Gdk;
namespace Do.Interface.Widgets
{
public class Frame : Bin
{
protected Rectangle childAlloc;
protected double radius;
protected bool drawFrame;
protected Color frameColor;
protected double frameAlpha;
protected bool drawGradient;
protected bool fill;
protected Color fillColor;
protected double fillAlpha;
protected Cairo.Context cairo;
protected int height, width;
protected int x, y;
public Frame () : base ()
{
fill = false;
fillAlpha = 1.0;
drawFrame = false;
frameAlpha = 1.0;
radius = 12.0;
fillColor = frameColor = new Color (0, 0, 0);
}
public double Radius
{
get { return radius; }
set {
radius = value;
if (IsDrawable) QueueDraw ();
}
}
public bool DrawFrame
{
get { return drawFrame; }
set {
drawFrame = value;
if (IsDrawable) QueueDraw ();
}
}
public Color FrameColor
{
get { return frameColor; }
set {
frameColor = new Color ((byte)value.Red, (byte)value.Green, (byte)value.Blue);
if (IsDrawable) QueueDraw ();
}
}
public double FrameAlpha
{
get { return frameAlpha; }
set {
frameAlpha = value;
if (IsDrawable) QueueDraw ();
}
}
public bool DrawFill
{
get { return fill; }
set {
fill = value;
if (IsDrawable) QueueDraw ();
}
}
public Color FillColor
{
get { return fillColor; }
set {
fillColor = new Color ((byte)value.Red, (byte)value.Green, (byte)value.Blue);
if (IsDrawable) QueueDraw ();
}
}
public double FillAlpha
{
get { return fillAlpha; }
set {
fillAlpha = value;
if (IsDrawable) QueueDraw ();
}
}
protected virtual void GetFrame (Cairo.Context cairo)
{
if (radius == 0)
{
cairo.MoveTo (x, y);
cairo.Rectangle (x, y, width, height);
} else {
cairo.MoveTo (x+radius, y);
cairo.Arc (x+width-radius, y+radius, radius, (Math.PI*1.5), (Math.PI*2));
cairo.Arc (x+width-radius, y+height-radius, radius, 0, (Math.PI*0.5));
cairo.Arc (x+radius, y+height-radius, radius, (Math.PI*0.5), Math.PI);
cairo.Arc (x+radius, y+radius, radius, Math.PI, (Math.PI*1.5));
}
}
protected virtual void GetBorderFrame (Cairo.Context cairo)
{
/* Override coordinates to align to the cairo grid */
double X, Y, Width, Height;
X = x + cairo.LineWidth/2.0;
Y = y + cairo.LineWidth/2.0;
Width = width - cairo.LineWidth;
Height = height - cairo.LineWidth;
if (radius == 0)
{
cairo.MoveTo (X, Y);
cairo.Rectangle (X, Y, Width, Height);
} else {
cairo.MoveTo (X+radius, Y);
cairo.Arc (X+Width-radius, Y+radius, radius, (Math.PI*1.5), (Math.PI*2));
cairo.Arc (X+Width-radius, Y+Height-radius, radius, 0, (Math.PI*0.5));
cairo.Arc (X+radius, Y+Height-radius, radius, (Math.PI*0.5), Math.PI);
cairo.Arc (X+radius, Y+radius, radius, Math.PI, (Math.PI*1.5));
}
}
protected virtual void Paint (Gdk.Rectangle area)
{
if (!IsDrawable) {
return;
}
if (!drawFrame && !fill) {
/* Nothing to draw. */
return;
}
/* You shouldn't change the size of the drawing area
* to avoid glitches when switching panes, though
* you can enlarge the big frame.
* This workaround is enlarging only the frame which has
* radius == 0, so when the window is not composited.
* Pretty ugly, I should think on something better.
*
* int offset = radius == 0 ? 1 : 0;
*
* x = childAlloc.X - offset;
* y = childAlloc.Y - offset;
* width = childAlloc.Width + offset * 2;
* height = childAlloc.Height + offset * 2;
*/
x = childAlloc.X;
y = childAlloc.Y;
width = childAlloc.Width;
height = childAlloc.Height;
if (this.radius < 0.0) {
radius = Math.Min (width, height);
radius = (radius / 100) * 10;
}
using (cairo = Gdk.CairoHelper.Create (GdkWindow)) {
cairo.Operator = Cairo.Operator.Over;
if (fill) {
PaintFill ();
}
cairo.NewPath ();
if (drawFrame) {
PaintBorder ();
}
if (drawGradient)
((IDisposable)cairo.Target).Dispose ();
}
}
protected virtual Cairo.LinearGradient GetGradient ()
{
return new Cairo.LinearGradient (x, y, x, y+height);
}
protected virtual void PaintFill ()
{
double r, g, b;
r = (double) fillColor.Red / ushort.MaxValue;
g = (double) fillColor.Green / ushort.MaxValue;
b = (double) fillColor.Blue / ushort.MaxValue;
cairo.Save ();
GetFrame (cairo);
if ( !drawGradient )
cairo.Color = new Cairo.Color (r, g, b, fillAlpha);
else
cairo.Pattern = GetGradient ();
cairo.FillPreserve ();
cairo.Restore ();
}
protected virtual void PaintBorder ()
{
double r, g, b;
r = (double) frameColor.Red / ushort.MaxValue;
g = (double) frameColor.Green / ushort.MaxValue;
b = (double) frameColor.Blue / ushort.MaxValue;
cairo.Save ();
cairo.LineWidth = 2;
GetBorderFrame (cairo);
cairo.Color = new Cairo.Color (r, g, b, frameAlpha);
cairo.Stroke ();
cairo.Restore ();
}
protected override bool OnExposeEvent (EventExpose evnt)
{
if (IsDrawable) {
Paint (evnt.Area);
base.OnExposeEvent (evnt);
}
return false;
}
protected override void OnSizeRequested (ref Requisition requisition)
{
Requisition cr;
requisition.Height = requisition.Width = 0;
if (Child != null && Child.Visible) {
cr = Child.SizeRequest ();
requisition.Width = Math.Max (requisition.Width, cr.Width);
requisition.Height += cr.Height;
}
requisition.Width += (int)(BorderWidth + 2);
requisition.Height += (int)(BorderWidth + 2);
}
protected override void OnSizeAllocated (Rectangle allocation)
{
Rectangle new_alloc;
new_alloc.X = (int) BorderWidth + 1;
new_alloc.Width = Math.Max (1, allocation.Width - new_alloc.X * 2);
new_alloc.Y = (int) BorderWidth + 1;
new_alloc.Height = Math.Max (1, allocation.Height - new_alloc.Y * 2);
new_alloc.X += allocation.X;
new_alloc.Y += allocation.Y;
if (IsMapped && new_alloc != childAlloc) {
GdkWindow.InvalidateRect (new_alloc, false);
}
if (Child != null && Child.Visible) {
Child.SizeAllocate (new_alloc);
}
childAlloc = new_alloc;
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/PaxHeaders.10129/GlossyRounded0000644 0001750 0001750 00000000074 11704304006 031073 x ustar 00 0000000 0000000 30 atime=1330831085.966265885
30 ctime=1330847229.988504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/GlossyRoundedFrame.cs 0000664 0001750 0001750 00000006145 11704304006 031734 0 ustar 00chris chris 0000000 0000000 /* GlossyRoundedFrame.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using Cairo;
using Gtk;
using Gdk;
namespace Do.Interface.Widgets
{
public class GlossyRoundedFrame : Frame
{
protected double glossHeight = .5;
protected int glossAngle = -25;
public GlossyRoundedFrame ()
{
drawGradient = true;
}
public double GlossHeight
{
get { return glossHeight; }
set {
if (value >= 0 || value <= 1)
glossHeight = value;
}
}
public int GlossAngle
{
get { return glossAngle; }
set { glossAngle = value; }
}
protected void GlossOverlay (Context glare)
{
Cairo.PointD pt1, pt2, pt3;
int localGlossHeight = (int) (height * glossHeight);
pt1 = new Cairo.PointD (x, localGlossHeight);
pt2 = new Cairo.PointD (x+2*width/3, localGlossHeight+glossAngle);
pt3 = new Cairo.PointD (x+width/3, localGlossHeight+glossAngle);
if (radius != 0) {
glare.MoveTo (x+radius, y);
glare.Arc (x+width-radius, y+radius, radius, (Math.PI*1.5), (Math.PI*2));
glare.LineTo (x+width, localGlossHeight);
glare.CurveTo (pt2, pt3, pt1);
glare.Arc (x+radius, y+radius, radius, Math.PI, (Math.PI*1.5));
} else {
glare.MoveTo (x, y);
glare.LineTo (x+width, y);
glare.LineTo (x+width, localGlossHeight);
glare.CurveTo (pt2, pt3, pt1);
glare.ClosePath ();
}
}
protected override LinearGradient GetGradient ()
{
double r, g, b;
LinearGradient gloss = base.GetGradient ();
r = (double) fillColor.Red / ushort.MaxValue;
g = (double) fillColor.Green / ushort.MaxValue;
b = (double) fillColor.Blue / ushort.MaxValue;
gloss.AddColorStop (0, new Cairo.Color (r+.25, g+.25, b+.25, fillAlpha));
gloss.AddColorStop (.25, new Cairo.Color (r, g, b, fillAlpha));
gloss.AddColorStop (.75, new Cairo.Color (r-.15, g-.15, b-.15, fillAlpha));
return gloss;
}
protected override void PaintFill ()
{
base.PaintFill ();
Cairo.Gradient fade;
fade = new Cairo.LinearGradient (0, 0, 0, height);
fade.AddColorStop (0, new Cairo.Color (1, 1, 1, 0));
fade.AddColorStop (.75, new Cairo.Color (1, 1, 1, .25));
cairo.Save ();
cairo.NewPath ();
GlossOverlay (cairo);
cairo.Pattern = fade;
cairo.FillPreserve ();
cairo.Restore ();
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/PaxHeaders.10129/HalfRoundedFr0000644 0001750 0001750 00000000074 11704304006 030755 x ustar 00 0000000 0000000 30 atime=1330831085.970265885
30 ctime=1330847229.988504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/HalfRoundedFrame.cs 0000664 0001750 0001750 00000005557 11704304006 031334 0 ustar 00chris chris 0000000 0000000 /* HalfRoundedFrame.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
namespace Do.Interface.Widgets
{
public class HalfRoundedFrame : Frame
{
protected Cairo.Context outline;
public HalfRoundedFrame ()
{
}
protected override void GetFrame (Cairo.Context cairo)
{
if (radius == 0) {
cairo.MoveTo (x, y);
cairo.Rectangle (x, y, width, height);
} else {
cairo.MoveTo (x, y);
cairo.LineTo (x+width, y);
cairo.Arc (x+width-radius, y+height-radius, radius, 0, (Math.PI*0.5));
cairo.Arc (x+radius, y+height-radius, radius, (Math.PI*0.5), Math.PI);
cairo.ClosePath ();
}
}
protected void SemiOutline (Cairo.Context outline)
{
/* Override coordinates to align to the cairo grid */
double X, Y, Width, Height;
X = x + cairo.LineWidth/2.0;
Y = y + cairo.LineWidth/2.0;
Width = width - cairo.LineWidth;
Height = height - cairo.LineWidth;
if (radius == 0) {
outline.MoveTo (X+Width, Y);
outline.LineTo (X+Width, Y+Height);
outline.LineTo (X, Y+Height);
outline.LineTo (X, Y);
} else {
outline.MoveTo (X+width, y);
outline.Arc (X+Width-radius, Y+Height-radius, radius, 0, (Math.PI*0.5));
outline.Arc (x+radius, Y+Height-radius, radius, (Math.PI*0.5), Math.PI);
outline.LineTo (X, Y);
}
}
protected override void PaintFill ()
{
double r, g, b, offset;
offset = -.15;
r = (double) fillColor.Red / ushort.MaxValue;
g = (double) fillColor.Green / ushort.MaxValue;
b = (double) fillColor.Blue / ushort.MaxValue;
cairo.Save ();
GetFrame (cairo);
cairo.Color = new Cairo.Color (r+offset, g+offset, b+offset, fillAlpha);
cairo.FillPreserve ();
cairo.Restore ();
}
protected override void PaintBorder ()
{
double r, g, b, brighten = .2;
r = (double) fillColor.Red / ushort.MaxValue;
g = (double) fillColor.Green / ushort.MaxValue;
b = (double) fillColor.Blue / ushort.MaxValue;
cairo.Save ();
cairo.LineWidth = 2;
SemiOutline (cairo);
cairo.Color = new Cairo.Color (r+brighten, g+brighten, b+brighten, frameAlpha);
cairo.Stroke ();
cairo.Restore ();
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/PaxHeaders.10129/IconBox.cs 0000644 0001750 0001750 00000000074 11704304006 030237 x ustar 00 0000000 0000000 30 atime=1330831085.974265886
30 ctime=1330847229.988504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/IconBox.cs 0000664 0001750 0001750 00000014422 11704304006 027516 0 ustar 00chris chris 0000000 0000000 /* IconBox.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using Gtk;
using Gdk;
using Do.Universe;
using Do.Platform;
using Do.Interface;
namespace Do.Interface.Widgets
{
public class IconBox : Frame
{
const string CaptionFormat = "{0}";
const string HighlightFormat = "{0}";
protected bool focused, textOverlay;
protected string caption, icon_name, highlight;
protected Pixbuf empty_pixbuf;
protected int icon_size;
protected VBox vbox;
protected Gtk.Image image;
protected Label label;
protected Gdk.Pixbuf overlay_pixbuf;
protected float focused_fill_transparency = 0.4f;
protected float unfocused_fill_transparency = 0.1f;
protected float focused_frame_transparency = 0.3f;
protected float unfocused_frame_transparency = 0.075f;
public IconBox (int icon_size) : base ()
{
this.icon_size = icon_size;
overlay_pixbuf = IconProvider.PixbufFromIconName ("gnome-mime-text", icon_size);
Build ();
}
protected virtual void Build ()
{
Alignment label_align;
caption = "";
highlight = "";
vbox = new VBox (false, 4);
vbox.BorderWidth = 6;
Add (vbox);
vbox.Show ();
empty_pixbuf = new Pixbuf (Colorspace.Rgb, true, 8, icon_size, icon_size);
empty_pixbuf.Fill (uint.MinValue);
image = new Gtk.Image ();
vbox.PackStart (image, false, false, 0);
image.Show ();
label = new Label ();
label.Ellipsize = Pango.EllipsizeMode.End;
label.ModifyFg (StateType.Normal, Style.White);
label_align = new Alignment (1.0F, 0.0F, 0, 0);
label_align.SetPadding (0, 2, 2, 2);
label_align.Add (label);
vbox.PackStart (label_align, false, false, 0);
label.Show ();
label_align.Show ();
image.SetSizeRequest (icon_size, icon_size);
label.SetSizeRequest (icon_size / 4 * 5, -1);
// SetSizeRequest (icon_size * 2, icon_size * 2);
DrawFrame = DrawFill = true;
FrameColor = FillColor = new Color (byte.MaxValue, byte.MaxValue, byte.MaxValue);
Realized += OnRealized;
UpdateFocus ();
}
public virtual void Clear ()
{
Pixbuf = null;
highlight = "";
Caption = "";
icon_name = "";
TextOverlay = false;
}
protected virtual void OnRealized (object o, EventArgs args)
{
UpdateFocus ();
}
public bool IsFocused
{
get { return focused; }
set {
if (focused == value) return;
focused = value;
UpdateFocus ();
}
}
public virtual bool TextOverlay
{
get { return textOverlay; }
set {
if (textOverlay == value)
return;
textOverlay = value;
if (value) {
FillAlpha = focused_fill_transparency;
FrameAlpha = focused_frame_transparency;
FillColor = FrameColor = new Color (0x00, 0x00, 0x00);
image.Hide ();
label.Ellipsize = Pango.EllipsizeMode.None;
label.LineWrapMode = Pango.WrapMode.WordChar;
label.LineWrap = true;
highlight = "";
} else {
FillColor = FrameColor = new Color (0xff, 0xff, 0xff);
image.Show ();
label.Wrap = false;
label.Ellipsize = Pango.EllipsizeMode.End;
}
}
}
public string Caption
{
get { return caption; }
set {
caption = GLib.Markup.EscapeText (value ?? "");
caption = caption.Replace ("\n", " ");
UpdateLabel ();
}
}
private void UpdateLabel ()
{
int lines = label.Layout.LineCount;
label.Markup = string.Format (CaptionFormat,
Util.FormatCommonSubstrings (caption, highlight, HighlightFormat));
if (lines != label.Layout.LineCount && LinesChanged != null)
LinesChanged (label.Layout.LineCount, new EventArgs ());
}
public string Icon
{
get {
return icon_name;
}
set {
if (value == null || textOverlay) return;
icon_name = value;
using (Gdk.Pixbuf pix = IconProvider.PixbufFromIconName (value, icon_size)) {
Pixbuf = pix;
}
}
}
public Pixbuf Pixbuf
{
set {
image.Pixbuf = value ?? empty_pixbuf;
}
}
public Do.Universe.Item DisplayObject
{
set {
string name, icon;
icon = null;
name = null;
if (value != null) {
icon = value.Icon;
name = value.Name;
if (name == Caption && icon == this.Icon)
return;
}
Icon = icon;
Caption = name;
}
}
public string Highlight
{
set {
highlight = value ?? "";
UpdateLabel ();
}
}
protected virtual void UpdateFocus ()
{
FillAlpha = focused ? focused_fill_transparency : unfocused_fill_transparency;
FrameAlpha = focused ? focused_frame_transparency : unfocused_frame_transparency;
}
protected override void PaintFill ()
{
if (!textOverlay) {
base.PaintFill ();
return;
}
// Gtk doesn't allow stacking elements, so we can't use a standard GTK interface here
// To work around this we will instead draw our own icon and gtk will be none the wiser.
// We are very clever.
double r, g, b;
r = (double) fillColor.Red / ushort.MaxValue;
g = (double) fillColor.Green / ushort.MaxValue;
b = (double) fillColor.Blue / ushort.MaxValue;
cairo.Save ();
GetFrame (cairo);
Gdk.CairoHelper.SetSourcePixbuf (cairo,
overlay_pixbuf,
(int) (width / 2) - (int) (overlay_pixbuf.Width / 2) + x,
(int) (height / 2) - (int) (overlay_pixbuf.Height / 2) + y);
cairo.PaintWithAlpha (fillAlpha);
cairo.Color = new Cairo.Color (r, g, b, fillAlpha);
cairo.FillPreserve ();
cairo.Restore ();
}
public event EventHandler LinesChanged;
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/PaxHeaders.10129/ResultsWindow0000644 0001750 0001750 00000000074 11704304006 031123 x ustar 00 0000000 0000000 30 atime=1330831085.978265887
30 ctime=1330847229.992504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/ResultsWindow.cs 0000664 0001750 0001750 00000031445 11704304006 031012 0 ustar 00chris chris 0000000 0000000 /* ResultsWindow.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Gtk;
using Gdk;
using Do.Universe;
using Do.Platform;
using Do.Interface;
namespace Do.Interface.Widgets
{
public delegate void OnSelectionChanged (object sender,
ResultsWindowSelectionEventArgs args);
public class ResultsWindow : Gtk.Window
{
protected int DefaultResultIconSize = 32;
protected int DefaultWindowWidth = 352;
protected int NumberResultsDisplayed = 6;
protected int offset;
public string ResultInfoFormat
{
set { resultInfoFormat = value; }
get { return resultInfoFormat; }
}
protected string resultInfoFormat = "{0}\n{1}";
const string QueryLabelFormat = "{0}";
public event OnSelectionChanged SelectionChanged;
protected enum Column {
ItemColumn = 0,
NameColumn = 1,
NumberColumns = 2
}
protected ScrolledWindow resultsScrolledWindow;
protected TreeView resultsTreeview;
protected IList results, stunted_results;
protected int startResult, endResult;
protected Frame frame;
protected string query;
protected Gdk.Color backgroundColor;
protected VBox vbox;
protected Toolbar toolbar;
protected Label resultsLabel, queryLabel;
protected IUIContext context = null;
protected int cursor;
protected int[] secondary = new int[0];
protected bool pushedUpdate, clearing, update_needed = false;
public ResultsWindow (Gdk.Color backgroundColor, int NumberResults)
: base (Gtk.WindowType.Toplevel)
{
this.backgroundColor = backgroundColor;
this.NumberResultsDisplayed = NumberResults;
Build ();
results = new Do.Universe.Item[0];
}
public ResultsWindow (Gdk.Color backgroundColor, int DefaultIconSize,
int WindowWidth, int NumberResults)
: base (Gtk.WindowType.Toplevel)
{
this.backgroundColor = backgroundColor;
this.DefaultResultIconSize = DefaultIconSize;
this.DefaultWindowWidth = WindowWidth;
this.NumberResultsDisplayed = NumberResults;
Build ();
results = new Do.Universe.Item[0];
}
protected void NotifySelectionChanged ()
{
TreeIter iter;
if (!resultsTreeview.Selection.GetSelected (out iter)) return;
try {
cursor = Convert.ToInt32 (resultsTreeview.Model.GetStringFromIter (iter));
} catch { return; }
ResultsWindowSelectionEventArgs args;
args = new ResultsWindowSelectionEventArgs (SelectedIndex, SelectedObject);
if (null != SelectionChanged) {
SelectionChanged (this, args);
}
}
protected virtual void Build ()
{
Alignment align;
TreeViewColumn column;
CellRenderer cell;
HBox hbox;
KeepAbove = true;
AppPaintable = true;
AcceptFocus = false;
// This typehint gets the window to raise all the way to top.
TypeHint = WindowTypeHint.Splashscreen;
SetColormap ();
frame = new Frame ();
frame.DrawFill = true;
frame.DrawFrame = true;
frame.FillColor = frame.FrameColor = backgroundColor;
frame.FillAlpha = .55;
frame.FrameAlpha = .7;
frame.Radius = 0;
frame.Show ();
vbox = new VBox (false, 0);
Add (frame);
frame.Add (vbox);
vbox.BorderWidth = 3;
vbox.Show ();
//---------The breadcrum bar---------
hbox = new HBox ();
toolbar = new Toolbar ();
align = new Alignment (0, .5f, 0, 0);
resultsLabel = new Label ();
queryLabel = new Label ();
align.Add (queryLabel);
hbox.PackStart (align, true, true, 4);
hbox.PackStart (resultsLabel, false, false, 0);
hbox.WidthRequest = DefaultWindowWidth - 10;
toolbar.Add (hbox);
toolbar.ShowAll ();
vbox.PackStart (toolbar, false, false, 0);
//---------Results Window
resultsScrolledWindow = new ScrolledWindow ();
resultsScrolledWindow.SetPolicy (PolicyType.Never, PolicyType.Never);
resultsScrolledWindow.ShadowType = ShadowType.None;
vbox.PackStart (resultsScrolledWindow, true, true, 0);
resultsScrolledWindow.Show ();
resultsTreeview = new TreeView ();
resultsTreeview.EnableSearch = false;
resultsTreeview.HeadersVisible = false;
// If this is not set the tree will call IconDataFunc for all rows to
// determine the total height of the tree
resultsTreeview.FixedHeightMode = true;
resultsScrolledWindow.Add (resultsTreeview);
resultsTreeview.Show ();
resultsTreeview.Model = new ListStore (new Type[] {
typeof (Do.Universe.Item),
typeof (string),
});
column = new TreeViewColumn ();
column.Sizing = Gtk.TreeViewColumnSizing.Fixed;
// because resultsTreeview.FixedHeightMode = true:
cell = new CellRendererPixbuf ();
cell.SetFixedSize (-1, 4 + DefaultResultIconSize - (int) cell.Ypad);
int width, height;
cell.GetFixedSize (out width, out height);
column.PackStart (cell, false);
column.SetCellDataFunc (cell, new TreeCellDataFunc (IconDataFunc));
vbox.SetSizeRequest (DefaultWindowWidth,
(height + 2) * NumberResultsDisplayed +
(int) (vbox.BorderWidth * 2) + 20);
cell = new CellRendererText ();
(cell as CellRendererText).Ellipsize = Pango.EllipsizeMode.End;
column.PackStart (cell, true);
column.AddAttribute (cell, "markup", (int) Column.NameColumn);
resultsTreeview.AppendColumn (column);
resultsTreeview.Selection.Changed += OnResultRowSelected;
Shown += OnShown;
}
public void UpdateColors (Gdk.Color backgroundColor)
{
this.backgroundColor = backgroundColor;
frame.FillColor = backgroundColor;
}
protected void IconDataFunc (TreeViewColumn column, CellRenderer cell,
TreeModel model, TreeIter iter)
{
CellRendererPixbuf renderer = cell as CellRendererPixbuf;
Do.Universe.Item o = (resultsTreeview.Model as ListStore).GetValue (iter, 0) as Do.Universe.Item;
bool isSecondary = false;
foreach (int i in secondary)
if (model.GetStringFromIter (iter) == i.ToString ())
isSecondary = true;
Gdk.Pixbuf final;
if (isSecondary) {
using (Gdk.Pixbuf source = IconProvider.PixbufFromIconName (o.Icon, DefaultResultIconSize))
using (Gdk.Pixbuf emblem = IconProvider.PixbufFromIconName ("gtk-add", DefaultResultIconSize)) {
final = new Pixbuf (Colorspace.Rgb,
true,
8,
DefaultResultIconSize,
DefaultResultIconSize);
source.CopyArea (0, 0, source.Width, source.Height, final, 0, 0);
emblem.Composite (final,
0,
0,
DefaultResultIconSize,
DefaultResultIconSize,
0,
0,
1,
1,
InterpType.Bilinear,
220);
}
} else {
final = IconProvider.PixbufFromIconName (o.Icon, DefaultResultIconSize);
}
renderer.Pixbuf = final;
final.Dispose ();
}
protected void OnResultRowSelected (object sender, EventArgs args)
{
if (!clearing && !pushedUpdate) {
NotifySelectionChanged ();
}
}
public virtual void Clear ()
{
(resultsTreeview.Model as ListStore).Clear ();
cursor = 0;
resultsLabel.Markup = "--/--";
queryLabel.Markup = "";
update_needed = false;
}
public IUIContext Context
{
set {
context = value;
if (!Visible) {
update_needed = true;
return;
}
pushedUpdate = true;
if (value == null || !value.Results.Any ()) {
Results = new Do.Universe.Item [0];
return;
}
if (results.GetHashCode () != value.Results.GetHashCode ()) {
results = value.Results;
}
startResult = value.Cursor - 5;
if (startResult < 0)
startResult = 0;
endResult = startResult + 8;
offset = startResult;
if (endResult > results.Count)
endResult = results.Count;
Do.Universe.Item[] resultsArray = new Do.Universe.Item[endResult - startResult];
Array.Copy (results.ToArray (), startResult, resultsArray, 0, resultsArray.Length);
cursor = value.Cursor - offset;
Results = resultsArray;
Query = value.Query;
int[] secArray = new int[value.SecondaryCursors.Length];
for (int i=0; i ");
context = context.ParentContext;
count++;
}
queryLabel.Markup = string.Format ("{0}{1}",
GLib.Markup.EscapeText (builder.ToString ()),
GLib.Markup.EscapeText (query));
}
private void UpdateCursors ()
{
Gtk.TreePath path;
path = new TreePath (cursor.ToString ());
//makes this just a tiny bit smoother overall
Gtk.Application.Invoke (delegate {
resultsTreeview.Selection.UnselectAll ();
resultsTreeview.Selection.SelectPath (path);
resultsTreeview.ScrollToCell (path, null, true, 0.5F, 0.0F);
});
}
public Do.Universe.Item SelectedObject
{
get {
try {
return results [SelectedIndex];
} catch {
return null;
}
}
}
public IList Results
{
get {
if (stunted_results == null)
stunted_results = new List (0);
return stunted_results;
}
set {
stunted_results = value;
//some memory hacks.
foreach (CellRenderer rend in resultsTreeview.Columns[0].CellRenderers) {
if (rend is CellRendererPixbuf && (rend as CellRendererPixbuf).Pixbuf != null) {
(rend as CellRendererPixbuf).Pixbuf.Dispose ();
}
rend.Dispose ();
}
ListStore store;
string info;
clearing = true;
Gtk.Application.Invoke (delegate {
store = resultsTreeview.Model as ListStore;
store.Clear ();
foreach (Do.Universe.Item result in value) {
info = string.Format (ResultInfoFormat,
GLib.Markup.EscapeText (result.Name),
GLib.Markup.EscapeText (result.Description));
store.AppendValues (new object[] {
result,
info,
});
}
clearing = false;
});
// UpdateCursors ();
}
}
public string Query
{
set {
query = value ?? "";
queryLabel.Markup = string.Format (QueryLabelFormat, GLib.Markup.EscapeText (query));
}
get { return query; }
}
protected void OnShown (object o, EventArgs args)
{
if (update_needed)
Context = context;
update_needed = false;
}
// Draw a border around the window.
protected override bool OnExposeEvent (EventExpose evnt)
{
Cairo.Context cairo;
using (cairo = Gdk.CairoHelper.Create (GdkWindow)) {
cairo.Rectangle (evnt.Area.X, evnt.Area.Y, evnt.Area.Width, evnt.Area.Height);
cairo.Color = new Cairo.Color (1.0, 1.0, 1.0, 0.0);
cairo.Operator = Cairo.Operator.Source;
cairo.Paint ();
}
return base.OnExposeEvent (evnt);
}
protected virtual void SetColormap ()
{
Gdk.Colormap colormap;
colormap = Screen.RgbaColormap;
if (colormap == null) {
colormap = Screen.RgbColormap;
Console.Error.WriteLine ("No alpha support.");
}
Colormap = colormap;
colormap.Dispose ();
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/PaxHeaders.10129/SymbolDisplay0000644 0001750 0001750 00000000074 11704304006 031065 x ustar 00 0000000 0000000 30 atime=1330831085.986265887
30 ctime=1330847229.992504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/SymbolDisplayLabel.cs 0000664 0001750 0001750 00000004666 11704304006 031721 0 ustar 00chris chris 0000000 0000000 /* SymbolDisplayLabel.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using Gtk;
using Gdk;
using Do.Universe;
using Do.Interface;
namespace Do.Interface.Widgets
{
public class SymbolDisplayLabel : Label
{
const string DisplayFormat = " {1} ";
string highlight;
string name, description;
public SymbolDisplayLabel ():
base ("")
{
highlight = name = description = "";
Build ();
}
void Build ()
{
UseMarkup = true;
Ellipsize = Pango.EllipsizeMode.Middle;
Justify = Justification.Center;
ModifyFg (StateType.Normal,
new Gdk.Color (byte.MaxValue, byte.MaxValue, byte.MaxValue));
}
public Do.Universe.Item DisplayObject
{
set {
Do.Universe.Item displayObject;
displayObject = value;
name = description = highlight = "";
if (displayObject != null) {
name = displayObject.Name;
description = displayObject.Description;
}
SetDisplayLabel (name, description);
}
}
public void SetDisplayLabel (string name, string description)
{
this.name = (name ?? "").Replace ("\n", " ");
this.description = (description ?? "").Replace ("\n", " ");
highlight = "";
UpdateText ();
}
public string Highlight
{
get { return highlight; }
set {
highlight = value ?? "";
UpdateText ();
}
}
void UpdateText ()
{
string highlighted, safe_name, safe_description;
safe_name = Util.Appearance.MarkupSafeString (name);
safe_description = Util.Appearance.MarkupSafeString (description);
highlighted = Util.FormatCommonSubstrings(safe_name, highlight, "{0}");
Markup = string.Format (DisplayFormat, highlighted, safe_description);
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/PaxHeaders.10129/TextFrame.cs 0000644 0001750 0001750 00000000074 11704304006 030575 x ustar 00 0000000 0000000 30 atime=1330831085.986265887
30 ctime=1330847229.992504914
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Do.Interface.Widgets/TextFrame.cs 0000664 0001750 0001750 00000005035 11704304006 030054 0 ustar 00chris chris 0000000 0000000 // TextFrame.cs
//
// Copyright (C) 2008 Jason Smith
//
// This program 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.
//
// This program 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
//
//
using System;
using Gtk;
using Gdk;
namespace Do.Interface.Widgets
{
public class TextFrame : Frame
{
protected Label label;
protected string labelText;
protected bool isFocused;
protected float focused_fill_transparency = 0.4f;
protected float unfocused_fill_transparency = 0.1f;
protected float focused_frame_transparency = 0.3f;
protected float unfocused_frame_transparency = 0.075f;
public string LabelText
{
get { return labelText; }
set {
labelText = value;
label.Markup = string.Format("{0}", value);
}
}
public TextFrame ()
{
Build ();
this.LabelText = "";
drawGradient = true;
}
protected virtual void Build ()
{
label = new Label ();
label.Ellipsize = Pango.EllipsizeMode.End;
label.ModifyFg (StateType.Normal, Style.White);
Add (label);
label.Show ();
}
public bool IsFocused
{
get { return isFocused; }
set {
isFocused = value;
UpdateFocus ();
}
}
protected override Cairo.LinearGradient GetGradient ()
{
double r, g, b;
r = (double) frameColor.Red / ushort.MaxValue;
g = (double) frameColor.Green / ushort.MaxValue;
b = (double) frameColor.Blue / ushort.MaxValue;
Cairo.LinearGradient grad = new Cairo.LinearGradient (0, 0, x+width, 0);
grad.AddColorStop (.1, new Cairo.Color (r, g, b, 0));
grad.AddColorStop (.35, new Cairo.Color (r, g, b, fillAlpha));
grad.AddColorStop (.65, new Cairo.Color (r, g, b, fillAlpha));
grad.AddColorStop (.9, new Cairo.Color (r, g, b, 0));
return grad;
}
protected virtual void UpdateFocus ()
{
FillAlpha = (IsFocused ? focused_fill_transparency : unfocused_fill_transparency);
FrameAlpha = (IsFocused ? focused_frame_transparency : unfocused_frame_transparency);
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/Tests 0000644 0001750 0001750 00000000132 11724616776 023547 x ustar 00 0000000 0000000 30 mtime=1330847230.012504913
30 atime=1330847230.796504871
30 ctime=1330847230.012504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Tests/ 0000775 0001750 0001750 00000000000 11724616776 023105 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Tests/PaxHeaders.10129/TestPositionWindow.cs 0000644 0001750 0001750 00000000127 11713404100 027761 x ustar 00 0000000 0000000 27 mtime=1328416832.534997
30 atime=1330831086.002265887
30 ctime=1330847230.016504912
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Tests/TestPositionWindow.cs 0000664 0001750 0001750 00000012151 11713404100 027236 0 ustar 00chris chris 0000000 0000000 //
// TestPositionWindow.cs
//
// Author:
// Christopher James Halse Rogers
//
// Copyright © 2012 Christopher James Halse Rogers
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library 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
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using NUnit.Framework;
namespace Do.Interface.Linux
{
[TestFixture()]
public class TestPositionWindow
{
[SetUp]
public void Setup()
{
Gtk.Application.Init ();
}
[Test()]
public void TestSingleHeadPositionCalc ()
{
var positioner = new PositionWindow (null, null);
var calculatePosition = positioner.GetType ().GetMethod ("CalculateBasePosition",
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Instance);
// Single-head displays have an origin of (0,0)
Gdk.Rectangle screen = new Gdk.Rectangle (0, 0, 1024, 768);
// We only care about width and height here
Gdk.Rectangle window = new Gdk.Rectangle (0, 0, 200, 100);
object[] parameters = new object[] {screen, window, new Gdk.Rectangle ()};
Gdk.Rectangle result = (Gdk.Rectangle)calculatePosition.Invoke (positioner, parameters);
Assert.AreEqual (412, result.X);
Assert.AreEqual (267, result.Y);
}
[Test]
public void TestHorizMultiHeadPositionCalc ()
{
var positioner = new PositionWindow (null, null);
var calculatePosition = positioner.GetType ().GetMethod ("CalculateBasePosition",
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Instance);
// Single-head displays have an origin of (0,0)
Gdk.Rectangle screen_one = new Gdk.Rectangle (0, 0, 1024, 768);
Gdk.Rectangle screen_two = new Gdk.Rectangle (screen_one.Width, 0, 1024, 768);
// We only care about width and height here
Gdk.Rectangle window = new Gdk.Rectangle (0, 0, 200, 100);
object[] parameters = new object[] {screen_one, window, new Gdk.Rectangle ()};
Gdk.Rectangle screen_one_result = (Gdk.Rectangle)calculatePosition.Invoke (positioner, parameters);
parameters = new object[] {screen_two, window, new Gdk.Rectangle ()};
Gdk.Rectangle screen_two_result = (Gdk.Rectangle)calculatePosition.Invoke (positioner, parameters);
Assert.AreEqual (screen_one_result.X + screen_one.Width, screen_two_result.X);
Assert.AreEqual (screen_one_result.Y, screen_two_result.Y);
}
[Test]
public void TestVertMultiHeadPositionCalc ()
{
var positioner = new PositionWindow (null, null);
var calculatePosition = positioner.GetType ().GetMethod ("CalculateBasePosition",
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Instance);
// Single-head displays have an origin of (0,0)
Gdk.Rectangle screen_one = new Gdk.Rectangle (0, 0, 1024, 768);
Gdk.Rectangle screen_two = new Gdk.Rectangle (0, screen_one.Height, 1024, 768);
// We only care about width and height here
Gdk.Rectangle window = new Gdk.Rectangle (0, 0, 200, 100);
object[] parameters = new object[] {screen_one, window, new Gdk.Rectangle ()};
Gdk.Rectangle screen_one_result = (Gdk.Rectangle)calculatePosition.Invoke (positioner, parameters);
parameters = new object[] {screen_two, window, new Gdk.Rectangle ()};
Gdk.Rectangle screen_two_result = (Gdk.Rectangle)calculatePosition.Invoke (positioner, parameters);
Assert.AreEqual (screen_one_result.X, screen_two_result.X);
Assert.AreEqual (screen_one_result.Y + screen_one.Height, screen_two_result.Y);
}
[Test]
[Timeout (500)]
public void TestResultsWindowIsBelowMainWindow ()
{
Gtk.Window main = new Gtk.Window ("Test Main Window");
Gtk.Window results = new Gtk.Window ("Test Results Window");
main.Resize (200, 100);
results.Resize (200, 100);
Gdk.Rectangle resultsOffset = new Gdk.Rectangle (0, 10, 0, 0);
var positioner = new PositionWindow (main, results);
positioner.UpdatePosition (10, Pane.First, resultsOffset);
// Drain the event loop
while (Gtk.Global.EventsPending) {
Gtk.Main.Iteration ();
}
int main_x, main_y;
int results_x, results_y;
main.GetPosition (out main_x, out main_y);
results.GetPosition (out results_x, out results_y);
Assert.Greater (results_y, main_y + 100);
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/IDoController.cs 0000644 0001750 0001750 00000000074 11704304006 025547 x ustar 00 0000000 0000000 30 atime=1330831085.986265887
30 ctime=1330847229.996504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/IDoController.cs 0000664 0001750 0001750 00000004164 11704304006 025030 0 ustar 00chris chris 0000000 0000000 // IDoController.cs
//
// GNOME Do is the legal property of its developers, whose names are too numerous
// to list here. Please refer to the COPYRIGHT file distributed with this
// source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
using System;
using System.Collections.Generic;
using Do.Interface;
using Do.Universe;
namespace Do.Interface
{
public enum ControlOrientation {
Vertical,
Horizontal,
}
public interface IDoController
{
///
/// Allows the UI to alert the controller that a mouse event has selected a new object in a context
///
///
/// A
///
///
/// A
///
void NewContextSelection (Pane pane, int index);
///
/// Allows the UI to alert the controller that a mouse click has occured off of its main window
///
void ButtonPressOffWindow ();
///
/// Allow the UI to set the Controllers idea of the CurrentPane. Useful for allowing current
/// pane setting through mouse events.
///
Pane CurrentPane { set; }
///
/// Set the control layout orientation
///
ControlOrientation Orientation { get; set; }
///
/// Check and see if an object likely has children
///
///
/// A
///
///
/// A
///
bool ItemHasChildren (Item item);
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/IDoWindow.cs 0000644 0001750 0001750 00000000074 11704304006 024673 x ustar 00 0000000 0000000 30 atime=1330831085.986265887
30 ctime=1330847229.996504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/IDoWindow.cs 0000664 0001750 0001750 00000006535 11704304006 024160 0 ustar 00chris chris 0000000 0000000 // IDoWindow.cs
//
// GNOME Do is the legal property of its developers, whose names are too numerous
// to list here. Please refer to the COPYRIGHT file distributed with this
// source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
using System;
using Do.Universe;
using Gdk;
namespace Do.Interface
{
public enum Pane
{
None = -1,
First = 0,
Second = 1,
Third = 2,
}
public interface IDoWindow : IDisposable
{
///
/// Returns true if window is currently being displayed
///
bool Visible { get; }
///
/// The name of the interface
///
string Name { get; }
///
/// Set and Get current Pane
///
Pane CurrentPane { get; set; }
///
/// Initializes the interface
///
///
/// A
///
void Initialize (IDoController controller);
///
/// Summoning of main window. Does not imply resetting of normal state
///
void Summon ();
///
/// Vanishing of main window. Does not imply resetting of normal state
///
void Vanish ();
///
/// Signal to UI window to clear out its panes and set a "default" state as it defines.
/// Focusing of the first pane is implied with this method call
///
void Reset ();
///
/// Event to Controller to pass keypress information on to it. This should be a direct
/// pass to the controller with no modification in between.
///
///
/// A
///
event DoEventKeyDelegate KeyPressEvent;
///
/// Inform UI that the third display area needs to be displayed
///
void Grow ();
///
/// Inform UI that the third display area needs to be hidden
///
void Shrink ();
///
/// Inform UI that it is appropriate to show more results than are currently shown
///
void GrowResults ();
///
/// Inform UI that it is appropriate to show fewer results than are currently shown
///
void ShrinkResults ();
///
/// All inclusive pane set method. This should update the search results as well as the current
/// objects and its highlight.
///
///
/// A
///
///
/// A
///
void SetPaneContext (Pane pane, IUIContext context);
///
/// Clear out the context of a pane.
///
///
/// A
///
void ClearPane (Pane pane);
bool ResultsCanHide { get; }
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/IUIContext.cs 0000644 0001750 0001750 00000000074 11704304006 025023 x ustar 00 0000000 0000000 30 atime=1330831085.986265887
30 ctime=1330847229.996504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/IUIContext.cs 0000664 0001750 0001750 00000003372 11704304006 024304 0 ustar 00chris chris 0000000 0000000 // IUIContext.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.Collections.Generic;
using Do.Universe;
namespace Do.Interface
{
public enum TextModeType {
None,
Explicit,
ExplicitFinalized,
Implicit,
}
public interface IUIContext
{
///
/// The current selection
///
Item Selection {get;}
///
/// The results list
///
IList- Results {get;}
///
/// Integer index of the selection in the results list
///
int Cursor {get;}
///
/// Secondary selections indicies
///
int[] SecondaryCursors {get;}
///
/// The query that got us here
///
string Query {get;}
///
/// Tells the controller to present text in a larger box
///
bool LargeTextDisplay {get;}
TextModeType LargeTextModeType {get;}
///
/// The parent context of the current UI context if it exists.
///
IUIContext ParentContext {get;}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/IconCache.cs 0000644 0001750 0001750 00000000074 11704304006 024644 x ustar 00 0000000 0000000 30 atime=1330831085.986265887
30 ctime=1330847229.996504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/IconCache.cs 0000664 0001750 0001750 00000004232 11704304006 024121 0 ustar 00chris chris 0000000 0000000 /* IconCache.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using System.Collections;
using System.Collections.Generic;
namespace Do.Interface
{
public class IconCache
{
const int MaxSize = 50;
protected Dictionary cache;
public IconCache ()
{
cache = new Dictionary ();
}
public bool TryGetValue (string key, out Gdk.Pixbuf p)
{
Entry e = null;
p = null;
if (cache.TryGetValue (key, out e))
p = e.Icon;
return null != e;
}
public void Clear ()
{
cache.Clear ();
}
public Gdk.Pixbuf this [string key] {
get {
Entry e;
if (cache.TryGetValue (key, out e)) {
e.Time = DateTime.Now;
return e.Icon;
} else {
return null;
}
}
set {
if (cache.ContainsKey (key)) {
cache [key].Time = DateTime.Now;
} else {
if (cache.Count > MaxSize) EvictLRU ();
cache [key] = new Entry (value);
}
}
}
protected void EvictLRU ()
{
string name = null;
Entry least = null;
foreach (KeyValuePair e in cache) {
if (least == null || e.Value.Time < least.Time) {
name = e.Key;
least = e.Value;
}
}
if (null != name) {
cache.Remove (name);
}
}
protected class Entry
{
public Gdk.Pixbuf Icon;
public DateTime Time;
public Entry (Gdk.Pixbuf p)
{
Icon = p;
Time = DateTime.Now;
}
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/IconProvider.cs 0000644 0001750 0001750 00000000074 11704304006 025433 x ustar 00 0000000 0000000 30 atime=1330831085.990265886
30 ctime=1330847230.000504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/IconProvider.cs 0000664 0001750 0001750 00000011601 11704304006 024706 0 ustar 00chris chris 0000000 0000000 /* IconProvider.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using System.IO;
using System.Reflection;
using System.Collections.Generic;
using Gtk;
using Gdk;
using Do.Platform;
namespace Do.Interface
{
public static class IconProvider
{
const string MissingIconIcon = "emblem-noread";
public const int DefaultIconSize = 80;
static IconProvider ()
{
}
static Pixbuf UnknownPixbuf ()
{
Pixbuf pb = new Pixbuf (Colorspace.Rgb, true, 8, 1, 1);
pb.Fill (0x00000000);
return pb;
}
static bool IconIsEmbeddedResource (string name)
{
return 0 < name.IndexOf ("@");
}
static bool IconIsFile (string name)
{
return name.StartsWith ("/") ||
name.StartsWith ("~/") ||
name.StartsWith ("file://", StringComparison.OrdinalIgnoreCase);
}
static Pixbuf IconFromEmbeddedResource (string name, int size)
{
Pixbuf pixbuf = null;
string resource, assemblyName;
resource = name.Substring (0, name.IndexOf ("@"));
assemblyName = name.Substring (resource.Length + 1);
try {
foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies ()) {
if (asm.FullName != assemblyName) continue;
pixbuf = new Pixbuf (asm, resource, size, size);
break;
}
} catch (Exception e) {
Log.Error ("Failed to load icon resource {0} from assembly {1}: {2}",
resource, assemblyName, e.Message);
Log.Debug (e.StackTrace);
pixbuf = null;
}
return pixbuf;
}
static Pixbuf IconFromFile (string name, int size)
{
Pixbuf pixbuf;
string home = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
name = name.Replace ("~", home);
try {
pixbuf = new Pixbuf (name, size, size);
} catch {
pixbuf = null;
}
return pixbuf;
}
static Pixbuf IconFromTheme (string name, int size, IconTheme theme)
{
Pixbuf pixbuf = null;
string name_noext;
// We may have to remove the extension.
if (name.Contains (".")) {
name_noext = name.Remove (name.LastIndexOf ("."));
} else {
name_noext = name;
}
try {
if (theme.HasIcon (name)) {
pixbuf = theme.LoadIcon (name, size, 0);
} else if (theme.HasIcon (name_noext)) {
pixbuf = theme.LoadIcon (name_noext, size, 0);
} else if (name == "gnome-mime-text-plain" && theme.HasIcon ("gnome-mime-text")) {
pixbuf = theme.LoadIcon ("gnome-mime-text", size, 0);
}
} catch {
pixbuf = null;
}
return pixbuf;
}
static Pixbuf GenericFileIcon (int size)
{
Pixbuf pixbuf = null;
if (IconTheme.Default.HasIcon ("gtk-file")) {
try {
pixbuf = IconTheme.Default.LoadIcon ("gtk-file", size, 0);
} catch {
pixbuf = null;
}
}
return pixbuf;
}
public static Pixbuf PixbufFromIconName (string name, int size)
{
Pixbuf pixbuf;
PixbufFromIconName (name, size, out pixbuf);
return pixbuf;
}
public static bool PixbufFromIconName (string name, int size, out Pixbuf pixbuf)
{
if (null == name) throw new ArgumentNullException ("name");
// The icon can be loaded from a loaded assembly if the icon has
// the format: "resource@assemblyname".
if (IconIsEmbeddedResource (name)) {
pixbuf = IconFromEmbeddedResource (name, size);
if (pixbuf != null) return true;
}
if (IconIsFile (name)) {
pixbuf = IconFromFile (name, size);
if (pixbuf != null) return true;
}
// Try to load icon from defaul theme.
pixbuf = IconFromTheme (name, size, IconTheme.Default);
if (pixbuf != null) return true;
// Try to load a generic file icon.
if (name.StartsWith ("gnome-mime")) {
pixbuf = GenericFileIcon (size);
if (pixbuf != null) return true;
}
// After this point, we assume that the caller's icon cannot be found, so
// we attempt to provide a suitable alternative. We return false to
// indicate that an alternative icon selection was made.
// Try to load a pretty "no icon found" icon.
if (name != MissingIconIcon) {
pixbuf = PixbufFromIconName (MissingIconIcon, size);
if (pixbuf != null) return false;
}
// If all else fails, use the UnknownPixbuf.
pixbuf = UnknownPixbuf ();
return false;
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/InterfaceDescription.cs 0000644 0001750 0001750 00000000074 11704304006 027134 x ustar 00 0000000 0000000 30 atime=1330831085.990265886
30 ctime=1330847230.000504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/InterfaceDescription.cs 0000664 0001750 0001750 00000002346 11704304006 026415 0 ustar 00chris chris 0000000 0000000 // InterfaceDescription.cs
//
// Copyright (C) 2008 GNOME Do
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using Mono.Addins;
namespace Do.Interface
{
public class InterfaceDescription
{
TypeExtensionNode node;
public InterfaceDescription (TypeExtensionNode node)
{
if (node == null) throw new ArgumentNullException ("node");
this.node = node;
}
public string Name {
get {
return Addin.Name;
}
}
Addin Addin {
get {
return AddinManager.Registry.GetAddin (node.Addin.Id);
}
}
public IDoWindow GetNewInstance ()
{
return node.CreateInstance () as IDoWindow;
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/InterfaceManager.cs 0000644 0001750 0001750 00000000074 11704304006 026223 x ustar 00 0000000 0000000 30 atime=1330831085.994265886
30 ctime=1330847230.004504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/InterfaceManager.cs 0000664 0001750 0001750 00000004037 11704304006 025503 0 ustar 00chris chris 0000000 0000000 // InterfaceManager.cs
//
// Copyright (C) 2008 GNOME Do
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.Linq;
using System.Collections.Generic;
using Mono.Addins;
using Do.Platform;
namespace Do.Interface
{
public class InterfaceManager
{
public static void Initialize ()
{
if (!AddinManager.IsInitialized)
throw new Exception ("Addin manager was not initialized before initializing user interfaces");
AddinManager.AddExtensionNodeHandler ("/Do/InterfaceWindow", OnInterfaceChanged);
}
static void OnInterfaceChanged (object sender, ExtensionNodeEventArgs e)
{
TypeExtensionNode node = e.ExtensionNode as TypeExtensionNode;
InterfaceDescription desc = new InterfaceDescription (node);
switch (e.Change) {
case ExtensionChange.Add:
Log.Debug ("\"{0}\" interface was loaded", desc.Name);
break;
case ExtensionChange.Remove:
Log.Debug ("\"{0}\" interface was unloaded", desc.Name);
break;
}
}
public static IEnumerable GetInterfaceDescriptions ()
{
return AddinManager.GetExtensionNodes ("/Do/InterfaceWindow")
.Cast ()
.Select (node => new InterfaceDescription (node));
}
public static IDoWindow MaybeGetInterfaceNamed (string name)
{
return GetInterfaceDescriptions ()
.Where (d => d.Name == name)
.Select (d => d.GetNewInstance ())
.FirstOrDefault ();
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/PixbufSurfaceCache.cs 0000644 0001750 0001750 00000000074 11704304006 026522 x ustar 00 0000000 0000000 30 atime=1330831085.994265886
30 ctime=1330847230.004504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PixbufSurfaceCache.cs 0000664 0001750 0001750 00000010277 11704304006 026005 0 ustar 00chris chris 0000000 0000000 // PixbufSurfaceCache.cs
//
// Copyright (C) 2008 GNOME Do
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.Linq;
using System.Collections.Generic;
using Cairo;
using Gdk;
using Gtk;
using Do.Platform;
using Do.Interface;
namespace Do.Interface
{
public class PixbufSurfaceCache : IDisposable
{
Dictionary surface_cache;
int surface_width;
int surface_height;
public PixbufSurfaceCache(int count, int surface_width, int surface_height, Surface sourceSurface)
{
this.surface_width = surface_width;
this.surface_height = surface_height;
surface_cache = new Dictionary ();
Entry e;
for (int i=0; i ();
Entry e;
for (int i=0; i {
public Surface surface;
public DateTime time;
public string ID;
#region IComparable[PixbufSurfaceCache.Entry] implementation
public int CompareTo (Entry other)
{
return time.CompareTo (other.time);
}
#endregion
public Entry (Surface s, string id)
{
ID = id;
surface = s;
time = DateTime.Now;
}
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/PositionWindow.cs 0000644 0001750 0001750 00000000127 11713404100 026017 x ustar 00 0000000 0000000 27 mtime=1328416832.534997
30 atime=1330831085.998265887
30 ctime=1330847230.004504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PositionWindow.cs 0000664 0001750 0001750 00000005011 11713404100 025271 0 ustar 00chris chris 0000000 0000000 // PositionWindow.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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.
//
// This program 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
//
//
using System;
using Gdk;
using Gtk;
using Do.Platform;
namespace Do.Interface
{
public class PositionWindow
{
Gtk.Window w, r;
public PositionWindow (Gtk.Window main, Gtk.Window results)
{
this.w = main;
this.r = results;
}
int GetMonitor ()
{
Display disp;
Rectangle point;
disp = w.Screen.Display;
disp.GetPointer(out point.X, out point.Y);
return w.Screen.GetMonitorAtPoint (point.X, point.Y);
}
public void UpdatePosition (int iconboxWidth, Pane currentPane, Rectangle resultsOffset)
{
UpdatePosition (iconboxWidth, currentPane, resultsOffset, new Gdk.Rectangle ());
}
protected Rectangle CalculateBasePosition (Rectangle screen, Rectangle window, Rectangle offset)
{
Rectangle result = window;
result.X = ((screen.Width - window.Width) / 2) + screen.X + offset.X;
result.Y = (int)((screen.Height - window.Height) / 2.5) + screen.Y + offset.Y;
return result;
}
public void UpdatePosition (int iconboxWidth, Pane currentPane, Rectangle resultsOffset, Rectangle normalOffset) {
Gtk.Application.Invoke (delegate {
Gdk.Rectangle geo, main, results;
w.GetPosition (out main.X, out main.Y);
w.GetSize (out main.Width, out main.Height);
geo = w.Screen.GetMonitorGeometry (GetMonitor ());
main = CalculateBasePosition (geo, main, normalOffset);
w.Move (main.X, main.Y);
if (r == null) return;
//position resultsWindow
r.GetSize (out results.Width, out results.Height);
results.Y = main.Y + main.Height + resultsOffset.Y;
results.X = main.X + iconboxWidth * (int) currentPane + resultsOffset.X;
r.Move (results.X, results.Y);
});
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/ResultsWindowSelectionEventArgs.cs0000644 0001750 0001750 00000000074 11704304006 031346 x ustar 00 0000000 0000000 30 atime=1330831085.998265887
30 ctime=1330847230.008504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/ResultsWindowSelectionEventArgs.cs 0000664 0001750 0001750 00000002364 11704304006 030627 0 ustar 00chris chris 0000000 0000000 // GNOME Do is the legal property of its developers, whose names are too numerous
// to list here. Please refer to the COPYRIGHT file distributed with this
// source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
using System;
using Do.Universe;
namespace Do.Interface
{
public class ResultsWindowSelectionEventArgs : EventArgs
{
int index;
Item selection;
public ResultsWindowSelectionEventArgs (int index, Item selection)
{
this.index = index;
this.selection = selection;
}
public int SelectedIndex
{
get { return index; }
}
public Item SelectedObject
{
get {
return selection;
}
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/SearchFinishState.cs 0000644 0001750 0001750 00000000074 11704304006 026377 x ustar 00 0000000 0000000 30 atime=1330831085.998265887
30 ctime=1330847230.008504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/SearchFinishState.cs 0000664 0001750 0001750 00000002641 11704304006 025656 0 ustar 00chris chris 0000000 0000000 // SearchFinishState.cs
//
// Copyright (C) 2008 GNOME-Do
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using Do.Universe;
namespace Do.Interface
{
public class SearchFinishState
{
private bool selection_changed, query_changed;
private string query;
private Item selection;
public bool SelectionChanged {
get {
return selection_changed;
}
}
public bool QueryChanged {
get {
return query_changed;
}
}
public string Query {
get {
return query;
}
}
public Item Selection {
get {
return selection;
}
}
public SearchFinishState(bool selectionChanged, bool queryChanged, Item selection, string query)
{
selection_changed = selectionChanged;
query_changed = queryChanged;
this.selection = selection;
this.query = query;
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/UIContext.cs 0000644 0001750 0001750 00000000074 11704304006 024712 x ustar 00 0000000 0000000 30 atime=1330831086.002265887
30 ctime=1330847230.008504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/UIContext.cs 0000664 0001750 0001750 00000004267 11704304006 024177 0 ustar 00chris chris 0000000 0000000 // UIContext.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.Collections.Generic;
using Do.Universe;
namespace Do.Interface
{
public class UIContext : IUIContext
{
private Item selection;
private IList
- results;
private int cursor;
private int[] secondary;
private string query;
private bool largeText;
private TextModeType textType;
private IUIContext parentContext;
public Item Selection {
get {
return selection;
}
}
public IList
- Results {
get {
return results;
}
}
public int Cursor {
get {
return cursor;
}
}
public int[] SecondaryCursors {
get {
return secondary;
}
}
public string Query {
get {
return query;
}
}
public bool LargeTextDisplay {
get {
return largeText;
}
}
public TextModeType LargeTextModeType {
get {
return textType;
}
}
public IUIContext ParentContext {
get {
return parentContext;
}
}
public UIContext(Item selection, IList
- results, int cursor, int[] secondaryCursors,
string query, bool largeTextDisplay, TextModeType type, IUIContext parentContext)
{
this.selection = selection;
this.results = results;
this.cursor = cursor;
this.secondary = secondaryCursors;
this.query = query;
this.largeText = largeTextDisplay;
this.parentContext = parentContext;
this.textType = type;
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/Util.cs 0000644 0001750 0001750 00000000074 11704304006 023745 x ustar 00 0000000 0000000 30 atime=1330831086.002265887
30 ctime=1330847230.012504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Util.cs 0000664 0001750 0001750 00000024510 11704304006 023223 0 ustar 00chris chris 0000000 0000000 /* Util.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this
* source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using System.Collections.Generic;
using Gdk;
using Cairo;
using Do.Universe;
namespace Do.Interface
{
public delegate void DoEventKeyDelegate (Gdk.EventKey key);
public delegate void NullEventHandler ();
public delegate void SearchStartedEventHandler (bool upstream_search);
public delegate void SearchFinishedEventHandler (object controller, SearchFinishState state);
public static class Util
{
public static string FormatCommonSubstrings (string main, string other, string format)
{
int pos, len, match_pos, last_main_cut;
string lower_main, result;
string skipped, matched, remainder;
bool matchedTermination;
result = "";
match_pos = last_main_cut = 0;
lower_main = main.ToLower ();
other = other.ToLower ();
for (pos = 0; pos < other.Length; ++pos) {
matchedTermination = false;
for (len = 1; len <= other.Length - pos; ++len) {
int tmp_match_pos = lower_main.IndexOf (other.Substring (pos, len));
if (tmp_match_pos < 0) {
len--;
matchedTermination = false;
break;
} else {
matchedTermination = true;
match_pos = tmp_match_pos;
}
}
if (matchedTermination) {
len--;
}
if (0 < len) {
//Theres a match starting at match_pos with positive length
skipped = main.Substring (last_main_cut, match_pos - last_main_cut);
matched = main.Substring (match_pos, len);
if ( skipped.Length + matched.Length < main.Length) {
remainder = FormatCommonSubstrings ( main.Substring (match_pos + len), other.Substring (pos + len), format);
}
else {
remainder = "";
}
result = string.Format ("{0}{1}{2}", skipped, string.Format(format, matched), remainder);
break;
}
}
if (result == "") {
// no matches
result = main;
}
return result;
}
public static class Appearance
{
public static string MarkupSafeString (string s)
{
if (s == null) throw new ArgumentNullException ("s");
return GLib.Markup.EscapeText (s);
}
public static void SetColormap (Gtk.Widget widget)
{
Gdk.Colormap colormap;
colormap = widget.Screen.RgbaColormap;
if (colormap == null) {
colormap = widget.Screen.RgbColormap;
Console.Error.WriteLine ("No alpha support.");
}
widget.Colormap = colormap;
colormap.Dispose ();
}
public static void RGBToHSV (byte r, byte g, byte b,
out double hue, out double sat, out double val)
{
// Ported from Murrine Engine.
double red, green, blue;
double max, min;
double delta;
red = (double) r;
green = (double) g;
blue = (double) b;
hue = 0;
max = Math.Max (red, Math.Max (blue, green));
min = Math.Min (red, Math.Min (blue, green));
delta = max - min;
val = max / 255.0 * 100.0;
if (Math.Abs (delta) < 0.0001) {
sat = 0;
} else {
sat = (delta / max) * 100;
if (red == max) hue = (green - blue) / delta;
if (green == max) hue = 2 + (blue - red) / delta;
if (blue == max) hue = 4 + (red - green) / delta;
hue *= 60;
if (hue < 0) hue += 360;
}
}
public static void HSVToRGB (double hue, double sat, double val,
out byte red, out byte green, out byte blue)
{
double h, s, v;
double r = 0, g = 0, b = 0;
h = hue;
s = sat / 100;
v = val / 100;
if (s == 0) {
r = v;
g = v;
b = v;
} else {
int secNum;
double fracSec;
double p, q, t;
secNum = (int) Math.Floor(h / 60);
fracSec = h/60 - secNum;
p = v * (1 - s);
q = v * (1 - s*fracSec);
t = v * (1 - s*(1 - fracSec));
switch (secNum) {
case 0:
r = v;
g = t;
b = p;
break;
case 1:
r = q;
g = v;
b = p;
break;
case 2:
r = p;
g = v;
b = t;
break;
case 3:
r = p;
g = q;
b = v;
break;
case 4:
r = t;
g = p;
b = v;
break;
case 5:
r = v;
g = p;
b = q;
break;
}
}
red = Convert.ToByte(r*255);
green = Convert.ToByte(g*255);
blue = Convert.ToByte(b*255);
}
static void GetFrame (Cairo.Context cairo, double x, double y, double width, double height, double radius)
{
if (radius == 0)
{
cairo.MoveTo (x, y);
cairo.Rectangle (x, y, width, height);
} else {
cairo.MoveTo (x+radius, y);
cairo.Arc (x+width-radius, y+radius, radius, (Math.PI*1.5), (Math.PI*2));
cairo.Arc (x+width-radius, y+height-radius, radius, 0, (Math.PI*0.5));
cairo.Arc (x+radius, y+height-radius, radius, (Math.PI*0.5), Math.PI);
cairo.Arc (x+radius, y+radius, radius, Math.PI, (Math.PI*1.5));
}
}
static void GetShadowPattern (Cairo.Gradient shadow, ShadowParameters shadowParams)
{
double denLog = Math.Log(1.0f/shadowParams.shadowRadius);
shadow.AddColorStop (0.0, new Cairo.Color (0, 0, 0, shadowParams.shadowAlpha));
for (int i=2; i<=shadowParams.shadowRadius; i++)
{
double step = i/shadowParams.shadowRadius;
shadow.AddColorStop (step, new Cairo.Color (0, 0, 0, shadowParams.shadowAlpha*(Math.Log(step)/denLog)));
}
}
static void FillShadowPattern (Cairo.Context cairo, Cairo.Gradient shadow, ShadowParameters shadowParams)
{
GetShadowPattern (shadow, shadowParams);
cairo.Pattern = shadow;
cairo.Fill ();
}
public static void DrawShadow (Cairo.Context cr, double x, double y, double width,
double height, double radius, ShadowParameters shadowParams)
{
Surface sr = cr.Target.CreateSimilar (cr.Target.Content, (int)width + (int)(2*shadowParams.shadowRadius) + (int)x,
(int)height + (int)(2*shadowParams.shadowRadius) + (int)y);
Context cairo = new Context (sr);
radius++;
y++;
height--;
Cairo.Gradient shadow;
/* Top Left */
shadow = new Cairo.RadialGradient (x+radius, y+radius, radius,
x+radius, y+radius, radius+shadowParams.shadowRadius);
cairo.Rectangle (x-shadowParams.shadowRadius, y-shadowParams.shadowRadius,
radius+shadowParams.shadowRadius, radius+shadowParams.shadowRadius);
FillShadowPattern (cairo, shadow, shadowParams);
shadow.Destroy ();
/* Top */
shadow = new Cairo.LinearGradient (0.0, y,
0.0, y-shadowParams.shadowRadius);
cairo.Rectangle (x+radius, y-shadowParams.shadowRadius,
width-radius*2, shadowParams.shadowRadius);
FillShadowPattern (cairo, shadow, shadowParams);
shadow.Destroy ();
/* Top Right */
shadow = new Cairo.RadialGradient (width+x-radius, y+radius, radius,
width+x-radius, y+radius, radius+shadowParams.shadowRadius);
cairo.Rectangle (width+x-radius, y-shadowParams.shadowRadius,
radius+shadowParams.shadowRadius, radius+shadowParams.shadowRadius);
FillShadowPattern (cairo, shadow, shadowParams);
shadow.Destroy ();
/* Right */
shadow = new Cairo.LinearGradient (width+x, 0.0,
width+x+shadowParams.shadowRadius, 0.0);
cairo.Rectangle (width+x, y+radius, shadowParams.shadowRadius, height-radius*2);
FillShadowPattern (cairo, shadow, shadowParams);
shadow.Destroy ();
/* Bottom Right */
shadow = new Cairo.RadialGradient (width+x-radius, height+y-radius, radius,
width+x-radius, height+y-radius, radius+shadowParams.shadowRadius);
cairo.Rectangle (width+x-radius, height+y-radius,
radius+shadowParams.shadowRadius, radius+shadowParams.shadowRadius);
FillShadowPattern (cairo, shadow, shadowParams);
shadow.Destroy ();
/* Bottom */
shadow = new Cairo.LinearGradient (0.0, height+y,
0.0, height+y+shadowParams.shadowRadius);
cairo.Rectangle (x+radius, height+y,
width-radius*2, shadowParams.shadowRadius);
FillShadowPattern (cairo, shadow, shadowParams);
shadow.Destroy ();
/* Bottom Left */
shadow = new Cairo.RadialGradient (x+radius, height+y-radius, radius,
x+radius, height+y-radius, radius+shadowParams.shadowRadius);
cairo.Rectangle (x-shadowParams.shadowRadius, height+y-radius,
radius+shadowParams.shadowRadius, radius+shadowParams.shadowRadius);
FillShadowPattern (cairo, shadow, shadowParams);
shadow.Destroy ();
/* Left */
shadow = new Cairo.LinearGradient (x, 0.0,
x-shadowParams.shadowRadius, 0.0);
cairo.Rectangle (x-shadowParams.shadowRadius, y+radius,
radius+shadowParams.shadowRadius, height-radius*2);
FillShadowPattern (cairo, shadow, shadowParams);
shadow.Destroy ();
y--;
height++;
/* Clear inner rectangle */
GetFrame (cairo, x, y, width, height, radius);
cairo.Operator = Cairo.Operator.Clear;
cairo.Fill();
cr.SetSource (sr);
cr.Paint ();
(cairo as IDisposable).Dispose ();
sr.Destroy ();
}
}
public class ShadowParameters
{
public double shadowAlpha = 0.325;
public double shadowRadius = 15f;
public ShadowParameters (double shadowAlpha, double shadowRadius)
{
this.shadowAlpha = shadowAlpha;
this.shadowRadius = shadowRadius;
}
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/PaxHeaders.10129/Windowing.cs 0000644 0001750 0001750 00000000074 11704304006 024775 x ustar 00 0000000 0000000 30 atime=1330831086.002265887
30 ctime=1330847230.012504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Interface/Windowing.cs 0000664 0001750 0001750 00000004032 11704304006 024250 0 ustar 00chris chris 0000000 0000000 /* Windowing.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using System.Threading;
using System.Diagnostics;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Gdk;
using Mono.Unix;
namespace Do.Interface
{
public static class Windowing
{
public static void PresentWindow (Gtk.Window window)
{
window.Present ();
window.GdkWindow.Raise ();
for (int i = 0; i < 100; i++) {
if (TryGrabWindow (window)) {
break;
}
Thread.Sleep (100);
}
}
public static void UnpresentWindow (Gtk.Window window)
{
uint time;
time = Gtk.Global.CurrentEventTime;
Pointer.Ungrab (time);
Keyboard.Ungrab (time);
Gtk.Grab.Remove (window);
}
private static bool TryGrabWindow (Gtk.Window window)
{
uint time;
time = Gtk.Global.CurrentEventTime;
if (Pointer.Grab (window.GdkWindow,
true,
EventMask.ButtonPressMask |
EventMask.ButtonReleaseMask |
EventMask.PointerMotionMask,
null,
null,
time) == GrabStatus.Success)
{
if (Keyboard.Grab (window.GdkWindow, true, time) == GrabStatus.Success) {
Gtk.Grab.Add (window);
return true;
} else {
Pointer.Ungrab (time);
return false;
}
}
return false;
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/PaxHeaders.10129/Do.Universe 0000644 0001750 0001750 00000000132 11724616776 022345 x ustar 00 0000000 0000000 30 mtime=1330847230.012504913
30 atime=1330847230.796504871
30 ctime=1330847230.012504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Universe/ 0000775 0001750 0001750 00000000000 11724616776 021703 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Interface.Linux/src/Do.Universe/PaxHeaders.10129/ImplicitTextItem.cs 0000644 0001750 0001750 00000000074 11704304006 026166 x ustar 00 0000000 0000000 30 atime=1330831086.002265887
30 ctime=1330847230.012504913
gnome-do-0.9/Do.Interface.Linux/src/Do.Universe/ImplicitTextItem.cs 0000664 0001750 0001750 00000002004 11704304006 025436 0 ustar 00chris chris 0000000 0000000 // ImplicitTextItem.cs
//
// GNOME Do is the legal property of its developers, whose names are too numerous
// to list here. Please refer to the COPYRIGHT file distributed with this
// source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
using System;
namespace Do.Universe
{
public class ImplicitTextItem : Common.TextItem
{
public ImplicitTextItem (string text) : base (text)
{
}
}
}
gnome-do-0.9/Do.Interface.Linux/src/PaxHeaders.10129/AssemblyInfo.cs 0000644 0001750 0001750 00000000132 11724616773 023200 x ustar 00 0000000 0000000 30 mtime=1330847227.872505027
30 atime=1330847228.528504991
30 ctime=1330847229.976504915
gnome-do-0.9/Do.Interface.Linux/src/AssemblyInfo.cs 0000664 0001750 0001750 00000003273 11724616773 022466 0 ustar 00chris chris 0000000 0000000 // AssemblyInfo.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Do.Interface.Linux")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// If the build and revision are set to '*' they will be updated automatically.
[assembly: AssemblyVersion("0.11.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
gnome-do-0.9/Do.Interface.Linux/PaxHeaders.10129/Resources 0000644 0001750 0001750 00000000132 11724616776 021367 x ustar 00 0000000 0000000 30 mtime=1330847230.016504912
30 atime=1330847230.796504871
30 ctime=1330847230.016504912
gnome-do-0.9/Do.Interface.Linux/Resources/ 0000775 0001750 0001750 00000000000 11724616776 020725 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Interface.Linux/Resources/PaxHeaders.10129/Do.Interface.Linux.addin.xml 0000644 0001750 0001750 00000000074 11704304006 026562 x ustar 00 0000000 0000000 30 atime=1330831086.522265899
30 ctime=1330847230.016504912
gnome-do-0.9/Do.Interface.Linux/Resources/Do.Interface.Linux.addin.xml 0000664 0001750 0001750 00000000634 11704304006 026041 0 ustar 00chris chris 0000000 0000000
gnome-do-0.9/Do.Interface.Linux/Resources/PaxHeaders.10129/settings-triangle.png 0000644 0001750 0001750 00000000074 11704304006 025574 x ustar 00 0000000 0000000 30 atime=1330831086.522265899
30 ctime=1330847230.016504912
gnome-do-0.9/Do.Interface.Linux/Resources/settings-triangle.png 0000664 0001750 0001750 00000000317 11704304006 025051 0 ustar 00chris chris 0000000 0000000 PNG
IHDR sRGB bKGD C pHYs tIME
tEXtComment Created with GIMPW *IDATc`7'k"&ӄ4M r
IENDB` gnome-do-0.9/Do.Interface.Linux/PaxHeaders.10129/Makefile.am 0000644 0001750 0001750 00000000074 11705366321 021516 x ustar 00 0000000 0000000 30 atime=1330831072.882265571
30 ctime=1330847229.976504915
gnome-do-0.9/Do.Interface.Linux/Makefile.am 0000664 0001750 0001750 00000003215 11705366321 020773 0 ustar 00chris chris 0000000 0000000 # Simple component buildsystem
include $(top_srcdir)/build.rules.mk
ASSEMBLY = Do.Interface.Linux
TARGET = library
PKG_CONFIG_FILES = do.interface.linux.pc
FILES = \
src/AssemblyInfo.cs \
src/Do.Interface/ClassicInterface/ClassicWindow.cs \
src/Do.Interface/Do.Interface.CairoUtils/CairoUtils.cs \
src/Do.Interface/Do.Interface.Widgets/DefaultItems.cs \
src/Do.Interface/Do.Interface.Widgets/Frame.cs \
src/Do.Interface/Do.Interface.Widgets/GlossyRoundedFrame.cs \
src/Do.Interface/Do.Interface.Widgets/HalfRoundedFrame.cs \
src/Do.Interface/Do.Interface.Widgets/IconBox.cs \
src/Do.Interface/Do.Interface.Widgets/ResultsWindow.cs \
src/Do.Interface/Do.Interface.Widgets/SymbolDisplayLabel.cs \
src/Do.Interface/Do.Interface.Widgets/TextFrame.cs \
src/Do.Interface/IDoController.cs \
src/Do.Interface/IDoWindow.cs \
src/Do.Interface/IUIContext.cs \
src/Do.Interface/IconCache.cs \
src/Do.Interface/IconProvider.cs \
src/Do.Interface/InterfaceDescription.cs \
src/Do.Interface/InterfaceManager.cs \
src/Do.Interface/PixbufSurfaceCache.cs \
src/Do.Interface/PositionWindow.cs \
src/Do.Interface/ResultsWindowSelectionEventArgs.cs \
src/Do.Interface/SearchFinishState.cs \
src/Do.Interface/UIContext.cs \
src/Do.Interface/Util.cs \
src/Do.Interface/Windowing.cs \
src/Do.Universe/ImplicitTextItem.cs
if HAVE_NUNIT
FILES += \
src/Do.Interface/Tests/TestPositionWindow.cs
endif
RESOURCES = \
Resources/Do.Interface.Linux.addin.xml \
Resources/settings-triangle.png
REFERENCES = \
System \
System.Core \
Mono.Cairo \
Mono.Posix \
$(GTK_SHARP_20_LIBS) \
$(MONO_ADDINS_LIBS) \
$(NUNIT_LIBS)
PROJECT_REFERENCES = \
Do.Platform \
Do.Universe
gnome-do-0.9/Do.Interface.Linux/PaxHeaders.10129/Makefile.in 0000644 0001750 0001750 00000000132 11724616764 021534 x ustar 00 0000000 0000000 30 mtime=1330847220.112505441
30 atime=1330847227.856505028
30 ctime=1330847229.976504915
gnome-do-0.9/Do.Interface.Linux/Makefile.in 0000664 0001750 0001750 00000054130 11724616764 021020 0 ustar 00chris chris 0000000 0000000 # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Rules to more easily specify a C# build for automake.
#
# Inspired and adapted from Banshee's build system
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/build.rules.mk
@ENABLE_DEBUG_TRUE@am__append_1 = $(ASSEMBLY_FILE).mdb
@ENABLE_DEBUG_TRUE@am__append_2 = -d:DEBUG -debug
@HAVE_NUNIT_TRUE@am__append_3 = \
@HAVE_NUNIT_TRUE@ src/Do.Interface/Tests/TestPositionWindow.cs
subdir = Do.Interface.Linux
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/shamrock/expansions.m4 \
$(top_srcdir)/m4/shamrock/i18n.m4 \
$(top_srcdir)/m4/shamrock/mono.m4 \
$(top_srcdir)/m4/shamrock/programs.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(moduledir)" \
"$(DESTDIR)$(pkgconfigdir)"
SCRIPTS = $(module_SCRIPTS)
SOURCES =
DIST_SOURCES =
DATA = $(module_DATA) $(pkgconfig_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ABI_VERSION = @ABI_VERSION@
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DBUS_BUILD_DEFINES = @DBUS_BUILD_DEFINES@
DBUS_SHARP_CFLAGS = @DBUS_SHARP_CFLAGS@
DBUS_SHARP_GLIB_CFLAGS = @DBUS_SHARP_GLIB_CFLAGS@
DBUS_SHARP_GLIB_LIBS = @DBUS_SHARP_GLIB_LIBS@
DBUS_SHARP_LIBS = @DBUS_SHARP_LIBS@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DMCS = @DMCS@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONFTOOL = @GCONFTOOL@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GCONF_SHARP_20_CFLAGS = @GCONF_SHARP_20_CFLAGS@
GCONF_SHARP_20_LIBS = @GCONF_SHARP_20_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLADE_SHARP_20_CFLAGS = @GLADE_SHARP_20_CFLAGS@
GLADE_SHARP_20_LIBS = @GLADE_SHARP_20_LIBS@
GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@
GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@
GMCS = @GMCS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_DESKTOP_SHARP_20_CFLAGS = @GNOME_DESKTOP_SHARP_20_CFLAGS@
GNOME_DESKTOP_SHARP_20_LIBS = @GNOME_DESKTOP_SHARP_20_LIBS@
GNOME_KEYRING_SHARP_CFLAGS = @GNOME_KEYRING_SHARP_CFLAGS@
GNOME_KEYRING_SHARP_LIBS = @GNOME_KEYRING_SHARP_LIBS@
GNOME_SHARP_20_CFLAGS = @GNOME_SHARP_20_CFLAGS@
GNOME_SHARP_20_LIBS = @GNOME_SHARP_20_LIBS@
GNOME_VFS_SHARP_20_CFLAGS = @GNOME_VFS_SHARP_20_CFLAGS@
GNOME_VFS_SHARP_20_LIBS = @GNOME_VFS_SHARP_20_LIBS@
GREP = @GREP@
GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@
GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDO_CFLAGS = @LIBDO_CFLAGS@
LIBDO_LIBS = @LIBDO_LIBS@
LIBOBJS = @LIBOBJS@
LIBRSVG_SHARP_CFLAGS = @LIBRSVG_SHARP_CFLAGS@
LIBRSVG_SHARP_LIBS = @LIBRSVG_SHARP_LIBS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MCS = @MCS@
MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MONO = @MONO@
MONO_ADDINS_CFLAGS = @MONO_ADDINS_CFLAGS@
MONO_ADDINS_GUI_CFLAGS = @MONO_ADDINS_GUI_CFLAGS@
MONO_ADDINS_GUI_LIBS = @MONO_ADDINS_GUI_LIBS@
MONO_ADDINS_LIBS = @MONO_ADDINS_LIBS@
MONO_ADDINS_SETUP_CFLAGS = @MONO_ADDINS_SETUP_CFLAGS@
MONO_ADDINS_SETUP_LIBS = @MONO_ADDINS_SETUP_LIBS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
NOTIFY_SHARP_CFLAGS = @NOTIFY_SHARP_CFLAGS@
NOTIFY_SHARP_LIBS = @NOTIFY_SHARP_LIBS@
NUNIT_CFLAGS = @NUNIT_CFLAGS@
NUNIT_LIBS = @NUNIT_LIBS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
WNCK_SHARP_10_CFLAGS = @WNCK_SHARP_10_CFLAGS@
WNCK_SHARP_10_LIBS = @WNCK_SHARP_10_LIBS@
XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
expanded_bindir = @expanded_bindir@
expanded_datadir = @expanded_datadir@
expanded_libdir = @expanded_libdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
intltool__v_merge_options_ = @intltool__v_merge_options_@
intltool__v_merge_options_0 = @intltool__v_merge_options_0@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SOURCES_BUILD = $(addprefix $(srcdir)/, $(FILES))
RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
-resource:$(resource),$(notdir $(resource)))
BUILD_DIR = $(top_builddir)/build
ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
ASSEMBLY_FILE = $(BUILD_DIR)/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
STD_REFERENCES = $(foreach ref,$(filter-out -r:%,$(REFERENCES)),-r:$(ref))
BUILD_REFERENCES = $(filter -r:%,$(REFERENCES) $(STD_REFERENCES))
COMPONENT_REFERENCES = $(foreach ref, $(PROJECT_REFERENCES),-r:$(BUILD_DIR)/$(ref).dll)
COMPONENT_DEPS = $(foreach ref,$(PROJECT_REFERENCES),$(BUILD_DIR)/$(ref).dll)
OUTPUT_FILES = $(ASSEMBLY_FILE) $(am__append_1)
moduledir = $(pkglibdir)
# Install libraries as data; there's no need for them to be excutable
module_DATA = $(filter %.dll,$(OUTPUT_FILES)) $(filter %.mdb,$(OUTPUT_FILES))
# Install executables as scripts
module_SCRIPTS = $(filter %.exe,$(OUTPUT_FILES))
MCS_FLAGS = $(MCS_LINQ_FLAG) $(DBUS_BUILD_DEFINES) -noconfig \
-codepage:utf8 -warn:4 $(am__append_2)
#
# pkg-config handling
#
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(PKG_CONFIG_FILES)
#
# Clean and dist targets
#
EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) \
$(foreach pkgcfg_file, $(PKG_CONFIG_FILES), $(pkgcfg_file).in)
CLEANFILES = $(OUTPUT_FILES) $(pkgconfig_DATA)
DISTCLEANFILES = *.pidb
MAINTAINERCLEANFILES = Makefile.in
# Simple component buildsystem
ASSEMBLY = Do.Interface.Linux
TARGET = library
PKG_CONFIG_FILES = do.interface.linux.pc
FILES = src/AssemblyInfo.cs \
src/Do.Interface/ClassicInterface/ClassicWindow.cs \
src/Do.Interface/Do.Interface.CairoUtils/CairoUtils.cs \
src/Do.Interface/Do.Interface.Widgets/DefaultItems.cs \
src/Do.Interface/Do.Interface.Widgets/Frame.cs \
src/Do.Interface/Do.Interface.Widgets/GlossyRoundedFrame.cs \
src/Do.Interface/Do.Interface.Widgets/HalfRoundedFrame.cs \
src/Do.Interface/Do.Interface.Widgets/IconBox.cs \
src/Do.Interface/Do.Interface.Widgets/ResultsWindow.cs \
src/Do.Interface/Do.Interface.Widgets/SymbolDisplayLabel.cs \
src/Do.Interface/Do.Interface.Widgets/TextFrame.cs \
src/Do.Interface/IDoController.cs \
src/Do.Interface/IDoWindow.cs src/Do.Interface/IUIContext.cs \
src/Do.Interface/IconCache.cs src/Do.Interface/IconProvider.cs \
src/Do.Interface/InterfaceDescription.cs \
src/Do.Interface/InterfaceManager.cs \
src/Do.Interface/PixbufSurfaceCache.cs \
src/Do.Interface/PositionWindow.cs \
src/Do.Interface/ResultsWindowSelectionEventArgs.cs \
src/Do.Interface/SearchFinishState.cs \
src/Do.Interface/UIContext.cs src/Do.Interface/Util.cs \
src/Do.Interface/Windowing.cs \
src/Do.Universe/ImplicitTextItem.cs $(am__append_3)
RESOURCES = \
Resources/Do.Interface.Linux.addin.xml \
Resources/settings-triangle.png
REFERENCES = \
System \
System.Core \
Mono.Cairo \
Mono.Posix \
$(GTK_SHARP_20_LIBS) \
$(MONO_ADDINS_LIBS) \
$(NUNIT_LIBS)
PROJECT_REFERENCES = \
Do.Platform \
Do.Universe
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/build.rules.mk $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Do.Interface.Linux/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Do.Interface.Linux/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_srcdir)/build.rules.mk:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-moduleSCRIPTS: $(module_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)"
@list='$(module_SCRIPTS)'; test -n "$(moduledir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n' \
-e 'h;s|.*|.|' \
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
if (++n[d] == $(am__install_max)) { \
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
else { print "f", d "/" $$4, $$1 } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(moduledir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(moduledir)$$dir" || exit $$?; \
} \
; done
uninstall-moduleSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(module_SCRIPTS)'; test -n "$(moduledir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
dir='$(DESTDIR)$(moduledir)'; $(am__uninstall_files_from_dir)
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-moduleDATA: $(module_DATA)
@$(NORMAL_INSTALL)
test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)"
@list='$(module_DATA)'; test -n "$(moduledir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(moduledir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(moduledir)" || exit $$?; \
done
uninstall-moduleDATA:
@$(NORMAL_UNINSTALL)
@list='$(module_DATA)'; test -n "$(moduledir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(moduledir)'; $(am__uninstall_files_from_dir)
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-moduleDATA install-moduleSCRIPTS \
install-pkgconfigDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-moduleDATA uninstall-moduleSCRIPTS \
uninstall-pkgconfigDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-moduleDATA \
install-moduleSCRIPTS install-pdf install-pdf-am \
install-pkgconfigDATA install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-moduleDATA uninstall-moduleSCRIPTS \
uninstall-pkgconfigDATA
all: $(ASSEMBLY_FILE)
$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE)
build-debug :
@echo $(COMPONENT_REFERENCES)
$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(COMPONENT_DEPS)
@mkdir -p $(BUILD_DIR)
@colors=no; \
case $$TERM in \
"xterm" | "rxvt" | "rxvt-unicode") \
test "x$$COLORTERM" != "x" && colors=yes ;; \
"xterm-color") colors=yes ;; \
esac; \
if [ "x$$colors" = "xyes" ]; then \
tty -s && true || { colors=no; true; } \
fi; \
test "x$$colors" = "xyes" && \
echo -e "\033[1mCompiling $(notdir $@)...\033[0m" || \
echo "Compiling $(notdir $@)...";
@$(MCS) $(MCS_FLAGS) -target:$(TARGET) -out:$@ $(BUILD_DEFINES) $(BUILD_REFERENCES) $(COMPONENT_REFERENCES) $(RESOURCES_BUILD) $(SOURCES_BUILD)
@if [ -e $(srcdir)/$(notdir $@.config) ]; then \
cp $(srcdir)/$(notdir $@.config) $(BUILD_DIR) ; \
fi;
%.pc : %.pc.in
@colors=no; \
case $$TERM in \
"xterm" | "rxvt" | "rxvt-unicode") \
test "x$$COLORTERM" != "x" && colors=yes ;; \
"xterm-color") colors=yes ;; \
esac; \
if [ "x$$colors" = "xyes" ]; then \
tty -s && true || { colors=no; true; } \
fi; \
test "x$$colors" = "xyes" && \
echo -e "\033[1mGenerating $(notdir $@)...\033[0m" || \
echo "Generating $(notdir $@)...";
@sed "s,\@ABI_VERSION\@,$(ABI_VERSION),g; s,\@expanded_libdir\@,$(expanded_libdir),g; s,\@PACKAGE\@,$(PACKAGE),g" < $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gnome-do-0.9/Do.Interface.Linux/PaxHeaders.10129/do.interface.linux.pc.in 0000644 0001750 0001750 00000000074 11704304006 024101 x ustar 00 0000000 0000000 30 atime=1330832186.034292315
30 ctime=1330847230.020504912
gnome-do-0.9/Do.Interface.Linux/do.interface.linux.pc.in 0000664 0001750 0001750 00000000271 11704304006 023355 0 ustar 00chris chris 0000000 0000000 Name: Do.Interface.Linux
Description: GTK+ Interface module for Do
Version: @ABI_VERSION@
Requires: do.platform do.universe
Libs: -r:@expanded_libdir@/@PACKAGE@/Do.Interface.Linux.dll
gnome-do-0.9/PaxHeaders.10129/Do.Platform.Linux.JoliCloud 0000644 0001750 0001750 00000000132 11724616776 021164 x ustar 00 0000000 0000000 30 mtime=1330847230.132504906
30 atime=1330847230.796504871
30 ctime=1330847230.132504906
gnome-do-0.9/Do.Platform.Linux.JoliCloud/ 0000775 0001750 0001750 00000000000 11724616776 020522 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux.JoliCloud/PaxHeaders.10129/src 0000644 0001750 0001750 00000000132 11724616775 021752 x ustar 00 0000000 0000000 30 mtime=1330847229.184504957
30 atime=1330847230.796504871
30 ctime=1330847229.184504957
gnome-do-0.9/Do.Platform.Linux.JoliCloud/src/ 0000775 0001750 0001750 00000000000 11724616775 021310 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux.JoliCloud/src/PaxHeaders.10129/AssemblyInfo.cs.in 0000644 0001750 0001750 00000000074 11704304006 025336 x ustar 00 0000000 0000000 30 atime=1330831082.486265802
30 ctime=1330847229.184504957
gnome-do-0.9/Do.Platform.Linux.JoliCloud/src/AssemblyInfo.cs.in 0000664 0001750 0001750 00000003421 11704304006 024612 0 ustar 00chris chris 0000000 0000000 // AssemblyInfo.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Do.Platform.Linux.JoliCloud")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("@ABI_VERSION@.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
gnome-do-0.9/Do.Platform.Linux.JoliCloud/PaxHeaders.10129/Makefile.am 0000644 0001750 0001750 00000000074 11704304006 023254 x ustar 00 0000000 0000000 30 atime=1330831072.938265572
30 ctime=1330847230.132504906
gnome-do-0.9/Do.Platform.Linux.JoliCloud/Makefile.am 0000664 0001750 0001750 00000001274 11704304006 022534 0 ustar 00chris chris 0000000 0000000 # Simple component buildsystem
if ENABLE_JOLICLOUD
include $(top_srcdir)/build.rules.mk
endif
ASSEMBLY = Do.Platform.Linux.JoliCloud
TARGET = library
FILES = \
src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/PackageManagerService.cs
if HAVE_NUNIT
FILES += \
src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/Tests/PackageManagerServiceTests.cs
endif
RESOURCES = \
Resources/Do.Platform.Linux.JoliCloud.addin.xml
PKG_CONFIG_FILES = do.platform.linux.jolicloud.pc
REFERENCES = \
System \
System.Core \
Mono.Posix \
$(MONO_ADDINS_LIBS) \
$(DBUS_SHARP_LIBS) \
$(DBUS_SHARP_GLIB_LIBS) \
$(NUNIT_LIBS)
PROJECT_REFERENCES = \
Do.Platform \
Do.Platform.Linux
gnome-do-0.9/Do.Platform.Linux.JoliCloud/PaxHeaders.10129/Makefile.in 0000644 0001750 0001750 00000000132 11724616764 023303 x ustar 00 0000000 0000000 30 mtime=1330847220.160505439
30 atime=1330847228.036505018
30 ctime=1330847230.132504906
gnome-do-0.9/Do.Platform.Linux.JoliCloud/Makefile.in 0000664 0001750 0001750 00000055075 11724616764 022600 0 ustar 00chris chris 0000000 0000000 # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Rules to more easily specify a C# build for automake.
#
# Inspired and adapted from Banshee's build system
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/build.rules.mk
@ENABLE_DEBUG_TRUE@@ENABLE_JOLICLOUD_TRUE@am__append_1 = $(ASSEMBLY_FILE).mdb
@ENABLE_DEBUG_TRUE@@ENABLE_JOLICLOUD_TRUE@am__append_2 = -d:DEBUG -debug
@HAVE_NUNIT_TRUE@am__append_3 = \
@HAVE_NUNIT_TRUE@ src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/Tests/PackageManagerServiceTests.cs
subdir = Do.Platform.Linux.JoliCloud
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/shamrock/expansions.m4 \
$(top_srcdir)/m4/shamrock/i18n.m4 \
$(top_srcdir)/m4/shamrock/mono.m4 \
$(top_srcdir)/m4/shamrock/programs.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(moduledir)" \
"$(DESTDIR)$(pkgconfigdir)"
SCRIPTS = $(module_SCRIPTS)
SOURCES =
DIST_SOURCES =
DATA = $(module_DATA) $(pkgconfig_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ABI_VERSION = @ABI_VERSION@
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DBUS_BUILD_DEFINES = @DBUS_BUILD_DEFINES@
DBUS_SHARP_CFLAGS = @DBUS_SHARP_CFLAGS@
DBUS_SHARP_GLIB_CFLAGS = @DBUS_SHARP_GLIB_CFLAGS@
DBUS_SHARP_GLIB_LIBS = @DBUS_SHARP_GLIB_LIBS@
DBUS_SHARP_LIBS = @DBUS_SHARP_LIBS@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DMCS = @DMCS@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONFTOOL = @GCONFTOOL@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GCONF_SHARP_20_CFLAGS = @GCONF_SHARP_20_CFLAGS@
GCONF_SHARP_20_LIBS = @GCONF_SHARP_20_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLADE_SHARP_20_CFLAGS = @GLADE_SHARP_20_CFLAGS@
GLADE_SHARP_20_LIBS = @GLADE_SHARP_20_LIBS@
GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@
GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@
GMCS = @GMCS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_DESKTOP_SHARP_20_CFLAGS = @GNOME_DESKTOP_SHARP_20_CFLAGS@
GNOME_DESKTOP_SHARP_20_LIBS = @GNOME_DESKTOP_SHARP_20_LIBS@
GNOME_KEYRING_SHARP_CFLAGS = @GNOME_KEYRING_SHARP_CFLAGS@
GNOME_KEYRING_SHARP_LIBS = @GNOME_KEYRING_SHARP_LIBS@
GNOME_SHARP_20_CFLAGS = @GNOME_SHARP_20_CFLAGS@
GNOME_SHARP_20_LIBS = @GNOME_SHARP_20_LIBS@
GNOME_VFS_SHARP_20_CFLAGS = @GNOME_VFS_SHARP_20_CFLAGS@
GNOME_VFS_SHARP_20_LIBS = @GNOME_VFS_SHARP_20_LIBS@
GREP = @GREP@
GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@
GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDO_CFLAGS = @LIBDO_CFLAGS@
LIBDO_LIBS = @LIBDO_LIBS@
LIBOBJS = @LIBOBJS@
LIBRSVG_SHARP_CFLAGS = @LIBRSVG_SHARP_CFLAGS@
LIBRSVG_SHARP_LIBS = @LIBRSVG_SHARP_LIBS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MCS = @MCS@
MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MONO = @MONO@
MONO_ADDINS_CFLAGS = @MONO_ADDINS_CFLAGS@
MONO_ADDINS_GUI_CFLAGS = @MONO_ADDINS_GUI_CFLAGS@
MONO_ADDINS_GUI_LIBS = @MONO_ADDINS_GUI_LIBS@
MONO_ADDINS_LIBS = @MONO_ADDINS_LIBS@
MONO_ADDINS_SETUP_CFLAGS = @MONO_ADDINS_SETUP_CFLAGS@
MONO_ADDINS_SETUP_LIBS = @MONO_ADDINS_SETUP_LIBS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
NOTIFY_SHARP_CFLAGS = @NOTIFY_SHARP_CFLAGS@
NOTIFY_SHARP_LIBS = @NOTIFY_SHARP_LIBS@
NUNIT_CFLAGS = @NUNIT_CFLAGS@
NUNIT_LIBS = @NUNIT_LIBS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
WNCK_SHARP_10_CFLAGS = @WNCK_SHARP_10_CFLAGS@
WNCK_SHARP_10_LIBS = @WNCK_SHARP_10_LIBS@
XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
expanded_bindir = @expanded_bindir@
expanded_datadir = @expanded_datadir@
expanded_libdir = @expanded_libdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
intltool__v_merge_options_ = @intltool__v_merge_options_@
intltool__v_merge_options_0 = @intltool__v_merge_options_0@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@ENABLE_JOLICLOUD_TRUE@SOURCES_BUILD = $(addprefix $(srcdir)/, $(FILES))
@ENABLE_JOLICLOUD_TRUE@RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
@ENABLE_JOLICLOUD_TRUE@RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
@ENABLE_JOLICLOUD_TRUE@ -resource:$(resource),$(notdir $(resource)))
@ENABLE_JOLICLOUD_TRUE@BUILD_DIR = $(top_builddir)/build
@ENABLE_JOLICLOUD_TRUE@ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
@ENABLE_JOLICLOUD_TRUE@ASSEMBLY_FILE = $(BUILD_DIR)/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
@ENABLE_JOLICLOUD_TRUE@STD_REFERENCES = $(foreach ref,$(filter-out -r:%,$(REFERENCES)),-r:$(ref))
@ENABLE_JOLICLOUD_TRUE@BUILD_REFERENCES = $(filter -r:%,$(REFERENCES) $(STD_REFERENCES))
@ENABLE_JOLICLOUD_TRUE@COMPONENT_REFERENCES = $(foreach ref, $(PROJECT_REFERENCES),-r:$(BUILD_DIR)/$(ref).dll)
@ENABLE_JOLICLOUD_TRUE@COMPONENT_DEPS = $(foreach ref,$(PROJECT_REFERENCES),$(BUILD_DIR)/$(ref).dll)
@ENABLE_JOLICLOUD_TRUE@OUTPUT_FILES = $(ASSEMBLY_FILE) $(am__append_1)
@ENABLE_JOLICLOUD_TRUE@moduledir = $(pkglibdir)
# Install libraries as data; there's no need for them to be excutable
@ENABLE_JOLICLOUD_TRUE@module_DATA = $(filter %.dll,$(OUTPUT_FILES)) $(filter %.mdb,$(OUTPUT_FILES))
# Install executables as scripts
@ENABLE_JOLICLOUD_TRUE@module_SCRIPTS = $(filter %.exe,$(OUTPUT_FILES))
@ENABLE_JOLICLOUD_TRUE@MCS_FLAGS = $(MCS_LINQ_FLAG) \
@ENABLE_JOLICLOUD_TRUE@ $(DBUS_BUILD_DEFINES) -noconfig \
@ENABLE_JOLICLOUD_TRUE@ -codepage:utf8 -warn:4 $(am__append_2)
#
# pkg-config handling
#
@ENABLE_JOLICLOUD_TRUE@pkgconfigdir = $(libdir)/pkgconfig
@ENABLE_JOLICLOUD_TRUE@pkgconfig_DATA = $(PKG_CONFIG_FILES)
#
# Clean and dist targets
#
@ENABLE_JOLICLOUD_TRUE@EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) \
@ENABLE_JOLICLOUD_TRUE@ $(foreach pkgcfg_file, $(PKG_CONFIG_FILES), $(pkgcfg_file).in)
@ENABLE_JOLICLOUD_TRUE@CLEANFILES = $(OUTPUT_FILES) $(pkgconfig_DATA)
@ENABLE_JOLICLOUD_TRUE@DISTCLEANFILES = *.pidb
@ENABLE_JOLICLOUD_TRUE@MAINTAINERCLEANFILES = Makefile.in
# Simple component buildsystem
ASSEMBLY = Do.Platform.Linux.JoliCloud
TARGET = library
FILES = src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/PackageManagerService.cs \
$(am__append_3)
RESOURCES = \
Resources/Do.Platform.Linux.JoliCloud.addin.xml
PKG_CONFIG_FILES = do.platform.linux.jolicloud.pc
REFERENCES = \
System \
System.Core \
Mono.Posix \
$(MONO_ADDINS_LIBS) \
$(DBUS_SHARP_LIBS) \
$(DBUS_SHARP_GLIB_LIBS) \
$(NUNIT_LIBS)
PROJECT_REFERENCES = \
Do.Platform \
Do.Platform.Linux
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/build.rules.mk $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Do.Platform.Linux.JoliCloud/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Do.Platform.Linux.JoliCloud/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_srcdir)/build.rules.mk:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-moduleSCRIPTS: $(module_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)"
@list='$(module_SCRIPTS)'; test -n "$(moduledir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n' \
-e 'h;s|.*|.|' \
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
if (++n[d] == $(am__install_max)) { \
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
else { print "f", d "/" $$4, $$1 } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(moduledir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(moduledir)$$dir" || exit $$?; \
} \
; done
uninstall-moduleSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(module_SCRIPTS)'; test -n "$(moduledir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
dir='$(DESTDIR)$(moduledir)'; $(am__uninstall_files_from_dir)
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-moduleDATA: $(module_DATA)
@$(NORMAL_INSTALL)
test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)"
@list='$(module_DATA)'; test -n "$(moduledir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(moduledir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(moduledir)" || exit $$?; \
done
uninstall-moduleDATA:
@$(NORMAL_UNINSTALL)
@list='$(module_DATA)'; test -n "$(moduledir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(moduledir)'; $(am__uninstall_files_from_dir)
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-moduleDATA install-moduleSCRIPTS \
install-pkgconfigDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-moduleDATA uninstall-moduleSCRIPTS \
uninstall-pkgconfigDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-moduleDATA \
install-moduleSCRIPTS install-pdf install-pdf-am \
install-pkgconfigDATA install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-moduleDATA uninstall-moduleSCRIPTS \
uninstall-pkgconfigDATA
@ENABLE_JOLICLOUD_TRUE@all: $(ASSEMBLY_FILE)
@ENABLE_JOLICLOUD_TRUE@$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE)
@ENABLE_JOLICLOUD_TRUE@build-debug :
@ENABLE_JOLICLOUD_TRUE@ @echo $(COMPONENT_REFERENCES)
@ENABLE_JOLICLOUD_TRUE@$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(COMPONENT_DEPS)
@ENABLE_JOLICLOUD_TRUE@ @mkdir -p $(BUILD_DIR)
@ENABLE_JOLICLOUD_TRUE@ @colors=no; \
@ENABLE_JOLICLOUD_TRUE@ case $$TERM in \
@ENABLE_JOLICLOUD_TRUE@ "xterm" | "rxvt" | "rxvt-unicode") \
@ENABLE_JOLICLOUD_TRUE@ test "x$$COLORTERM" != "x" && colors=yes ;; \
@ENABLE_JOLICLOUD_TRUE@ "xterm-color") colors=yes ;; \
@ENABLE_JOLICLOUD_TRUE@ esac; \
@ENABLE_JOLICLOUD_TRUE@ if [ "x$$colors" = "xyes" ]; then \
@ENABLE_JOLICLOUD_TRUE@ tty -s && true || { colors=no; true; } \
@ENABLE_JOLICLOUD_TRUE@ fi; \
@ENABLE_JOLICLOUD_TRUE@ test "x$$colors" = "xyes" && \
@ENABLE_JOLICLOUD_TRUE@ echo -e "\033[1mCompiling $(notdir $@)...\033[0m" || \
@ENABLE_JOLICLOUD_TRUE@ echo "Compiling $(notdir $@)...";
@ENABLE_JOLICLOUD_TRUE@ @$(MCS) $(MCS_FLAGS) -target:$(TARGET) -out:$@ $(BUILD_DEFINES) $(BUILD_REFERENCES) $(COMPONENT_REFERENCES) $(RESOURCES_BUILD) $(SOURCES_BUILD)
@ENABLE_JOLICLOUD_TRUE@ @if [ -e $(srcdir)/$(notdir $@.config) ]; then \
@ENABLE_JOLICLOUD_TRUE@ cp $(srcdir)/$(notdir $@.config) $(BUILD_DIR) ; \
@ENABLE_JOLICLOUD_TRUE@ fi;
@ENABLE_JOLICLOUD_TRUE@%.pc : %.pc.in
@ENABLE_JOLICLOUD_TRUE@ @colors=no; \
@ENABLE_JOLICLOUD_TRUE@ case $$TERM in \
@ENABLE_JOLICLOUD_TRUE@ "xterm" | "rxvt" | "rxvt-unicode") \
@ENABLE_JOLICLOUD_TRUE@ test "x$$COLORTERM" != "x" && colors=yes ;; \
@ENABLE_JOLICLOUD_TRUE@ "xterm-color") colors=yes ;; \
@ENABLE_JOLICLOUD_TRUE@ esac; \
@ENABLE_JOLICLOUD_TRUE@ if [ "x$$colors" = "xyes" ]; then \
@ENABLE_JOLICLOUD_TRUE@ tty -s && true || { colors=no; true; } \
@ENABLE_JOLICLOUD_TRUE@ fi; \
@ENABLE_JOLICLOUD_TRUE@ test "x$$colors" = "xyes" && \
@ENABLE_JOLICLOUD_TRUE@ echo -e "\033[1mGenerating $(notdir $@)...\033[0m" || \
@ENABLE_JOLICLOUD_TRUE@ echo "Generating $(notdir $@)...";
@ENABLE_JOLICLOUD_TRUE@ @sed "s,\@ABI_VERSION\@,$(ABI_VERSION),g; s,\@expanded_libdir\@,$(expanded_libdir),g; s,\@PACKAGE\@,$(PACKAGE),g" < $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gnome-do-0.9/PaxHeaders.10129/Do.Platform.Linux 0000644 0001750 0001750 00000000132 11724616776 017301 x ustar 00 0000000 0000000 30 mtime=1330847230.096504908
30 atime=1330847230.796504871
30 ctime=1330847230.096504908
gnome-do-0.9/Do.Platform.Linux/ 0000775 0001750 0001750 00000000000 11724616776 016637 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux/PaxHeaders.10129/src 0000644 0001750 0001750 00000000130 11724616776 020066 x ustar 00 0000000 0000000 29 mtime=1330847230.05650491
30 atime=1330847230.796504871
29 ctime=1330847230.05650491
gnome-do-0.9/Do.Platform.Linux/src/ 0000775 0001750 0001750 00000000000 11724616776 017426 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux/src/PaxHeaders.10129/AssemblyInfo.cs.in 0000644 0001750 0001750 00000000072 11704304006 023451 x ustar 00 0000000 0000000 28 atime=1330831082.4302658
30 ctime=1330847229.184504957
gnome-do-0.9/Do.Platform.Linux/src/AssemblyInfo.cs.in 0000664 0001750 0001750 00000003676 11704304006 022743 0 ustar 00chris chris 0000000 0000000 // AssemblyInfo.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Do.Platform.Linux")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("@ABI_VERSION@.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
namespace Do.Platform.Linux
{
internal static class AssemblyInfo
{
public const string InstallPrefix = "@prefix@";
public const string InstallData = "@expanded_datadir@";
}
}
gnome-do-0.9/Do.Platform.Linux/src/PaxHeaders.10129/Do.Platform 0000644 0001750 0001750 00000000130 11724616776 022213 x ustar 00 0000000 0000000 29 mtime=1330847230.05650491
30 atime=1330847230.796504871
29 ctime=1330847230.05650491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/ 0000775 0001750 0001750 00000000000 11724616776 021553 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/PaxHeaders.10129/Do.Platform.Linux 0000644 0001750 0001750 00000000132 11724616776 025440 x ustar 00 0000000 0000000 30 mtime=1330847230.080504909
30 atime=1330847230.796504871
30 ctime=1330847230.080504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/ 0000775 0001750 0001750 00000000000 11724616776 024776 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/Do.Platform.Linux.0000644 0001750 0001750 00000000130 11724616776 030737 x ustar 00 0000000 0000000 29 mtime=1330847230.06050491
30 atime=1330847230.796504871
29 ctime=1330847230.06050491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.DBus/ 0000775 0001750 0001750 00000000000 11724616776 031055 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.DBus/PaxHeaders.10000644 0001750 0001750 00000000253 11704304006 031161 x ustar 00 0000000 0000000 112 path=gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.DBus/IController.cs
30 atime=1330831086.750265905
29 ctime=1330847230.06050491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.DBus/IController.0000664 0001750 0001750 00000002321 11704304006 033262 0 ustar 00chris chris 0000000 0000000 /* IController.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
#if USE_DBUS_SHARP
using DBus;
#else
using NDesk.DBus;
#endif
namespace Do.Platform.Linux.DBus
{
[Interface ("org.gnome.Do.Controller")]
public interface IController
{
///
/// Causes an IController instance to show its user interface
/// so the user can interact with it. For example, making a
/// SymbolWindow become visible and raise to the top.
///
void Summon ();
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.DBus/PaxHeaders.10000644 0001750 0001750 00000000073 11704304006 031161 x ustar 00 0000000 0000000 30 atime=1330831086.750265905
29 ctime=1330847230.06050491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.DBus/Registrar.cs0000664 0001750 0001750 00000006770 11704304006 033332 0 ustar 00chris chris 0000000 0000000 /* Registrar.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
#if USE_DBUS_SHARP
using DBus;
#else
using NDesk.DBus;
#endif
using org.freedesktop.DBus;
namespace Do.Platform.Linux.DBus
{
///
/// Registrar is used for getting DBus-ready classes on and off the
/// session bus.
///
static class Registrar
{
const string BusName = "org.gnome.Do";
const string BaseItemPath = "/org/gnome/Do";
const string ControllerItemPath = BaseItemPath + "/Controller";
static Registrar ()
{
try {
BusG.Init ();
} catch {
}
}
///
/// Get an instace of T if it exists on the session bus.
/// Returns null if there is no such instance.
///
///
/// A containing the bus path of the instance.
///
///
/// A instance if it was found on the bus; null otherwise.
///
public static T GetInstance (string objectPath)
{
try {
if (!Bus.Session.NameHasOwner (BusName)) {
return default (T);
}
} catch {
return default (T);
}
return Bus.Session.GetObject (BusName, new ObjectPath (objectPath));
}
///
/// Register an instance of T on the session bus. Returns null if another
/// instance at the same path exists on the bus, or if registration fails
/// in another way.
///
///
/// A instance to register on the bus.
///
///
/// A containing the bus path being requested for
/// the object.
///
///
/// A instance registered on the bus if successful; null otherwise.
///
public static T Register (T busItem, string objectPath)
{
try {
Bus.Session.RequestName (BusName);
Bus.Session.Register (new ObjectPath (objectPath), busItem);
} catch {
return default (T);
}
return busItem;
}
///
/// Get an IController instance registered on the session bus.
///
///
/// A instance if successful; null otherwise.
///
public static IController GetControllerInstance ()
{
return GetInstance (ControllerItemPath);
}
///
/// Register an IController instance on the session bus.
///
///
/// A instance to register.
///
///
/// A instance if registered successfully; null otherwise.
///
public static IController RegisterController (IController commander)
{
return Register (commander, ControllerItemPath);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/Tests 0000644 0001750 0001750 00000000132 11724616776 026542 x ustar 00 0000000 0000000 30 mtime=1330847230.092504908
30 atime=1330847230.796504871
30 ctime=1330847230.092504908
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Tests/ 0000775 0001750 0001750 00000000000 11724616776 026100 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Tests/PaxHeaders.10129/GConfPrefere0000644 0001750 0001750 00000000254 11704565630 031042 x ustar 00 0000000 0000000 112 path=gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Tests/GConfPreferencesServiceTests.cs
30 atime=1330831086.782265905
30 ctime=1330847230.092504908
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/Tests/GConfPreferencesServiceTests.0000664 0001750 0001750 00000004777 11704565630 033630 0 ustar 00chris chris 0000000 0000000 /* GConfPreferencesServiceTests.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this
* source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using NUnit.Framework;
namespace Do.Platform.Linux
{
[TestFixture()]
public class GConfPreferencesServiceTests
{
const string RootPath = "/apps/gnome-do/test";
GConfPreferencesService Service { get; set; }
[SetUp]
public void SetUp ()
{
GLib.GType.Init ();
Service = new GConfPreferencesService (RootPath);
}
[TearDown]
public void TearDown ()
{
}
[Test()]
public void Set_bool ()
{
string key = "testbool";
bool val_in = true;
Assert.IsTrue (Service.Set (key, val_in));
}
[Test()]
public void TryGet_bool ()
{
string key = "testbool";
bool val_in = true, val_out;
Service.Set (key, val_in);
Assert.IsTrue (Service.TryGet (key, out val_out));
Assert.AreEqual (val_in, val_out);
}
[Test()]
public void Set_int ()
{
string key = "testint";
int val_in = 42;
Assert.IsTrue (Service.Set (key, val_in));
}
[Test()]
public void TryGet_int ()
{
string key = "testint";
int val_in = 42, val_out;
Service.Set (key, val_in);
Assert.IsTrue (Service.TryGet (key, out val_out));
Assert.AreEqual (val_in, val_out);
}
[Test()]
public void TryGetDoesNotExist ()
{
string key = "xcnd45w3d8bvweqmgf7rbx";
string val = "";
Assert.IsFalse (Service.TryGet (key, out val));
}
[Test()]
public void Set_string ()
{
string key = "teststring";
string val_in = "hello";
Assert.IsTrue (Service.Set (key, val_in));
}
[Test()]
public void TryGet_string ()
{
string key = "teststring";
string val_in = "hello", val_out;
Service.Set (key, val_in);
Assert.IsTrue (Service.TryGet (key, out val_out));
Assert.AreEqual (val_in, val_out);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/ConsoleLogService.0000644 0001750 0001750 00000000073 11704304006 031061 x ustar 00 0000000 0000000 30 atime=1330831086.754265904
29 ctime=1330847230.06450491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/ConsoleLogService.cs 0000664 0001750 0001750 00000003312 11704304006 030663 0 ustar 00chris chris 0000000 0000000 // ConsoleLogService.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.IO;
using System.Collections.Generic;
using Do.Platform;
namespace Do.Platform.Linux {
public class ConsoleLogService: Common.AbstractLogService
{
public override void Log (LogLevel level, string message)
{
switch (level) {
case LogLevel.Fatal:
ConsoleCrayon.BackgroundColor = ConsoleColor.Red;
ConsoleCrayon.ForegroundColor = ConsoleColor.White;
break;
case LogLevel.Error:
ConsoleCrayon.ForegroundColor = ConsoleColor.Red;
break;
case LogLevel.Warn:
ConsoleCrayon.ForegroundColor = ConsoleColor.Yellow;
break;
case LogLevel.Info:
ConsoleCrayon.ForegroundColor = ConsoleColor.Blue;
break;
case LogLevel.Debug:
ConsoleCrayon.ForegroundColor = ConsoleColor.Green;
break;
}
Console.Write (FormatLogPrompt (level));
ConsoleCrayon.ResetColor ();
Console.Write (" ");
Console.WriteLine (message);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/EnvironmentService0000644 0001750 0001750 00000000073 11704304006 031243 x ustar 00 0000000 0000000 30 atime=1330831086.754265904
29 ctime=1330847230.06450491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/EnvironmentService.cs 0000664 0001750 0001750 00000015565 11704304006 031140 0 ustar 00chris chris 0000000 0000000 // EnvironmentImplementation.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.IO;
using System.Linq;
using System.Diagnostics;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Mono.Unix;
using Mono.Unix.Native;
using Do.Platform;
using Do.Universe;
namespace Do.Platform.Linux
{
public class EnvironmentService : IEnvironmentService
{
const string PathPattern = @"^~([^\-\/][^:\s\/]*)?(\/.*)?$";
string last_command_found;
readonly Regex path_matcher;
public EnvironmentService ()
{
path_matcher = new Regex (PathPattern, RegexOptions.Compiled);
}
#region IEnvironmentService
public void OpenEmail (IEnumerable to, IEnumerable cc, IEnumerable bcc,
string subject, string body, IEnumerable attachments)
{
IEnumerable arguments;
arguments = cc.SelectMany (address => new string[] { "--cc", address });
arguments = arguments.Concat (bcc.SelectMany (address => new string[] { "--bcc", address }));
if (!String.IsNullOrEmpty (subject)) {
arguments = arguments.Concat (new string[] { "--subject", subject });
}
if (!String.IsNullOrEmpty (body)) {
arguments = arguments.Concat (new string[] { "--body", body });
}
arguments = arguments.Concat (attachments.SelectMany (attachment => new string[] { "--attach", attachment }));
arguments = arguments.Concat (to);
using (Process emailer = ExecuteWithArguments ("xdg-email", arguments)) {
}
}
string UserHome {
get { return Environment.GetFolderPath (Environment.SpecialFolder.Personal); }
}
public void OpenUrl (string url)
{
if (!url.Contains ("://"))
url = "http://" + url;
Open (url);
}
public void OpenPath (string path)
{
Open (ExpandPath (path));
}
public bool IsExecutable (string line)
{
line = ExpandPath (line);
return IsExecutableFile (line) || CommandLineIsFoundOnPath (line);
}
public void Execute (string line)
{
line = ExpandPath (line);
Log.Info ("Executing \"{0}\"", line);
if (File.Exists (line)) {
Process proc = new Process ();
proc.StartInfo.FileName = line;
proc.StartInfo.UseShellExecute = false;
proc.Start ();
} else {
Process.Start (line);
}
}
public Process ExecuteWithArguments (string command, params string[] arguments)
{
return ExecuteWithArguments (command, arguments.AsEnumerable ());
}
public Process ExecuteWithArguments (string command, IEnumerable arguments)
{
// This requires us to work around the GODDAMNED BRAINDEAD System.Diagnostics.Process
// API which unavoidably splits on space (and interprets a bunch of other characters).
// We do this by spawning xargs and passing the arguments through stdin. Since this is
// in Do.Platform.Linux the lack of portability is not an issue.
Process executor = new Process ();
//FIXME: xargs is actually kinda crappy for this
//Really, we should be fork/execing.
executor.StartInfo.FileName = "xargs";
executor.StartInfo.Arguments = "--null " + command;
executor.StartInfo.UseShellExecute = false;
executor.StartInfo.RedirectStandardInput = true;
executor.Start ();
foreach (string argument in arguments) {
executor.StandardInput.Write ("{0}\0", argument);
}
executor.StandardInput.Close ();
Log.Debug ("Executing command “{0} {1}”", command, arguments.Aggregate ((cur, item) => cur + " " + item));
return executor;
}
public void CopyToClipboard (Item item)
{
string text = "";
try {
// TODO: this is absolute garbage
if (item is ITextItem)
text = (item as ITextItem).Text;
else if (item is IFileItem)
text = (item as IFileItem).Path;
else if (item is IUriItem)
text = (item as IUriItem).Uri;
else if (item is IUrlItem)
text = (item as IUrlItem).Url;
else if (item is IContactDetailItem)
text = (item as IContactDetailItem).Value;
else if (item is ContactItem)
text = (item as ContactItem).Name;
else
text = string.Format ("{0} - {1}", item.Name, item.Description);
Log.Debug ("Copying \"{0}\" to clipboard.", text);
Gtk.Clipboard.Get (Gdk.Selection.Clipboard).Text =
Gtk.Clipboard.Get (Gdk.Selection.Primary).Text = text;
} catch (Exception e) {
Log.Error ("Copy to clipboard failed: {0}", e.Message);
Log.Debug (e.StackTrace);
}
}
public string ExpandPath (string path)
{
Match m = path_matcher.Match (path);
if (!m.Success)
return path;
if (String.IsNullOrEmpty (m.Groups[1].Value)) {
return UserHome + m.Groups[2].Value;
} else {
Passwd pw = Syscall.getpwnam (m.Groups[1].Value);
return (pw == null) ? path : pw.pw_dir + m.Groups[2].Value;
}
}
#endregion
void Open (string open)
{
try {
Log.Info ("Opening \"{0}\"...", open);
using (Process executor = ExecuteWithArguments ("xdg-open", open)) {
}
} catch (Exception e) {
Log.Error ("Failed to open {0}: {1}", open, e.Message);
Log.Debug (e.StackTrace);
}
}
bool IsExecutableFile (string path)
{
if (path == null) throw new ArgumentNullException ("path");
if (!File.Exists (path)) return false;
UnixFileInfo info = new UnixFileInfo (path);
return 0 !=
(info.FileAccessPermissions & FileAccessPermissions.UserExecute);
}
bool CommandLineIsFoundOnPath (string line)
{
string command;
if (line == null) throw new ArgumentNullException ("line");
int space = line.IndexOf (" ");
if (0 < space)
command = line.Substring (0, space);
else
command = line;
// If this command is the same as the last, yes.
if (command == last_command_found) return true;
// Otherwise, try to find the command file in path.
string PATH = Environment.GetEnvironmentVariable ("PATH") ?? "";
command = PATH
.Split (':')
.Select (path => Path.Combine (path, command))
.FirstOrDefault (IsExecutableFile);
if (command != null) {
last_command_found = command;
return true;
}
return false;
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/EnvironmentService0000644 0001750 0001750 00000000131 11716440350 031244 x ustar 00 0000000 0000000 30 mtime=1329217768.696213913
30 atime=1330829339.234223921
29 ctime=1330847230.06850491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/EnvironmentServiceExtensions.cs 0000664 0001750 0001750 00000006547 11716440350 033226 0 ustar 00chris chris 0000000 0000000 // EnvironmentServieExtensions
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this
// source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see
using System;
using System.IO;
using Do.Platform;
namespace Do.Platform.Linux
{
public static class EnvironmentServiceExtensions
{
///
/// Find the path of the directory that maps to the given XDG dir
/// if the xdg variable is not set, return null
///
///
/// A XDG directory variable name
///
///
/// A path for the XDG directory env. variable
///
public static string MaybePathForXdgVariable (this IEnvironmentService envService, string key)
{
return PathForXdgVariable (envService, key, null);
}
///
/// Find the path of the directory that maps to the given XDG dir
/// if the xdg variable is not set, use the fallback value passed in
///
///
/// A XDG directory variable name
///
///
/// A default XDG directory name to fallback
/// on if the variable is not set.
///
///
/// A path for the XDG directory env. variable
///
public static string PathForXdgVariable (this IEnvironmentService envService, string key, string fallback)
{
string homeDir, configDir, envPath, userDirsPath;
homeDir = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
configDir = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
envPath = Environment.GetEnvironmentVariable (key);
if (!String.IsNullOrEmpty (envPath)) {
return envPath;
}
userDirsPath = Path.Combine (configDir, "user-dirs.dirs");
if (File.Exists (userDirsPath)) {
using (StreamReader reader = new StreamReader (userDirsPath)) {
string line;
while ((line = reader.ReadLine ()) != null) {
line = line.Trim ();
int delimIndex = line.IndexOf ('=');
if (delimIndex > 8 && line.Substring (0, delimIndex) == key) {
string path = line.Substring (delimIndex + 1).Trim ('"');
bool relative = false;
if (path.StartsWith ("$HOME/")) {
relative = true;
path = path.Substring (6);
} else if (path.StartsWith ("~")) {
relative = true;
path = path.Substring (1);
} else if (!path.StartsWith ("/")) {
relative = true;
}
return relative ? Path.Combine (homeDir, path) : path;
}
}
}
}
return fallback == null
? null
: Path.Combine (homeDir, fallback);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/SystemService.cs 0000644 0001750 0001750 00000000073 11704304006 030627 x ustar 00 0000000 0000000 30 atime=1330831086.762265905
29 ctime=1330847230.06850491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/SystemService.cs 0000664 0001750 0001750 00000016247 11704304006 030116 0 ustar 00chris chris 0000000 0000000 // SystemService.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.IO;
using System.Text;
using System.Reflection;
using System.Runtime.InteropServices;
#if USE_DBUS_SHARP
using DBus;
#else
using NDesk.DBus;
#endif
using org.freedesktop.DBus;
using Do.Platform.ServiceStack;
using Do.Platform.Linux.DBus;
using Gnome;
using Mono.Unix.Native;
namespace Do.Platform.Linux
{
public class SystemService : AbstractSystemService, IController, IInitializedService
{
delegate void BoolDelegate (bool val);
const string PowerManagementName = "org.freedesktop.PowerManagement";
const string PowerManagementPath = "/org/freedesktop/PowerManagement";
const string DeviceKitPowerName = "org.freedesktop.DeviceKit.Power";
const string DeviceKitPowerPath = "/org/freedesktop/DeviceKit/Power";
const string AutoStartKey = "Hidden";
[Interface(PowerManagementName)]
interface IPowerManagement
{
bool GetOnBattery ();
event BoolDelegate OnBatteryChanged;
}
[Interface(DeviceKitPowerName)]
interface IDeviceKitPower : org.freedesktop.DBus.Properties
{
event Action OnChanged;
}
[DllImport ("libc")]
private static extern int prctl (int option, byte [] arg2, IntPtr arg3, IntPtr arg4, IntPtr arg5);
private static int prctl (int option, string arg2)
{
return prctl (option, Encoding.ASCII.GetBytes (arg2 + "\0"), IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
}
bool on_battery;
IPowerManagement power;
IDeviceKitPower devicekit;
DesktopItem autostartfile;
public void Initialize ()
{
// Set a sane default value for on_battery. Thus, if we don't find a working power manager
// we assume we're not on battery.
on_battery = false;
try {
BusG.Init ();
if (Bus.System.NameHasOwner (DeviceKitPowerName)) {
devicekit = Bus.System.GetObject (DeviceKitPowerName, new ObjectPath (DeviceKitPowerPath));
devicekit.OnChanged += DeviceKitOnChanged;
on_battery = (bool) devicekit.Get (DeviceKitPowerName, "on-battery");
Log.Debug ("Using org.freedesktop.DeviceKit.Power for battery information");
} else if (Bus.Session.NameHasOwner (PowerManagementName)) {
power = Bus.Session.GetObject (PowerManagementName, new ObjectPath (PowerManagementPath));
power.OnBatteryChanged += PowerOnBatteryChanged;
on_battery = power.GetOnBattery ();
Log.Debug ("Using org.freedesktop.PowerManager for battery information");
}
} catch (Exception e) {
Log.Error ("Could not initialize dbus: {0}", e.Message);
Log.Debug (e.StackTrace);
}
}
void PowerOnBatteryChanged (bool val)
{
on_battery = val;
OnOnBatteryChanged ();
}
void DeviceKitOnChanged ()
{
bool newState = (bool) devicekit.Get (DeviceKitPowerName, "on-battery");
if (on_battery != newState) {
on_battery = newState;
OnOnBatteryChanged ();
}
}
public override bool GetOnBatteryPower ()
{
return on_battery;
}
public override void EnsureSingleApplicationInstance ()
{
try {
IController controller = Registrar.GetControllerInstance ();
if (controller == null) {
// No IController found on the bus, so no other
// instance is running. Register self.
Log.Debug ("No other application instance detected. Continue startup.");
Registrar.RegisterController (this);
} else {
// Another IController was found, so summon it
// and exit.
Log.Debug ("Existing application instance detected. Summon and bail.");
controller.Summon ();
System.Environment.Exit (0);
}
} catch (Exception e) {
Log.Error ("Could not EnsureSingleApplicationInstance: {0}", e.Message);
Log.Debug (e.StackTrace);
}
}
public void Summon ()
{
Gdk.Threads.Enter ();
Services.Windowing.SummonMainWindow ();
Gdk.Threads.Leave ();
}
string AutoStartDir {
get {
return System.IO.Path.Combine (
Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "autostart");
}
}
string AutoStartFileName {
get {
return System.IO.Path.Combine (AutoStartDir, "gnome-do.desktop");
}
}
string AutoStartUri {
get {
return Gnome.Vfs.Uri.GetUriFromLocalPath (AutoStartFileName);
}
}
DesktopItem AutoStartFile {
get {
if (autostartfile != null)
return autostartfile;
try {
autostartfile = DesktopItem.NewFromUri (AutoStartUri, DesktopItemLoadFlags.NoTranslations);
} catch (GLib.GException loadException) {
Log.Info ("Unable to load existing autostart file: {0}", loadException.Message);
Log.Info ("Writing new autostart file to {0}", AutoStartFileName);
autostartfile = DesktopItem.NewFromFile (System.IO.Path.Combine (AssemblyInfo.InstallData, "applications/gnome-do.desktop"),
DesktopItemLoadFlags.NoTranslations);
try {
if (!Directory.Exists (AutoStartDir))
Directory.CreateDirectory (AutoStartDir);
// This *enables* autostart, by setting the "Hidden" key (which disables autostart) to false.
// Explicitly setting this key fixes LP #398303; otherwise our IsAutoStartEnabled method won't find
// the AutoStartKey, and will erroneously return false.
autostartfile.SetBoolean (AutoStartKey, false);
autostartfile.Save (AutoStartUri, true);
autostartfile.Location = AutoStartUri;
} catch (Exception e) {
Log.Error ("Failed to write initial autostart file: {0}", e.Message);
}
}
return autostartfile;
}
}
public override bool IsAutoStartEnabled ()
{
DesktopItem autostart = AutoStartFile;
if (!autostart.Exists ()) {
Log.Error ("Could not open autostart file {0}", AutoStartUri);
}
if (autostart.AttrExists (AutoStartKey)) {
return !String.Equals(autostart.GetString (AutoStartKey), "true", StringComparison.OrdinalIgnoreCase);
}
return false;
}
public override void SetAutoStartEnabled (bool enabled)
{
DesktopItem autostart = AutoStartFile;
autostart.SetBoolean (AutoStartKey, !enabled);
try {
autostart.Save (null, true);
} catch (Exception e) {
Log.Error ("Failed to update autostart file: {0}", e.Message);
}
}
public override void SetProcessName (string name)
{
prctl (15 /* PR_SET_NAME */, name);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/GConfPreferencesSe0000644 0001750 0001750 00000000073 11704304006 031064 x ustar 00 0000000 0000000 30 atime=1330831086.766265905
29 ctime=1330847230.06850491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/GConfPreferencesService.cs 0000664 0001750 0001750 00000005162 11704304006 032002 0 ustar 00chris chris 0000000 0000000 // GConfPreferencesService.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using Do.Platform;
namespace Do.Platform.Linux
{
public class GConfPreferencesService : IPreferencesService
{
const string ApplicationRootPath = "/apps/gnome-do/preferences";
GConf.Client client;
string RootPath { get; set; }
public GConfPreferencesService () : this (ApplicationRootPath)
{
}
public GConfPreferencesService (string rootPath)
{
RootPath = rootPath;
client = new GConf.Client ();
client.AddNotify (RootPath, new GConf.NotifyEventHandler (HandleGConfChanged));
}
void HandleGConfChanged (object sender, GConf.NotifyEventArgs args)
{
if (PreferencesChanged != null)
PreferencesChanged (this, new PreferencesChangedEventArgs (args.Key.Substring(RootPath.Length + 1), args.Value));
}
string AbsolutePathForKey (string key)
{
if (key.StartsWith ("/"))
return key;
return string.Format ("{0}/{1}", RootPath, key);
}
#region IPreferencesService
public event EventHandler PreferencesChanged;
public bool Set (string key, T val)
{
bool success = true;
try {
client.Set (AbsolutePathForKey (key), val);
} catch (Exception e) {
Log.Error ("Encountered error setting GConf key {0}: {1}", key, e.Message);
Log.Debug (e.StackTrace);
success = false;
}
return success;
}
public bool TryGet (string key, out T val)
{
bool success = true;
val = default (T);
try {
val = (T) client.Get (AbsolutePathForKey (key));
} catch (GConf.NoSuchKeyException) {
// We don't need to log this, because many keys that do not
// exist are asked for.
success = false;
} catch (Exception e) {
Log.Error ("Encountered error getting GConf key {0}: {1}", key, e.Message);
Log.Debug (e.StackTrace);
success = false;
}
return success;
}
#endregion
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/GnomeKeyringSecure0000644 0001750 0001750 00000000256 11704304006 031166 x ustar 00 0000000 0000000 114 path=gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/GnomeKeyringSecurePreferencesService.cs
30 atime=1330831086.766265905
30 ctime=1330847230.072504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/GnomeKeyringSecurePreferencesServic0000664 0001750 0001750 00000007011 11704304006 033775 0 ustar 00chris chris 0000000 0000000 /* GnomeKeyringSecurePreferencesService.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this
* source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using System.Collections;
using System.Threading;
using System.ComponentModel;
using Mono.Unix;
using Gnome.Keyring;
using Do.Platform;
namespace Do.Platform.Linux
{
public class GnomeKeyringSecurePreferencesService : ISecurePreferencesService
{
readonly string ErrorSavingMessage = Catalog.GetString ("Error saving {0}");
readonly string KeyNotFoundMessage = Catalog.GetString ("Key \"{0}\" not found in keyring");
readonly string KeyringUnavailableMessage = Catalog.GetString ("gnome-keyring-daemon could not be reached!");
const string DefaultRootPath = "gnome-do";
string RootPath { get; set; }
public GnomeKeyringSecurePreferencesService () : this (DefaultRootPath)
{
}
public GnomeKeyringSecurePreferencesService (string rootPath)
{
RootPath = rootPath;
}
string AbsolutePathForKey (string key)
{
if (key.StartsWith ("/"))
return key;
return string.Format ("{0}/{1}", RootPath, key);
}
#region ISecurePreferencesService
public bool Set (string key, string val)
{
Hashtable keyData;
if (!Ring.Available) {
Log.Error (KeyringUnavailableMessage);
return false;
}
keyData = new Hashtable ();
keyData[AbsolutePathForKey (key)] = key;
bool success = false;
AutoResetEvent completed = new AutoResetEvent (false);
Services.Application.RunOnMainThread (delegate {
try {
Ring.CreateItem (Ring.GetDefaultKeyring (), ItemType.GenericSecret, AbsolutePathForKey (key), keyData, val.ToString (), true);
success = true;
} catch (KeyringException e) {
Log.Error (ErrorSavingMessage, key, e.Message);
Log.Debug (e.StackTrace);
success = false;
}
completed.Set ();
});
if (!completed.WaitOne (200)) {
return false;
}
return success;
}
public bool TryGet (string key, out string val)
{
Hashtable keyData;
string secret = "";
if (!Ring.Available) {
Log.Error (KeyringUnavailableMessage);
val = "";
return false;
}
keyData = new Hashtable ();
keyData[AbsolutePathForKey (key)] = key;
bool success = false;
AutoResetEvent completed = new AutoResetEvent (false);
Services.Application.RunOnMainThread (delegate {
try {
foreach (ItemData item in Ring.Find (ItemType.GenericSecret, keyData)) {
if (!item.Attributes.ContainsKey (AbsolutePathForKey (key)))
continue;
secret = item.Secret;
success = true;
break;
}
} catch (KeyringException) {
Log.Debug (KeyNotFoundMessage, AbsolutePathForKey (key));
success = false;
} finally {
completed.Set ();
}
});
if (!completed.WaitOne (200)) {
success = false;
}
val = secret;
return success;
}
#endregion
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/IConfigurable.cs 0000644 0001750 0001750 00000000074 11704304006 030534 x ustar 00 0000000 0000000 30 atime=1330831086.766265905
30 ctime=1330847230.072504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/IConfigurable.cs 0000664 0001750 0001750 00000002070 11704304006 030007 0 ustar 00chris chris 0000000 0000000 // IConfigurable.cs
//
// GNOME Do is the legal property of its developers, whose names are too numerous
// to list here. Please refer to the COPYRIGHT file distributed with this
// source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
using System;
using Gtk;
namespace Do.Platform.Linux
{
public interface IConfigurable
{
string Name { get; }
string Description { get; }
string Icon { get; }
Bin GetConfiguration ();
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/NotificationHelper0000644 0001750 0001750 00000000074 11704304006 031205 x ustar 00 0000000 0000000 30 atime=1330831086.766265905
30 ctime=1330847230.072504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/NotificationHelper.cs 0000664 0001750 0001750 00000007754 11704304006 031102 0 ustar 00chris chris 0000000 0000000 /* NotificationHelper.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using Gtk;
using Gdk;
using Mono.Unix;
using LibNotify = Notifications;
using Do.Platform;
using Do.Interface;
namespace Do.Platform.Linux
{
public enum NotificationCapability {
actions,
append,
body,
body_hyperlinks,
body_images,
body_markup,
icon_multi,
icon_static,
image_svg,
max,
positioning, // not an official capability
scaling, // not an official capability
sound
}
internal class NotificationHelper
{
const string DefaultIconName = "gnome-do";
const int IconSize = 48;
const int LettersPerWord = 7;
const int MillisecondsPerWord = 350;
const int MinNotifyShow = 5000;
const int MaxNotifyShow = 10000;
Pixbuf DefaultIcon { get; set; }
public event EventHandler NotificationClosed;
public NotificationHelper ()
{
DefaultIcon = IconProvider.PixbufFromIconName (DefaultIconName, IconSize);
}
static int ReadableDurationForMessage (string title, string message)
{
int t = (title.Length + message.Length) / LettersPerWord * MillisecondsPerWord;
return Math.Min (Math.Max (t, MinNotifyShow), MaxNotifyShow);
}
public void Notify (Notification note)
{
Notify (note, Screen.Default, 0, 0);
}
public void Notify (Notification note, Screen screen, int x, int y)
{
LibNotify.Notification notify = ToNotify (note);
notify.SetGeometryHints (screen, x, y);
notify.Show ();
}
public bool SupportsCapability (NotificationCapability capability)
{
// positioning and scaling are not actual capabilities, i just know for a fact most other servers
// support geo. hints, and notify-osd is the only that auto scales images
if (capability == NotificationCapability.positioning)
return LibNotify.Global.ServerInformation.Name != "notify-osd";
else if (capability == NotificationCapability.scaling)
return LibNotify.Global.ServerInformation.Name == "notify-osd";
return Array.IndexOf (LibNotify.Global.Capabilities, Enum.GetName (typeof (NotificationCapability), capability)) > -1;
}
LibNotify.Notification ToNotify (Notification note)
{
LibNotify.Notification notify = new LibNotify.Notification ();
notify.Body = GLib.Markup.EscapeText (note.Body);
notify.Summary = GLib.Markup.EscapeText (note.Title);
notify.Closed += (sender, e) => OnNotificationClosed (note);
notify.Timeout = ReadableDurationForMessage (note.Title, note.Body);
if (SupportsCapability (NotificationCapability.scaling) && !note.Icon.Contains ("@")) {
notify.IconName = string.IsNullOrEmpty (note.Icon)
? DefaultIconName
: note.Icon;
} else {
notify.Icon = string.IsNullOrEmpty (note.Icon)
? DefaultIcon
: IconProvider.PixbufFromIconName (note.Icon, IconSize);
}
if (note is ActionableNotification) {
ActionableNotification anote = note as ActionableNotification;
notify.AddAction (GLib.Markup.EscapeText (anote.ActionLabel),
anote.ActionLabel, (sender, e) => anote.PerformAction ());
}
return notify;
}
void OnNotificationClosed (Notification note)
{
if (NotificationClosed != null)
NotificationClosed (this, new NotificationEventArgs (note));
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/TrayIconPreference0000644 0001750 0001750 00000000074 11704304006 031146 x ustar 00 0000000 0000000 30 atime=1330831086.770265905
30 ctime=1330847230.076504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/TrayIconPreferences.cs 0000664 0001750 0001750 00000003266 11704304006 031220 0 ustar 00chris chris 0000000 0000000 // TrayIconPreferences.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using Mono.Unix;
using Do.Platform;
namespace Do.Platform.Linux
{
class TrayIconPreferences
{
const bool VisiblePreferenceDefault = false;
const string VisiblePreferenceKey = "StatusIconVisible";
IPreferences Preferences { get; set; }
public event EventHandler IconVisibleChanged;
public TrayIconPreferences ()
{
Preferences = Services.Preferences.Get ();
Preferences.PreferencesChanged += OnPreferencesChanged;
}
void OnPreferencesChanged (object sender, PreferencesChangedEventArgs e)
{
switch (e.Key) {
case VisiblePreferenceKey:
if (IconVisibleChanged != null)
IconVisibleChanged (this, EventArgs.Empty);
break;
}
}
public bool IconVisible {
get { return Preferences.Get (VisiblePreferenceKey, VisiblePreferenceDefault); }
set { Preferences.Set (VisiblePreferenceKey, value); }
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/TrayIconService.cs0000644 0001750 0001750 00000000074 11704304006 031074 x ustar 00 0000000 0000000 30 atime=1330831086.770265905
30 ctime=1330847230.076504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/TrayIconService.cs 0000664 0001750 0001750 00000010365 11704304006 030355 0 ustar 00chris chris 0000000 0000000 // TrayIconService.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using Mono.Unix;
using Gdk;
using Gtk;
using Do.Platform;
using Do.Platform.ServiceStack;
using Do.Interface;
namespace Do.Platform.Linux
{
public class TrayIconService : IInitializedService
{
const int IconSize = 24;
const int NotifyDelay = 2000;
const string IconName = "gnome-do";
const string MonochromeIconName = "gnome-do-symbolic";
// Must remain static until IServices have their own preferences.
static TrayIconPreferences Preferences { get; set; }
// Need until IServices have their own preferences.
public static bool Visible {
get { return Preferences.IconVisible; }
set { Preferences.IconVisible = value; }
}
StatusIcon status_icon;
NotificationHelper notifier;
public TrayIconService ()
{
notifier = new NotificationHelper ();
notifier.NotificationClosed += OnNotificationClosed;
Gtk.IconInfo info = Gtk.IconTheme.Default.ChooseIcon (new [] {MonochromeIconName, IconName}, IconSize, IconLookupFlags.ForceSvg);
status_icon = new StatusIcon ();
status_icon.Pixbuf = info.LoadIcon ();
status_icon.PopupMenu += OnPopupMenu;
status_icon.Activate += OnActivate;
}
~TrayIconService ()
{
status_icon.Activate -= OnActivate;
status_icon.PopupMenu -= OnPopupMenu;
}
public void Initialize ()
{
Preferences = new TrayIconPreferences ();
Preferences.IconVisibleChanged += OnIconVisibleChanged;
if (!Preferences.IconVisible)
Hide ();
// Listen for notifications so we can show a libnotify bubble.
Services.Notifications.Notified += OnNotified;
}
void OnIconVisibleChanged (object sender, EventArgs e)
{
if (Preferences.IconVisible)
Show ();
else
Hide ();
}
void OnNotified (object sender, NotificationEventArgs e)
{
Services.Application.RunOnMainThread (() => {
ShowNotification (e.Notification);
});
}
void OnNotificationClosed (object sender, NotificationEventArgs e)
{
Services.Application.RunOnMainThread (() => {
if (!Preferences.IconVisible) Hide ();
});
}
// Only run on the main thread.
void ShowNotification (Notification note)
{
int x, y;
Screen screen;
if (notifier.SupportsCapability (NotificationCapability.positioning)) {
Show ();
GetLocationOnScreen (out screen, out x, out y);
// We delay this so that the status icon has time to show.
Services.Application.RunOnMainThread (() => {
notifier.Notify (note, screen, x, y);
}, NotifyDelay);
} else {
Services.Application.RunOnMainThread (() => {
notifier.Notify (note);
});
}
}
void Show ()
{
status_icon.Visible = true;
}
void Hide ()
{
status_icon.Visible = false;
}
void GetLocationOnScreen (out Screen screen, out int x, out int y)
{
Rectangle area;
Orientation orientation;
status_icon.GetGeometry (out screen, out area, out orientation);
x = area.X + area.Width / 2;
y = area.Y + area.Height - 5;
}
void OnPopupMenu (object sender, EventArgs e)
{
Services.Windowing.ShowMainMenu (PositionMainMenu);
}
void OnActivate (object sender, EventArgs e)
{
Services.Windowing.SummonMainWindow ();
}
void PositionMainMenu (int menuHeight, int menuWidth, out int x, out int y)
{
Screen screen;
Rectangle area;
Orientation orientation;
status_icon.GetGeometry (out screen, out area, out orientation);
x = area.X;
y = area.Y;
if (y + menuHeight >= screen.Height)
y -= menuHeight;
else
y += area.Height;
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/UniverseFactorySer0000644 0001750 0001750 00000000074 11704304006 031221 x ustar 00 0000000 0000000 30 atime=1330831086.774265905
30 ctime=1330847230.076504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/UniverseFactoryService.cs 0000664 0001750 0001750 00000003113 11704304006 031746 0 ustar 00chris chris 0000000 0000000 // UniverseFactoryService.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.Collections.Generic;
using System.Linq;
using Do.Universe;
using Do.Universe.Linux;
using Do.Platform;
namespace Do.Platform.Linux
{
public class UniverseFactoryService : IUniverseFactoryService
{
public IFileItem NewFileItem (string path)
{
return new FileItem (path);
}
public IApplicationItem NewApplicationItem (string path)
{
// We attempt to create the Application item, but return a NullApplicationItem
// instead of null if MaybeCreateFromDesktopItem fails.
IApplicationItem maybe = ApplicationItem.MaybeCreateFromDesktopItem (path);
return maybe ?? new NullApplicationItem (path);
}
public IApplicationItem MaybeApplicationItemFromCommand (string cmd)
{
return ApplicationItem.MaybeCreateFromCmd (cmd);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/NetworkService.cs 0000644 0001750 0001750 00000000074 11704304006 030775 x ustar 00 0000000 0000000 30 atime=1330831086.774265905
30 ctime=1330847230.076504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/NetworkService.cs 0000664 0001750 0001750 00000005426 11704304006 030260 0 ustar 00chris chris 0000000 0000000 // NetworkService.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.Reflection;
#if USE_DBUS_SHARP
using DBus;
#else
using NDesk.DBus;
#endif
using org.freedesktop.DBus;
using Do.Platform.ServiceStack;
using Do.Platform.Linux.DBus;
namespace Do.Platform.Linux
{
public class NetworkService : INetworkService
{
const string NetworkManagerName = "org.freedesktop.NetworkManager";
const string NetworkManagerPath = "/org/freedesktop/NetworkManager";
[Interface(NetworkManagerName)]
interface INetworkManager : org.freedesktop.DBus.Properties
{
event StateChangedHandler StateChanged;
}
delegate void StateChangedHandler (uint state);
INetworkManager network;
public event EventHandler StateChanged;
public NetworkService ()
{
this.IsConnected = true;
try {
BusG.Init ();
if (Bus.System.NameHasOwner (NetworkManagerName)) {
network = Bus.System.GetObject (NetworkManagerName, new ObjectPath (NetworkManagerPath));
network.StateChanged += OnStateChanged;
SetConnected ();
}
} catch (Exception e) {
// if something bad happened, log the error and assume we are connected
Log.Error ("Could not initialize Network Manager dbus: {0}", e.Message);
Log.Debug (e.StackTrace);
}
}
void OnStateChanged (uint state)
{
NetworkState newState = (NetworkState) Enum.ToObject (typeof (NetworkState), state);
SetConnected ();
if (StateChanged != null) {
StateChanged (this, new NetworkStateChangedEventArgs (newState));
}
}
void SetConnected ()
{
if (this.State == NetworkState.Connected)
IsConnected = true;
else
IsConnected = false;
}
NetworkState State {
get {
try {
return (NetworkState) Enum.ToObject (typeof (NetworkState), network.Get (NetworkManagerName, "State"));
} catch (Exception) {
return NetworkState.Unknown;
}
}
}
#region INetworkService
public bool IsConnected { get; private set; }
#endregion
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/PaxHeaders.10129/KeyBindingService.0000644 0001750 0001750 00000000127 11724563113 031050 x ustar 00 0000000 0000000 27 mtime=1330832971.373325
30 atime=1330832973.806311241
30 ctime=1330847230.080504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/Do.Platform.Linux/KeyBindingService.cs 0000664 0001750 0001750 00000003070 11724563113 030653 0 ustar 00chris chris 0000000 0000000 using System;
using System.Linq;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Mono.Unix;
using Gdk;
using Do.Platform.Common;
namespace Do.Platform.Linux
{
class KeyBindingService : AbstractKeyBindingService
{
[DllImport("libdo")]
static extern void gnomedo_keybinder_init ();
[DllImport("libdo")]
static extern bool gnomedo_keybinder_bind (string keystring, BindkeyHandler handler);
[DllImport("libdo")]
static extern bool gnomedo_keybinder_unbind (string keystring, BindkeyHandler handler);
public delegate void BindkeyHandler (string key, IntPtr user_data);
BindkeyHandler key_handler;
public KeyBindingService () : base ()
{
key_handler = new BindkeyHandler (KeybindingPressed);
try {
gnomedo_keybinder_init ();
} catch (DllNotFoundException) {
Log.Error ("libdo not found - keybindings will not work.");
}
}
void KeybindingPressed (string keystring, IntPtr user_data)
{
if (Bindings.Any (k => k.KeyString == keystring)) {
Bindings.First (k => k.KeyString == keystring).Callback (null);
}
}
public override bool RegisterOSKey (string keyString, EventCallback cb)
{
if (string.IsNullOrEmpty (keyString) || cb == null)
return false;
return gnomedo_keybinder_bind (keyString, key_handler);
}
public override bool UnRegisterOSKey (string keyString)
{
if (Bindings.Any (k => k.KeyString == keyString))
return gnomedo_keybinder_unbind (keyString, key_handler);
return false;
}
}
} gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/PaxHeaders.10129/ConsoleCrayon.cs 0000644 0001750 0001750 00000000073 11704304006 025355 x ustar 00 0000000 0000000 30 atime=1330831086.738265904
29 ctime=1330847230.06050491
gnome-do-0.9/Do.Platform.Linux/src/Do.Platform/ConsoleCrayon.cs 0000664 0001750 0001750 00000012372 11704304006 024637 0 ustar 00chris chris 0000000 0000000 // ConsoleCrayon.cs
//
// Author:
// Aaron Bockover
//
// Copyright (C) 2008 Novell, Inc.
//
// 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 Do.Platform
{
public static class ConsoleCrayon
{
#region Public API
private static ConsoleColor foreground_color;
public static ConsoleColor ForegroundColor {
get { return foreground_color; }
set {
foreground_color = value;
SetColor (foreground_color, true);
}
}
private static ConsoleColor background_color;
public static ConsoleColor BackgroundColor {
get { return background_color; }
set {
background_color = value;
SetColor (background_color, false);
}
}
public static void ResetColor ()
{
if (XtermColors) {
Console.Write (GetAnsiResetControlCode ());
} else if (Environment.OSVersion.Platform != PlatformID.Unix &&
!RuntimeIsMono) {
Console.ResetColor ();
}
}
private static void SetColor (ConsoleColor color, bool isForeground)
{
if (color < ConsoleColor.Black || color > ConsoleColor.White) {
throw new ArgumentOutOfRangeException ("color",
"Not a ConsoleColor value.");
}
if (XtermColors) {
Console.Write (GetAnsiColorControlCode (color, isForeground));
} else if (Environment.OSVersion.Platform != PlatformID.Unix &&
!RuntimeIsMono) {
if (isForeground) {
Console.ForegroundColor = color;
} else {
Console.BackgroundColor = color;
}
}
}
#endregion
#region Ansi/VT Code Calculation
// Modified from Mono's System.TermInfoDriver
// License: MIT/X11
// Authors: Gonzalo Paniagua Javier
// (C) 2005-2006 Novell, Inc
private static int TranslateColor (ConsoleColor desired, out bool light)
{
light = false;
switch (desired) {
// Dark colors
case ConsoleColor.Black: return 0;
case ConsoleColor.DarkRed: return 1;
case ConsoleColor.DarkGreen: return 2;
case ConsoleColor.DarkYellow: return 3;
case ConsoleColor.DarkBlue: return 4;
case ConsoleColor.DarkMagenta: return 5;
case ConsoleColor.DarkCyan: return 6;
case ConsoleColor.Gray: return 7;
// Light colors
case ConsoleColor.DarkGray: light = true; return 0;
case ConsoleColor.Red: light = true; return 1;
case ConsoleColor.Green: light = true; return 2;
case ConsoleColor.Yellow: light = true; return 3;
case ConsoleColor.Blue: light = true; return 4;
case ConsoleColor.Magenta: light = true; return 5;
case ConsoleColor.Cyan: light = true; return 6;
case ConsoleColor.White: default: light = true; return 7;
}
}
private static string GetAnsiColorControlCode (ConsoleColor color, bool isForeground)
{
// lighter fg colours are 90 -> 97 rather than 30 -> 37
// lighter bg colours are 100 -> 107 rather than 40 -> 47
bool light;
int code = TranslateColor (color, out light) + (isForeground ? 30 : 40) + (light ? 60 : 0);
return String.Format ("\x001b[{0}m", code);
}
private static string GetAnsiResetControlCode ()
{
return "\x001b[0m";
}
#endregion
#region xterm Detection
private static bool? xterm_colors = null;
public static bool XtermColors {
get {
if (xterm_colors == null) {
DetectXtermColors ();
}
return xterm_colors.Value;
}
}
[System.Runtime.InteropServices.DllImport ("libc", EntryPoint="isatty")]
private extern static int _isatty (int fd);
private static bool isatty (int fd)
{
try {
return _isatty (fd) == 1;
} catch {
return false;
}
}
private static void DetectXtermColors ()
{
bool _xterm_colors = false;
switch (Environment.GetEnvironmentVariable ("TERM")) {
case "xterm":
case "rxvt":
case "rxvt-unicode":
if (Environment.GetEnvironmentVariable ("COLORTERM") != null) {
_xterm_colors = true;
}
break;
case "xterm-color":
_xterm_colors = true;
break;
}
xterm_colors = _xterm_colors && isatty (1) && isatty (2);
}
#endregion
#region Runtime Detection
private static bool? runtime_is_mono;
public static bool RuntimeIsMono {
get {
if (runtime_is_mono == null) {
runtime_is_mono = Type.GetType ("System.MonoType") != null;
}
return runtime_is_mono.Value;
}
}
#endregion
}
}
gnome-do-0.9/Do.Platform.Linux/src/PaxHeaders.10129/Do.Universe 0000644 0001750 0001750 00000000132 11724616776 022231 x ustar 00 0000000 0000000 30 mtime=1330847230.088504909
30 atime=1330847230.796504871
30 ctime=1330847230.088504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/ 0000775 0001750 0001750 00000000000 11724616776 021567 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/PaxHeaders.10129/ApplicationItem.cs 0000644 0001750 0001750 00000000074 11704304006 025676 x ustar 00 0000000 0000000 30 atime=1330831086.774265905
30 ctime=1330847230.080504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/ApplicationItem.cs 0000664 0001750 0001750 00000015317 11704304006 025161 0 ustar 00chris chris 0000000 0000000 // ApplicationItem.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using Gnome;
using Mono.Unix;
using Do.Universe;
using Do.Platform;
namespace Do.Universe.Linux {
internal class ApplicationItem : Item, IApplicationItem {
const string DefaultApplicationIcon = "applications-other";
static IDictionary Instances { get; set; }
static ApplicationItem ()
{
Instances = new Dictionary ();
}
public static ApplicationItem MaybeCreateFromDesktopItem (string path)
{
string key = path;
ApplicationItem appItem;
if (path == null) throw new ArgumentNullException ("path");
lock (Instances)
{
if (Instances.ContainsKey (key)) {
appItem = Instances [key];
} else {
DesktopItem item = null;
try {
item = DesktopItem.NewFromFile (path, 0);
appItem = new ApplicationItem (item);
} catch (Exception e) {
appItem = null;
try { item.Dispose (); } catch { }
Log.Error ("Could not load desktop item: {0}", e.Message);
Log.Debug (e.StackTrace);
}
if (appItem != null)
Instances [key] = appItem;
}
}
return appItem;
}
public static ApplicationItem MaybeCreateFromCmd (string cmd)
{
if (string.IsNullOrEmpty (cmd))
return null;
List appItems = new List ();
cmd = Regex.Escape (cmd);
Regex regex = new Regex (string .Format ("(^| ){0}( |)", cmd));
foreach (ApplicationItem item in Instances.Values) {
string path = item.Location;
try {
if (path.StartsWith ("file://"))
path = path.Substring ("file://".Length);
path = Path.GetFileName (path);
} catch { continue; }
try {
if (!string.IsNullOrEmpty (path) && !string.IsNullOrEmpty (item.Exec) &&
(regex.IsMatch (path) || regex.IsMatch (item.Exec))) {
appItems.Add (item);
}
} catch {
// it failed, probably a null somewhere, we dont care really
}
}
ApplicationItem bestMatch = null;
foreach (ApplicationItem item in appItems) {
if (bestMatch == null) {
bestMatch = item;
continue;
}
if (!item.Hidden) {
if (bestMatch.Hidden) {
bestMatch = item;
continue;
}
if (item.IsAppropriateForCurrentDesktop) {
if (!bestMatch.IsAppropriateForCurrentDesktop || item.Exec.Length < bestMatch.Exec.Length)
bestMatch = item;
}
}
}
return bestMatch;
}
protected DesktopItem item;
string name, description, icon;
IEnumerable categories;
///
/// Create an application item from a desktop file.
///
///
/// A containing the absolute path of
/// a desktop (.desktop) file.
///
protected ApplicationItem (DesktopItem item)
{
this.item = item;
if (item.Exists ()) {
name = item.GetLocalestring ("Name");
description = item.GetLocalestring ("Comment");
icon = item.GetString ("Icon") ?? DefaultApplicationIcon;
if (item.AttrExists ("Categories"))
categories = item.GetString ("Categories").Split (';');
else
categories = Enumerable.Empty ();
} else {
name = Path.GetFileName (item.Location);
description =
Catalog.GetString ("This application could not be indexed.");
icon = DefaultApplicationIcon;
categories = Enumerable.Empty ();
}
}
public override string Name {
get { return name; }
}
public override string Description {
get { return description; }
}
public override string Icon {
get { return icon; }
}
public IEnumerable Categories {
get { return categories; }
}
public bool NoDisplay {
get {
return item.AttrExists ("NoDisplay") && item.GetBoolean ("NoDisplay");
}
}
public string Exec {
get { return item.GetString ("Exec"); }
}
protected string Location {
get { return item.Location; }
}
public bool Hidden {
get { return item.GetBoolean ("NoDisplay"); }
}
public bool IsUserCustomItem {
get { return item.Location.StartsWith ("file:///home"); }
}
public bool IsAppropriateForCurrentDesktop {
get {
string onlyShowIn = item.GetString ("OnlyShowIn");
string notShowIn = item.GetString ("NotShowIn");
string desktopSession = Environment.GetEnvironmentVariable ("XDG_CURRENT_DESKTOP");
if (desktopSession == null) {
// Legacy fallbacks:
// If KDE_FULL_SESSION is true, assume kde.
// Else, assume GNOME
if (Environment.GetEnvironmentVariable ("KDE_FULL_SESSION") == "true") {
desktopSession = "KDE";
} else {
desktopSession = "GNOME";
}
}
// It doesn't make sense for a DE to appear in both OnlyShowIn and
// NotShowIn. We choose to prefer OnlyShowIn in this case as it makes
// the following checks easier.
if (onlyShowIn != null) {
foreach (string environment in onlyShowIn.Split (';')) {
if (desktopSession.Equals (environment, StringComparison.InvariantCultureIgnoreCase)) {
return true;
}
}
// There's an OnlyShowIn attribute, and the current environment doesn't match.
return false;
}
if (notShowIn != null) {
foreach (string environment in notShowIn.Split (';')) {
if (desktopSession.Equals (environment, StringComparison.InvariantCultureIgnoreCase)) {
return false;
}
}
}
return true;
}
}
///
/// Executes the application.
///
public void Run ()
{
item.Launch (null, DesktopItemLaunchFlags.OnlyOne);
}
public void LaunchWithFiles (IEnumerable files)
{
string [] uris = files.Select (file => file.Uri).ToArray ();
GLib.List glist = new GLib.List (uris as object[], typeof (string), false, true);
item.Launch (glist, DesktopItemLaunchFlags.OnlyOne);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/PaxHeaders.10129/CategoryItem.cs 0000644 0001750 0001750 00000000074 11704304006 025210 x ustar 00 0000000 0000000 30 atime=1330831086.778265905
30 ctime=1330847230.080504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/CategoryItem.cs 0000664 0001750 0001750 00000004204 11704304006 024464 0 ustar 00chris chris 0000000 0000000 //
// Copyright (C) 2009 GNOME Do
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using Gnome;
using Mono.Unix;
using Do.Universe;
using Do.Platform;
namespace Do.Universe.Linux
{
public class CategoryItem : Item
{
static Dictionary Instances { get; set; }
static CategoryItem ()
{
Instances = new Dictionary ();
}
public static bool ContainsCategory (string category)
{
return Instances.ContainsKey (category.ToLower ());
}
public static CategoryItem GetCategoryItem (string category)
{
string lowCat = category.ToLower ();
lock (Instances)
{
if (!Instances.ContainsKey (lowCat)) {
CategoryItem item = new CategoryItem (category);
Instances [lowCat] = item;
}
}
return Instances [lowCat];
}
string name, descritpion, category;
public override string Description {
get { return descritpion; }
}
public override string Icon {
get { return "applications-other"; }
}
public override string Name {
get { return name; }
}
public string Category {
get { return category; }
}
protected CategoryItem (string category)
{
this.category = category;
name = string.Format (Catalog.GetString ("{0} Application Category"), category);
descritpion = string.Format (Catalog.GetString ("Applications in the {0} category"), category);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/PaxHeaders.10129/NullApplicationItem.cs 0000644 0001750 0001750 00000000074 11704304006 026531 x ustar 00 0000000 0000000 30 atime=1330831086.778265905
30 ctime=1330847230.084504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/NullApplicationItem.cs 0000664 0001750 0001750 00000003530 11704304006 026006 0 ustar 00chris chris 0000000 0000000 /* NullApplicationItem.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using System.IO;
using System.Collections.Generic;
using Mono.Unix;
using Do.Universe;
using Do.Platform;
namespace Do.Universe.Linux
{
class NullApplicationItem : Item, IApplicationItem
{
string ApplicationPath { get; set; }
public NullApplicationItem (string applicationPath)
{
ApplicationPath = applicationPath ?? "";
}
public override string Name {
get { return Path.GetFileName (ApplicationPath); }
}
public override string Description {
get {
string warning = Catalog.GetString ("Error reading {0}.");
return string.Format (warning, ApplicationPath);
}
}
public override string Icon {
get { return "applications-other"; }
}
public string Exec {
get { return ""; }
}
public void Run ()
{
Log.Warn ("Cannot Run because {0} contains errors.", ApplicationPath);
}
public void LaunchWithFiles (IEnumerable files)
{
Log.Warn ("Cannot LaunchWithFiles because {0} contains errors.", ApplicationPath);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/PaxHeaders.10129/FileItem.cs 0000644 0001750 0001750 00000000074 11704304006 024312 x ustar 00 0000000 0000000 30 atime=1330831086.778265905
30 ctime=1330847230.084504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/FileItem.cs 0000664 0001750 0001750 00000012651 11704304006 023573 0 ustar 00chris chris 0000000 0000000 // FileItem.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using IO = System.IO;
using System.Collections.Generic;
using SpecialFolder = System.Environment.SpecialFolder;
using Gnome;
using Mono.Unix;
using Do.Platform;
using Do.Universe;
using Do.Platform.Linux;
namespace Do.Universe.Linux {
///
/// FileItem is an item describing a file. FileItem subclasses
/// can be created and registered with FileItem for instantiation
/// in the factory method FileItem.Create.
///
internal class FileItem : Item, IFileItem, IOpenableItem {
// A map from absolute paths to icon names.
static readonly Dictionary SpecialFolderIcons;
// A map from XDG user-dir names to icons names.
static readonly Dictionary SpecialFolderIconsXDG
= new Dictionary () {
{ "XDG_DESKTOP_DIR", "desktop" },
{ "XDG_DOWNLOAD_DIR", "folder-downloads" },
{ "XDG_TEMPLATES_DIR", "folder-templates" },
{ "XDG_PUBLICSHARE_DIR", "folder-publicshare" },
{ "XDG_DOCUMENTS_DIR", "folder-documents" },
{ "XDG_MUSIC_DIR", "folder-music" },
{ "XDG_PICTURES_DIR", "folder-pictures" },
{ "XDG_VIDEOS_DIR", "folder-videos" },
};
static string MaybeGetSpecialFolderIconForPath (string path)
{
return SpecialFolderIcons.ContainsKey (path)
? SpecialFolderIcons [path]
: null;
}
static FileItem ()
{
Gnome.Vfs.Vfs.Initialize ();
// Initialize SpecialFolderIcons by expanding paths in
// SpecialFolderIconsXDG.
//
// If an icon already exists in SpecialFolderIcons for a given path, we
// don't overwrite it. This way SpecialFolderIconsXDG defines an ordering
// for which icons take precedent; for example, XDG_DOWNLOAD_DIR and
// XDG_DESKTOP_DIR are often the same folder, so we use the icon for
// whichever one comes first in SpecialFolderIconsXDG.
SpecialFolderIcons = new Dictionary ();
foreach (KeyValuePair kv in SpecialFolderIconsXDG) {
string path = Services.Environment.MaybePathForXdgVariable (kv.Key);
if (path != null && !SpecialFolderIcons.ContainsKey (path)) {
SpecialFolderIcons [path] = kv.Value;
}
}
}
///
/// Abbreviates an absolute path by replacing $HOME with ~.
///
///
/// A containing a path.
///
///
/// A containing the abbreviated path.
///
public static string DisplayPath (string path)
{
if (null == path) throw new ArgumentNullException ();
return path.Replace (Environment.GetFolderPath (SpecialFolder.Personal), "~");
}
string name, description, icon;
///
/// Create a new FileItem for a given file.
///
///
/// A containing an absolute path to a file.
///
public FileItem (string path)
{
if (null == path) throw new ArgumentNullException ("path");
Path = path;
name = IO.Path.GetFileName (Path);
// Showing only "~" looks too abbreviated.
description = DisplayPath (Path) == "~"
? Path
: DisplayPath (Path);
}
public string Path { get; private set; }
public override string Name { get { return name; } }
public override string Description { get { return description; } }
public string Uri {
get {
return System.Uri.EscapeUriString ("file://" + Path);
}
}
public string MimeType {
get { return Gnome.Vfs.Global.GetMimeType (Path); }
}
public override string Icon {
get {
// Icon is memoized.
if (null != icon) return icon;
// See if the Path is a special folder with a special icon.
icon = MaybeGetSpecialFolderIconForPath (Path);
if (icon != null) return icon;
string large_thumb = Thumbnail.PathForUri (Uri, ThumbnailSize.Large);
string normal_thumb = Thumbnail.PathForUri (Uri, ThumbnailSize.Normal);
// Generating the thumbnail ourself is too slow for large files.
// Suggestion: generate thumbnails asynchronously. Banshee's
// notion of job queues may be useful.
if (IO.File.Exists (large_thumb)) {
icon = large_thumb;
} else if (IO.File.Exists (normal_thumb)) {
icon = normal_thumb;
} else {
try {
if (MimeType == "x-directory/normal") {
icon = "folder";
} else if (MimeType.StartsWith ("image")) {
icon = "gnome-mime-image";
} else {
icon = MimeType.Replace ('/', '-');
icon = string.Format ("gnome-mime-{0}", icon);
}
} catch (NullReferenceException) {
icon = "gtk-file";
}
}
return icon;
}
}
public virtual void Open ()
{
Services.Environment.OpenPath (Path);
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/PaxHeaders.10129/ApplicationItemSource.cs 0000644 0001750 0001750 00000000132 11724557417 027074 x ustar 00 0000000 0000000 30 mtime=1330831119.594266694
30 atime=1330831119.598266693
30 ctime=1330847230.088504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/ApplicationItemSource.cs 0000664 0001750 0001750 00000022662 11724557417 026365 0 ustar 00chris chris 0000000 0000000 // ApplicationItemSource.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using Do.Platform;
using Do.Universe;
using Mono.Unix;
namespace Do.Universe.Linux {
public class ApplicationItemSource : DynamicItemSource {
const bool show_hidden = false;
Dictionary app_items = new Dictionary ();
List categories = new List ();
static IEnumerable desktop_file_directories;
List directoryMonitors = new List ();
static ApplicationItemSource ()
{
desktop_file_directories = GetDesktopFileDirectories ();
}
public override IEnumerable SupportedItemTypes {
get {
yield return typeof (ApplicationItem);
yield return typeof (CategoryItem);
}
}
public override string Name {
get { return Catalog.GetString ("Applications"); }
}
public override string Description {
get { return Catalog.GetString ("Finds applications in many locations."); }
}
public override string Icon {
get { return "gnome-applications"; }
}
///
/// Given an absolute path to a directory, scan that directory for
/// .desktop files, creating an ApplicationItem for each desktop file
/// found and adding the ApplicationItem to the list of
/// ApplicationItems.
///
///
/// A containing an absolute path to a
/// directory
/// where .desktop files can be found.
///
IEnumerable> LoadDesktopFiles (string dir)
{
return GetDesktopFiles (dir)
.Where (ShouldUseDesktopFile)
.Select (f => new KeyValuePair (f, ApplicationItem.MaybeCreateFromDesktopItem (f)))
.Where (a => a.Value != null)
.Where (a => ShouldUseApplicationItem (a.Value));
}
IEnumerable GetDesktopFiles ()
{
return desktop_file_directories
.Where (d => Directory.Exists (d))
.SelectMany (d => GetDesktopFiles (d));
}
IEnumerable GetDesktopFiles (string parent)
{
IEnumerable baseFiles = Enumerable.Empty ();
IEnumerable recursiveFiles = Enumerable.Empty ();
// done separately so failures allow other directories to recurse
try {
baseFiles = Directory.GetFiles (parent, "*.desktop");
} catch (Exception) { }
try {
recursiveFiles = Directory.GetDirectories (parent).SelectMany (d => GetDesktopFiles (d));
} catch (Exception) { }
return baseFiles.Concat (recursiveFiles);
}
IEnumerable LoadCategoryItems (ApplicationItem appItem)
{
return appItem.Categories
.Where (c => !CategoryItem.ContainsCategory (c))
.Select (c => CategoryItem.GetCategoryItem (c));
}
bool ShouldUseDesktopFile (string path)
{
return !path.Contains ("screensavers");
}
bool ShouldUseApplicationItem (ApplicationItem app)
{
return app.IsAppropriateForCurrentDesktop && (show_hidden || !app.NoDisplay);
}
override protected void Enable ()
{
ItemsAvailableEventArgs eventArgs = new ItemsAvailableEventArgs ();
lock (app_items) {
foreach (var directory in desktop_file_directories.Where (dir => Directory.Exists (dir))) {
var monitor = new FileSystemWatcher (directory, "*.desktop");
monitor.Created += OnFileCreated;
monitor.Deleted += OnFileDeleted;
monitor.Renamed += OnFileRenamed;
monitor.Error += OnWatcherError;
monitor.EnableRaisingEvents = true;
directoryMonitors.Add (monitor);
Log.Debug ("Watching directory {0} for application changes.", directory);
}
foreach (var fileItemPair in desktop_file_directories.SelectMany (dir => LoadDesktopFiles (dir))) {
var previousMatch = app_items.FirstOrDefault (pair => pair.Value == fileItemPair.Value);
if (previousMatch.Key == null && previousMatch.Value == null) {
app_items.Add (fileItemPair.Key, fileItemPair.Value);
} else if (fileItemPair.Key != previousMatch.Key){
Log.Debug ("Desktop file {0} hides previous file {1}", fileItemPair.Key, previousMatch.Key);
app_items.Remove (previousMatch.Key);
app_items.Add (fileItemPair.Key, fileItemPair.Value);
}
}
eventArgs.newItems = app_items.Values.Cast
- ().ToList ();
categories = app_items.SelectMany (pair => LoadCategoryItems (pair.Value)).Distinct ().ToList ();
eventArgs.newItems = eventArgs.newItems.Concat (categories.ToArray ());
}
RaiseItemsAvailable (eventArgs);
}
override protected void Disable ()
{
foreach (var watcher in directoryMonitors) {
watcher.Dispose ();
}
directoryMonitors.Clear ();
app_items.Clear ();
}
void OnWatcherError (object sender, ErrorEventArgs e)
{
Log.Error ("Error in directory watcher: {0}", e.GetException ().Message);
}
void OnFileDeleted (object sender, FileSystemEventArgs e)
{
Item disappearingItem;
lock (app_items) {
Log.Debug ("Deskop file removed: {0}", e.FullPath);
if (!app_items.ContainsKey (e.FullPath)) {
Log.Error ("Desktop file {0} deleted, but not found in Universe", e.FullPath);
// FIXME: Should this throw an exception?
return;
}
disappearingItem = app_items[e.FullPath];
app_items.Remove (e.FullPath);
}
RaiseItemsUnavailable (new ItemsUnavailableEventArgs () { unavailableItems = new Item[] { disappearingItem }});
}
void OnFileCreated (object sender, FileSystemEventArgs e)
{
Log.Debug ("New Desktop file found: {0}", e.FullPath);
var newItem = ApplicationItem.MaybeCreateFromDesktopItem (e.FullPath);
if (newItem == null) {
Log.Error ("Found new Desktop file {0} but unable to create an item in the Universe", e.FullPath);
return;
}
lock (app_items) {
if (app_items.ContainsKey (e.FullPath)) {
Log.Error ("Attempting to add duplicate ApplicationItem {0} to Universe", e.FullPath);
return;
}
app_items[e.FullPath] = newItem;
}
RaiseItemsAvailable (new ItemsAvailableEventArgs () { newItems = new Item[] { newItem }});
}
void OnFileRenamed (object sender, RenamedEventArgs e)
{
Item disappearingItem = null;
ApplicationItem newItem = null;
lock (app_items) {
if (app_items.ContainsKey (e.OldFullPath)) {
Log.Debug ("Desktop file {0} moved away", e.OldFullPath);
disappearingItem = app_items[e.OldFullPath];
app_items.Remove (e.OldFullPath);
}
if (e.FullPath.EndsWith (".desktop")) {
Log.Debug ("Desktop file {0} moved into watched directory", e.FullPath);
newItem = ApplicationItem.MaybeCreateFromDesktopItem (e.FullPath);
if (newItem == null) {
Log.Error ("Found new Desktop file {0} but unable to create an item in the Universe", e.FullPath);
} else {
app_items[e.FullPath] = newItem;
}
}
}
if (disappearingItem != null) {
RaiseItemsUnavailable (new ItemsUnavailableEventArgs () { unavailableItems = new Item[] { disappearingItem }});
}
if (newItem != null) {
RaiseItemsAvailable (new ItemsAvailableEventArgs () { newItems = new Item[] { newItem }});
}
}
public override IEnumerable
- ChildrenOfItem (Item item)
{
if (item is CategoryItem) {
CategoryItem catItem = item as CategoryItem;
return app_items.Values
.Where (a => a is ApplicationItem)
.Where (a => (a as ApplicationItem).Categories.Contains (catItem.Category))
.Cast
- ();
} else {
return Enumerable.Empty
- ();
}
}
///
/// Return list of directories to scan for .desktop files.
///
///
/// Returns absolute paths.
/// Implements XDG data directory specification.
///
///
/// A
///
static IEnumerable GetDesktopFileDirectories ()
{
return new [] {
// These are XDG variables...
"XDG_DATA_DIRS",
"XDG_DATA_HOME"
}.SelectMany (v => GetXdgEnvironmentPaths (v));
}
static IEnumerable GetXdgEnvironmentPaths (string xdgVar)
{
string envPath = Environment.GetEnvironmentVariable (xdgVar);
if (string.IsNullOrEmpty (envPath)) {
switch (xdgVar) {
case "XDG_DATA_HOME":
yield return Path.Combine (
Environment.GetFolderPath (Environment.SpecialFolder.Personal),
".local/share/applications"
);
break;
case "XDG_DATA_DIRS":
yield return "/usr/share/applications";
yield return "/usr/local/share/applications";
break;
}
} else {
foreach (string dir in envPath.Split (':')) {
yield return Path.Combine (dir, "applications");
}
}
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/PaxHeaders.10129/GNOMEBookmarkItem.cs 0000644 0001750 0001750 00000000074 11704304006 025766 x ustar 00 0000000 0000000 30 atime=1330831086.782265905
30 ctime=1330847230.088504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/GNOMEBookmarkItem.cs 0000664 0001750 0001750 00000003133 11704304006 025242 0 ustar 00chris chris 0000000 0000000 // GNOMEBookmarkItem.cs
//
// GNOME Do is the legal property of its developers, whose names are too numerous
// to list here. Please refer to the COPYRIGHT file distributed with this
// source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using Mono.Unix;
using Do.Platform;
using Do.Universe;
namespace Do.Universe.Linux {
class GNOMEBookmarkItem : Item, IUriItem
{
string uri, icon, name;
public GNOMEBookmarkItem (string name, string uri)
{
this.name = name;
this.uri = uri;
icon = "user-bookmarks";
}
public GNOMEBookmarkItem (string name, string uri, string icon)
: this (name, uri)
{
this.icon = icon;
}
public override string Name {
get { return name; }
}
public override string Description {
get { return Uri; }
}
public string Uri {
get { return uri; }
}
public override string Icon {
get { return icon; }
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/PaxHeaders.10129/GNOMESpecialLocationsItemSource.cs 0000644 0001750 0001750 00000000074 11704304006 030636 x ustar 00 0000000 0000000 30 atime=1330831086.782265905
30 ctime=1330847230.088504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/GNOMESpecialLocationsItemSource.cs 0000664 0001750 0001750 00000006203 11704304006 030113 0 ustar 00chris chris 0000000 0000000 // GNOMESpecialLocationsItemSource.cs
//
// GNOME Do is the legal property of its developers, whose names are too numerous
// to list here. Please refer to the COPYRIGHT file distributed with this
// source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Mono.Unix;
using Do.Platform;
using Do.Universe;
namespace Do.Universe.Linux {
public class GNOMESpecialLocationsItemSource : ItemSource {
static readonly string BookmarksFile =
Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), ".gtk-bookmarks");
List
- items;
public GNOMESpecialLocationsItemSource()
{
items = new List
- ();
}
public override string Name {
get { return Catalog.GetString ("GNOME Special Locations"); }
}
public override string Description {
get {
return Catalog.GetString ("Special locations in GNOME, such as Computer and Network.");
}
}
public override string Icon { get { return "user-bookmarks"; } }
public override IEnumerable SupportedItemTypes {
get { yield return typeof (IUriItem); }
}
public override IEnumerable
- Items {
get { return items; }
}
public override void UpdateItems ()
{
items.Clear ();
items.Add (new GNOMETrashItem ());
items.Add (new GNOMEBookmarkItem ("Computer", "computer://", "computer"));
items.Add (new GNOMEBookmarkItem ("Network", "network://", "network"));
foreach (Item item in ReadBookmarkItems ()) items.Add (item);
}
IEnumerable ReadBookmarkItems ()
{
string line, uri, name;
Regex regex = new Regex ("([^ ]*) (.*)");
using (StreamReader reader = new StreamReader (BookmarksFile)) {
while ((line = reader.ReadLine ()) != null) {
Match match = regex.Match (line);
bool isNetworkBookmark = match.Groups.Count == 3;
if (line.StartsWith ("file://")) {
string path = line;
path = path.Substring ("file://".Length);
// Some entries contain more information after the URI. We
// discard it.
if (line.Contains (" "))
path = path.Substring (0, path.IndexOf (" "));
path = Uri.UnescapeDataString (path);
yield return Services.UniverseFactory.NewFileItem (path);
} else if (isNetworkBookmark) {
name = match.Groups [2].ToString ();
uri = match.Groups [1].ToString ();
yield return new GNOMEBookmarkItem (name, uri, "network");
}
}
}
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/PaxHeaders.10129/GNOMETrashItem.cs 0000644 0001750 0001750 00000000074 11704304006 025302 x ustar 00 0000000 0000000 30 atime=1330831086.782265905
30 ctime=1330847230.088504909
gnome-do-0.9/Do.Platform.Linux/src/Do.Universe/GNOMETrashItem.cs 0000664 0001750 0001750 00000003511 11704304006 024556 0 ustar 00chris chris 0000000 0000000 // GNOMETrashItem.cs
//
// GNOME Do is the legal property of its developers, whose names are too numerous
// to list here. Please refer to the COPYRIGHT file distributed with this
// source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using Mono.Unix;
using Do.Platform;
using Do.Universe;
namespace Do.Universe.Linux {
class GNOMETrashItem : Item, IFileItem, IOpenableItem
{
string path;
public string Path {
get {
if (path != null) return path;
return path = new [] {
Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData),
"Trash",
"files",
}.Aggregate (System.IO.Path.Combine);
}
}
public override string Name {
get { return "Trash"; }
}
public override string Description {
get { return "Trash"; }
}
public string Uri {
get { return "trash://"; }
}
public override string Icon
{
get {
if (Directory.Exists (Path) && Directory.GetFileSystemEntries (Path).Any ()) {
return "user-trash-full";
} else {
return "user-trash";
}
}
}
public void Open ()
{
Services.Environment.OpenUrl ("trash://");
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/PaxHeaders.10129/Do.Widgets 0000644 0001750 0001750 00000000132 11724616776 022037 x ustar 00 0000000 0000000 30 mtime=1330847230.092504908
30 atime=1330847230.796504871
30 ctime=1330847230.092504908
gnome-do-0.9/Do.Platform.Linux/src/Do.Widgets/ 0000775 0001750 0001750 00000000000 11724616776 021375 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux/src/Do.Widgets/PaxHeaders.10129/AbstractLoginWidget.cs 0000644 0001750 0001750 00000000074 11704304006 026322 x ustar 00 0000000 0000000 30 atime=1330831086.782265905
30 ctime=1330847230.092504908
gnome-do-0.9/Do.Platform.Linux/src/Do.Widgets/AbstractLoginWidget.cs 0000664 0001750 0001750 00000016746 11704304006 025614 0 ustar 00chris chris 0000000 0000000 /* AbstractLoginWidget.cs
*
* GNOME Do is the legal property of its developers. Please refer to the
* COPYRIGHT file distributed with this
* source distribution.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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, see .
*/
using System;
using System.Threading;
using Gtk;
using Mono.Unix;
namespace Do.Platform.Linux
{
///
/// A class providing a generic login widget for plugins that will need
/// to log into an external service. Provides a clean UI and enforces
/// asynchronous validation so the plugin developer doesn't need to know
/// about delegates or any complex concepts. To see an example of this
/// class in use, see the Microblogging plugin.
///
[System.ComponentModel.ToolboxItem(true)]
public abstract partial class AbstractLoginWidget : Bin
{
const string ValidatingFormat = "{0}";
protected readonly string NewAccountButtonFormat = Catalog.GetString ("Sign up for {0}");
protected readonly string BusyValidatingLabel = string.Format (ValidatingFormat, Catalog.GetString ("Validating..."));
protected readonly string NewAccountLabelFormat = string.Format (ValidatingFormat, Catalog.GetString ("Don't have {0}?"));
protected readonly string AccountValidationFailedLabel = string.Format (ValidatingFormat, Catalog.GetString ("Account validation failed!"));
protected readonly string DefaultValidatingLabel = string.Format (ValidatingFormat, Catalog.GetString ("Verify and save account information"));
protected readonly string AccountValidationSucceededLabel = string.Format (ValidatingFormat, Catalog.GetString ("Account validation succeeded!"));
LinkButton new_account_button;
public AbstractLoginWidget (string serviceName) : this (serviceName, "")
{
}
public AbstractLoginWidget (string serviceName, string serviceUri)
{
Build();
// setup the link button
new_account_button = new LinkButton (serviceUri, string.Format (NewAccountButtonFormat, serviceName));
new_account_button_box.Add (new_account_button);
// masks chars for passwords
password_entry.Visibility = false;
username_entry.Activated += OnUsernameEntryActivated;
password_entry.Activated += OnPasswordEntryActivated;
new_account_button.Clicked += OnNewAccountBtnClicked;
ChangeService (serviceName, serviceUri);
ShowAll ();
}
// give our subclasses access to certain properties of our widgets
///
/// Give access to the text in the username entry box
///
protected string Username {
get { return username_entry.Text; }
set { username_entry.Text = value; }
}
///
/// gives access to the text in the password entry box
///
protected string Password {
get { return password_entry.Text; }
set { password_entry.Text = value; }
}
///
/// gives access to the label next to the username entry box
///
protected string UsernameLabel {
get { return username_lbl.Text; }
set { username_lbl.Markup = value; }
}
///
/// gives access to the label next to the password entry box
///
protected string PasswordLabel {
get { return password_lbl.Text; }
set { password_lbl.Markup = value; }
}
///
/// gives access to the label above the validate button
///
protected string ValidateLabel {
get { return validate_lbl.Text; }
set { validate_lbl.Markup = string.Format (ValidatingFormat, value); }
}
///
/// Reset widget properties when the service changes, make sure when you use this
/// that you set the password/username entries to new values. When set to empty strting
/// this will hide the new account sign up link and label.
///
///
/// A
///
///
/// A
///
protected void ChangeService (string serviceName, string serviceUri)
{
if (string.IsNullOrEmpty (serviceName) || string.IsNullOrEmpty (serviceUri)) {
new_account_lbl.Visible = false;
new_account_button.Visible = false;
return;
}
new_account_button.Uri = serviceUri;
validate_lbl.Markup = DefaultValidatingLabel;
new_account_lbl.Markup = string.Format (NewAccountLabelFormat, serviceName);
new_account_button.Label = string.Format (NewAccountButtonFormat, serviceName);
}
///
/// Puts a widget at the top of the page above the username entry.
///
///
/// A
///
protected void InsertWidgetAtTop (Widget widget)
{
wrapper_vbox.Add (widget);
Box.BoxChild wrapperSpace = (Box.BoxChild) wrapper_vbox[widget];
wrapperSpace.Position = 0;
wrapperSpace.Fill = false;
wrapperSpace.Expand = false;
wrapperSpace.Padding = 5;
}
///
/// Save account data to disk
///
///
/// A username
///
///
/// A password
///
abstract protected void SaveAccountData (string username, string password);
///
/// Check that username and password entered by user are valid
/// This method is executed asychronously so don't be afraid to make slow
/// web calls or something, we desensitize the apply button, and alert the
/// user that their credentials are being validated.
///
///
/// A
///
///
/// A
///
///
/// A
///
abstract protected bool Validate (string username, string password);
void OnValidateBtnClicked (object sender, System.EventArgs e)
{
validate_lbl.Markup = BusyValidatingLabel;
validate_btn.Sensitive = false;
string username = username_entry.Text;
string password = password_entry.Text;
Thread thread = new Thread (new ThreadStart(() => ValidateCredentials (username, password)));
thread.IsBackground = true;
thread.Start ();
}
void OnNewAccountBtnClicked (object sender, EventArgs e)
{
Services.Environment.OpenUrl (new_account_button.Uri);
}
void ValidateCredentials (string username, string password)
{
bool valid = Validate (username, password);
Services.Application.RunOnMainThread (() => UpdateInterface (username, password, valid));
}
void UpdateInterface (string username, string password, bool valid)
{
if (valid) {
validate_lbl.Markup = AccountValidationSucceededLabel;
SaveAccountData (username, password);
} else {
validate_lbl.Markup = AccountValidationFailedLabel;
}
validate_btn.Sensitive = true;
}
void OnUsernameEntryActivated (object sender, System.EventArgs e)
{
password_entry.GrabFocus ();
}
void OnPasswordEntryActivated (object sender, System.EventArgs e)
{
validate_btn.Activate ();
}
}
}
gnome-do-0.9/Do.Platform.Linux/src/Do.Widgets/PaxHeaders.10129/PluginAvailableDialog.cs 0000644 0001750 0001750 00000000074 11704304006 026601 x ustar 00 0000000 0000000 30 atime=1330831086.782265905
30 ctime=1330847230.092504908
gnome-do-0.9/Do.Platform.Linux/src/Do.Widgets/PluginAvailableDialog.cs 0000664 0001750 0001750 00000004510 11704304006 026055 0 ustar 00chris chris 0000000 0000000 // %filename
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
using System;
using Gtk;
using Mono.Unix;
using Mono.Addins;
using Do.Platform;
namespace Do.Platform.Linux
{
public partial class PluginAvailableDialog : Gtk.Dialog
{
const string WhatIsDoUrl = "http://do.davebsd.com/wiki/index.php?title=Main_Page#What_is_GNOME_Do.3F";
Addin addin;
public PluginAvailableDialog (string package, Addin addin)
{
this.Build();
LinkButton wiki_btn, plugin_desc_btn;
this.addin = addin;
body_lbl.Text = string.Format (body_lbl.Text, package);
wiki_btn = new LinkButton (WhatIsDoUrl, Catalog.GetString ("What is Do?"));
wiki_btn.Xalign = 0F;
link_vbox.Add (wiki_btn);
// if the URL attribute is set, then we show a link to the plugin help
if (!string.IsNullOrEmpty (addin.Description.Url)) {
plugin_desc_btn = new LinkButton (addin.Description.Url,
string.Format (Catalog.GetString ("What does the {0} plugin do?"), package));
plugin_desc_btn.Xalign = 0F;
link_vbox.Add (plugin_desc_btn);
}
ShowAll ();
}
protected virtual void OnButtonCancelClicked (object sender, System.EventArgs e)
{
Destroy ();
}
protected virtual void OnInstallBtnClicked (object sender, System.EventArgs e)
{
Services.PluginManager.Install (addin);
Destroy ();
}
protected virtual void OnAskChkToggled (object sender, System.EventArgs e)
{
IPreferences prefs = Services.Preferences.Get ();
prefs.Set (AbstractPackageManagerService.PluginAvailableKey, ask_chk.Active);
}
}
} gnome-do-0.9/Do.Platform.Linux/src/PaxHeaders.10129/AssemblyInfo.cs 0000644 0001750 0001750 00000000131 11724616774 023064 x ustar 00 0000000 0000000 30 mtime=1330847228.024505019
30 atime=1330847228.636504986
29 ctime=1330847230.05650491
gnome-do-0.9/Do.Platform.Linux/src/AssemblyInfo.cs 0000664 0001750 0001750 00000003665 11724616774 022360 0 ustar 00chris chris 0000000 0000000 // AssemblyInfo.cs
//
// GNOME Do is the legal property of its developers. Please refer to the
// COPYRIGHT file distributed with this source distribution.
//
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program 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, see .
//
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Do.Platform.Linux")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("0.11.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
namespace Do.Platform.Linux
{
internal static class AssemblyInfo
{
public const string InstallPrefix = "/usr/local";
public const string InstallData = "/usr/local/share";
}
}
gnome-do-0.9/Do.Platform.Linux/PaxHeaders.10129/gtk-gui 0000644 0001750 0001750 00000000132 11724616776 020650 x ustar 00 0000000 0000000 30 mtime=1330847230.096504908
30 atime=1330847230.796504871
30 ctime=1330847230.096504908
gnome-do-0.9/Do.Platform.Linux/gtk-gui/ 0000775 0001750 0001750 00000000000 11724616776 020206 5 ustar 00chris chris 0000000 0000000 gnome-do-0.9/Do.Platform.Linux/gtk-gui/PaxHeaders.10129/Do.Platform.Linux.AbstractLoginWidget.cs 0000644 0001750 0001750 00000000073 11704304006 030354 x ustar 00 0000000 0000000 30 atime=1330831086.678265903
29 ctime=1330847230.05250491
gnome-do-0.9/Do.Platform.Linux/gtk-gui/Do.Platform.Linux.AbstractLoginWidget.cs 0000664 0001750 0001750 00000020474 11704304006 027640 0 ustar 00chris chris 0000000 0000000
// This file has been generated by the GUI designer. Do not modify.
namespace Do.Platform.Linux
{
public partial class AbstractLoginWidget
{
private global::Gtk.VBox wrapper_vbox;
private global::Gtk.VBox vbox2;
private global::Gtk.VBox account_vbox;
private global::Gtk.Table login_tbl;
private global::Gtk.Entry password_entry;
private global::Gtk.Label password_lbl;
private global::Gtk.Entry username_entry;
private global::Gtk.Label username_lbl;
private global::Gtk.Label validate_lbl;
private global::Gtk.HButtonBox hbuttonbox1;
private global::Gtk.Button validate_btn;
private global::Gtk.VBox middle_box;
private global::Gtk.VBox new_account_vbox;
private global::Gtk.HSeparator hseparator1;
private global::Gtk.Label new_account_lbl;
private global::Gtk.HButtonBox new_account_button_box;
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
// Widget Do.Platform.Linux.AbstractLoginWidget
global::Stetic.BinContainer.Attach (this);
this.Name = "Do.Platform.Linux.AbstractLoginWidget";
// Container child Do.Platform.Linux.AbstractLoginWidget.Gtk.Container+ContainerChild
this.wrapper_vbox = new global::Gtk.VBox ();
this.wrapper_vbox.Name = "wrapper_vbox";
this.wrapper_vbox.Spacing = 6;
this.wrapper_vbox.BorderWidth = ((uint)(10));
// Container child wrapper_vbox.Gtk.Box+BoxChild
this.vbox2 = new global::Gtk.VBox ();
this.vbox2.Name = "vbox2";
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
this.account_vbox = new global::Gtk.VBox ();
this.account_vbox.Name = "account_vbox";
this.account_vbox.Spacing = 6;
// Container child account_vbox.Gtk.Box+BoxChild
this.login_tbl = new global::Gtk.Table (((uint)(2)), ((uint)(2)), false);
this.login_tbl.Name = "login_tbl";
this.login_tbl.RowSpacing = ((uint)(6));
this.login_tbl.ColumnSpacing = ((uint)(6));
// Container child login_tbl.Gtk.Table+TableChild
this.password_entry = new global::Gtk.Entry ();
this.password_entry.CanFocus = true;
this.password_entry.Name = "password_entry";
this.password_entry.IsEditable = true;
this.password_entry.Visibility = false;
this.password_entry.InvisibleChar = '●';
this.login_tbl.Add (this.password_entry);
global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(this.login_tbl [this.password_entry]));
w1.TopAttach = ((uint)(1));
w1.BottomAttach = ((uint)(2));
w1.LeftAttach = ((uint)(1));
w1.RightAttach = ((uint)(2));
w1.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child login_tbl.Gtk.Table+TableChild
this.password_lbl = new global::Gtk.Label ();
this.password_lbl.Name = "password_lbl";
this.password_lbl.Xalign = 1F;
this.password_lbl.LabelProp = global::Mono.Unix.Catalog.GetString ("Password");
this.login_tbl.Add (this.password_lbl);
global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.login_tbl [this.password_lbl]));
w2.TopAttach = ((uint)(1));
w2.BottomAttach = ((uint)(2));
w2.XOptions = ((global::Gtk.AttachOptions)(4));
w2.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child login_tbl.Gtk.Table+TableChild
this.username_entry = new global::Gtk.Entry ();
this.username_entry.CanFocus = true;
this.username_entry.Name = "username_entry";
this.username_entry.IsEditable = true;
this.username_entry.InvisibleChar = '●';
this.login_tbl.Add (this.username_entry);
global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.login_tbl [this.username_entry]));
w3.LeftAttach = ((uint)(1));
w3.RightAttach = ((uint)(2));
w3.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child login_tbl.Gtk.Table+TableChild
this.username_lbl = new global::Gtk.Label ();
this.username_lbl.Name = "username_lbl";
this.username_lbl.Xalign = 1F;
this.username_lbl.LabelProp = global::Mono.Unix.Catalog.GetString ("Username");
this.login_tbl.Add (this.username_lbl);
global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.login_tbl [this.username_lbl]));
w4.XOptions = ((global::Gtk.AttachOptions)(0));
w4.YOptions = ((global::Gtk.AttachOptions)(4));
this.account_vbox.Add (this.login_tbl);
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.account_vbox [this.login_tbl]));
w5.Position = 0;
w5.Expand = false;
w5.Fill = false;
// Container child account_vbox.Gtk.Box+BoxChild
this.validate_lbl = new global::Gtk.Label ();
this.validate_lbl.Name = "validate_lbl";
this.validate_lbl.LabelProp = global::Mono.Unix.Catalog.GetString ("Verify and save account information");
this.validate_lbl.UseMarkup = true;
this.account_vbox.Add (this.validate_lbl);
global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.account_vbox [this.validate_lbl]));
w6.Position = 1;
w6.Expand = false;
w6.Fill = false;
// Container child account_vbox.Gtk.Box+BoxChild
this.hbuttonbox1 = new global::Gtk.HButtonBox ();
this.hbuttonbox1.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
this.validate_btn = new global::Gtk.Button ();
this.validate_btn.CanFocus = true;
this.validate_btn.Name = "validate_btn";
this.validate_btn.UseStock = true;
this.validate_btn.UseUnderline = true;
this.validate_btn.Label = "gtk-apply";
this.hbuttonbox1.Add (this.validate_btn);
global::Gtk.ButtonBox.ButtonBoxChild w7 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox1 [this.validate_btn]));
w7.Expand = false;
w7.Fill = false;
this.account_vbox.Add (this.hbuttonbox1);
global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.account_vbox [this.hbuttonbox1]));
w8.Position = 2;
w8.Expand = false;
w8.Fill = false;
this.vbox2.Add (this.account_vbox);
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.account_vbox]));
w9.Position = 0;
w9.Expand = false;
w9.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
this.middle_box = new global::Gtk.VBox ();
this.middle_box.Name = "middle_box";
this.middle_box.Spacing = 6;
this.vbox2.Add (this.middle_box);
global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.middle_box]));
w10.Position = 1;
this.wrapper_vbox.Add (this.vbox2);
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.wrapper_vbox [this.vbox2]));
w11.Position = 1;
// Container child wrapper_vbox.Gtk.Box+BoxChild
this.new_account_vbox = new global::Gtk.VBox ();
this.new_account_vbox.Name = "new_account_vbox";
this.new_account_vbox.Spacing = 6;
// Container child new_account_vbox.Gtk.Box+BoxChild
this.hseparator1 = new global::Gtk.HSeparator ();
this.hseparator1.Name = "hseparator1";
this.new_account_vbox.Add (this.hseparator1);
global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.new_account_vbox [this.hseparator1]));
w12.Position = 0;
w12.Expand = false;
w12.Fill = false;
// Container child new_account_vbox.Gtk.Box+BoxChild
this.new_account_lbl = new global::Gtk.Label ();
this.new_account_lbl.Name = "new_account_lbl";
this.new_account_lbl.LabelProp = global::Mono.Unix.Catalog.GetString ("Don't have an account?");
this.new_account_vbox.Add (this.new_account_lbl);
global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.new_account_vbox [this.new_account_lbl]));
w13.Position = 1;
w13.Expand = false;
w13.Fill = false;
// Container child new_account_vbox.Gtk.Box+BoxChild
this.new_account_button_box = new global::Gtk.HButtonBox ();
this.new_account_button_box.Name = "new_account_button_box";
this.new_account_button_box.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(1));
this.new_account_vbox.Add (this.new_account_button_box);
global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.new_account_vbox [this.new_account_button_box]));
w14.Position = 2;
w14.Expand = false;
w14.Fill = false;
this.wrapper_vbox.Add (this.new_account_vbox);
global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.wrapper_vbox [this.new_account_vbox]));
w15.Position = 2;
w15.Expand = false;
w15.Fill = false;
this.Add (this.wrapper_vbox);
if ((this.Child != null)) {
this.Child.ShowAll ();
}
this.Hide ();
this.validate_btn.Clicked += new global::System.EventHandler (this.OnValidateBtnClicked);
}
}
}
gnome-do-0.9/Do.Platform.Linux/gtk-gui/PaxHeaders.10129/Do.Platform.Linux.PluginAvailableDialog.cs 0000644 0001750 0001750 00000000073 11704304006 030633 x ustar 00 0000000 0000000 30 atime=1330831086.730265904
29 ctime=1330847230.05250491
gnome-do-0.9/Do.Platform.Linux/gtk-gui/Do.Platform.Linux.PluginAvailableDialog.cs 0000664 0001750 0001750 00000017001 11704304006 030107 0 ustar 00chris chris 0000000 0000000
// This file has been generated by the GUI designer. Do not modify.
namespace Do.Platform.Linux
{
public partial class PluginAvailableDialog
{
private global::Gtk.VBox vbox2;
private global::Gtk.HBox hbox1;
private global::Gtk.Image title_img;
private global::Gtk.Alignment title_align;
private global::Gtk.Label title_lbl;
private global::Gtk.Alignment body_align;
private global::Gtk.Label body_lbl;
private global::Gtk.Alignment link_align;
private global::Gtk.VBox link_vbox;
private global::Gtk.Alignment ask_align;
private global::Gtk.CheckButton ask_chk;
private global::Gtk.Button buttonCancel;
private global::Gtk.Button install_btn;
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
// Widget Do.Platform.Linux.PluginAvailableDialog
this.Name = "Do.Platform.Linux.PluginAvailableDialog";
this.Icon = global::Stetic.IconLoader.LoadIcon (this, "distributor-logo", global::Gtk.IconSize.Menu);
this.WindowPosition = ((global::Gtk.WindowPosition)(4));
this.BorderWidth = ((uint)(5));
// Internal child Do.Platform.Linux.PluginAvailableDialog.VBox
global::Gtk.VBox w1 = this.VBox;
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.vbox2 = new global::Gtk.VBox ();
this.vbox2.Name = "vbox2";
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
this.hbox1 = new global::Gtk.HBox ();
this.hbox1.Name = "hbox1";
this.hbox1.Spacing = 6;
// Container child hbox1.Gtk.Box+BoxChild
this.title_img = new global::Gtk.Image ();
this.title_img.Name = "title_img";
this.title_img.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gnome-do", global::Gtk.IconSize.Dialog);
this.hbox1.Add (this.title_img);
global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.title_img]));
w2.Position = 0;
w2.Expand = false;
w2.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.title_align = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
this.title_align.Name = "title_align";
this.title_align.LeftPadding = ((uint)(7));
// Container child title_align.Gtk.Container+ContainerChild
this.title_lbl = new global::Gtk.Label ();
this.title_lbl.Name = "title_lbl";
this.title_lbl.LabelProp = global::Mono.Unix.Catalog.GetString ("There's a Do plugin for that!");
this.title_lbl.UseMarkup = true;
this.title_align.Add (this.title_lbl);
this.hbox1.Add (this.title_align);
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.title_align]));
w4.Position = 1;
w4.Expand = false;
w4.Fill = false;
this.vbox2.Add (this.hbox1);
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
w5.Position = 0;
w5.Expand = false;
w5.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
this.body_align = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
this.body_align.Name = "body_align";
this.body_align.LeftPadding = ((uint)(62));
// Container child body_align.Gtk.Container+ContainerChild
this.body_lbl = new global::Gtk.Label ();
this.body_lbl.Name = "body_lbl";
this.body_lbl.Xalign = 0F;
this.body_lbl.LabelProp = global::Mono.Unix.Catalog.GetString ("A Do plugin for {0} is available for installation. Would you like us to enable it for you?");
this.body_lbl.Wrap = true;
this.body_align.Add (this.body_lbl);
this.vbox2.Add (this.body_align);
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.body_align]));
w7.Position = 1;
w7.Expand = false;
w7.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
this.link_align = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
this.link_align.Name = "link_align";
this.link_align.LeftPadding = ((uint)(55));
// Container child link_align.Gtk.Container+ContainerChild
this.link_vbox = new global::Gtk.VBox ();
this.link_vbox.Name = "link_vbox";
this.link_align.Add (this.link_vbox);
this.vbox2.Add (this.link_align);
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.link_align]));
w9.Position = 2;
// Container child vbox2.Gtk.Box+BoxChild
this.ask_align = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
this.ask_align.Name = "ask_align";
this.ask_align.LeftPadding = ((uint)(57));
// Container child ask_align.Gtk.Container+ContainerChild
this.ask_chk = new global::Gtk.CheckButton ();
this.ask_chk.CanFocus = true;
this.ask_chk.Name = "ask_chk";
this.ask_chk.Label = global::Mono.Unix.Catalog.GetString ("Don't ask me about Do plugins again.");
this.ask_chk.DrawIndicator = true;
this.ask_chk.UseUnderline = true;
this.ask_align.Add (this.ask_chk);
this.vbox2.Add (this.ask_align);
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.ask_align]));
w11.Position = 3;
w11.Expand = false;
w11.Fill = false;
w1.Add (this.vbox2);
global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
w12.Position = 0;
// Internal child Do.Platform.Linux.PluginAvailableDialog.ActionArea
global::Gtk.HButtonBox w13 = this.ActionArea;
w13.Name = "dialog1_ActionArea";
w13.Spacing = 6;
w13.BorderWidth = ((uint)(5));
w13.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonCancel = new global::Gtk.Button ();
this.buttonCancel.CanDefault = true;
this.buttonCancel.CanFocus = true;
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.UseStock = true;
this.buttonCancel.UseUnderline = true;
this.buttonCancel.Label = "gtk-cancel";
this.AddActionWidget (this.buttonCancel, -6);
global::Gtk.ButtonBox.ButtonBoxChild w14 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13 [this.buttonCancel]));
w14.Expand = false;
w14.Fill = false;
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.install_btn = new global::Gtk.Button ();
this.install_btn.CanDefault = true;
this.install_btn.CanFocus = true;
this.install_btn.Name = "install_btn";
this.install_btn.UseUnderline = true;
// Container child install_btn.Gtk.Container+ContainerChild
global::Gtk.Alignment w15 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w16 = new global::Gtk.HBox ();
w16.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w17 = new global::Gtk.Image ();
w17.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-ok", global::Gtk.IconSize.Button);
w16.Add (w17);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w19 = new global::Gtk.Label ();
w19.LabelProp = global::Mono.Unix.Catalog.GetString ("_Install");
w19.UseUnderline = true;
w16.Add (w19);
w15.Add (w16);
this.install_btn.Add (w15);
this.AddActionWidget (this.install_btn, -5);
global::Gtk.ButtonBox.ButtonBoxChild w23 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13 [this.install_btn]));
w23.Position = 1;
w23.Expand = false;
w23.Fill = false;
if ((this.Child != null)) {
this.Child.ShowAll ();
}
this.DefaultWidth = 486;
this.DefaultHeight = 218;
this.Show ();
this.ask_chk.Toggled += new global::System.EventHandler (this.OnAskChkToggled);
this.buttonCancel.Clicked += new global::System.EventHandler (this.OnButtonCancelClicked);
this.install_btn.Clicked += new global::System.EventHandler (this.OnInstallBtnClicked);
}
}
}
gnome-do-0.9/Do.Platform.Linux/gtk-gui/PaxHeaders.10129/generated.cs 0000644 0001750 0001750 00000000073 11704304006 023170 x ustar 00 0000000 0000000 30 atime=1330831086.730265904
29 ctime=1330847230.05650491
gnome-do-0.9/Do.Platform.Linux/gtk-gui/generated.cs 0000664 0001750 0001750 00000006315 11704304006 022452 0 ustar 00chris chris 0000000 0000000
// This file has been generated by the GUI designer. Do not modify.
namespace Stetic
{
internal class Gui
{
private static bool initialized;
internal static void Initialize (Gtk.Widget iconRenderer)
{
if ((Stetic.Gui.initialized == false)) {
Stetic.Gui.initialized = true;
}
}
}
internal class BinContainer
{
private Gtk.Widget child;
private Gtk.UIManager uimanager;
public static BinContainer Attach (Gtk.Bin bin)
{
BinContainer bc = new BinContainer ();
bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested);
bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated);
bin.Added += new Gtk.AddedHandler (bc.OnAdded);
return bc;
}
private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
{
if ((this.child != null)) {
args.Requisition = this.child.SizeRequest ();
}
}
private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
{
if ((this.child != null)) {
this.child.Allocation = args.Allocation;
}
}
private void OnAdded (object sender, Gtk.AddedArgs args)
{
this.child = args.Widget;
}
public void SetUiManager (Gtk.UIManager uim)
{
this.uimanager = uim;
this.child.Realized += new System.EventHandler (this.OnRealized);
}
private void OnRealized (object sender, System.EventArgs args)
{
if ((this.uimanager != null)) {
Gtk.Widget w;
w = this.child.Toplevel;
if (((w != null) && typeof(Gtk.Window).IsInstanceOfType (w))) {
((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup);
this.uimanager = null;
}
}
}
}
internal class IconLoader
{
public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size)
{
Gdk.Pixbuf res = widget.RenderIcon (name, size, null);
if ((res != null)) {
return res;
} else {
int sz;
int sy;
global::Gtk.Icon.SizeLookup (size, out sz, out sy);
try {
return Gtk.IconTheme.Default.LoadIcon (name, sz, 0);
} catch (System.Exception) {
if ((name != "gtk-missing-image")) {
return Stetic.IconLoader.LoadIcon (widget, "gtk-missing-image", size);
} else {
Gdk.Pixmap pmap = new Gdk.Pixmap (Gdk.Screen.Default.RootWindow, sz, sz);
Gdk.GC gc = new Gdk.GC (pmap);
gc.RgbFgColor = new Gdk.Color (255, 255, 255);
pmap.DrawRectangle (gc, true, 0, 0, sz, sz);
gc.RgbFgColor = new Gdk.Color (0, 0, 0);
pmap.DrawRectangle (gc, false, 0, 0, (sz - 1), (sz - 1));
gc.SetLineAttributes (3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
gc.RgbFgColor = new Gdk.Color (255, 0, 0);
pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4)));
pmap.DrawLine (gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)));
return Gdk.Pixbuf.FromDrawable (pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz);
}
}
}
}
}
internal class ActionGroups
{
public static Gtk.ActionGroup GetActionGroup (System.Type type)
{
return Stetic.ActionGroups.GetActionGroup (type.FullName);
}
public static Gtk.ActionGroup GetActionGroup (string name)
{
return null;
}
}
}
gnome-do-0.9/Do.Platform.Linux/gtk-gui/PaxHeaders.10129/gui.stetic 0000644 0001750 0001750 00000000074 11704304006 022705 x ustar 00 0000000 0000000 30 atime=1330829333.338223779
30 ctime=1330847230.096504908
gnome-do-0.9/Do.Platform.Linux/gtk-gui/gui.stetic 0000664 0001750 0001750 00000046717 11704304006 022200 0 ustar 00chris chris 0000000 0000000
..
2.12
False
6
10
6
6
2
2
6
6
True
True
False
●
1
2
1
2
True
Fill
True
True
False
False
True
False
1
Password
1
2
False
Fill
Fill
False
True
False
False
True
False
True
True
●
1
2
True
Fill
True
True
False
False
True
False
1
Username
False
0
Fill
False
False
False
False
True
False
0
True
False
False
<i>Verify and save account information</i>
True
1
True
False
False
1
End
True
True
StockItem
gtk-apply
gtk-apply
False
False
2
True
False
False
0
True
False
False
6
1
True
1
True
6
0
True
False
False
Don't have an account?
1
True
False
False
0
Spread
2
True
False
False
2
True
False
False
stock:distributor-logo Menu
CenterOnParent
5
2
False
2
6
6
stock:gnome-do Dialog
0
True
False
False
7
<b><span size="x-large">There's a Do plugin for that!</span></b>
True
1
True
False
False
0
True
False
False
62
0
A Do plugin for {0} is available for installation. Would you like us to enable it for you?
True
1
True
False
False
55
2
True
57
True
Don't ask me about Do plugins again.
True
True
True
3
True
False
False
0
True
6
5
2
End
True
True
True
StockItem
gtk-cancel
-6
gtk-cancel
False
False
True
True
TextAndIcon
stock:gtk-ok Button
_Install
True
-5
1
False
False