diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-04-28 05:01:29 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-04-28 05:06:24 +0800 |
commit | c314a914595dc3741ee7dab401fbef7b63fb193b (patch) | |
tree | 110535ef059a4513ec9faabf375d5d4d0d7371a1 /plugins/itip-formatter/itip-view.c | |
parent | 7981771ea6a6ab2729010fc814d427e25f792b31 (diff) | |
download | gsoc2013-evolution-c314a914595dc3741ee7dab401fbef7b63fb193b.tar gsoc2013-evolution-c314a914595dc3741ee7dab401fbef7b63fb193b.tar.gz gsoc2013-evolution-c314a914595dc3741ee7dab401fbef7b63fb193b.tar.bz2 gsoc2013-evolution-c314a914595dc3741ee7dab401fbef7b63fb193b.tar.lz gsoc2013-evolution-c314a914595dc3741ee7dab401fbef7b63fb193b.tar.xz gsoc2013-evolution-c314a914595dc3741ee7dab401fbef7b63fb193b.tar.zst gsoc2013-evolution-c314a914595dc3741ee7dab401fbef7b63fb193b.zip |
ItipView: Cleanups.
Diffstat (limited to 'plugins/itip-formatter/itip-view.c')
-rw-r--r-- | plugins/itip-formatter/itip-view.c | 152 |
1 files changed, 41 insertions, 111 deletions
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c index 09b34a01af..32fbf52e38 100644 --- a/plugins/itip-formatter/itip-view.c +++ b/plugins/itip-formatter/itip-view.c @@ -740,110 +740,39 @@ itip_view_finalize (GObject *object) d(printf("Itip view finalized!\n")); - if (priv->sender) { - g_free (priv->sender); - priv->sender = NULL; - } - - if (priv->organizer) { - g_free (priv->organizer); - priv->organizer = NULL; - } - - if (priv->organizer_sentby) { - g_free (priv->organizer_sentby); - priv->organizer_sentby = NULL; - } - - if (priv->delegator) { - g_free (priv->delegator); - priv->delegator = NULL; - } - - if (priv->attendee) { - g_free (priv->attendee); - priv->attendee = NULL; - } - - if (priv->attendee_sentby) { - g_free (priv->attendee_sentby); - priv->attendee_sentby = NULL; - } - - if (priv->proxy) { - g_free (priv->proxy); - priv->proxy = NULL; - } - - if (priv->summary) { - g_free (priv->summary); - priv->summary = NULL; - } - - if (priv->location) { - g_free (priv->location); - priv->location = NULL; - } - - if (priv->status) { - g_free (priv->status); - priv->status = NULL; - } - - if (priv->comment) { - g_free (priv->comment); - priv->comment = NULL; - } - - if (priv->start_tm) { - g_free (priv->start_tm); - priv->start_tm = NULL; - } - - if (priv->start_label) { - g_free (priv->start_label); - priv->start_label = NULL; - } - - if (priv->end_tm) { - g_free (priv->end_tm); - priv->end_tm = NULL; - } - - if (priv->end_label) { - g_free (priv->end_label); - priv->end_label = NULL; - } - - if (priv->description) { - g_free (priv->description); - priv->description = NULL; - } + g_free (priv->sender); + g_free (priv->organizer); + g_free (priv->organizer_sentby); + g_free (priv->delegator); + g_free (priv->attendee); + g_free (priv->attendee_sentby); + g_free (priv->proxy); + g_free (priv->summary); + g_free (priv->location); + g_free (priv->status); + g_free (priv->comment); + g_free (priv->start_tm); + g_free (priv->start_label); + g_free (priv->end_tm); + g_free (priv->end_label); + g_free (priv->description); + g_free (priv->error); for (iter = priv->lower_info_items; iter; iter = iter->next) { ItipViewInfoItem *item = iter->data; g_free (item->message); g_free (item); } - if (priv->lower_info_items) { - g_slist_free (priv->lower_info_items); - priv->lower_info_items = NULL; - } + + g_slist_free (priv->lower_info_items); for (iter = priv->upper_info_items; iter; iter = iter->next) { ItipViewInfoItem *item = iter->data; g_free (item->message); g_free (item); } - if (priv->upper_info_items) { - g_slist_free (priv->upper_info_items); - priv->upper_info_items = NULL; - } - if (priv->error) { - g_free (priv->error); - priv->error = NULL; - } + g_slist_free (priv->upper_info_items); /* Chain up to parent's finalize() method. */ G_OBJECT_CLASS (itip_view_parent_class)->finalize (object); @@ -859,23 +788,25 @@ itip_view_class_init (ItipViewClass *class) object_class = G_OBJECT_CLASS (class); object_class->finalize = itip_view_finalize; - signals[SOURCE_SELECTED] = - g_signal_new ("source_selected", - G_TYPE_FROM_CLASS (class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (ItipViewClass, source_selected), - NULL, NULL, - g_cclosure_marshal_VOID__POINTER, - G_TYPE_NONE, 1, G_TYPE_POINTER); - - signals[RESPONSE] = - g_signal_new ("response", - G_TYPE_FROM_CLASS (class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (ItipViewClass, response), - NULL, NULL, - g_cclosure_marshal_VOID__INT, - G_TYPE_NONE, 1, G_TYPE_INT); + signals[SOURCE_SELECTED] = g_signal_new ( + "source_selected", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ItipViewClass, source_selected), + NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, + E_TYPE_SOURCE); + + signals[RESPONSE] = g_signal_new ( + "response", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ItipViewClass, response), + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); } static void @@ -948,9 +879,9 @@ source_changed_cb (WebKitDOMElement *select, g_signal_emit (view, signals[SOURCE_SELECTED], 0, source); } -static gchar* +static gchar * parse_html_mnemonics (const gchar *label, - gchar **access_key) + gchar **access_key) { const gchar *pos = NULL; gchar ak = 0; @@ -988,7 +919,6 @@ parse_html_mnemonics (const gchar *label, return g_string_free (html_label, FALSE); } - static void append_checkbox_table_row (GString *buffer, const gchar *name, |