solang-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Solang-devel] [PATCH] Enlarged renderer improvements


From: Santanu Sinha
Subject: Re: [Solang-devel] [PATCH] Enlarged renderer improvements
Date: Sat, 23 May 2009 21:00:07 +0530

Looks safe enough.
Push please.

----
Upset the established order, and everything becomes chaos. I'm an
agent of chaos. Oh and you know the thing about chaos, it's fair.



On Sat, May 23, 2009 at 5:43 PM, Debarshi Ray <address@hidden> wrote:
> http://rishi.fedorapeople.org/0001-Enlarged-renderer-improvements.patch
>
> This is the contentious portion of this patch:
>
> +void
> +MainWindow::present_dock_object(GdlDockObject * dock_object) throw()
> +{
> +    if (0 == dock_object)
> +    {
> +        std::cerr << __FILE__ << ":" << __LINE__ << ", "
> +                  << __FUNCTION__ << ": " << "0 == dock_object"
> +                  << std::endl;
> +        return;
> +    }
> +
> +    Gtk::Container * dock_container
> +        = Glib::wrap(GTK_CONTAINER(dock_object), false);
> +    Gtk::Notebook * parent
> +        = dynamic_cast<Gtk::Notebook *>(dock_container->get_parent());
> +
> +    if (0 != parent)
> +    {
> +        const gint page_num = parent->page_num(*dock_container);
> +        parent->set_current_page(page_num);
> +    }
> +}
>
> There is really no way to avert the dynamic_cast here. The parent of a
> widget is stored somewhere in the private part of GtkWidget and it is
> always returned as a GtkWidget * (or Gtk::widget *).
>
> Happy hacking,
> Debarshi
> --
> One reason that life is complex is that it has a real part and an
> imaginary part.
>    -- Andrew Koenig
>
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]