After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 349304 - Help kill libegg
Help kill libegg
Status: RESOLVED FIXED
Product: planner
Classification: Other
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Alexandre Franke
planner-maint
cleanup
: 581989 596171 (view as bug list)
Depends on:
Blocks: 349256 588321 589045
 
 
Reported: 2006-07-30 12:26 UTC by Vincent Untz
Modified: 2009-11-17 21:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
planner-0.14.3-configure.patch (2.02 KB, patch)
2008-12-05 13:24 UTC, Gilles Dartiguelongue
rejected Details | Review
planner-HEAD-kill-libegg.patch (14.02 KB, patch)
2008-12-05 13:25 UTC, Gilles Dartiguelongue
none Details | Review
reworked patch (13.49 KB, patch)
2009-08-05 16:28 UTC, Alexandre Franke
none Details | Review
hopefully final version of the patch (178.06 KB, patch)
2009-11-09 21:58 UTC, Alexandre Franke
needs-work Details | Review

Description Vincent Untz 2006-07-30 12:26:20 UTC
+++ This bug was initially created as a clone of Bug #349256 +++

Please help kill libegg. Your module contains some egg code that is now deprecated thanks to new features, most probably the new GTK+ 2.10 features like:

 + GtkRecent* (deprecating EggRecent)
 + GtkStatusIcon (deprecating EggTrayIcon and EggStatusIcon)
 + GtkCellRendererAccel (deprecating EggCellRendererKeys)
 + GtkAccelGroup now has features to deprecate EggAccelerator (see bug 85780)

Also, egg-screen-exec stuff has been deprecated: see http://cvs.gnome.org/viewcvs/*checkout*/libegg/libegg/screen-exec/README

Also, EggIconList has become GtkIconView in GTK+ 2.6.
Comment 1 Gilles Dartiguelongue 2008-12-05 13:24:25 UTC
Created attachment 123999 [details] [review]
planner-0.14.3-configure.patch

here is a patch to migrate to GtkRecentManager API. Maybe I forgot to update gtk+ dependency but it should work well. FYI, adding recent files directly in the File menu is possible, see gedit code, but I was too lazy so I did it the submenu way.

 Makefile.am               |    1 
 configure.in              |    2 
 data/ui/main-window.ui    |    3 -
 po/POTFILES.in            |    2 
 po/POTFILES.skip          |    2 
 src/Makefile.am           |    1 
 src/planner-application.c |   20 ++-----
 src/planner-application.h |    9 +--
 src/planner-main.c        |    3 +
 src/planner-window.c      |  125 ++++++++++++++++++++++++++++------------------
 tests/Makefile.am         |    1 
 11 files changed, 95 insertions(+), 74 deletions(-)

Thanks for considering.
Comment 2 Gilles Dartiguelongue 2008-12-05 13:25:05 UTC
Created attachment 124000 [details] [review]
planner-HEAD-kill-libegg.patch

here is a patch to migrate to GtkRecentManager API. Maybe I forgot to update gtk+ dependency but it should work well. FYI, adding recent files directly in the File menu is possible, see gedit code, but I was too lazy so I did it the submenu way.

 Makefile.am               |    1 
 configure.in              |    2 
 data/ui/main-window.ui    |    3 -
 po/POTFILES.in            |    2 
 po/POTFILES.skip          |    2 
 src/Makefile.am           |    1 
 src/planner-application.c |   20 ++-----
 src/planner-application.h |    9 +--
 src/planner-main.c        |    3 +
 src/planner-window.c      |  125 ++++++++++++++++++++++++++++------------------
 tests/Makefile.am         |    1 
 11 files changed, 95 insertions(+), 74 deletions(-)

Thanks for considering.
Comment 3 Gilles Dartiguelongue 2008-12-05 13:26:08 UTC
oops, sorry for double posting, I picked the wrong patch.
Comment 4 Yaakov Selkowitz 2009-04-28 23:54:23 UTC
Patch WFM with 0.14.4; GTK_REQUIRED needs to be bumped to 2.10.0 to match.
Comment 5 Alexandre Franke 2009-05-09 15:44:38 UTC
*** Bug 581989 has been marked as a duplicate of this bug. ***
Comment 6 André Klapper 2009-05-15 12:17:34 UTC
ping - Maurice, can this cleanup patch please get a review?
Comment 7 Alexandre Franke 2009-05-19 09:27:49 UTC
I'm currently reviewing it and rebasing it on current HEAD.
Comment 8 Maurice van der Pot 2009-05-30 16:32:05 UTC
planner-application.c:
- don't unref the recent manager in application_finalize (see docs on gtk_recent_manager_get_default())
- should there really be a "..." at the end of the menu entry? Isn't that only for things that open up dialogs?

