diff --git a/src/helper/window.cpp b/src/helper/window.cpp
index 346bd19f16d617226f2354edede9bc8eea424337..6f898ee3e084c6c5a31efc9e23b5f5071a92afb4 100644 (file)
--- a/src/helper/window.cpp
+++ b/src/helper/window.cpp
# 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) |
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)
{
return window;
}
-