Coding style and whitespace cleanup.

This commit is contained in:
Matthew Barnes
2009-12-26 00:26:18 -05:00
parent 5f83c587b2
commit bd31f49bac
38 changed files with 227 additions and 105 deletions

View File

@ -351,9 +351,8 @@ eab_editor_get_window (EABEditor *editor)
}
/* This function prompts for saving if editor conents are in changed state and
save or discards or cancels(just returns with out doing anything) according to user input.
Editor gets destoryed in case of save and discard case.
*/
save or discards or cancels(just returns with out doing anything) according
to user input. Editor gets destroyed in case of save and discard case. */
gboolean
eab_editor_prompt_to_save_changes (EABEditor *editor, GtkWindow *window)

View File

@ -101,7 +101,10 @@ struct _EContactListEditorPrivate {
GtkBuilder *builder;
GtkTreeModel *model;
ENameSelector *name_selector;
ENameSelectorEntry *email_entry; /* it's kept here, because the builder has an old widget, which was changed with this one */
/* This is kept here because the builder has an old widget
* which was changed with this one. */
ENameSelectorEntry *email_entry;
/* Whether we are editing a new contact or an existing one. */
guint is_new_list : 1;
@ -866,7 +869,7 @@ contact_list_editor_tree_view_key_press_event_cb (GtkWidget *widget,
return FALSE;
}
/*********************** GtkBuilder Custom Widgets Functions ***********************/
/******************** GtkBuilder Custom Widgets Functions ********************/
static gpointer
contact_editor_fudge_new (EBook *book,
@ -938,7 +941,9 @@ setup_custom_widgets (EContactListEditor *editor)
name_selector_entry = e_name_selector_peek_section_entry (
name_selector, "Members");
gtk_widget_set_name (GTK_WIDGET (name_selector_entry), gtk_widget_get_name (old));
gtk_widget_set_name (
GTK_WIDGET (name_selector_entry),
gtk_widget_get_name (old));
parent = gtk_widget_get_parent (old);
gtk_container_child_get (GTK_CONTAINER (parent), old,
@ -955,9 +960,12 @@ setup_custom_widgets (EContactListEditor *editor)
/* only hide it... */
gtk_widget_hide (old);
/* ... and place the new name selector to the exact place as is the old one in UI file */
/* ... and place the new name selector to the
* exact place as is the old one in UI file */
gtk_widget_show (GTK_WIDGET (name_selector_entry));
gtk_table_attach (GTK_TABLE (parent), GTK_WIDGET (name_selector_entry), la, ra, ta, ba, xo, yo, xp, yp);
gtk_table_attach (
GTK_TABLE (parent), GTK_WIDGET (name_selector_entry),
la, ra, ta, ba, xo, yo, xp, yp);
priv->email_entry = name_selector_entry;
e_name_selector_entry_set_contact_editor_func (

View File

@ -72,7 +72,9 @@ clear_comp_info (ECalComponentPreview *preview)
/* Stores information about actually shown component and
returns whether component in the preview changed */
static gboolean
update_comp_info (ECalComponentPreview *preview, ECal *ecal, ECalComponent *comp)
update_comp_info (ECalComponentPreview *preview,
ECal *ecal,
ECalComponent *comp)
{
ECalComponentPreviewPrivate *priv;
gboolean changed;

View File

@ -256,7 +256,9 @@ e_day_view_layout_day_event (EDayViewEvent *event,
for (row = start_row; row <= end_row; row++) {
/* resize the array if necessary */
if (e_bit_array_bit_count (grid [row]) <= free_col)
e_bit_array_insert (grid [row], e_bit_array_bit_count (grid [row]), free_col - e_bit_array_bit_count (grid [row]) + 1);
e_bit_array_insert (
grid [row], e_bit_array_bit_count (grid [row]),
free_col - e_bit_array_bit_count (grid [row]) + 1);
e_bit_array_change_one_row (grid [row], free_col, TRUE);
cols_per_row[row]++;

View File

@ -45,7 +45,8 @@ G_BEGIN_DECLS
of a normal event. */
#define E_DAY_VIEW_LONG_EVENT E_DAY_VIEW_MAX_DAYS
/* The maximum number of columns of appointments within a day in multi-day view. */
/* The maximum number of columns of appointments within a day in multi-day
view. */
#define E_DAY_VIEW_MULTI_DAY_MAX_COLUMNS 6
/* minimum width of the event in one-day view in pixels */
@ -533,7 +534,8 @@ gint e_day_view_get_work_day_end_minute (EDayView *day_view);
void e_day_view_set_work_day_end_minute (EDayView *day_view,
gint work_day_end_minute);
/* Whether we display the Marcus Bains Line in the main canvas and time canvas. */
/* Whether we display the Marcus Bains Line in the main canvas and time
canvas. */
void e_day_view_marcus_bains_update (EDayView *day_view);
gboolean e_day_view_marcus_bains_get_show_line(EDayView *day_view);
void e_day_view_marcus_bains_set_show_line(EDayView *day_view,

View File

@ -1339,7 +1339,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
/* Right align - 10 comes from print_day_long_event too */
x = right - gdk_pixbuf_get_width (pixbuf) * 0.5 - 10;
/* Placing '...' over the last all day event entry printed. '-1 -1' comes
/* Placing '...' over the last all day event entry printed. '-1 -1' comes
from print_long_day_event (top/bottom spacing in each cell) */
y = top + LONG_DAY_EVENTS_TOP_SPACING + DAY_VIEW_ROW_HEIGHT * (i - 1) + (DAY_VIEW_ROW_HEIGHT - 1 - 1) * 0.5;
@ -1358,7 +1358,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
cairo_set_source_rgb (cr, 0, 0, 0);
print_border (context, left, right,
top,
top,
top + rows_in_top_display * DAY_VIEW_ROW_HEIGHT + LONG_DAY_EVENTS_TOP_SPACING + LONG_DAY_EVENTS_BOTTOM_SPACING,
1.0, -1.0);

View File

@ -512,23 +512,34 @@ composer_header_table_constructor (GType type,
0, 1, ii, ii + 1, GTK_FILL, GTK_FILL, 0, 3);
if (composer_lite && ii == E_COMPOSER_HEADER_TO) {
GtkWidget *box = gtk_hbox_new (FALSE, 0);
g_object_set_data ((GObject *)priv->headers[ii]->input_widget, "parent", object);
gtk_box_pack_start ((GtkBox *)box, priv->headers[ii]->input_widget, TRUE, TRUE, 3);
gtk_box_pack_start ((GtkBox *)box, (GtkWidget *)priv->actions_container, FALSE, FALSE, 0);
g_object_set_data (
G_OBJECT (priv->headers[ii]->input_widget),
"parent", object);
gtk_box_pack_start (
GTK_BOX (box), priv->headers[ii]->input_widget,
TRUE, TRUE, 3);
gtk_box_pack_start (
GTK_BOX (box),
GTK_WIDGET (priv->actions_container),
FALSE, FALSE, 0);
gtk_widget_show (box);
gtk_table_attach (
GTK_TABLE (object), box,
1, 4, ii, ii + 1, GTK_FILL | GTK_EXPAND, 0, 0, 3);
GTK_TABLE (object), box, 1, 4, ii, ii + 1,
GTK_FILL | GTK_EXPAND, 0, 0, 3);
} else {
gtk_table_attach (
GTK_TABLE (object), priv->headers[ii]->input_widget,
1, 4, ii, ii + 1, GTK_FILL | GTK_EXPAND, 0, 0, 3);
GTK_TABLE (object),
priv->headers[ii]->input_widget, 1, 4,
ii, ii + 1, GTK_FILL | GTK_EXPAND, 0, 0, 3);
}
if (composer_lite && priv->headers[ii]->action_widget) {
/* Pack the widgets to the end. Helps formatting when hiding the From field */
gtk_box_pack_end ((GtkBox *)priv->actions_container, priv->headers[ii]->action_widget,
FALSE, FALSE, 6);
/* Pack the widgets to the end. Helps formatting
* when hiding the From field. */
gtk_box_pack_end (
GTK_BOX (priv->actions_container),
priv->headers[ii]->action_widget,
FALSE, FALSE, 6);
}
}

View File

@ -27,7 +27,8 @@
#include <sys/stat.h>
#include <unistd.h>
/* This isn't as portable as, say, the stuff in GNU coreutils. But I care not for OSF1. */
/* This isn't as portable as, say, the stuff in GNU coreutils.
* But I care not for OSF1. */
#ifdef HAVE_STATVFS
# ifdef HAVE_SYS_STATVFS_H
# include <sys/statvfs.h>

View File

@ -365,8 +365,9 @@ e_import_target_new_uri (EImport *import,
const gchar *uri_src,
const gchar *uri_dst)
{
EImportTargetURI *t = e_import_target_new (import, E_IMPORT_TARGET_URI, sizeof (*t));
EImportTargetURI *t;
t = e_import_target_new (import, E_IMPORT_TARGET_URI, sizeof (*t));
t->uri_src = g_strdup (uri_src);
t->uri_dest = g_strdup (uri_dst);
@ -542,8 +543,11 @@ emph_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
ihook = emph_construct_importer (eph, node);
if (ihook) {
e_import_class_add_importer (class, &ihook->importer, eih_free_importer, eph);
emph->importers = g_slist_append (emph->importers, ihook);
e_import_class_add_importer (
class, &ihook->importer,
eih_free_importer, eph);
emph->importers = g_slist_append (
emph->importers, ihook);
}
}
node = node->next;

View File

@ -542,9 +542,13 @@ e_signature_to_xml (ESignature *signature)
string = e_signature_get_filename (signature);
if (string != NULL) {
node = xmlNewTextChild (root, NULL, (xmlChar *) "filename", (xmlChar *) string);
node = xmlNewTextChild (
root, NULL, (xmlChar *) "filename",
(xmlChar *) string);
if (e_signature_get_is_script (signature))
xmlSetProp (node, (xmlChar *) "script", (xmlChar *) "true");
xmlSetProp (
node, (xmlChar *) "script",
(xmlChar *) "true");
}
} else {
/* this is to make Evolution-1.4 and older 1.5 versions happy */

View File

@ -84,7 +84,10 @@ filter_input_validate (EFilterElement *element,
pattern = input->values->data;
if ((regerr = regcomp (&regexpat, pattern, REG_EXTENDED | REG_NEWLINE | REG_ICASE))) {
regerr = regcomp (
&regexpat, pattern,
REG_EXTENDED | REG_NEWLINE | REG_ICASE);
if (regerr != 0) {
if (alert) {
gsize reglen;
gchar *regmsg;

View File

@ -190,7 +190,8 @@ e_filter_part_xml_create (EFilterPart *part,
} else {
g_warning ("Invalid xml format, missing/unknown input type");
}
} else if (!strcmp ((gchar *)n->name, "title") || !strcmp ((gchar *)n->name, "_title")) {
} else if (!strcmp ((gchar *)n->name, "title") ||
!strcmp ((gchar *)n->name, "_title")) {
if (!part->title) {
str = (gchar *)xmlNodeGetContent (n);
part->title = g_strdup (str);

View File

@ -381,6 +381,7 @@ mail_backend_constructed (GObject *object)
EShellBackend *shell_backend;
MailFolderCache *folder_cache;
const gchar *data_dir;
gboolean online;
shell_backend = E_SHELL_BACKEND (object);
shell = e_shell_backend_get_shell (shell_backend);
@ -388,7 +389,8 @@ mail_backend_constructed (GObject *object)
/* This also initializes Camel, so it needs to happen early. */
mail_session_init ();
camel_session_set_online ((CamelSession *) session, e_shell_get_online (shell));
online = e_shell_get_online (shell);
camel_session_set_online (CAMEL_SESSION (session), online);
e_account_combo_box_set_session (session); /* XXX Don't ask... */
folder_cache = mail_folder_cache_get_default ();

View File

@ -808,15 +808,22 @@ action_mail_save_as_cb (GtkAction *action,
}
if (!suggestion) {
/* To Translators: This is a part of a suggested file name used when saving
a message or multiple messages to an mbox format, when the first message
doesn't have a Subject. The extension ".mbox" is appended to this string,
thus it will be something like "Message.mbox" at the end. */
suggestion = g_strconcat (ngettext ("Message", "Messages", uids->len), ".mbox", NULL);
const gchar *basename;
/* Translators: This is a part of a suggested file name
* used when saving a message or multiple messages to an
* mbox format, when the first message doesn't have a
* Subject. The extension ".mbox" is appended to this
* string, thus it will be something like "Message.mbox"
* at the end. */
basename = ngettext ("Message", "Messages", uids->len);
suggestion = g_strconcat (basename, ".mbox", NULL);
}
shell = e_shell_backend_get_shell (shell_backend);
file = e_shell_run_save_dialog (shell, title, suggestion, "*.mbox:application/mbox,message/rfc822", NULL, NULL);
file = e_shell_run_save_dialog (
shell, title, suggestion,
"*.mbox:application/mbox,message/rfc822", NULL, NULL);
if (file == NULL) {
em_utils_uids_free (uids);

View File

@ -2477,7 +2477,7 @@ emae_receive_options_item (EConfig *ec, EConfigItem *item, GtkWidget *parent, Gt
GtkWidget *box = gtk_hbox_new (FALSE, 12);
gtk_widget_reparent (old, box);
gtk_widget_show(box);
gtk_box_set_child_packing ((GtkBox *)box, old, TRUE, TRUE, 12, GTK_PACK_START);
gtk_box_set_child_packing ((GtkBox *)box, old, TRUE, TRUE, 12, GTK_PACK_START);
gtk_box_pack_end ((GtkBox *)emae->pages[2], box, FALSE, FALSE, 0);
}
return old;

View File

@ -2167,7 +2167,6 @@ em_utils_guess_account_with_recipients (CamelMimeMessage *message, CamelFolder *
if (addr)
recipients = g_list_append (recipients, (gpointer) addr);
/* finally recipient (to/cc) in account table */
account_hash = em_utils_generate_account_hash ();
for (l = recipients; l == NULL; l = l->next) {

View File

@ -196,7 +196,7 @@ GPtrArray * message_list_get_selected (MessageList *message_list);
void message_list_set_selected (MessageList *message_list,
GPtrArray *uids);
gboolean message_list_select (MessageList *message_list,
MessageListSelectDirection direction,
MessageListSelectDirection direction,
guint32 flags,
guint32 mask);
gboolean message_list_can_select (MessageList *message_list,

View File

@ -259,7 +259,8 @@ action_address_book_save_as_cb (GtkAction *action,
string = eab_suggest_filename (list);
file = e_shell_run_save_dialog (
shell, _("Save as vCard"), string, "*.vcf:text/x-vcard,text/directory", NULL, NULL);
shell, _("Save as vCard"), string,
"*.vcf:text/x-vcard,text/directory", NULL, NULL);
g_free (string);
if (file == NULL)
@ -522,7 +523,8 @@ action_contact_save_as_cb (GtkAction *action,
string = eab_suggest_filename (list);
file = e_shell_run_save_dialog (
shell, _("Save as vCard"), string, "*.vcf:text/x-vcard,text/directory", NULL, NULL);
shell, _("Save as vCard"), string,
"*.vcf:text/x-vcard,text/directory", NULL, NULL);
g_free (string);
if (file == NULL)

View File

@ -242,8 +242,12 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view,
widget = e_addressbook_view_new (shell_view, source);
gtk_widget_show (widget);
/* default searching options for a new view */
e_addressbook_view_set_search (E_ADDRESSBOOK_VIEW (widget), CONTACT_FILTER_ANY_CATEGORY, CONTACT_SEARCH_NAME_CONTAINS, NULL, NULL);
/* Default searching options for a new view. */
e_addressbook_view_set_search (
E_ADDRESSBOOK_VIEW (widget),
CONTACT_FILTER_ANY_CATEGORY,
CONTACT_SEARCH_NAME_CONTAINS,
NULL, NULL);
e_book_shell_content_insert_view (
book_shell_content,

View File

@ -506,7 +506,8 @@ cal_shell_content_constructed (GObject *object)
e_table_load_state (E_TABLE (widget), filename);
g_free (filename);
e_cal_model_set_default_time_func (e_memo_table_get_model (E_MEMO_TABLE (widget)), gc_get_default_time, calendar);
e_cal_model_set_default_time_func (
memo_model, gc_get_default_time, calendar);
g_signal_connect_swapped (
widget, "open-component",

View File

@ -529,8 +529,11 @@ cal_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
delete = e_source_get_property (source, "delete");
can_delete &= (delete == NULL || strcmp (delete, "no") != 0);
client = g_hash_table_lookup (cal_shell_sidebar->priv->client_table, e_source_peek_uid (source));
refresh_supported = client && e_cal_get_refresh_supported (client);
client = g_hash_table_lookup (
cal_shell_sidebar->priv->client_table,
e_source_peek_uid (source));
refresh_supported =
client && e_cal_get_refresh_supported (client);
}
if (source != NULL)

View File

@ -170,12 +170,17 @@ action_calendar_jump_to_cb (GtkAction *action,
ECalShellView *cal_shell_view)
{
ECalShellContent *cal_shell_content;
EShellWindow *shell_window;
EShellView *shell_view;
GnomeCalendar *calendar;
shell_view = E_SHELL_VIEW (cal_shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
cal_shell_content = cal_shell_view->priv->cal_shell_content;
calendar = e_cal_shell_content_get_calendar (cal_shell_content);
goto_dialog (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (cal_shell_content))), calendar);
goto_dialog (GTK_WINDOW (shell_window), calendar);
}
static void
@ -350,14 +355,22 @@ static void
action_calendar_refresh_cb (GtkAction *action,
ECalShellView *cal_shell_view)
{
ECalShellContent *cal_shell_content;
ECalShellSidebar *cal_shell_sidebar;
ESourceSelector *selector;
ECal *client;
ECalModel *model;
ESource *source;
gchar *uri;
GError *error = NULL;
model = e_cal_shell_content_get_model (cal_shell_view->priv->cal_shell_content);
source = e_source_selector_peek_primary_selection (e_cal_shell_sidebar_get_selector (cal_shell_view->priv->cal_shell_sidebar));
cal_shell_content = cal_shell_view->priv->cal_shell_content;
cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar;
model = e_cal_shell_content_get_model (cal_shell_content);
selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar);
source = e_source_selector_peek_primary_selection (selector);
g_return_if_fail (E_IS_SOURCE (source));
uri = e_source_get_uri (source);
@ -370,7 +383,10 @@ action_calendar_refresh_cb (GtkAction *action,
g_return_if_fail (e_cal_get_refresh_supported (client));
if (!e_cal_refresh (client, &error) && error) {
g_warning ("%s: Failed to refresh '%s', %s\n", G_STRFUNC, e_source_peek_name (source), error->message);
g_warning (
"%s: Failed to refresh '%s', %s\n",
G_STRFUNC, e_source_peek_name (source),
error->message);
g_error_free (error);
}
}
@ -1071,10 +1087,12 @@ action_event_save_as_cb (GtkAction *action,
client = event->comp_data->client;
icalcomp = event->comp_data->icalcomp;
/* To Translators: Default filename part saving an event to a file when no summary is filed, the '.ics' extension is concatenated to it */
/* Translators: Default filename part saving an event to a file when
* no summary is filed, the '.ics' extension is concatenated to it. */
string = icalcomp_suggest_filename (icalcomp, _("event"));
file = e_shell_run_save_dialog (
shell, _("Save as iCalendar"), string, "*.ics:text/calendar", NULL, NULL);
shell, _("Save as iCalendar"), string,
"*.ics:text/calendar", NULL, NULL);
g_free (string);
if (file == NULL)
return;
@ -1134,16 +1152,25 @@ edit_event_as (ECalShellView *cal_shell_view, gboolean as_meeting)
/* do it on a copy, as user can cancel changes */
icalcomp = icalcomponent_new_clone (icalcomp);
#define remove_all(_kind) \
while (prop = icalcomponent_get_first_property (icalcomp, _kind), prop != NULL) { \
icalcomponent_remove_property (icalcomp, prop); \
icalproperty_free (prop); \
}
prop = icalcomponent_get_first_property (
icalcomp, ICAL_ATTENDEE_PROPERTY);
while (prop != NULL) {
icalcomponent_remove_property (icalcomp, prop);
icalproperty_free (prop);
remove_all (ICAL_ATTENDEE_PROPERTY);
remove_all (ICAL_ORGANIZER_PROPERTY);
prop = icalcomponent_get_first_property (
icalcomp, ICAL_ATTENDEE_PROPERTY);
}
#undef remove_all
prop = icalcomponent_get_first_property (
icalcomp, ICAL_ORGANIZER_PROPERTY);
while (prop != NULL) {
icalcomponent_remove_property (icalcomp, prop);
icalproperty_free (prop);
prop = icalcomponent_get_first_property (
icalcomp, ICAL_ORGANIZER_PROPERTY);
}
}
e_calendar_view_edit_appointment (

View File

@ -219,10 +219,12 @@ action_calendar_memopad_save_as_cb (GtkAction *action,
comp_data = list->data;
g_slist_free (list);
/* To Translators: Default filename part saving a memo to a file when no summary is filed, the '.ics' extension is concatenated to it */
/* Translators: Default filename part saving a memo to a file when
* no summary is filed, the '.ics' extension is concatenated to it. */
string = icalcomp_suggest_filename (comp_data->icalcomp, _("memo"));
file = e_shell_run_save_dialog (
shell, _("Save as iCalendar"), string, "*.ics:text/calendar", NULL, NULL);
shell, _("Save as iCalendar"), string,
"*.ics:text/calendar", NULL, NULL);
g_free (string);
if (file == NULL)
return;

View File

@ -868,7 +868,8 @@ e_cal_shell_view_update_sidebar (ECalShellView *cal_shell_view)
view_type = gnome_calendar_get_view (calendar);
calendar_view = gnome_calendar_get_calendar_view (calendar, view_type);
if (!e_calendar_view_get_visible_time_range (calendar_view, &start_time, &end_time)) {
if (!e_calendar_view_get_visible_time_range (
calendar_view, &start_time, &end_time)) {
e_shell_sidebar_set_secondary_text (shell_sidebar, "");
return;
}

View File

@ -287,10 +287,12 @@ action_calendar_taskpad_save_as_cb (GtkAction *action,
comp_data = list->data;
g_slist_free (list);
/* To Translators: Default filename part saving a task to a file when no summary is filed, the '.ics' extension is concatenated to it */
/* Translators: Default filename part saving a task to a file when
* no summary is filed, the '.ics' extension is concatenated to it. */
string = icalcomp_suggest_filename (comp_data->icalcomp, _("task"));
file = e_shell_run_save_dialog (
shell, _("Save as iCalendar"), string, "*.ics:text/calendar", NULL, NULL);
shell, _("Save as iCalendar"), string,
"*.ics:text/calendar", NULL, NULL);
g_free (string);
if (file == NULL)
return;

View File

@ -474,8 +474,11 @@ memo_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
delete = e_source_get_property (source, "delete");
can_delete &= (delete == NULL || strcmp (delete, "no") != 0);
client = g_hash_table_lookup (memo_shell_sidebar->priv->client_table, e_source_peek_uid (source));
refresh_supported = client && e_cal_get_refresh_supported (client);
client = g_hash_table_lookup (
memo_shell_sidebar->priv->client_table,
e_source_peek_uid (source));
refresh_supported =
client && e_cal_get_refresh_supported (client);
}
if (source != NULL)

View File

@ -472,8 +472,11 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
delete = e_source_get_property (source, "delete");
can_delete &= (delete == NULL || strcmp (delete, "no") != 0);
client = g_hash_table_lookup (task_shell_sidebar->priv->client_table, e_source_peek_uid (source));
refresh_supported = client && e_cal_get_refresh_supported (client);
client = g_hash_table_lookup (
task_shell_sidebar->priv->client_table,
e_source_peek_uid (source));
refresh_supported =
client && e_cal_get_refresh_supported (client);
}
if (source != NULL)

View File

@ -282,16 +282,24 @@ action_task_list_properties_cb (GtkAction *action,
static void
action_task_list_refresh_cb (GtkAction *action,
ETaskShellView *task_shell_view)
ETaskShellView *task_shell_view)
{
ETaskShellContent *task_shell_content;
ETaskShellSidebar *task_shell_sidebar;
ESourceSelector *selector;
ECal *client;
ECalModel *model;
ESource *source;
gchar *uri;
GError *error = NULL;
model = e_task_shell_content_get_task_model (task_shell_view->priv->task_shell_content);
source = e_source_selector_peek_primary_selection (e_task_shell_sidebar_get_selector (task_shell_view->priv->task_shell_sidebar));
task_shell_content = task_shell_view->priv->task_shell_content;
task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
model = e_task_shell_content_get_task_model (task_shell_content);
selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
source = e_source_selector_peek_primary_selection (selector);
g_return_if_fail (E_IS_SOURCE (source));
uri = e_source_get_uri (source);
@ -304,7 +312,10 @@ action_task_list_refresh_cb (GtkAction *action,
g_return_if_fail (e_cal_get_refresh_supported (client));
if (!e_cal_refresh (client, &error) && error) {
g_warning ("%s: Failed to refresh '%s', %s\n", G_STRFUNC, e_source_peek_name (source), error->message);
g_warning (
"%s: Failed to refresh '%s', %s\n",
G_STRFUNC, e_source_peek_name (source),
error->message);
g_error_free (error);
}
}
@ -608,10 +619,12 @@ action_task_save_as_cb (GtkAction *action,
comp_data = list->data;
g_slist_free (list);
/* To Translators: Default filename part saving a task to a file when no summary is filed, the '.ics' extension is concatenated to it */
/* Translators: Default filename part saving a task to a file when
* no summary is filed, the '.ics' extension is concatenated to it */
string = icalcomp_suggest_filename (comp_data->icalcomp, _("task"));
file = e_shell_run_save_dialog (
shell, _("Save as iCalendar"), string, "*.ics:text/calendar", NULL, NULL);
shell, _("Save as iCalendar"), string,
"*.ics:text/calendar", NULL, NULL);
g_free (string);
if (file == NULL)
return;

View File

@ -354,7 +354,8 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view)
e_task_shell_view_update_search_filter (task_shell_view);
e_task_shell_view_update_timezone (task_shell_view);
/* call this when everything is ready, like actions in action groups and such */
/* Call this when everything is ready, like actions in
* action groups and such. */
task_shell_view_update_timeout_cb (task_shell_view);
priv->update_timeout = g_timeout_add_full (
G_PRIORITY_LOW, 60000, (GSourceFunc)

View File

@ -85,7 +85,8 @@ mail_junk_hook_get_name (CamelJunkPlugin *junk_plugin)
interface = (EMJunkInterface *) junk_plugin;
if (!interface->hook->plugin->enabled) {
/* Translators: "None" for a junk hook name, when the junk plugin is not enabled */
/* Translators: "None" for a junk hook name,
* when the junk plugin is not enabled. */
return C_("mail-junk-hook", "None");
}

View File

@ -260,7 +260,8 @@ shell_content_forall (GtkContainer *container,
priv = E_SHELL_CONTENT_GET_PRIVATE (container);
if (include_internals && priv->searchbar != NULL && container == (GtkContainer *)priv->searchbar->parent)
if (include_internals && priv->searchbar != NULL &&
container == GTK_CONTAINER (priv->searchbar->parent))
callback (priv->searchbar, callback_data);
/* Chain up to parent's forall() method. */

View File

@ -392,7 +392,7 @@ shell_searchbar_get_property (GObject *object,
value, e_shell_searchbar_get_label_visible (
E_SHELL_SEARCHBAR (object)));
return;
case PROP_FILTER_VISIBLE:
g_value_set_boolean (
value, e_shell_searchbar_get_filter_visible (

View File

@ -103,12 +103,11 @@ gboolean e_shell_searchbar_get_search_visible
void e_shell_searchbar_set_search_visible
(EShellSearchbar *searchbar,
gboolean search_visible);
gboolean e_shell_searchbar_get_label_visible
gboolean e_shell_searchbar_get_label_visible
(EShellSearchbar *searchbar);
void e_shell_searchbar_set_label_visible
void e_shell_searchbar_set_label_visible
(EShellSearchbar *searchbar,
gboolean label_visible);
gboolean label_visible);
EActionComboBox *
e_shell_searchbar_get_scope_combo_box
(EShellSearchbar *searchbar);

View File

@ -127,7 +127,9 @@ shell_switcher_layout_actions (EShellSwitcher *switcher)
y -= max_height;
len = g_list_length (rows[i]);
if (!icons_only)
extra_width = (allocation->width - (len * max_width ) - (len * H_PADDING)) / len;
extra_width =
(allocation->width - (len * max_width) -
(len * H_PADDING)) / len;
else
extra_width = 0;
for (p = rows [i]; p != NULL; p = p->next) {

View File

@ -308,9 +308,10 @@ e_shell_utils_import_uris (EShell *shell, gchar **uris, gboolean preview)
gtk_widget_show (assistant);
} else {
g_warning ("%s: Cannot %s any of the given URIs", G_STRFUNC, preview ? "preview" : "import");
g_warning (
"%s: Cannot %s any of the given URIs",
G_STRFUNC, preview ? "preview" : "import");
}
/* like when all of them */
return g_strv_length (uris);
}

View File

@ -44,7 +44,9 @@ struct _EggSMClientPrivate {
GKeyFile *state_file;
};
#define EGG_SM_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_SM_CLIENT, EggSMClientPrivate))
#define EGG_SM_CLIENT_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), EGG_TYPE_SM_CLIENT, EggSMClientPrivate))
G_DEFINE_TYPE (EggSMClient, egg_sm_client, G_TYPE_OBJECT)

View File

@ -109,11 +109,13 @@ attachment_button_menu_position (GtkMenu *menu,
else if (menu_requisition.width > widget->allocation.width)
*x -= menu_requisition.width - widget->allocation.width;
if ((*y + toggle_button->allocation.height + menu_requisition.height) <= monitor.y + monitor.height)
if ((*y + toggle_button->allocation.height +
menu_requisition.height) <= monitor.y + monitor.height)
*y += toggle_button->allocation.height;
else if ((*y - menu_requisition.height) >= monitor.y)
*y -= menu_requisition.height;
else if (monitor.y + monitor.height - (*y + toggle_button->allocation.height) > *y)
else if (monitor.y + monitor.height -
(*y + toggle_button->allocation.height) > *y)
*y += toggle_button->allocation.height;
else
*y -= menu_requisition.height;

View File

@ -107,6 +107,7 @@ static gboolean
create_system_thumbnail (EAttachment *attachment, GIcon **icon)
{
GFile *file;
GFile *icon_file;
gchar *thumbnail = NULL;
g_return_val_if_fail (attachment != NULL, FALSE);
@ -122,27 +123,33 @@ create_system_thumbnail (EAttachment *attachment, GIcon **icon)
}
}
if (thumbnail) {
GFile *gf = g_file_new_for_path (thumbnail);
if (thumbnail == NULL)
return FALSE;
g_return_val_if_fail (gf != NULL, FALSE);
if (*icon)
g_object_unref (*icon);
icon_file = g_file_new_for_path (thumbnail);
*icon = g_file_icon_new (gf);
g_object_unref (gf);
if (*icon)
g_object_unref (*icon);
if (file) {
GFileInfo *fi = e_attachment_get_file_info (attachment);
*icon = g_file_icon_new (icon_file);
if (fi)
g_file_info_set_attribute_byte_string (fi, G_FILE_ATTRIBUTE_THUMBNAIL_PATH, thumbnail);
}
g_object_unref (icon_file);
if (file) {
GFileInfo *file_info;
const gchar *attribute;
file_info = e_attachment_get_file_info (attachment);
attribute = G_FILE_ATTRIBUTE_THUMBNAIL_PATH;
if (file_info != NULL)
g_file_info_set_attribute_byte_string (
file_info, attribute, thumbnail);
}
g_free (thumbnail);
return thumbnail != NULL;
return TRUE;
}
static gchar *