Re: gnome-core available

Ok George,

I got it.
The problem is actually that in the 'icon-entry-hack', you do allocate a
new icon entry
while, the dentry-edit widget has already allocated one. The signal
handlers are registered
on the first allocated widget while the used widget is the second one.
Obviously the signals
cannot hit the targets.
The patch I send here is just to get the icon-entry already allocated by
the dentry-edit (if
one exists) and only allocate a new one if no entry is returned.

--- icon-entry-hack.c.old Sat Apr 21 20:46:39 2001
+++ icon-entry-hack.c Mon May  7 17:55:29 2001
@@ -231,8 +231,11 @@

  g_return_if_fail (GNOME_IS_DENTRY_EDIT (dedit));

- ientry = gnome_icon_entry_new ("icon", _("Choose an icon"));
+        ientry = gnome_dentry_get_icon_entry(dedit);
+ if (!ientry || !GNOME_IS_ICON_ENTRY(ientry))
+         ientry = gnome_icon_entry_new ("icon", _("Choose an icon"));
  gtk_widget_show (ientry);
  gtk_object_set_data (GTK_OBJECT (ientry),
         "IconHackOrigIconEntry", dedit->icon_entry);

One problem remain anyway. The update of the icon through the file
selection dialog (browse
button) do not update the icon list of the icon selection dialog (pick
dialog). Some more
hack is needed either in hack-icon-entry or in gnome-dentry-edit...

I'll try to fix ... it is far from being obvious !

George a écrit :

> On Sun, May 06, 2001 at 04:45:14PM +0200, Remi Cohen-Scali wrote:
> > Actually I have been browsing the code and I realized it was a problem of the dentry
> > widget.
> > It seems the widget do not emit a signal when the file entry one (changed) is received.
> > Is it really what happening ?
> > Thanks for your explanations
> OK, the issues are complex.  The standard gnome icon entry does not actually
> have a real changed signal.  By some stroke of dementia we made the entry in
> the browse dialog box theentry the icon entry gets the icon from.  This meant
> that if you bind to the changed signal there, it's very simple to get the icon
> button and the actual icon out of sync.  So what I do is a very ugly hack with
> juggling two icon entries.  What it seems to me is that I'm forgetting to check
> changes on the entry when ok is pressed.
> George

                                     Remi Cohen-Scali
   _/_/_/   _/    _/  _/      /      Development engineer
   _/      _/    _/  _/_/   _/       International Center for Network
  _/_/_/  _/    _/  _/  _/ _/        Network Service Provider Division
     _/  _/    _/  _/   _/_/         Phone:     +33-139-447-509  x44509
_/_/_/   _/_/_/   _/     _/          E-mails: Remi Cohen-Scali Sun COM
M  I  C  R  O  S  Y  S  T  E  M  S            Remi Cohen-Scali COM
Remi CohenScali Itineris Net

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