aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-attachment-button.c25
-rw-r--r--widgets/misc/e-calendar-item.c11
-rw-r--r--widgets/misc/e-calendar.c9
-rw-r--r--widgets/misc/e-canvas.c3
-rw-r--r--widgets/misc/e-dateedit.c4
-rw-r--r--widgets/misc/e-import-assistant.c3
-rw-r--r--widgets/misc/e-map.c8
-rw-r--r--widgets/misc/e-searching-tokenizer.c10
-rw-r--r--widgets/misc/e-selection-model-simple.c36
9 files changed, 69 insertions, 40 deletions
diff --git a/widgets/misc/e-attachment-button.c b/widgets/misc/e-attachment-button.c
index 88c965e787..efc184b090 100644
--- a/widgets/misc/e-attachment-button.c
+++ b/widgets/misc/e-attachment-button.c
@@ -271,7 +271,8 @@ attachment_button_expand_drag_data_get_cb (EAttachmentButton *button,
if (button->priv->attachment) {
gchar *mime_type;
- mime_type = e_attachment_get_mime_type (button->priv->attachment);
+ mime_type = e_attachment_get_mime_type (
+ button->priv->attachment);
if (mime_type) {
gboolean processed = FALSE;
@@ -284,7 +285,9 @@ attachment_button_expand_drag_data_get_cb (EAttachmentButton *button,
if (g_strcmp0 (atom_name, mime_type) == 0) {
CamelMimePart *mime_part;
- mime_part = e_attachment_get_mime_part (button->priv->attachment);
+ mime_part = e_attachment_get_mime_part (
+ button->priv->attachment);
+
if (CAMEL_IS_MIME_PART (mime_part)) {
CamelDataWrapper *wrapper;
CamelStream *stream;
@@ -292,12 +295,18 @@ attachment_button_expand_drag_data_get_cb (EAttachmentButton *button,
buffer = g_byte_array_new ();
stream = camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), buffer);
- wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
- camel_data_wrapper_decode_to_stream_sync (wrapper, stream, NULL, NULL);
+ camel_stream_mem_set_byte_array (
+ CAMEL_STREAM_MEM (stream),
+ buffer);
+ wrapper = camel_medium_get_content (
+ CAMEL_MEDIUM (mime_part));
+ camel_data_wrapper_decode_to_stream_sync (
+ wrapper, stream, NULL, NULL);
g_object_unref (stream);
- gtk_selection_data_set (selection, atom, 8, buffer->data, buffer->len);
+ gtk_selection_data_set (
+ selection, atom, 8,
+ buffer->data, buffer->len);
processed = TRUE;
g_byte_array_free (buffer, TRUE);
@@ -780,7 +789,9 @@ e_attachment_button_set_attachment (EAttachmentButton *button,
attach_entry[0].target = simple_type;
- gtk_target_list_add_table (list, attach_entry, G_N_ELEMENTS (attach_entry));
+ gtk_target_list_add_table (
+ list, attach_entry,
+ G_N_ELEMENTS (attach_entry));
g_free (simple_type);
}
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index ad7b95bfd4..fd626c674c 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -1619,7 +1619,9 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
}
/* Draw the 1- or 2-digit day number. */
- day_x += calitem->cell_width - (calitem->cell_width - min_cell_width) / 2;
+ day_x += calitem->cell_width -
+ (calitem->cell_width -
+ min_cell_width) / 2;
day_x -= E_CALENDAR_ITEM_MIN_CELL_XPAD / 2;
day_y += (calitem->cell_height - min_cell_height + 1) / 2;
day_y += E_CALENDAR_ITEM_MIN_CELL_YPAD / 2;
@@ -1628,7 +1630,9 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
if (day_num >= 10) {
digit = day_num / 10;
day_x -= calitem->digit_widths[digit];
- num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
+ num_chars += sprintf (
+ &buffer[num_chars],
+ get_digit_fomat (), digit);
}
digit = day_num % 10;
@@ -2117,7 +2121,8 @@ e_calendar_item_button_press (ECalendarItem *calitem,
tmp_start_moff = calitem->selection_start_month_offset;
tmp_start_day = calitem->selection_start_day;
- e_calendar_item_round_down_selection (calitem, &tmp_start_moff, &tmp_start_day);
+ e_calendar_item_round_down_selection (
+ calitem, &tmp_start_moff, &tmp_start_day);
e_calendar_item_round_down_selection (calitem, &month_offset, &day);
month_offset += calitem->selection_start_month_offset - tmp_start_moff;
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index b0e8cbe12f..2c0c6ab9c0 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -137,10 +137,11 @@ e_calendar_init (ECalendar *cal)
/* Create the small font. */
- small_font_desc =
- pango_font_description_copy (gtk_widget_get_style (GTK_WIDGET (cal))->font_desc);
- pango_font_description_set_size (small_font_desc,
- E_CALENDAR_SMALL_FONT_PTSIZE * PANGO_SCALE);
+ small_font_desc = pango_font_description_copy (
+ gtk_widget_get_style (GTK_WIDGET (cal))->font_desc);
+ pango_font_description_set_size (
+ small_font_desc,
+ E_CALENDAR_SMALL_FONT_PTSIZE * PANGO_SCALE);
canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (cal)->root);
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index c5d953b396..b27b7182d7 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -222,7 +222,8 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event)
* synthesize an enter event.
*/
if (event != &canvas->pick_event) {
- if ((event->type == GDK_MOTION_NOTIFY) || (event->type == GDK_BUTTON_RELEASE)) {
+ if ((event->type == GDK_MOTION_NOTIFY) ||
+ (event->type == GDK_BUTTON_RELEASE)) {
/* these fields have the same offsets in both types of events */
canvas->pick_event.crossing.type = GDK_ENTER_NOTIFY;
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 7fb0f8cd79..acc3c08fe5 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -1918,8 +1918,8 @@ e_date_edit_update_date_entry (EDateEdit *dedit)
gtk_entry_set_text (GTK_ENTRY (priv->date_entry), C_("date", "None"));
} else {
/* This is a strftime() format for a short date.
- %x the preferred date representation for the current locale without the time,
- but has forced to use 4 digit year */
+ * %x the preferred date representation for the current locale
+ * without the time, but is forced to use 4 digit year. */
gchar *format = e_time_get_d_fmt_with_4digit_year ();
time_t tt;
diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c
index 3069692f52..69cf847ae5 100644
--- a/widgets/misc/e-import-assistant.c
+++ b/widgets/misc/e-import-assistant.c
@@ -614,7 +614,8 @@ import_simple_done (EImport *ei, gpointer user_data)
/* process next file URI */
g_free (priv->simple_page.target->uri_src);
- priv->simple_page.target->uri_src = g_ptr_array_remove_index (priv->fileuris, 0);
+ priv->simple_page.target->uri_src =
+ g_ptr_array_remove_index (priv->fileuris, 0);
e_import_import (
priv->import, priv->import_target,
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index ef1d805130..dd02486a43 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -945,7 +945,9 @@ e_map_set_zoom (EMap *map, EMapZoomState zoom)
}
void
-e_map_zoom_to_location (EMap *map, gdouble longitude, gdouble latitude)
+e_map_zoom_to_location (EMap *map,
+ gdouble longitude,
+ gdouble latitude)
{
gdouble prevlong, prevlat;
gdouble prevzoom;
@@ -959,7 +961,9 @@ e_map_zoom_to_location (EMap *map, gdouble longitude, gdouble latitude)
e_map_set_zoom (map, E_MAP_ZOOMED_IN);
center_at (map, longitude, latitude);
- e_map_tween_new_from (map, E_MAP_TWEEN_DURATION_MSECS, prevlong, prevlat, prevzoom);
+ e_map_tween_new_from (
+ map, E_MAP_TWEEN_DURATION_MSECS,
+ prevlong, prevlat, prevzoom);
}
void
diff --git a/widgets/misc/e-searching-tokenizer.c b/widgets/misc/e-searching-tokenizer.c
index 6d34b6d8f0..3da81e44bd 100644
--- a/widgets/misc/e-searching-tokenizer.c
+++ b/widgets/misc/e-searching-tokenizer.c
@@ -272,9 +272,10 @@ build_trie (gint nocase, gint len, guchar **words)
/* Step 2: Build failure graph */
- /* This searches for the longest substring which is a prefix of another string and
- builds a graph of failure links so you can find multiple substrings concurrently,
- using aho-corasick's algorithm */
+ /* This searches for the longest substring which is a prefix of
+ * another string and builds a graph of failure links so you can
+ * find multiple substrings concurrently, using aho-corasick's
+ * algorithm. */
for (i=0;i<state_depth_size;i++) {
q = state_depth[i];
@@ -726,7 +727,8 @@ searcher_next_token (struct _searcher *s)
if (q->matches == NULL) {
if (s->submatchp == 0) {
- /* nothing pending, always put something in so we can try merge */
+ /* nothing pending, always put
+ * something in so we can try merge */
push_subpending (s, offstart, offend);
} else if (!merge_subpending (s, offstart, offend)) {
/* can't merge, output what we have, and start againt */
diff --git a/widgets/misc/e-selection-model-simple.c b/widgets/misc/e-selection-model-simple.c
index 1bdd99c3eb..e7bd0c2f16 100644
--- a/widgets/misc/e-selection-model-simple.c
+++ b/widgets/misc/e-selection-model-simple.c
@@ -44,12 +44,11 @@ e_selection_model_simple_init (ESelectionModelSimple *selection)
}
static void
-e_selection_model_simple_class_init (ESelectionModelSimpleClass *klass)
+e_selection_model_simple_class_init (ESelectionModelSimpleClass *class)
{
ESelectionModelArrayClass *esma_class;
- esma_class = E_SELECTION_MODEL_ARRAY_CLASS (klass);
-
+ esma_class = E_SELECTION_MODEL_ARRAY_CLASS (class);
esma_class->get_row_count = esms_get_row_count;
}
@@ -68,7 +67,7 @@ e_selection_model_simple_new (void)
void
e_selection_model_simple_set_row_count (ESelectionModelSimple *esms,
- gint row_count)
+ gint row_count)
{
if (esms->row_count != row_count) {
ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (esms);
@@ -78,6 +77,7 @@ e_selection_model_simple_set_row_count (ESelectionModelSimple *esms,
esma->selected_row = -1;
esma->selected_range_end = -1;
}
+
esms->row_count = row_count;
}
@@ -89,27 +89,31 @@ esms_get_row_count (ESelectionModelArray *esma)
return esms->row_count;
}
-void e_selection_model_simple_insert_rows (ESelectionModelSimple *esms,
- gint row,
- gint count)
+void
+e_selection_model_simple_insert_rows (ESelectionModelSimple *esms,
+ gint row,
+ gint count)
{
esms->row_count += count;
- e_selection_model_array_insert_rows (E_SELECTION_MODEL_ARRAY (esms), row, count);
+ e_selection_model_array_insert_rows (
+ E_SELECTION_MODEL_ARRAY (esms), row, count);
}
void
-e_selection_model_simple_delete_rows (ESelectionModelSimple *esms,
- gint row,
- gint count)
+e_selection_model_simple_delete_rows (ESelectionModelSimple *esms,
+ gint row,
+ gint count)
{
esms->row_count -= count;
- e_selection_model_array_delete_rows (E_SELECTION_MODEL_ARRAY (esms), row, count);
+ e_selection_model_array_delete_rows (
+ E_SELECTION_MODEL_ARRAY (esms), row, count);
}
void
-e_selection_model_simple_move_row (ESelectionModelSimple *esms,
- gint old_row,
- gint new_row)
+e_selection_model_simple_move_row (ESelectionModelSimple *esms,
+ gint old_row,
+ gint new_row)
{
- e_selection_model_array_move_row (E_SELECTION_MODEL_ARRAY (esms), old_row, new_row);
+ e_selection_model_array_move_row (
+ E_SELECTION_MODEL_ARRAY (esms), old_row, new_row);
}