aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-06-02 12:40:44 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-06-02 12:40:44 +0800
commitc91b4c129a05a17a3a4b9861630a9cb43589ca4a (patch)
treefc31f3a9b4719e3b2ce2654e7a557cbe6650ca99 /calendar
parenta161070ec2a2de0527a9b442f11d29a6749db122 (diff)
downloadgsoc2013-evolution-c91b4c129a05a17a3a4b9861630a9cb43589ca4a.tar.gz
gsoc2013-evolution-c91b4c129a05a17a3a4b9861630a9cb43589ca4a.tar.zst
gsoc2013-evolution-c91b4c129a05a17a3a4b9861630a9cb43589ca4a.zip
Handler for the "editor_closed" signal of the event editor; we just
2000-06-01 Federico Mena Quintero <federico@helixcode.com> * gui/gnome-cal.c (editor_closed_cb): Handler for the "editor_closed" signal of the event editor; we just destroy it then. * gui/event-editor.c (app_delete_event_cb): Callback used when the dialog is closed. Release the iCalObject here instead of the event editor's destroy handler, and emit the new "editor_closed" signal. svn path=/trunk/; revision=3376
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog11
-rw-r--r--calendar/gui/event-editor.c77
-rw-r--r--calendar/gui/event-editor.h1
-rw-r--r--calendar/gui/gnome-cal.c10
4 files changed, 74 insertions, 25 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f58a8e42dd..04809350c2 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,16 @@
2000-06-01 Federico Mena Quintero <federico@helixcode.com>
+ * gui/gnome-cal.c (editor_closed_cb): Handler for the
+ "editor_closed" signal of the event editor; we just destroy it
+ then.
+
+ * gui/event-editor.c (app_delete_event_cb): Callback used when the
+ dialog is closed. Release the iCalObject here instead of the
+ event editor's destroy handler, and emit the new "editor_closed"
+ signal.
+
+2000-06-01 Federico Mena Quintero <federico@helixcode.com>
+
* gui/event-editor-dialog.glade: Change of plans. The toplevel
GnomeApp is now generated with Glade instead of being created in
the program code. Otherwise we can't migrate the accelerators to
diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c
index 38ed9ad070..9f24fb63cd 100644
--- a/calendar/gui/event-editor.c
+++ b/calendar/gui/event-editor.c
@@ -118,6 +118,7 @@ typedef struct {
/* Signal IDs */
enum {
ICAL_OBJECT_RELEASED,
+ EDITOR_CLOSED,
LAST_SIGNAL
};
@@ -199,6 +200,14 @@ event_editor_class_init (EventEditorClass *class)
GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
+ event_editor_signals[EDITOR_CLOSED] =
+ gtk_signal_new ("editor_closed",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EventEditorClass, editor_closed),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
gtk_object_class_add_signals (object_class, event_editor_signals, LAST_SIGNAL);
object_class->destroy = event_editor_destroy;
@@ -227,23 +236,27 @@ event_editor_destroy (GtkObject *object)
ee = EVENT_EDITOR (object);
priv = ee->priv;
- if (priv->ico) {
- gtk_signal_emit (GTK_OBJECT (ee), event_editor_signals[ICAL_OBJECT_RELEASED],
- priv->ico->uid);
- ical_object_unref (priv->ico);
- priv->ico = NULL;
- }
-
if (priv->uih) {
bonobo_object_unref (BONOBO_OBJECT (priv->uih));
priv->uih = NULL;
}
if (priv->app) {
+ gtk_signal_disconnect_by_data (GTK_OBJECT (priv->app), ee);
gtk_widget_destroy (priv->app);
priv->app = NULL;
}
+ if (priv->ico) {
+ /* We do not emit the "ical_object_released" signal here. If
+ * the user cloased the dialog box, then it has already been
+ * released. If the application just destroyed the event
+ * editor, then it had better clean up after itself.
+ */
+ ical_object_unref (priv->ico);
+ priv->ico = NULL;
+ }
+
if (priv->xml) {
gtk_object_unref (GTK_OBJECT (priv->xml));
priv->xml = NULL;
@@ -495,19 +508,6 @@ free_exception_clist_data (GtkCList *clist)
gtk_clist_clear (clist);
}
-/* Callback used when the exception date GtkCList is destroyed */
-static void
-exception_clist_destroyed (GtkObject *object, gpointer data)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
-
- ee = EVENT_EDITOR (data);
- priv = ee->priv;
-
- free_exception_clist_data (GTK_CLIST (priv->recurrence_exceptions_list));
-}
-
/* Hooks the widget signals */
static void
init_widgets (EventEditor *ee)
@@ -563,11 +563,6 @@ init_widgets (EventEditor *ee)
GTK_SIGNAL_FUNC (recurrence_exception_deleted), ee);
gtk_signal_connect (GTK_OBJECT (priv->recurrence_exception_change), "clicked",
GTK_SIGNAL_FUNC (recurrence_exception_changed), ee);
-
- /* Exception list */
-
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_exceptions_list), "destroy",
- GTK_SIGNAL_FUNC (exception_clist_destroyed), ee);
}
/* Fills the widgets with default values */
@@ -1061,6 +1056,33 @@ create_toolbar (EventEditor *ee)
bonobo_ui_handler_toolbar_add_list (priv->uih, "/Toolbar", list);
}
+/* Callback used when the dialog box is destroyed */
+static gint
+app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
+{
+ EventEditor *ee;
+ EventEditorPrivate *priv;
+
+ ee = EVENT_EDITOR (data);
+ priv = ee->priv;
+
+ free_exception_clist_data (GTK_CLIST (priv->recurrence_exceptions_list));
+
+ gtk_widget_destroy (priv->app);
+ priv->app = NULL;
+
+ if (priv->ico) {
+ gtk_signal_emit (GTK_OBJECT (ee), event_editor_signals[ICAL_OBJECT_RELEASED],
+ priv->ico->uid);
+ ical_object_unref (priv->ico);
+ priv->ico = NULL;
+ }
+
+ gtk_signal_emit (GTK_OBJECT (ee), event_editor_signals[EDITOR_CLOSED]);
+
+ return TRUE;
+}
+
/**
* event_editor_construct:
* @ee: An event editor.
@@ -1109,6 +1131,11 @@ event_editor_construct (EventEditor *ee)
create_menu (ee);
create_toolbar (ee);
+ /* Hook to destruction of the dialog */
+
+ gtk_signal_connect (GTK_OBJECT (priv->app), "delete_event",
+ GTK_SIGNAL_FUNC (app_delete_event_cb), ee);
+
/* Show the dialog */
gtk_widget_show (priv->app);
diff --git a/calendar/gui/event-editor.h b/calendar/gui/event-editor.h
index a1d50a0dff..f5b5482e93 100644
--- a/calendar/gui/event-editor.h
+++ b/calendar/gui/event-editor.h
@@ -53,6 +53,7 @@ struct _EventEditorClass {
/* Notification signals */
void (* ical_object_released) (EventEditor *ee, const char *uid);
+ void (* editor_closed) (EventEditor *ee);
};
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 460e0151d6..e97947cbf0 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1327,6 +1327,13 @@ ical_object_released_cb (EventEditor *ee, const char *uid, gpointer data)
g_free (orig_uid);
}
+/* Callback used when an event editor dialog is closed */
+static void
+editor_closed_cb (EventEditor *ee, gpointer data)
+{
+ gtk_object_unref (GTK_OBJECT (ee));
+}
+
void
gnome_calendar_edit_object (GnomeCalendar *gcal, iCalObject *ico)
{
@@ -1353,6 +1360,9 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, iCalObject *ico)
gtk_signal_connect (GTK_OBJECT (ee), "ical_object_released",
GTK_SIGNAL_FUNC (ical_object_released_cb), gcal);
+ gtk_signal_connect (GTK_OBJECT (ee), "editor_closed",
+ GTK_SIGNAL_FUNC (editor_closed_cb), gcal);
+
event_editor_set_ical_object (EVENT_EDITOR (ee), ico);
}
/+4 * Update to xgobi 2002.06.20kris2002-10-273-19/+10 * Mark BROKEN on 5.0kris2002-10-261-1/+7 * Add linux-relview, an interactive tool for computer-supportedobraun2002-10-266-0/+53 * Remove #include <values.h> to partially fix build on -current (stillkris2002-10-252-1/+18 * Partially fix build on -current (remove #include <malloc.h>). This stillkris2002-10-251-0/+11 * Release all my ports.nsayer2002-10-211-1/+1 * Fix -current build.jmz2002-10-202-24/+65 * Sign over maintainership to gnome@. gcalctool will be part of the GNOME 2.2marcus2002-10-201-1/+1 * Upgrade to 2.2.4.kuriyama2002-10-194-12/+18 * Add a second md5 sum; distfile was repacked on master site with no changeskris2002-10-191-0/+1 * Upgrade to 0.5.1.obraun2002-10-193-4/+55 * Add checksums for Python-2.2.2.perky2002-10-171-1/+1 * Upgrade to 0.5.0.obraun2002-10-173-3/+12 * BROKEN -> IGNORE to prevent package buildkris2002-10-131-1/+1 * Update to superlu 2.0.20020923 (lots of code changes, no vendorkris2002-10-132-4/+3 * change maintainer emailijliao2002-10-131-1/+1 * add py-probstat 0.912ijliao2002-10-126-0/+35 * 1. Removed comments from pkg-plist files per will's request.alane2002-10-112-33/+28 * CC, CXX, CFLAGS, PTHREAD_CFLAGS and PTHREAD_LIBS may contain `/' inknu2002-10-101-2/+2 * add blitz++ 0.6ijliao2002-10-108-0/+379 * upgrade to 2.5ijliao2002-10-104-242/+281 * Remove http://www.ruby-lang.org/~knu/backup/ from MASTER_SITES, nowknu2002-10-081-2/+1 * Upgrade to 1.1. Unfortunately, the tar file is not versioned.des2002-10-083-193/+198 * Update to 1.0.10.marcus2002-10-082-2/+2 * Use RUBY_MOD*.knu2002-10-0716-390/+390 * Unbreak this port by correcting REINPLACE_CMD invocations.kris2002-10-061-4/+2 * BROKEN: Does not compilekris2002-10-061-0/+2 * BROKEN: Does not compilekris2002-10-061-0/+2 * Fix build without <values.h> presentkris2002-10-062-0/+61 * Fix build by disabling use of <values.h>kris2002-10-061-10/+1 * Update to 1.1.9.marcus2002-10-064-8/+94 * Set USE_X_PREFIX=yes to fix buildkris2002-10-021-2/+2 * 1. Bump PORTREVISION to 1.alane2002-10-022-10/+23 * make the patch work on both -current and -stableijliao2002-10-011-25/+10 * make the patch work on both -current and -stableijliao2002-10-011-6/+12 * find->${FIND},xargs->${XARGS}ijliao2002-09-291-1/+1 * Fix plistkris2002-09-291-1/+0 * Correct pkg-plistkris2002-09-291-9/+0 * bump gsl lib versionijliao2002-09-251-1/+1 * fix build problem by upgrading it to 2.3.4ijliao2002-09-257-426/+64 * Update to 3.2.1 and unbreak.demon2002-09-223-10/+12 * upgrade to 3.0ijliao2002-09-215-7/+9 * BROKEN: Does not installkris2002-09-211-0/+2 * GNOME has just changed the layout of their FTP site. This resulted inmarcus2002-09-214-4/+4 * - Support CFLAGS/CXXFLAGS properlyijliao2002-09-203-2/+24 * - Support CFLAGS/CXXFLAGS properlyijliao2002-09-201-1/+1 * Upgrade to 20020910 and unbroken.kuriyama2002-09-206-42/+54 * upgrade to 0.999ijliao2002-09-208-95/+118 * upgrade to 1.0.11ijliao2002-09-193-3/+3 * BROKEN: Does not buildkris2002-09-191-0/+2 * Add a full dependency on libgda2. Bump PORTREVISION.marcus2002-09-191-7/+2 * Update to 6.2.tobez2002-09-182-2/+2 * fix build on -currentijliao2002-09-172-0/+43 * Prevent breakage when both gal1 and gal2 are installed.sobomax2002-09-162-1/+11 * fix patch pathijliao2002-09-162-4/+4 * fix build on -currentijliao2002-09-162-0/+48 * Add gnumeric2 after a repo copy from gnumeric. Gnumeric2 is a sreadsheetmarcus2002-09-1617-873/+278 * Fix build on -current by adding USE_LIBTOOL, and respect CFLAGSkris2002-09-092-0/+11 * ${PERL} -> ${REINPLACE_CMD}dwcjr2002-09-021-1/+2 * Deploy USE_GNOMENG infrastructurelioux2002-09-011-3/+4 * Remove USE_NEWGCC, which is no longer supported or required.kris2002-08-312-2/+0 * Deploy USE_GNOMENG infrastructurelioux2002-08-304-4/+8 * Update to 4.1.9.marcus2002-08-303-21/+10 * Update to version 6.3.16sanpei2002-08-301-0/+3 * Directory layouts of py-gtk and py-gnome packages have been changed, so thatsobomax2002-08-292-2/+2 * Update to version 6.3.16sanpei2002-08-274-9/+8 * o) Update to 5.1.9lkoeller2002-08-266-38/+44 * Update to 3.0.3. Not much changed here: [1] i18n PKGNAMEs converted towill2002-08-252-15/+2 * Switch to GNOMENG framework for Gtk.naddy2002-08-241-1/+2 * Add missing .pyo files to each pkg-plistperky2002-08-233-0/+32 * MASTER_SITES changed.obraun2002-08-221-1/+1 * Update to 1.3.13. Changes in this release:naddy2002-08-202-2/+2 * Fix build on alpha.naddy2002-08-204-12/+56 * Add entropy 1.0, calculate data entropy to benchmark compressionpetef2002-08-116-0/+25 * Update to 5.3pat2002-08-083-3/+3 * Bump shared library version after pari-devel updatepat2002-08-081-1/+1 * Update to 2.2.3.apat2002-08-085-19/+19 * add tcl and tk dependenciesijliao2002-08-053-0/+12 * upgrade to 1.5.1ijliao2002-08-039-594/+1092 * Chase shlib rev of devel/gettextade2002-08-022-2/+2 * upgrade to 0.998aijliao2002-07-317-77/+83 * upgrade to 1.1.5ijliao2002-07-316-60/+65 * upgrade to 1.0.10ijliao2002-07-303-3/+3 * Update to 1.3.12, which has various minor enhancements and fixes.naddy2002-07-292-2/+2 * Update to 1.60.tobez2002-07-282-2/+2 * Update to 1.01.tobez2002-07-283-2/+7 * add tvmet 0.4.0ijliao2002-07-256-0/+55 * * Unbreak build of FORTRAN parts.naddy2002-07-245-75/+95 * shlib version bump for ports depending on math/gslpat2002-07-242-2/+2 * Update to 1.2pat2002-07-243-5/+7 * - Do not install .la filesijliao2002-07-218-22/+48 * Update to 1.0.9.sobomax2002-07-206-856/+850 * Remove obsolete MASTER_SITE.demon2002-07-181-2/+1 * Upgrade to version 3.2demon2002-07-183-17/+4 * upgrade to 2.10.1ijliao2002-07-175-363/+372 * upgrade to 2.5.0ijliao2002-07-165-641/+1454 * Changes in release 1.3.11:naddy2002-07-162-2/+2 * Use $PYNUMERIC in the dependencies.tg2002-07-154-15/+6 * fix on p4 architectureijliao2002-07-152-4/+12 * Update to 4.3 bugfix level 1.keith2002-07-133-3/+4 * Add new port gdcalc: Gnome-based scientific calculatorpat2002-07-137-0/+71 * Convert all core GNOME1 components and some of the most popular GNOME1sobomax2002-07-124-27/+15 * Upgrade to 2.4.tg2002-07-053-164/+205 * Update to 3.0.2 -- full log available in ports/x11/kde3/Makefile,v 1.51.will2002-07-052-2/+2 * Bump XForms lib. version.mikeh2002-07-042-2/+2 * Prepare for xforms update.mikeh2002-07-042-6/+11 * Add diehard 0.1, Marsaglia's Diehard Battery of Tests of Randomness.skv2002-07-046-0/+56 * Prepare for xforms update.mikeh2002-07-023-66/+58 * upgrade to 1.80ijliao2002-06-302-2/+2 * Silence a compile warning, main() should not be declared type void.truckman2002-06-291-0/+10 * The format patch included in PR ports/32017 is breaks formats such astruckman2002-06-292-4/+22 * Add py-numarray 0.3.4,perky2002-06-276-0/+169 * add p5-Math-Calc-Units 1.02ijliao2002-06-266-0/+59 * add p5-Math-BaseCalc 1.011ijliao2002-06-266-0/+37 * Updating my email address.perky2002-06-251-1/+1 * bump libgmp4 libversionijliao2002-06-253-3/+3 * upgrade to 4.1ijliao2002-06-256-8/+8 * Replace ${PERL} with ${REINPLACE_CMD}ijliao2002-06-232-4/+7 * add lapack++ 1.1ijliao2002-06-2314-0/+318 * Replace ${PERL} with ${REINPLACE_CMD}ijliao2002-06-2312-17/+29 * Update to 3.4.1. (Use patch posted to ports-jp@ list)yoichi2002-06-228-33/+6012 * Update to 1.0.8.sobomax2002-06-216-694/+712 * Correct typo.naddy2002-06-211-1/+1 * . Update to 0.3.1.glewis2002-06-213-2/+40 * Update to 1.3.10.naddy2002-06-202-2/+2 * add USE_REINPLACE= yesijliao2002-06-201-0/+1 * replace ${PERL} with ${REINPLACE_CMD}ijliao2002-06-201-4/+4 * Chase guile shared lib number.marcus2002-06-202-2/+2 * Add USE_REINPLACE where appropriate.sobomax2002-06-191-0/+1 * I found a very small typo. (%D/octave.info instead of %D/info/octave.info)mita2002-06-182-4/+4 * upgrade to 2.04ijliao2002-06-174-29/+27 * Upgrade to KDE 3.0.1. The delay in this upgrade is mainly due to thewill2002-06-163-10/+80 * Install library properly without stripping the symbolspat2002-06-151-1/+1 * Upgrade to 21.0.tg2002-06-143-90/+89 * This isn't a GNOME port per se. Don't use the GNOME datadir.marcus2002-06-142-4/+2 * upgrade to 1.0.9ijliao2002-06-133-3/+3 * Add gcalctool, a GTK+-2.0 calculator based on calctool for OpenWindows.marcus2002-06-127-0/+62 * o Update to 5.1.8lkoeller2002-06-122-3/+3 * Category move: math/spin to develsada2002-06-128-234/+0 * Add math/ruby-netcdf 0.3.5, a Ruby interface to the NetCDF scientific IOknu2002-06-126-0/+67 * Update to 0.5.6p2.knu2002-06-122-2/+2 * Update to 0.3.knu2002-06-113-5/+11 * Update to 1.3.9. Notable changes in this release:naddy2002-06-113-26/+2 * Unbreak: fix compilation.petef2002-06-102-2/+13 * Put back python support (requires up to date libtool).sobomax2002-06-092-2/+42 * - update to 3.4.16petef2002-06-084-13/+22 * Update to 1.0.7.sobomax2002-06-0814-1074/+970 * Upstream fix for decimal point stack push in RPN mode.naddy2002-06-052-0/+24 * add eukleides 0.9.0ijliao2002-06-057-0/+63 * Update to 1.3.8. Notable changes:naddy2002-06-042-2/+2 * enable c++ supportijliao2002-06-034-12/+16 * Updated to 1.00skv2002-06-024-7/+11 * Updated to 0.65skv2002-06-023-5/+10 * USE_LINUX rather than explicitly listing the dependency.obrien2002-05-302-5/+3 * Add p5-Math-LinearCombination 0.03,skv2002-05-276-0/+46 * Add p5-Math-SimpleVariable 0.03,skv2002-05-276-0/+44 * add missing .pyo files into plistijliao2002-05-261-0/+22 * Add back xgfe, which was prematurely removed by willkris2002-05-249-0/+148 * upgrade to 1.6.2ijliao2002-05-242-2/+2 * upgrade to 1.0.52ijliao2002-05-245-11/+54 * Cleanup: remove unneeded BUILD_DEPENDS line.tg2002-05-231-2/+0 * Cleanup: remove unneeded patch; remove unused variable.tg2002-05-232-10/+0 * Fix PLIST.sobomax2002-05-224-7/+34 * Don't build klaptopdaemon on alpha.gallatin2002-05-212-23/+34 * upgrade to 0.994ijliao2002-05-2110-307/+477 * BROKEN: Does not buildkris2002-05-182-0/+4 * BROKEN: Does not package correctlykris2002-05-181-0/+2 * Upgrade to version 3.4.14 .sada2002-05-183-10/+9 * BROKEN: does not buildkris2002-05-171-0/+2 * Update to 0.4.sobomax2002-05-178-74/+98 * Add djbfft since we can't package it due to author's license on patchinglioux2002-05-161-0/+2 * New port djbfft version 0.76: An extremely fast library forlioux2002-05-166-0/+79 * change WWWijliao2002-05-151-1/+1 * misc/graphthing -> math/graphthingijliao2002-05-152-1/+2 * Remove pygist. This port has been broken since the upgrade of lang/yoricktg2002-05-1510-248/+0 * WWW movedijliao2002-05-131-1/+1 * Change WWW to www.gap-system.org, easier to remember.keith2002-05-131-1/+1 * Update to 1.2.0.knu2002-05-133-3/+3 * Add GAP 4.3, a free system for computational discrete algebra.keith2002-05-136-0/+7756 * upgrade to 0.2.0ijliao2002-05-112-3/+3 * tarball change :ijliao2002-05-102-2/+2 * Update to 1.6.1dwcjr2002-05-083-2/+14 * Upgrade to version 3.0.7demon2002-05-064-19/+4 * Update to xgobi 2002.04.12kris2002-05-052-2/+2 * upgrade to 0.7ijliao2002-05-037-4/+137 * use USE_PYDISTUTILSijliao2002-04-30