[Glade-devel] [patch, glade3] cleanup popup menu
- From: e98cuenc free fr (Joaquin Cuenca Abela)
- Subject: [Glade-devel] [patch, glade3] cleanup popup menu
- Date: Sun, 11 May 2003 22:37:49 +0200
Hi Paolo!
I've committed your changes, plus some fixes to cut & paste.
The problems that I was seeing with cut & paste were due to the
finalization function of the cut command. It was destroying the widget
cutted, but we only do the finalization if we were destroying the cut
command. To reach this point the user should undo a cut command, and
then do another action (thus removing the upper part of the undo stack).
But if the cut command had been undoed, the cutted widget is again in
use, so we can't destroy it.
There was also a little problem with the paste command, as if you tried
to paste "button1" over "window1", the paste command tried to paste
"window1" (instead of pasting "button1").
Now cut & paste is working flawsely on my system.
Archit, are these the problems that you were experiencing a while ago
with cut & paste?
Paolo, making the menu items insensitive when the action is not allowed
will give you several love points ;-)
Thank you for your work!
Cheers,
P.S.: Sorry, still no time to look at your close project patch
Paolo wrote:
Hi!
The patch attached cleans up the popup menu making it saner
(IMHO before the code worked by chance since the "activate"
event was connected to functions with different prototypes
from that of the event handler). Beside the Cut, Copy etc in
the popup ended up calling different functions from those in
the main menu bar. Last but not least, after the patch popup
menu items have stock icons and mnemonics :) .
Here are the changes to make review easier:
- remove glade_widget_copy and friends: some codepaths (e.g.
the main menu bar) didn't call these, while others (e.g the
popup menu) did; since they only called glade_command_copy
etc, which is what was used in the other places, remove them
and their occurences.
- provide proper callbacks for the popup menu items: e.g.
glade_popup_cut_cb etc; also move in popup.c the
placeholder_paste_callback which was only used here.
- improve glade_popup_append_item so that it handles
mnemonics and icons, beside using g_object_set_data is not
needed anymore.
hope it makes sense
ciao
paolo
- Follow-Ups:
- [Glade-devel] [patch, glade3] insensitive Cut,Copy etc in popup menu
- [Glade-devel] [patch, glade3] decouple glade-project from glade-project-window
- [Glade-devel] [patch, glade3] clipboard_paste does not need to change the editor widget
- [Glade-devel] [patch, glade3] decouple glade-palette from glade-project-window
- [Glade-devel] [patch, glade3] rm glade-project-window.h from clipboard view
- [Glade-devel] [glade3] problems with latest cvs
- [Glade-devel] [patch, glade3] clipboard does not need glade_project_window.h
- [Glade-devel] [patch, glade3] rework widget creation
- [Glade-devel] [patch, glade3] small cleanup in gpw_refresh_undo_redo
- [Glade-devel] [patch, glade3] bug on placeholder selection
- [Glade-devel] [patch, glade3] rework widget creation
- [Glade-devel] [patch, glade3] placeholder.c cleanup
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]