summaryrefslogtreecommitdiffstats
path: root/src/helper/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper/window.cpp')
-rw-r--r--src/helper/window.cpp62
1 files changed, 30 insertions, 32 deletions
diff --git a/src/helper/window.cpp b/src/helper/window.cpp
index 98fbef170..98e886a38 100644
--- a/src/helper/window.cpp
+++ b/src/helper/window.cpp
@@ -1,6 +1,4 @@
-#define __SP_WINDOW_C__
-
-/*
+/**
* Generic window implementation
*
* Author:
@@ -9,61 +7,61 @@
* This code is in public domain
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
+#include <glibmm.h>
#include <gtkmm/window.h>
+#include "desktop.h"
#include "inkscape.h"
#include "shortcuts.h"
-#include "desktop.h"
#include "ui/tools/tool-base.h"
#include "window.h"
-#include <gtk/gtk.h>
static bool on_window_key_press(GdkEventKey* event)
{
- unsigned int shortcut;
- shortcut = Inkscape::UI::Tools::get_group0_keyval (event) |
+ unsigned shortcut = 0;
+ // FIXME why?
+ shortcut = Inkscape::UI::Tools::get_group0_keyval (event) |
( event->state & GDK_SHIFT_MASK ?
SP_SHORTCUT_SHIFT_MASK : 0 ) |
( event->state & GDK_CONTROL_MASK ?
SP_SHORTCUT_CONTROL_MASK : 0 ) |
( event->state & GDK_MOD1_MASK ?
SP_SHORTCUT_ALT_MASK : 0 );
- return sp_shortcut_invoke (shortcut, SP_ACTIVE_DESKTOP);
+ return sp_shortcut_invoke (shortcut, SP_ACTIVE_DESKTOP);
}
-Gtk::Window *
-Inkscape::UI::window_new (const gchar *title, unsigned int resizeable)
+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));
+ 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;
+ return window;
}
-static gboolean
-sp_window_key_press(GtkWidget */*widget*/, GdkEventKey *event)
+static gboolean sp_window_key_press(GtkWidget *, GdkEventKey *event)
{
return on_window_key_press(event);
}
-GtkWidget *
-sp_window_new (const gchar *title, unsigned int resizeable)
+GtkWidget * sp_window_new (const gchar *title, unsigned int resizeable)
{
- GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title ((GtkWindow *) window, title);
- gtk_window_set_resizable ((GtkWindow *) window, resizeable);
- g_signal_connect_after ((GObject *) window, "key_press_event", (GCallback) sp_window_key_press, NULL);
+ GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title ((GtkWindow *) window, title);
+ gtk_window_set_resizable ((GtkWindow *) window, resizeable);
+ g_signal_connect_after ((GObject *) window, "key_press_event", (GCallback) sp_window_key_press, NULL);
- return window;
+ return window;
}
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8 :