summaryrefslogtreecommitdiffstats
path: root/src/helper/window.cpp
diff options
context:
space:
mode:
authorJoel Holdsworth <joel@airwebreathe.org.uk>2007-07-28 12:32:01 +0000
committerjoelholdsworth <joelholdsworth@users.sourceforge.net>2007-07-28 12:32:01 +0000
commit246fcd5198c0a53e27f309777a8ae23e98221753 (patch)
tree22d7909d4ddc490f4cf408afa1a81e6bec601ee2 /src/helper/window.cpp
parentFilter effects dialog: (diff)
downloadinkscape-246fcd5198c0a53e27f309777a8ae23e98221753.tar.gz
inkscape-246fcd5198c0a53e27f309777a8ae23e98221753.zip
Gtkmm-ified the desktop window object, and modified the file dialogs so that they are correctly parented
(bzr r3328)
Diffstat (limited to 'src/helper/window.cpp')
-rw-r--r--src/helper/window.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/helper/window.cpp b/src/helper/window.cpp
index 346bd19f1..6f898ee3e 100644
--- a/src/helper/window.cpp
+++ b/src/helper/window.cpp
@@ -13,14 +13,15 @@
# include <config.h>
#endif
#include <gtk/gtkwindow.h>
+#include <gtkmm/window.h>
#include "inkscape.h"
#include "shortcuts.h"
#include "desktop.h"
#include "event-context.h"
+#include "window.h"
-static gboolean
-sp_window_key_press (GtkWidget *widget, GdkEventKey *event)
+static bool on_window_key_press(GdkEventKey* event)
{
unsigned int shortcut;
shortcut = get_group0_keyval (event) |
@@ -33,6 +34,23 @@ sp_window_key_press (GtkWidget *widget, GdkEventKey *event)
return sp_shortcut_invoke (shortcut, SP_ACTIVE_DESKTOP);
}
+Gtk::Window *
+Inkscape::UI::window_new (const gchar *title, unsigned int resizeable)
+{
+ Gtk::Window *window = new Gtk::Window(Gtk::WINDOW_TOPLEVEL);
+ window->set_title (title);
+ window->set_resizable (resizeable);
+ window->signal_key_press_event().connect(sigc::ptr_fun(&on_window_key_press));
+
+ return window;
+}
+
+static gboolean
+sp_window_key_press (GtkWidget *widget, GdkEventKey *event)
+{
+ return on_window_key_press(event);
+}
+
GtkWidget *
sp_window_new (const gchar *title, unsigned int resizeable)
{
@@ -44,4 +62,3 @@ sp_window_new (const gchar *title, unsigned int resizeable)
return window;
}
-