[glide] Inspector is now in a window
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Inspector is now in a window
- Date: Thu, 6 May 2010 07:06:38 +0000 (UTC)
commit 1480715845d88375b4377b5f1abf252dfa821016
Author: Robert Carr <racarr Valentine localdomain>
Date: Thu May 6 03:01:47 2010 -0400
Inspector is now in a window
libglide/glide-inspector-notebook.c | 2 +-
libglide/glide-inspector-window.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/libglide/glide-inspector-notebook.c b/libglide/glide-inspector-notebook.c
index 2bef319..8753c12 100644
--- a/libglide/glide-inspector-notebook.c
+++ b/libglide/glide-inspector-notebook.c
@@ -150,7 +150,7 @@ glide_inspector_notebook_init (GlideInspectorNotebook *inspector)
glide_inspector_notebook_add_pages (inspector);
- gtk_widget_set_size_request (GTK_WIDGET (inspector), 225, 20);
+ gtk_widget_set_size_request (GTK_WIDGET (inspector), 225, 400);
}
static void
diff --git a/libglide/glide-inspector-window.c b/libglide/glide-inspector-window.c
index 677914a..a2e0299 100644
--- a/libglide/glide-inspector-window.c
+++ b/libglide/glide-inspector-window.c
@@ -29,6 +29,13 @@ enum {
PROP_INSPECTOR
};
+static gboolean
+glide_inspector_window_delete_event (GtkWidget *w, gpointer user_data)
+{
+ gtk_widget_hide (w);
+ return TRUE;
+}
+
static void
glide_inspector_window_get_property (GObject *object,
guint prop_id,
@@ -54,17 +61,35 @@ glide_inspector_window_finalize (GObject *object)
}
static void
+glide_inspector_window_position (GlideInspectorWindow *window)
+{
+ GdkScreen *screen = gtk_window_get_screen (GTK_WINDOW (window));
+ gint width, height;
+
+ width = gdk_screen_get_width (screen);
+ height = gdk_screen_get_height (screen);
+
+ gtk_window_move (GTK_WINDOW (window), .7*width, .3*height);
+}
+
+static void
glide_inspector_window_init (GlideInspectorWindow *window)
{
window->priv = GLIDE_INSPECTOR_WINDOW_GET_PRIVATE (window);
window->priv->inspector = glide_inspector_notebook_new ();
+ g_signal_connect (window, "delete-event",
+ G_CALLBACK (glide_inspector_window_delete_event), NULL);
+
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), TRUE);
gtk_window_set_skip_pager_hint (GTK_WINDOW (window), TRUE);
+ gtk_window_set_keep_above (GTK_WINDOW (window), TRUE);
gtk_container_add (GTK_CONTAINER (window), window->priv->inspector);
gtk_widget_show_all (GTK_WIDGET (window));
+
+ glide_inspector_window_position (window);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]