planner-window.c
- when I first looked at this patch I decided to replace the GTK_STOCK_OPEN with NULL, but now I can't remember why I did that.
- don't leave commented out lines, the patch has them around line 610
- I think the string (if not NULL) returned by g_filename_to_uri should be freed. Also don't call gtk_recent_manager_add_full if the string is NULL.

I'd prefer to also have the previous behaviour where the name of the file you hover over is put in the status bar, but maybe it's non-trivial.
Comment 9 André Klapper 2009-08-04 14:12:49 UTC
Gilles or Alexandre, do you have time to update the patch based on the last comment?
If I get it right this will also kill Planner's Bonobo dependency.
Comment 10 Alexandre Franke 2009-08-05 16:28:23 UTC
Created attachment 139960 [details] [review]
reworked patch
Comment 11 Alexandre Franke 2009-08-05 16:42:10 UTC
Here's a new version of the patch, awaiting review.

(In reply to comment #8)
> planner-application.c:
> - don't unref the recent manager in application_finalize (see docs on
> gtk_recent_manager_get_default())

Fixed.

> - should there really be a "..." at the end of the menu entry? Isn't that only
> for things that open up dialogs?

There shouldn't be. Fixed.

> planner-window.c
> - when I first looked at this patch I decided to replace the GTK_STOCK_OPEN
> with NULL, but now I can't remember why I did that.

Indeed, the GTK_STOCK_OPEN icon looks weird on this submenu.

> - don't leave commented out lines, the patch has them around line 610

Fixed.

> - I think the string (if not NULL) returned by g_filename_to_uri should be
> freed. Also don't call gtk_recent_manager_add_full if the string is NULL.

Fixed, I reworked this part and it's cleaner now.

> I'd prefer to also have the previous behaviour where the name of the file you
> hover over is put in the status bar, but maybe it's non-trivial.

That looks indeed non-trivial and I think we can add it later on if we really want to.
Comment 12 Gilles Dartiguelongue 2009-08-05 17:06:14 UTC
>> I'd prefer to also have the previous behaviour where the name of the file you
>> hover over is put in the status bar, but maybe it's non-trivial.

> That looks indeed non-trivial and I think we can add it later on if we really
> want to.

I thought I said something about it but it seems not so, gedit does it, but if you look at it, you'll see it's a great amount of code for a small gain (imho).
Comment 13 Maurice van der Pot 2009-08-08 16:04:17 UTC
Agreed, it's not worth the extra code.

Some comments on the new patch:

- The entire libegg subdir should be removed now that we don't use it anymore.

- libegg/recent-files/egg-recent-vfs-utils.c should not be added to POTFILES.skip

- There is a misalignment in the New FileOpenRecent entry in the list of GtkActionEntrys (planner-window.c:233)

- There is some trailing white space (planner-window.c lines 433, 435, 438, 628, 633 and 637). I think git would have complained

- There's a double + in your patch, causing a compilation error and a whitespace problem.

Other than that the patch looks fine.
Comment 14 André Klapper 2009-08-11 15:46:42 UTC
Alexandre: Willing to fix the issues listed by Maurice and come up with a last, final version? :)

Thanks everybody here for working on this. I appreciate it.
Comment 15 Alexandre Franke 2009-08-11 16:36:40 UTC
I'm actually working on it :)
Comment 16 Alexandre Franke 2009-09-24 12:31:34 UTC
*** Bug 596171 has been marked as a duplicate of this bug. ***
Comment 17 Alexandre Franke 2009-11-09 21:58:05 UTC
Created attachment 147331 [details] [review]
hopefully final version of the patch

Well, at last I had a look and fixed the remaining problems. I also removed a line in Makefile.win32 so the Windows build needs to be verified. Maurice, if you think that this one is the good one, let me know and I'll push it.
Comment 18 Maurice van der Pot 2009-11-17 19:21:32 UTC
Review of attachment 147331 [details] [review]:

Looks fine except for one small thing.

::: src/planner-window.c
@@ +441,3 @@
+                planner_window_open_in_existing_or_new (window, uri, FALSE);
+                g_free (uri);
+        }

The above lines use spaces for indenting instead of tabs
Comment 19 Maurice van der Pot 2009-11-17 20:08:34 UTC
I forgot to add that it works on Windows as well.
Comment 20 Alexandre Franke 2009-11-17 21:01:09 UTC
Spaces have been fixed.

This has been pushed to master and will be available in next version.