diff options
author | Federico Mena Quintero <federico@ximian.com> | 2002-11-13 04:59:08 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2002-11-13 04:59:08 +0800 |
commit | 6c988be90916e1928b48b8ac7a8feceaed9f5c57 (patch) | |
tree | 90b7d99837726700e4c7af57b2edec502770a3ba /calendar/gui/alarm-notify | |
parent | aa55b24ba72f7674d547b3a1486d149603c1127d (diff) | |
download | gsoc2013-evolution-6c988be90916e1928b48b8ac7a8feceaed9f5c57.tar gsoc2013-evolution-6c988be90916e1928b48b8ac7a8feceaed9f5c57.tar.gz gsoc2013-evolution-6c988be90916e1928b48b8ac7a8feceaed9f5c57.tar.bz2 gsoc2013-evolution-6c988be90916e1928b48b8ac7a8feceaed9f5c57.tar.lz gsoc2013-evolution-6c988be90916e1928b48b8ac7a8feceaed9f5c57.tar.xz gsoc2013-evolution-6c988be90916e1928b48b8ac7a8feceaed9f5c57.tar.zst gsoc2013-evolution-6c988be90916e1928b48b8ac7a8feceaed9f5c57.zip |
#include <string.h>
2002-11-12 Federico Mena Quintero <federico@ximian.com>
* pcs/cal-backend-util.c: #include <string.h>
* pcs/cal.c: Fixed prototypes of the CORBA method implementations.
* pcs/cal-backend-file.c (cal_backend_file_dispose): Added a
dispose method.
(cal_backend_file_get_free_busy): Converted to use EConfigListener
rather than BonoboConfigDatabase.
* gui/alarm-notify/alarm-notify.c: #include <string.h>, fix use of
g_hash_table_lookup_extended().
* gui/alarm-notify/alarm-notify-dialog.c: Substitute deprecated
GTK+ functions for new ones.
* gui/alarm-notify/alarm-queue.c: Likewise.
* gui/alarm-notify/notify-main.c: #include <string.h>,
<gtk/gtkmain.h>.
* gui/alarm-notify/save.c: #include <string.h>.
svn path=/trunk/; revision=18726
Diffstat (limited to 'calendar/gui/alarm-notify')
-rw-r--r-- | calendar/gui/alarm-notify/alarm-notify-dialog.c | 50 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm-notify.c | 18 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm-queue.c | 22 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/notify-main.c | 4 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/save.c | 1 |
5 files changed, 54 insertions, 41 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c index 46d6eca39e..013e9620a5 100644 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.c +++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c @@ -70,7 +70,7 @@ dialog_destroy_cb (GtkObject *object, gpointer data) AlarmNotify *an; an = data; - gtk_object_unref (GTK_OBJECT (an->xml)); + g_object_unref (an->xml); g_free (an); } @@ -173,8 +173,7 @@ make_html_display (gchar *widget_name, char *s1, char *s2, int scroll, int shado { GtkWidget *html, *frame; - gtk_widget_push_visual(gdk_rgb_get_visual()); - gtk_widget_push_colormap(gdk_rgb_get_cmap()); + gtk_widget_push_colormap (gdk_rgb_get_colormap ()); html = gtk_html_new(); @@ -182,12 +181,11 @@ make_html_display (gchar *widget_name, char *s1, char *s2, int scroll, int shado "charset=utf-8"); gtk_html_load_empty (GTK_HTML (html)); - gtk_signal_connect (GTK_OBJECT (html), "url_requested", - GTK_SIGNAL_FUNC (url_requested_cb), - NULL); + g_signal_connect (html, "url_requested", + G_CALLBACK (url_requested_cb), + NULL); gtk_widget_pop_colormap(); - gtk_widget_pop_visual(); frame = e_scroll_frame_new(NULL, NULL); @@ -199,13 +197,13 @@ make_html_display (gchar *widget_name, char *s1, char *s2, int scroll, int shado e_scroll_frame_set_shadow_type (E_SCROLL_FRAME (frame), GTK_SHADOW_IN); - gtk_widget_set_usize (frame, 300, 200); + gtk_widget_set_size_request (frame, 300, 200); gtk_container_add(GTK_CONTAINER (frame), html); gtk_widget_show_all(frame); - gtk_object_set_user_data(GTK_OBJECT (frame), html); + g_object_set_data (G_OBJECT (frame), "html", html); return frame; } @@ -349,19 +347,19 @@ alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end, an->heading = glade_xml_get_widget (an->xml, "heading"); an->message = glade_xml_get_widget (an->xml, "message"); an->snooze_time = glade_xml_get_widget (an->xml, "snooze-time"); - an->html = gtk_object_get_user_data (GTK_OBJECT (glade_xml_get_widget (an->xml, "frame"))); + an->html = g_object_get_data (G_OBJECT (glade_xml_get_widget (an->xml, "frame")), "html"); if (!(an->dialog && an->close && an->snooze && an->edit && an->heading && an->message && an->snooze_time)) { g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!"); - gtk_object_unref (GTK_OBJECT (an->xml)); + g_object_unref (an->xml); g_free (an); return FALSE; } - gtk_object_set_data (GTK_OBJECT (an->dialog), "alarm-notify", an); - gtk_signal_connect (GTK_OBJECT (an->dialog), "destroy", - GTK_SIGNAL_FUNC (dialog_destroy_cb), an); + g_signal_connect (an->dialog, "destroy", + G_CALLBACK (dialog_destroy_cb), + an); /* Title */ @@ -381,21 +379,21 @@ alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end, /* Connect actions */ - gtk_signal_connect (GTK_OBJECT (an->dialog), "delete_event", - GTK_SIGNAL_FUNC (delete_event_cb), - an); + g_signal_connect (an->dialog, "delete_event", + G_CALLBACK (delete_event_cb), + an); - gtk_signal_connect (GTK_OBJECT (an->close), "clicked", - GTK_SIGNAL_FUNC (close_clicked_cb), - an); + g_signal_connect (an->close, "clicked", + G_CALLBACK (close_clicked_cb), + an); - gtk_signal_connect (GTK_OBJECT (an->snooze), "clicked", - GTK_SIGNAL_FUNC (snooze_clicked_cb), - an); + g_signal_connect (an->snooze, "clicked", + G_CALLBACK (snooze_clicked_cb), + an); - gtk_signal_connect (GTK_OBJECT (an->edit), "clicked", - GTK_SIGNAL_FUNC (edit_clicked_cb), - an); + g_signal_connect (an->edit, "clicked", + G_CALLBACK (edit_clicked_cb), + an); /* Run! */ diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index 8cba059431..290fbd2617 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -22,6 +22,7 @@ #include "config.h" #endif +#include <string.h> #include <cal-client/cal-client.h> #include "alarm-notify.h" #include "alarm-queue.h" @@ -293,6 +294,7 @@ AlarmNotify_removeCalendar (PortableServer_Servant servant, LoadedClient *lc; EUri *uri; char *orig_str; + gpointer lc_ptr, orig_str_ptr; gboolean found; an = ALARM_NOTIFY (bonobo_object_from_servant (servant)); @@ -309,8 +311,11 @@ AlarmNotify_removeCalendar (PortableServer_Servant servant, remove_uri_to_load (uri); found = g_hash_table_lookup_extended (priv->uri_client_hash, str_uri, - (gpointer *) &orig_str, - (gpointer *) &lc); + &orig_str_ptr, + &lc_ptr); + orig_str = orig_str_ptr; + lc = lc_ptr; + e_uri_free (uri); if (!lc) { @@ -413,7 +418,7 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a EUri *uri; CalClient *client; LoadedClient *lc; - char *s; + gpointer lc_ptr, s_ptr; g_return_if_fail (an != NULL); g_return_if_fail (IS_ALARM_NOTIFY (an)); @@ -430,7 +435,12 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a return; } - if (g_hash_table_lookup_extended (priv->uri_client_hash, str_uri, &s, &lc)) { + if (g_hash_table_lookup_extended (priv->uri_client_hash, str_uri, &s_ptr, &lc_ptr)) { + char *s; + + lc = lc_ptr; + s = s_ptr; + g_hash_table_remove (priv->uri_client_hash, str_uri); g_signal_handlers_disconnect_matched (G_OBJECT (lc->client), diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 9dbaec56d7..5a5875f321 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -941,7 +941,7 @@ alarm_queue_add_client (CalClient *client) ca = g_new (ClientAlarms, 1); ca->client = client; - gtk_object_ref (GTK_OBJECT (ca->client)); + g_object_ref (ca->client); ca->refcount = 1; g_hash_table_insert (client_alarms_hash, client, ca); @@ -949,13 +949,16 @@ alarm_queue_add_client (CalClient *client) ca->uid_alarms_hash = g_hash_table_new (g_str_hash, g_str_equal); if (cal_client_get_load_state (client) != CAL_CLIENT_LOAD_LOADED) - gtk_signal_connect (GTK_OBJECT (client), "cal_opened", - GTK_SIGNAL_FUNC (cal_opened_cb), ca); + g_signal_connect (client, "cal_opened", + G_CALLBACK (cal_opened_cb), + ca); - gtk_signal_connect (GTK_OBJECT (client), "obj_updated", - GTK_SIGNAL_FUNC (obj_updated_cb), ca); - gtk_signal_connect (GTK_OBJECT (client), "obj_removed", - GTK_SIGNAL_FUNC (obj_removed_cb), ca); + g_signal_connect (client, "obj_updated", + G_CALLBACK (obj_updated_cb), + ca); + g_signal_connect (client, "obj_removed", + G_CALLBACK (obj_removed_cb), + ca); if (cal_client_get_load_state (client) == CAL_CLIENT_LOAD_LOADED) { load_alarms_for_today (ca); @@ -1031,9 +1034,10 @@ alarm_queue_remove_client (CalClient *client) /* Clean up */ - gtk_signal_disconnect_by_data (GTK_OBJECT (ca->client), ca); + g_signal_handlers_disconnect_matched (ca->client, G_SIGNAL_MATCH_DATA, + 0, 0, NULL, NULL, ca); - gtk_object_unref (GTK_OBJECT (ca->client)); + g_object_unref (ca->client); ca->client = NULL; g_hash_table_destroy (ca->uid_alarms_hash); diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index b4eb59ce1c..77e5694fba 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -23,6 +23,7 @@ #include "config.h" #endif +#include <string.h> #include <glib.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-init.h> @@ -32,6 +33,7 @@ #include <bonobo/bonobo-main.h> #include <bonobo/bonobo-generic-factory.h> #include <bonobo-activation/bonobo-activation.h> +#include <gtk/gtkmain.h> #include "alarm.h" #include "alarm-queue.h" #include "alarm-notify.h" @@ -159,8 +161,6 @@ load_calendars (gpointer user_data) int main (int argc, char **argv) { - free (malloc (8)); - bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); textdomain (PACKAGE); diff --git a/calendar/gui/alarm-notify/save.c b/calendar/gui/alarm-notify/save.c index dc78686250..a3857cd16c 100644 --- a/calendar/gui/alarm-notify/save.c +++ b/calendar/gui/alarm-notify/save.c @@ -22,6 +22,7 @@ #include <config.h> #endif +#include <string.h> #include <bonobo/bonobo-arg.h> #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-moniker-util.h> |