Commit b1ed35f7 authored by Matthew Barnes's avatar Matthew Barnes
Browse files

Coding style and whitespace cleanup.

parent 54442be4
......@@ -1342,9 +1342,9 @@ static void
process_free_busy_comp_get_xfb (icalproperty *ip,
gchar **summary,
gchar **location)
{
{
const gchar *tmp = NULL;
g_return_if_fail (ip != NULL);
g_return_if_fail (summary != NULL && *summary == NULL);
g_return_if_fail (location != NULL && *location == NULL);
......@@ -1354,13 +1354,15 @@ process_free_busy_comp_get_xfb (icalproperty *ip,
* it will be displayed as a tooltip for the busy period. Otherwise,
* nothing will happen (*summary and/or *location will be NULL)
*/
tmp = icalproperty_get_parameter_as_string (ip, E_MEETING_FREE_BUSY_XPROP_SUMMARY);
*summary = e_meeting_xfb_utf8_string_new_from_ical (tmp,
E_MEETING_FREE_BUSY_XPROP_MAXLEN);
tmp = icalproperty_get_parameter_as_string (ip, E_MEETING_FREE_BUSY_XPROP_LOCATION);
*location = e_meeting_xfb_utf8_string_new_from_ical (tmp,
E_MEETING_FREE_BUSY_XPROP_MAXLEN);
tmp = icalproperty_get_parameter_as_string (
ip, E_MEETING_FREE_BUSY_XPROP_SUMMARY);
*summary = e_meeting_xfb_utf8_string_new_from_ical (
tmp, E_MEETING_FREE_BUSY_XPROP_MAXLEN);
tmp = icalproperty_get_parameter_as_string (
ip, E_MEETING_FREE_BUSY_XPROP_LOCATION);
*location = e_meeting_xfb_utf8_string_new_from_ical (
tmp, E_MEETING_FREE_BUSY_XPROP_MAXLEN);
}
static void
......@@ -1458,22 +1460,23 @@ process_free_busy_comp (EMeetingAttendee *attendee,
* for a reference.
*/
process_free_busy_comp_get_xfb (ip, &summary, &location);
e_meeting_attendee_add_busy_period (attendee,
fb.start.year,
fb.start.month,
fb.start.day,
fb.start.hour,
fb.start.minute,
fb.end.year,
fb.end.month,
fb.end.day,
fb.end.hour,
fb.end.minute,
busy_type,
summary,
location);
e_meeting_attendee_add_busy_period (
attendee,
fb.start.year,
fb.start.month,
fb.start.day,
fb.start.hour,
fb.start.minute,
fb.end.year,
fb.end.month,
fb.end.day,
fb.end.hour,
fb.end.minute,
busy_type,
summary,
location);
if (summary != NULL)
g_free (summary);
if (location != NULL)
......
......@@ -523,13 +523,12 @@ e_meeting_time_selector_construct (EMeetingTimeSelector *mts,
G_CALLBACK (e_meeting_time_selector_on_canvas_scroll_event), mts);
/* used for displaying extended free/busy (XFB) display when hovering
* over a busy period which carries XFB information */
g_signal_connect (mts->display_main,
"query-tooltip",
G_CALLBACK (e_meeting_time_selector_on_canvas_query_tooltip),
mts);
g_object_set (G_OBJECT (mts->display_main),
"has-tooltip", TRUE,
NULL);
g_signal_connect (
mts->display_main, "query-tooltip",
G_CALLBACK (e_meeting_time_selector_on_canvas_query_tooltip),
mts);
g_object_set (
G_OBJECT (mts->display_main), "has-tooltip", TRUE, NULL);
scrollable = GTK_SCROLLABLE (mts->display_main);
......@@ -2698,19 +2697,19 @@ e_meeting_time_selector_on_canvas_query_tooltip (GtkWidget *widget,
gint first_idx = 0;
gint ii = 0;
gchar *tt_text = NULL;
g_return_val_if_fail (GNOME_IS_CANVAS (widget), FALSE);
g_return_val_if_fail (GTK_IS_TOOLTIP (tooltip), FALSE);
g_return_val_if_fail (E_IS_MEETING_TIME_SELECTOR (user_data), FALSE);
mts = E_MEETING_TIME_SELECTOR (user_data);
scrollable = GTK_SCROLLABLE (widget);
adjustment = gtk_scrollable_get_hadjustment (scrollable);
scroll_x = (gint) gtk_adjustment_get_value (adjustment);
adjustment = gtk_scrollable_get_vadjustment (scrollable);
scroll_y = (gint) gtk_adjustment_get_value (adjustment);
/* calculate the attendee index (row) we're at */
row = (scroll_y + y) / mts->row_height;
......@@ -2730,8 +2729,8 @@ e_meeting_time_selector_on_canvas_query_tooltip (GtkWidget *widget,
g_return_val_if_fail (periods->len > 0, FALSE);
/* no tooltip if no busy period reaches into the current canvas area */
first_idx = e_meeting_attendee_find_first_busy_period (attendee,
&(mts->first_date_shown));
first_idx = e_meeting_attendee_find_first_busy_period (
attendee, &(mts->first_date_shown));
if (first_idx < 0)
return FALSE;
......@@ -2746,16 +2745,15 @@ e_meeting_time_selector_on_canvas_query_tooltip (GtkWidget *widget,
EMeetingFreeBusyPeriod *p = NULL;
gint sx = 0;
gint ex = 0;
p = &(g_array_index (periods,
EMeetingFreeBusyPeriod,
ii));
p = &(g_array_index (
periods, EMeetingFreeBusyPeriod, ii));
/* meeting start time x position */
sx = e_meeting_time_selector_calculate_time_position (mts,
&(p->start));
sx = e_meeting_time_selector_calculate_time_position (
mts, &(p->start));
/* meeting end time x position */
ex = e_meeting_time_selector_calculate_time_position (mts,
&(p->end));
ex = e_meeting_time_selector_calculate_time_position (
mts, &(p->end));
if ((mouse_x >= sx) && (mouse_x <= ex)) {
/* found busy period the mouse tip is over */
period = p;
......@@ -2794,7 +2792,7 @@ e_meeting_time_selector_on_canvas_query_tooltip (GtkWidget *widget,
/* set XFB information as tooltip text */
gtk_tooltip_set_text (tooltip, tt_text);
g_free (tt_text);
return TRUE;
}
......
......@@ -105,7 +105,7 @@ e_meeting_xfb_data_clear (EMeetingXfbData *xfb)
* length of the resulting string, since it gets displayed as a
* tooltip text in the meeting time selector.
*/
gchar*
gchar *
e_meeting_xfb_utf8_string_new_from_ical (const gchar *icalstring,
gsize max_len)
{
......@@ -132,11 +132,8 @@ e_meeting_xfb_utf8_string_new_from_ical (const gchar *icalstring,
/* no valid UTF-8, trying to convert to it
* according to system locale
*/
tmp = g_locale_to_utf8 (icalstring,
-1,
&in_len,
&out_len,
&tmp_err);
tmp = g_locale_to_utf8 (
icalstring, -1, &in_len, &out_len, &tmp_err);
if (tmp_err == NULL)
goto valid;
......@@ -148,8 +145,8 @@ e_meeting_xfb_utf8_string_new_from_ical (const gchar *icalstring,
/* still no success, forcing it into UTF-8, using
* replacement chars to replace invalid ones
*/
tmp = e_util_utf8_data_make_valid (icalstring,
strlen (icalstring));
tmp = e_util_utf8_data_make_valid (
icalstring, strlen (icalstring));
valid:
if (tmp == NULL)
tmp = g_strdup (icalstring);
......
......@@ -2020,7 +2020,7 @@ e_attachment_load_handle_error (EAttachment *attachment,
gboolean
e_attachment_load (EAttachment *attachment,
GError **error)
GError **error)
{
EAsyncClosure *closure;
GAsyncResult *result;
......@@ -2321,8 +2321,8 @@ e_attachment_open_handle_error (EAttachment *attachment,
gboolean
e_attachment_open (EAttachment *attachment,
GAppInfo *app_info,
GError **error)
GAppInfo *app_info,
GError **error)
{
EAsyncClosure *closure;
GAsyncResult *result;
......@@ -2858,9 +2858,9 @@ e_attachment_save_handle_error (EAttachment *attachment,
gboolean
e_attachment_save (EAttachment *attachment,
GFile *in_destination,
GFile **out_destination,
GError **error)
GFile *in_destination,
GFile **out_destination,
GError **error)
{
EAsyncClosure *closure;
GAsyncResult *result;
......
......@@ -239,7 +239,8 @@ e_categories_editor_init (ECategoriesEditor *editor)
gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
g_object_set (G_OBJECT (scrolledwindow1),
g_object_set (
G_OBJECT (scrolledwindow1),
"hexpand", TRUE,
"halign", GTK_ALIGN_FILL,
"vexpand", TRUE,
......@@ -263,7 +264,8 @@ e_categories_editor_init (ECategoriesEditor *editor)
G_CALLBACK (category_checked_cb), editor);
hbuttonbox1 = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
g_object_set (G_OBJECT (hbuttonbox1),
g_object_set (
G_OBJECT (hbuttonbox1),
"hexpand", TRUE,
"halign", GTK_ALIGN_FILL,
NULL);
......
......@@ -268,7 +268,8 @@ name_selector_dialog_constructed (GObject *object)
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_name_selector_dialog_parent_class)->constructed (object);
name_selector_grid = g_object_new (GTK_TYPE_GRID,
name_selector_grid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_VERTICAL,
"column-homogeneous", FALSE,
"row-spacing", 6,
......@@ -284,7 +285,8 @@ name_selector_dialog_constructed (GObject *object)
gtk_misc_set_alignment (GTK_MISC (show_contacts_label), 0, 0.5);
g_free (tmp_str);
hgrid = g_object_new (GTK_TYPE_GRID,
hgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_HORIZONTAL,
"row-homogeneous", FALSE,
"column-spacing", 12,
......@@ -299,7 +301,8 @@ name_selector_dialog_constructed (GObject *object)
show_contacts_grid = gtk_grid_new ();
gtk_widget_show (show_contacts_grid);
gtk_container_add (GTK_CONTAINER (hgrid), show_contacts_grid);
g_object_set (G_OBJECT (show_contacts_grid),
g_object_set (
G_OBJECT (show_contacts_grid),
"column-spacing", 12,
"row-spacing", 6,
"hexpand", TRUE,
......@@ -320,7 +323,8 @@ name_selector_dialog_constructed (GObject *object)
gtk_label_set_justify (GTK_LABEL (label_category), GTK_JUSTIFY_CENTER);
gtk_misc_set_alignment (GTK_MISC (label_category), 0, 0.5);
hgrid = g_object_new (GTK_TYPE_GRID,
hgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_HORIZONTAL,
"row-homogeneous", FALSE,
"column-spacing", 12,
......@@ -342,7 +346,8 @@ name_selector_dialog_constructed (GObject *object)
gtk_widget_set_halign (label_search, GTK_ALIGN_FILL);
gtk_misc_set_alignment (GTK_MISC (label_search), 0, 0.5);
source_menu_hgrid = g_object_new (GTK_TYPE_GRID,
source_menu_hgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_HORIZONTAL,
"row-homogeneous", FALSE,
"column-spacing", 0,
......@@ -354,7 +359,8 @@ name_selector_dialog_constructed (GObject *object)
combobox_category = gtk_combo_box_text_new ();
gtk_widget_show (combobox_category);
g_object_set (G_OBJECT (combobox_category),
g_object_set (
G_OBJECT (combobox_category),
"halign", GTK_ALIGN_FILL,
"valign", GTK_ALIGN_FILL,
NULL);
......@@ -380,7 +386,8 @@ name_selector_dialog_constructed (GObject *object)
GTK_SCROLLED_WINDOW (scrolledwindow0),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
hgrid = g_object_new (GTK_TYPE_GRID,
hgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_HORIZONTAL,
"row-homogeneous", FALSE,
"column-spacing", 12,
......@@ -412,7 +419,8 @@ name_selector_dialog_constructed (GObject *object)
gtk_tree_view_set_enable_search (
GTK_TREE_VIEW (source_tree_view), FALSE);
destination_vgrid = g_object_new (GTK_TYPE_GRID,
destination_vgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_VERTICAL,
"column-homogeneous", TRUE,
"row-spacing", 6,
......@@ -851,7 +859,8 @@ setup_section_button (ENameSelectorDialog *name_selector_dialog,
alignment = gtk_alignment_new (halign, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (alignment));
hgrid = g_object_new (GTK_TYPE_GRID,
hgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_HORIZONTAL,
"row-homogeneous", FALSE,
"column-spacing", 2,
......@@ -899,7 +908,8 @@ add_section (ENameSelectorDialog *name_selector_dialog,
memset (&section, 0, sizeof (Section));
section.name = g_strdup (name);
section.section_grid = g_object_new (GTK_TYPE_GRID,
section.section_grid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_HORIZONTAL,
"row-homogeneous", FALSE,
"column-spacing", 12,
......@@ -942,7 +952,8 @@ add_section (ENameSelectorDialog *name_selector_dialog,
alignment = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (section.section_grid), alignment);
vgrid = g_object_new (GTK_TYPE_GRID,
vgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_VERTICAL,
"column-homogeneous", TRUE,
"row-spacing", 6,
......@@ -964,7 +975,8 @@ add_section (ENameSelectorDialog *name_selector_dialog,
* spacing.
*/
hgrid = g_object_new (GTK_TYPE_GRID,
hgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_HORIZONTAL,
"row-homogeneous", FALSE,
"column-spacing", 6,
......@@ -1016,7 +1028,8 @@ add_section (ENameSelectorDialog *name_selector_dialog,
/* Pack this section's box into the dialog */
gtk_container_add (GTK_CONTAINER (name_selector_dialog->priv->destination_vgrid), GTK_WIDGET (section.section_grid));
g_object_set (G_OBJECT (section.section_grid),
g_object_set (
G_OBJECT (section.section_grid),
"vexpand", TRUE,
"valign", GTK_ALIGN_FILL,
NULL);
......
......@@ -93,7 +93,7 @@ static gboolean
popup_grab_on_window (GdkWindow *window,
GdkDevice *keyboard,
GdkDevice *pointer,
guint32 activate_time)
guint32 activate_time)
{
if (keyboard && gdk_device_grab (keyboard, window,
GDK_OWNERSHIP_WINDOW, TRUE,
......@@ -117,7 +117,7 @@ popup_grab_on_window (GdkWindow *window,
static void
enl_popup_grab (ENameSelectorList *list,
const GdkEvent *event)
const GdkEvent *event)
{
EDestinationStore *store;
ENameSelectorEntry *entry;
......@@ -740,7 +740,8 @@ e_name_selector_list_init (ENameSelectorList *list)
gtk_container_add (GTK_CONTAINER (list->priv->popup), popup_frame);
vgrid = g_object_new (GTK_TYPE_GRID,
vgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_VERTICAL,
"column-homogeneous", FALSE,
"row-spacing", 0,
......
......@@ -500,7 +500,8 @@ ep_ask_password (EPassMsg *msg)
widget = gtk_image_new_from_icon_name (
"dialog-password", GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0);
g_object_set (G_OBJECT (widget),
g_object_set (
G_OBJECT (widget),
"halign", GTK_ALIGN_FILL,
"vexpand", TRUE,
"valign", GTK_ALIGN_FILL,
......@@ -514,7 +515,8 @@ ep_ask_password (EPassMsg *msg)
gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE);
gtk_label_set_markup (GTK_LABEL (widget), msg->prompt);
gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
g_object_set (G_OBJECT (widget),
g_object_set (
G_OBJECT (widget),
"hexpand", TRUE,
"halign", GTK_ALIGN_FILL,
NULL);
......@@ -530,7 +532,8 @@ ep_ask_password (EPassMsg *msg)
gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE);
gtk_widget_grab_focus (widget);
g_object_set (G_OBJECT (widget),
g_object_set (
G_OBJECT (widget),
"hexpand", TRUE,
"halign", GTK_ALIGN_FILL,
NULL);
......@@ -550,7 +553,8 @@ ep_ask_password (EPassMsg *msg)
/* Caps Lock Label */
widget = gtk_label_new (NULL);
g_object_set (G_OBJECT (widget),
g_object_set (
G_OBJECT (widget),
"hexpand", TRUE,
"halign", GTK_ALIGN_FILL,
NULL);
......@@ -586,7 +590,8 @@ ep_ask_password (EPassMsg *msg)
GTK_TOGGLE_BUTTON (widget), *msg->remember);
if (msg->flags & E_PASSWORDS_DISABLE_REMEMBER)
gtk_widget_set_sensitive (widget, FALSE);
g_object_set (G_OBJECT (widget),
g_object_set (
G_OBJECT (widget),
"hexpand", TRUE,
"halign", GTK_ALIGN_FILL,
"valign", GTK_ALIGN_FILL,
......
......@@ -214,7 +214,8 @@ source_selector_dialog_constructed (GObject *object)
container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
widget = g_object_new (GTK_TYPE_GRID,
widget = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_VERTICAL,
"column-homogeneous", FALSE,
"row-spacing", 12,
......@@ -233,7 +234,8 @@ source_selector_dialog_constructed (GObject *object)
gtk_widget_show (label);
g_free (label_text);
hgrid = g_object_new (GTK_TYPE_GRID,
hgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_HORIZONTAL,
"row-homogeneous", FALSE,
"column-spacing", 12,
......
......@@ -27,7 +27,7 @@
/* Standard GObject macros */
#define E_TYPE_SPELL_ENTRY \
(e_spell_entry_get_type())
(e_spell_entry_get_type ())
#define E_SPELL_ENTRY(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_SPELL_ENTRY, ESpellEntry))
......
......@@ -165,10 +165,10 @@ struct _ETableItem {
* During editing
*/
gint editing_col, editing_row;
void *edit_ctx;
gpointer edit_ctx;
gint save_col, save_row;
void *save_state;
gpointer save_state;
gint grabbed_col, grabbed_row;
gint grabbed_count;
......
......@@ -33,7 +33,8 @@ on_idle_create_widget (void)
window, "delete-event",
G_CALLBACK (gtk_main_quit), NULL);
vgrid = g_object_new (GTK_TYPE_GRID,
vgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_VERTICAL,
"column-homogeneous", FALSE,
"row-spacing", 3,
......
......@@ -72,7 +72,8 @@ start_test (const gchar *param)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
vgrid = g_object_new (GTK_TYPE_GRID,
vgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_VERTICAL,
"column-homogeneous", FALSE,
"row-spacing", 2,
......
......@@ -76,7 +76,8 @@ on_idle_create_widget (ESourceRegistry *registry)
window, "delete-event",
G_CALLBACK (gtk_main_quit), NULL);
vgrid = g_object_new (GTK_TYPE_GRID,
vgrid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_VERTICAL,
"column-homogeneous", FALSE,
"row-spacing", 6,
......
......@@ -124,7 +124,7 @@ mail_formatter_print_run (EMailFormatter *formatter,
head = g_queue_peek_head_link (&queue);
for (link = head; link != NULL ; link = g_list_next (link)) {
for (link = head; link != NULL; link = g_list_next (link)) {
EMailPart *part = link->data;
gboolean ok;
......
......@@ -432,7 +432,8 @@ emfe_secure_button_get_widget (EMailFormatterExtension *extension,
g_return_val_if_fail (part != NULL, NULL);
grid = g_object_new (GTK_TYPE_GRID,
grid = g_object_new (
GTK_TYPE_GRID,
"orientation", GTK_ORIENTATION_VERTICAL,
"row-spacing", 2,
"halign", GTK_ALIGN_FILL,
......
......@@ -76,7 +76,8 @@ empe_inlinepgp_encrypted_parse (EMailParserExtension *extension,
local_error->message);
g_error_free (local_error);
e_mail_parser_parse_part_as (parser,
e_mail_parser_parse_part_as (
parser,
part, part_id,
"application/vnd.evolution.source",
cancellable, out_mail_parts);
......
......@@ -178,7 +178,7 @@ e_mail_part_get_instance_size (EMailPart *part)
static EMailPartValidityPair *
mail_part_find_validity_pair (EMailPart *part,
guint32 validity_type)
guint32 validity_type)
{
GSList *lst;
......@@ -239,7 +239,7 @@ e_mail_part_update_validity (EMailPart *part,
*/
CamelCipherValidity *
e_mail_part_get_validity (EMailPart *part,
guint32 validity_type)
guint32 validity_type)
{
EMailPartValidityPair *pair;
......
......@@ -578,7 +578,7 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple,
if (did_connect) {
/* if the cancellable is cancelled, then the disconnect will not run,
thus reset it to ensure the service will be properly disconnected */
* thus reset it to ensure the service will be properly disconnected */
if (cancellable)
g_cancellable_reset (cancellable);
......
......@@ -169,8 +169,8 @@ user_message_exec (struct _user_message_msg *m,
static void
user_message_response_cb (GObject *source,
GAsyncResult *result,
gpointer user_data)
GAsyncResult *result,
gpointer user_data)
{
struct _user_message_msg *m = user_data;
GError *local_error = NULL;
......@@ -220,7 +220,8 @@ user_message_exec (struct _user_message_msg *m,
if (!m->prompter)
m->prompter = e_user_prompter_new ();
e_user_prompter_prompt (m->prompter, type, "",
e_user_prompter_prompt (
m->prompter, type, "",
m->prompt, NULL, FALSE, m->button_captions, cancellable,
user_message_response_cb, m);
} else
......@@ -1374,7 +1375,7 @@ mail_session_alert_user (CamelSession *session,
CamelSessionAlertType type,
const gchar *prompt,
GSList *button_captions,
GCancellable *cancellable)
GCancellable *cancellable)
{
struct _user_message_msg *m;
gint result = -1;
......@@ -1410,11 +1411,11 @@ mail_session_alert_user (CamelSession *session,
static CamelCertTrust
mail_session_trust_prompt (CamelSession *session,
const gchar *host,
const gchar *certificate,
guint32 certificate_errors,
const GSList *issuers,
GCancellable *cancellable)