diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-08-09 23:23:12 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-08-09 23:23:12 +0000 |
| commit | 0b5ad417538a7ed72b2e88b97dfc2cfc7ba8f49e (patch) | |
| tree | 49d60b565305080f7c0fe5dbfcd0dbf54d501bbd /src/dialogs/dialog-events.cpp | |
| parent | merge silveiro's and my changes (diff) | |
| download | inkscape-0b5ad417538a7ed72b2e88b97dfc2cfc7ba8f49e.tar.gz inkscape-0b5ad417538a7ed72b2e88b97dfc2cfc7ba8f49e.zip | |
gtkmm-ify the 'Stroke style' tab of Fill and Stroke dialog
(bzr r6602)
Diffstat (limited to 'src/dialogs/dialog-events.cpp')
| -rw-r--r-- | src/dialogs/dialog-events.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/dialogs/dialog-events.cpp b/src/dialogs/dialog-events.cpp index 3443a6ccb..dc9f4ac2a 100644 --- a/src/dialogs/dialog-events.cpp +++ b/src/dialogs/dialog-events.cpp @@ -27,6 +27,8 @@ #include "dialog-events.h" +#include <gtkmm/entry.h> + /** * \brief This function is called to zero the transientize semaphore by a @@ -46,6 +48,19 @@ sp_allow_again (gpointer *wd) * */ void +sp_dialog_defocus_cpp (Gtk::Window *win) +{ + Gtk::Window *w; + //find out the document window we're transient for + w = win->get_transient_for(); + + //switch to it + if (w) { + w->present(); + } +} + +void sp_dialog_defocus (GtkWindow *win) { GtkWindow *w; @@ -59,12 +74,17 @@ sp_dialog_defocus (GtkWindow *win) } - /** * \brief Callback to defocus a widget's parent dialog. * */ void +sp_dialog_defocus_callback_cpp (Gtk::Entry *e) +{ + sp_dialog_defocus_cpp(dynamic_cast<Gtk::Window *>(e->get_toplevel())); +} + +void sp_dialog_defocus_callback (GtkWindow */*win*/, gpointer data) { sp_dialog_defocus ((GtkWindow *) @@ -74,6 +94,12 @@ sp_dialog_defocus_callback (GtkWindow */*win*/, gpointer data) void +sp_dialog_defocus_on_enter_cpp (Gtk::Entry *e) +{ + e->signal_activate().connect(sigc::bind(sigc::ptr_fun(&sp_dialog_defocus_callback_cpp), e)); +} + +void sp_dialog_defocus_on_enter (GtkWidget *w) { g_signal_connect ( G_OBJECT (w), "activate", |
