[gtkmm] Window: Added unset_transient_for().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Window: Added unset_transient_for().
- Date: Wed, 10 Mar 2010 11:45:04 +0000 (UTC)
commit 070e73810426f5e5d0d1bb7cc93520173d7e044e
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Mar 10 12:44:51 2010 +0100
Window: Added unset_transient_for().
* gtk/src/window.[hg|ccg]: Added unset_transient_for() now that the
documentation of the C function says that an arg can be NULL and what it means.
ChangeLog | 5 +++++
gtk/src/window.ccg | 13 ++++++++-----
gtk/src/window.hg | 27 ++++++++++++++++-----------
3 files changed, 29 insertions(+), 16 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4bf7428..0af966d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-03-10 Murray Cumming <murrayc murrayc com>
+ * gtk/src/window.[hg|ccg]: Added unset_transient_for() now that the
+ documentation of the C function says that an arg can be NULL and what it means.
+
+2010-03-10 Murray Cumming <murrayc murrayc com>
+
* gtk/src/entrybuffer.hg:
* gtk/src/range.hg:
* gtk/src/toolpalette.hg:
diff --git a/gtk/src/window.ccg b/gtk/src/window.ccg
index 3262cfa..2c865e5 100644
--- a/gtk/src/window.ccg
+++ b/gtk/src/window.ccg
@@ -1,7 +1,7 @@
// -*- c++ -*-
/* $Id: window.ccg,v 1.5 2006/05/10 20:59:28 murrayc Exp $ */
-/*
+/*
*
* Copyright 1998-2002 The gtkmm Development Team
*
@@ -122,7 +122,7 @@ void Window::_destroy_c_instance()
void Window_Class::dispose_vfunc_callback(GObject* self)
{
//Avoid disposal of Windows on delete_event (window close) signal.
-
+
#ifdef GLIBMM_DEBUG_REFCOUNTING
g_warning("Window_Class::dispose_vfunc_callback(): gobject_: %p\n", (void*)self);
#endif
@@ -174,7 +174,7 @@ void Window_Class::dispose_vfunc_callback(GObject* self)
#ifdef GLIBMM_DEBUG_REFCOUNTING
//g_warning("Window_Class::dispose_vfunc_callback(): unreferenced: after gtk_widget_hide().");
#endif
-
+
GObjectClass *const base = static_cast<GObjectClass*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)));
@@ -200,7 +200,10 @@ void Window::unset_default()
{
gtk_window_set_default(gobj(), 0 /* See GTK+ docs */);
}
-
-} // namespace Gtk
+void Window::unset_transient_for()
+{
+ gtk_window_set_transient_for(gobj(), 0 /* See GTK+ docs */);
+}
+} // namespace Gtk
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 2f65772..f12e61b 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -1,7 +1,7 @@
/* $Id: window.hg,v 1.20 2006/05/10 20:59:28 murrayc Exp $ */
/* window.h
- *
+ *
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
+
#include <glibmm/object.h>
#include <glibmm/listhandle.h>
#include <gtkmm/bin.h>
@@ -77,13 +77,13 @@ public:
_WRAP_PROPERTY("destroy_with_parent", bool)
_WRAP_PROPERTY("icon", Glib::RefPtr<Gdk::Pixbuf>)
_WRAP_PROPERTY("mnemonics-visible", bool)
- _WRAP_PROPERTY("icon-name", Glib::ustring)
+ _WRAP_PROPERTY("icon-name", Glib::ustring)
_WRAP_PROPERTY("screen", Glib::RefPtr<Gdk::Screen>)
_WRAP_PROPERTY("is_active", bool)
_WRAP_PROPERTY("has_toplevel_focus", bool)
_WRAP_PROPERTY("type_hint", GdkWindowTypeHint)
_WRAP_PROPERTY("skip_taskbar_hint", bool)
- _WRAP_PROPERTY("skip_pager_hint", bool)
+ _WRAP_PROPERTY("skip_pager_hint", bool)
_WRAP_PROPERTY("role", Glib::ustring)
_WRAP_PROPERTY("decorated", bool)
_WRAP_PROPERTY("gravity", Gdk::Gravity)
@@ -91,7 +91,7 @@ public:
_WRAP_PROPERTY("urgency_hint", bool)
_WRAP_PROPERTY("accept-focus", bool)
_WRAP_PROPERTY("focus-on-map", bool)
- _WRAP_PROPERTY("deletable", bool)
+ _WRAP_PROPERTY("deletable", bool)
bool is_toplevel() const;
bool is_dialog() const;
@@ -157,16 +157,22 @@ dnl
_WRAP_METHOD(void set_focus(Gtk::Widget& focus), gtk_window_set_focus)
void unset_focus();
-
+
_WRAP_METHOD(Widget* get_focus(), gtk_window_get_focus)
_WRAP_METHOD(const Widget* get_focus() const, gtk_window_get_focus, constversion)
_WRAP_METHOD(void set_default(Gtk::Widget& default_widget), gtk_window_set_default)
void unset_default();
-
+
_WRAP_METHOD(bool activate_default(), gtk_window_activate_default)
_WRAP_METHOD(void set_transient_for(Window& parent), gtk_window_set_transient_for)
+ /** Unsets the current transient window.
+ * @see set_transient_for().
+ * @newin{2,20}
+ */
+ void unset_transient_for();
+
_WRAP_METHOD(Window* get_transient_for(), gtk_window_get_transient_for)
_WRAP_METHOD(const Window* get_transient_for() const, gtk_window_get_transient_for, constversion)
@@ -260,7 +266,7 @@ dnl
gtk_window_set_default_icon_list)
_WRAP_METHOD(static Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > get_default_icon_list(), gtk_window_get_default_icon_list)
-
+
_WRAP_METHOD(static void set_default_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon), gtk_window_set_default_icon)
_WRAP_METHOD(static void set_default_icon_name(const Glib::ustring& name), gtk_window_set_default_icon_name)
_WRAP_METHOD(static bool set_default_icon_from_file(const std::string& filename), gtk_window_set_default_icon_from_file, errthrow)
@@ -304,7 +310,7 @@ dnl
_WRAP_METHOD(void fullscreen(), gtk_window_fullscreen)
_WRAP_METHOD(void unfullscreen(), gtk_window_unfullscreen)
-
+
_WRAP_METHOD(void begin_resize_drag(Gdk::WindowEdge edge,
int button, int root_x, int root_y, guint32 timestamp),
gtk_window_begin_resize_drag)
@@ -343,7 +349,7 @@ dnl
_WRAP_METHOD(void set_keep_above(bool setting = true), gtk_window_set_keep_above)
_WRAP_METHOD(void set_keep_below(bool setting = true), gtk_window_set_keep_below)
-
+
/** Returns a default accel group for this window
* This is a gtkmm-specific function. This accel group can not
* be removed.
@@ -374,4 +380,3 @@ private:
} // namespace Gtk
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]