window positioning patch
- From: Todd Berman <tberman sevenl net>
- To: dashboard-hackers gnome org
- Subject: window positioning patch
- Date: Tue, 09 Mar 2004 15:16:31 -0500
This patch makes the window startup in the upper right of the screen, as
well as uses a better overload for creation.
Lemme know if its ok to commit.
Nat: I sent this to you during one of those evenings, and it got lost
somewhere :)
--Todd
? dashboardwindow.patch
? formatting.patch
? glib-idle.patch
? window_pos.patch
Index: engine/dashboard.cs
===================================================================
RCS file: /cvs/gnome/dashboard/engine/dashboard.cs,v
retrieving revision 1.52
diff -u -r1.52 dashboard.cs
--- engine/dashboard.cs 4 Mar 2004 08:07:29 -0000 1.52
+++ engine/dashboard.cs 5 Mar 2004 06:44:09 -0000
@@ -40,7 +40,7 @@
public CluePacketManager cpm;
public EngineMatchSet ems;
private string dashdir;
- private Window window;
+ private DashboardWindow window;
private TcpServer server;
private Thread t;
public ArrayList backends;
@@ -255,7 +255,7 @@
{
Console.WriteLine ("Setting up GUI...");
- this.window = new Window ("Dashboard", this);
+ this.window = new DashboardWindow ("Dashboard", this);
this.window.DeleteEvent += new DeleteEventHandler (WindowDelete);
EventHandler handler = new EventHandler (SendQuery);
@@ -266,7 +266,7 @@
EventHandler graph_handler = new EventHandler (ShowGraph);
this.window.GraphButton.Clicked += graph_handler;
- this.window.ShowAll();
+ this.window.ShowAll ();
}
private void WindowDelete (object o, DeleteEventArgs args)
Index: engine/gui.cs
===================================================================
RCS file: /cvs/gnome/dashboard/engine/gui.cs,v
retrieving revision 1.43
diff -u -r1.43 gui.cs
--- engine/gui.cs 4 Mar 2004 08:08:52 -0000 1.43
+++ engine/gui.cs 5 Mar 2004 06:44:10 -0000
@@ -27,7 +27,7 @@
namespace Dashboard {
- public class Window : Gtk.Window {
+ public class DashboardWindow : Gtk.Window {
private Dashboard dashboard;
private Gtk.Entry entry;
@@ -41,9 +41,8 @@
private EngineMatchSet matchset;
private CluePacketManager cpm;
- public Window (string title, Dashboard dashboard) : base (WindowType.Toplevel)
+ public DashboardWindow (string title, Dashboard dashboard) : base (title)
{
- this.Title = title;
this.dashboard = dashboard;
this.DefaultWidth = 279;
this.DefaultHeight = 640;
@@ -74,6 +73,8 @@
this.Add (vbox);
this.match_queue = new Queue ();
+ Gravity = Gdk.Gravity.NorthEast;
+ Move (Screen.Width - DefaultWidth, 0);
}
private void LinkClicked (object o, LinkClickedArgs args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]