summaryrefslogtreecommitdiffstats
path: root/src/ui/interface.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-01-09 10:35:17 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-01-09 10:35:17 +0000
commit7f5d2af69c85e840274dda25a20aa63031a26b2c (patch)
tree84ea7938d55ec7ea8db58eb11be9617377c405d3 /src/ui/interface.cpp
parentRemove helper/window.h helper/window.cpp (diff)
downloadinkscape-7f5d2af69c85e840274dda25a20aa63031a26b2c.tar.gz
inkscape-7f5d2af69c85e840274dda25a20aa63031a26b2c.zip
First baby step in adding InkscapeWindow (Gtk::ApplicationWindow)
Diffstat (limited to 'src/ui/interface.cpp')
-rw-r--r--src/ui/interface.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index b02186152..c68ee0d2d 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -32,6 +32,7 @@
#include "file.h"
#include "gradient-drag.h"
#include "inkscape.h"
+#include "inkscape-window.h"
#include "message-context.h"
#include "message-stack.h"
#include "preferences.h"
@@ -140,23 +141,14 @@ static void sp_ui_menu_item_set_name(GtkWidget *data,
Glib::ustring const &name);
static void sp_recent_open(GtkRecentChooser *, gpointer);
-static bool sp_on_window_key_press(GdkEventKey* event)
-{
- unsigned shortcut = 0;
- shortcut = sp_shortcut_get_for_event(event);
- return sp_shortcut_invoke (shortcut, SP_ACTIVE_DESKTOP);
-}
-
void
sp_create_window(SPViewWidget *vw, bool editable)
{
g_return_if_fail(vw != nullptr);
g_return_if_fail(SP_IS_VIEW_WIDGET(vw));
- Gtk::Window *win = new Gtk::Window(Gtk::WINDOW_TOPLEVEL);
+ InkscapeWindow* win = new InkscapeWindow();
win->set_resizable(true);
- win->signal_key_press_event().connect(sigc::ptr_fun(&sp_on_window_key_press));
-
gtk_container_add(GTK_CONTAINER(win->gobj()), GTK_WIDGET(vw));
gtk_widget_show(GTK_WIDGET(vw));
@@ -200,6 +192,7 @@ sp_create_window(SPViewWidget *vw, bool editable)
}
}
+ // TODO Drop targets beglong on canvas, not window.
if ( completeDropTargets == nullptr || completeDropTargetsCount == 0 )
{
std::vector<Glib::ustring> types;