size negociation patch for bonobo
- From: lacage email enst fr (Mathieu Lacage)
- To: gnome-components-list gnome org
- Subject: size negociation patch for bonobo
- Date: 05 Oct 1999 10:29:58 +0200
hi,
here is a small patch for the size negociation mechanism of
bonobo...
I feel this corrects a real bug:
no size_request mechanism was implemented and the size_allocate
mechanism was likely to be wrong as it took the allocation of
the wrapper to send it to the embeddable. (this was 99 percent
right but the wrapper may be bigger than the emeddable just like
in the test prgm which can be found at:
http://www.stud.enst.fr/~lacage/linux/stuff/component.tar.gz
This test prgm will require you have patched your bonobo lib
with my patch III (~lacage/linux/stuff/bonobo.patch.tar.gz)
and the folowing patch which is a standalone patch. (does not
need any other patch)
------------------patch beg--------------------------
--- gnome-view-frame.c Mon Oct 4 22:03:10 1999
+++ gnome-view-frame.c.new Mon Oct 4 08:06:29 1999
@@ -70,7 +70,7 @@
CORBA_Environment *ev)
{
GnomeViewFrame *view_frame = GNOME_VIEW_FRAME (gnome_object_from_servant (servant));
-
+
gtk_signal_emit (GTK_OBJECT (view_frame),
view_frame_signals [VIEW_ACTIVATED], state);
}
@@ -437,6 +437,16 @@
return view_frame->view;
}
+GnomeClientSite *
+gnome_view_frame_get_client_site (GnomeViewFrame *view_frame)
+{
+
+ g_return_if_fail (view_frame != NULL);
+ g_return_if_fail (GNOME_IS_VIEW_FRAME (view_frame));
+
+ return GNOME_CLIENT_SITE(view_frame->client_site);
+}
+
/**
* gnome_view_frame_set_covered:
* @view_frame: A GnomeViewFrame object whose embedded View should be
@@ -460,6 +470,54 @@
wrapper = gnome_view_frame_get_wrapper (view_frame);
gnome_wrapper_set_covered (GNOME_WRAPPER (wrapper), covered);
+}
+
+
+void
+gnome_view_frame_activate (GnomeViewFrame *view_frame)
+{
+ GtkWidget *wrapper;
+ GnomeClientSite *client_site;
+
+ g_return_if_fail (view_frame != NULL);
+ g_return_if_fail (GNOME_IS_VIEW_FRAME (view_frame));
+
+ view_frame->activate = TRUE;
+ wrapper = gnome_view_frame_get_wrapper (view_frame);
+ client_site = gnome_view_frame_get_client_site (view_frame);
+ if (client_site->child_shown) {
+ /* here, we just have non inplace */
+ gnome_wrapper_set_state (GNOME_WRAPPER (wrapper),
+ GNOME_WRAPPER_COVERED_PAINT);
+ gtk_widget_queue_resize (GTK_WIDGET (wrapper));
+ } else {
+ /* here, inplace */
+ gnome_wrapper_set_state (GNOME_WRAPPER (wrapper),
+ GNOME_WRAPPER_UNCOVERED_PAINT);
+
+ gtk_widget_queue_resize (GTK_WIDGET (wrapper));
+ }
+
+
+
+}
+
+void
+gnome_view_frame_deactivate (GnomeViewFrame *view_frame)
+{
+ GtkWidget *wrapper;
+
+
+ g_return_if_fail (view_frame != NULL);
+ g_return_if_fail (GNOME_IS_VIEW_FRAME (view_frame));
+
+ view_frame->activate = FALSE;
+ wrapper = gnome_view_frame_get_wrapper (view_frame);
+
+ gnome_wrapper_set_state (GNOME_WRAPPER (wrapper),
+ GNOME_WRAPPER_COVERED);
+ gtk_widget_queue_resize (GTK_WIDGET (wrapper));
+
}
/**
------------------patch end--------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]