Skip to content

Commit

Permalink
clang-format: Break after assignment operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamaranch committed May 9, 2024
1 parent fc3fa1d commit 8895786
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 97 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ AlignOperands: Align
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakAfterReturnType: All
BinPackParameters: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Allman
IncludeCategories:
- Regex: 'util\.h'
Expand Down
4 changes: 2 additions & 2 deletions src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,8 @@ rstto_file_get_thumbnail (RsttoFile *r_file,
g_object_unref (r_file->priv->pixbufs[size]);

n_pixels = rstto_util_get_thumbnail_n_pixels (size);
r_file->priv->pixbufs[size]
= gdk_pixbuf_new_from_file_at_scale (thumbnail_path, n_pixels, n_pixels, TRUE, &error);
r_file->priv->pixbufs[size] =
gdk_pixbuf_new_from_file_at_scale (thumbnail_path, n_pixels, n_pixels, TRUE, &error);
if (error != NULL)
{
g_warning ("Thumbnail pixbuf generation failed for '%s': %s",
Expand Down
4 changes: 2 additions & 2 deletions src/icon_bar.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ rstto_icon_bar_init (RsttoIconBar *icon_bar)
icon_bar->priv->settings = rstto_settings_new ();
icon_bar->priv->thumbnailer = rstto_thumbnailer_new ();

icon_bar->priv->thumbnail_size
= rstto_settings_get_uint_property (icon_bar->priv->settings, "thumbnail-size");
icon_bar->priv->thumbnail_size =
rstto_settings_get_uint_property (icon_bar->priv->settings, "thumbnail-size");

gtk_widget_set_can_focus (GTK_WIDGET (icon_bar), FALSE);

Expand Down
68 changes: 34 additions & 34 deletions src/image_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ rstto_image_list_init (RsttoImageList *image_list)

image_list->priv->cb_rstto_image_list_compare_func = cb_rstto_image_list_image_name_compare_func;

image_list->priv->wrap_images
= rstto_settings_get_boolean_property (image_list->priv->settings, "wrap-images");
image_list->priv->wrap_images =
rstto_settings_get_boolean_property (image_list->priv->settings, "wrap-images");

g_signal_connect (image_list->priv->settings, "notify::wrap-images",
G_CALLBACK (cb_rstto_wrap_images_changed), image_list);
Expand All @@ -249,21 +249,21 @@ rstto_image_list_class_init (RsttoImageListClass *klass)

object_class->finalize = rstto_image_list_finalize;

rstto_image_list_signals[RSTTO_IMAGE_LIST_SIGNAL_REMOVE_ALL]
= g_signal_new ("remove-all",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);

rstto_image_list_signals[RSTTO_IMAGE_LIST_SIGNAL_SORTED]
= g_signal_new ("sorted",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
rstto_image_list_signals[RSTTO_IMAGE_LIST_SIGNAL_REMOVE_ALL] =
g_signal_new ("remove-all",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);

rstto_image_list_signals[RSTTO_IMAGE_LIST_SIGNAL_SORTED] =
g_signal_new ("sorted",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}

static void
Expand Down Expand Up @@ -347,8 +347,8 @@ rstto_image_list_add_file (RsttoImageList *image_list,
{
g_signal_connect (monitor, "changed",
G_CALLBACK (cb_file_monitor_changed), image_list);
image_list->priv->image_monitors
= g_list_prepend (image_list->priv->image_monitors, monitor);
image_list->priv->image_monitors =
g_list_prepend (image_list->priv->image_monitors, monitor);
}
}

Expand Down Expand Up @@ -809,21 +809,21 @@ rstto_image_list_iter_class_init (RsttoImageListIterClass *klass)

object_class->finalize = rstto_image_list_iter_finalize;

rstto_image_list_iter_signals[RSTTO_IMAGE_LIST_ITER_SIGNAL_PREPARE_CHANGE]
= g_signal_new ("prepare-change",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);

rstto_image_list_iter_signals[RSTTO_IMAGE_LIST_ITER_SIGNAL_CHANGED]
= g_signal_new ("changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
rstto_image_list_iter_signals[RSTTO_IMAGE_LIST_ITER_SIGNAL_PREPARE_CHANGE] =
g_signal_new ("prepare-change",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);

rstto_image_list_iter_signals[RSTTO_IMAGE_LIST_ITER_SIGNAL_CHANGED] =
g_signal_new ("changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}

static void
Expand Down
40 changes: 20 additions & 20 deletions src/main_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -2404,19 +2404,19 @@ cb_rstto_main_window_state_event (GtkWidget *widget,
}
if (!rstto_image_list_is_empty (window->priv->image_list))
{
window->priv->show_fs_toolbar_timeout_id
= g_timeout_add_full (G_PRIORITY_DEFAULT, 500,
cb_rstto_main_window_show_fs_toolbar_timeout, window,
cb_rstto_main_window_show_fs_toolbar_timeout_destroy);
window->priv->show_fs_toolbar_timeout_id =
g_timeout_add_full (G_PRIORITY_DEFAULT, 500,
cb_rstto_main_window_show_fs_toolbar_timeout, window,
cb_rstto_main_window_show_fs_toolbar_timeout_destroy);
}
}

if (timeout > 0)
{
window->priv->hide_fs_mouse_cursor_timeout_id
= g_timeout_add_full (G_PRIORITY_DEFAULT, 1000 * timeout,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout, window,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout_destroy);
window->priv->hide_fs_mouse_cursor_timeout_id =
g_timeout_add_full (G_PRIORITY_DEFAULT, 1000 * timeout,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout, window,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout_destroy);
}

if (rstto_settings_get_boolean_property (window->priv->settings_manager, "hide-thumbnails-fullscreen"))
Expand Down Expand Up @@ -2552,10 +2552,10 @@ cb_rstto_main_window_motion_notify_event (RsttoMainWindow *window,

if (timeout > 0)
{
window->priv->hide_fs_mouse_cursor_timeout_id
= g_timeout_add_full (G_PRIORITY_DEFAULT, 1000 * timeout,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout, window,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout_destroy);
window->priv->hide_fs_mouse_cursor_timeout_id =
g_timeout_add_full (G_PRIORITY_DEFAULT, 1000 * timeout,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout, window,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout_destroy);
}

return TRUE;
Expand Down Expand Up @@ -2613,10 +2613,10 @@ cb_rstto_main_window_image_viewer_enter_notify_event (GtkWidget *widget,
{
REMOVE_SOURCE (window->priv->show_fs_toolbar_timeout_id);
}
window->priv->show_fs_toolbar_timeout_id
= g_timeout_add_full (G_PRIORITY_DEFAULT, 500,
cb_rstto_main_window_show_fs_toolbar_timeout, window,
cb_rstto_main_window_show_fs_toolbar_timeout_destroy);
window->priv->show_fs_toolbar_timeout_id =
g_timeout_add_full (G_PRIORITY_DEFAULT, 500,
cb_rstto_main_window_show_fs_toolbar_timeout, window,
cb_rstto_main_window_show_fs_toolbar_timeout_destroy);
}
}

Expand Down Expand Up @@ -2919,10 +2919,10 @@ cb_rstto_main_window_configure_event (GtkWidget *widget,
if (gtk_widget_get_visible (GTK_WIDGET (window)))
{
/* save the geometry one second after the last configure event */
window->priv->window_save_geometry_timer_id
= g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, 1,
rstto_main_window_save_geometry_timer, widget,
rstto_main_window_save_geometry_timer_destroy);
window->priv->window_save_geometry_timer_id =
g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, 1,
rstto_main_window_save_geometry_timer, widget,
rstto_main_window_save_geometry_timer_destroy);
}
}

Expand Down
14 changes: 7 additions & 7 deletions src/monitor_chooser.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ rstto_monitor_chooser_class_init (RsttoMonitorChooserClass *klass)
widget_class->get_preferred_height = rstto_monitor_chooser_get_preferred_height;
widget_class->size_allocate = rstto_monitor_chooser_size_allocate;

rstto_monitor_chooser_signals[RSTTO_MONITOR_CHOOSER_SIGNAL_CHANGED]
= g_signal_new ("changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
rstto_monitor_chooser_signals[RSTTO_MONITOR_CHOOSER_SIGNAL_CHANGED] =
g_signal_new ("changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}

/**
Expand Down
60 changes: 30 additions & 30 deletions src/thumbnailer.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,20 @@ rstto_thumbnailer_class_init (RsttoThumbnailerClass *klass)

object_class->finalize = rstto_thumbnailer_finalize;

rstto_thumbnailer_signals[RSTTO_THUMBNAILER_SIGNAL_READY]
= g_signal_new ("ready",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, G_TYPE_OBJECT);
rstto_thumbnailer_signals[RSTTO_THUMBNAILER_SIGNAL_ERROR]
= g_signal_new ("error",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, G_TYPE_OBJECT);
rstto_thumbnailer_signals[RSTTO_THUMBNAILER_SIGNAL_READY] =
g_signal_new ("ready",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, G_TYPE_OBJECT);
rstto_thumbnailer_signals[RSTTO_THUMBNAILER_SIGNAL_ERROR] =
g_signal_new ("error",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, G_TYPE_OBJECT);
}

/**
Expand Down Expand Up @@ -248,16 +248,16 @@ rstto_thumbnailer_queue_file (RsttoThumbnailer *thumbnailer,
rstto_file_set_thumbnail_state (last_visible->data, flavor,
RSTTO_THUMBNAIL_STATE_UNPROCESSED);
g_object_unref (last_visible->data);
thumbnailer->priv->queues[flavor]
= g_slist_delete_link (thumbnailer->priv->queues[flavor], last_visible);
thumbnailer->priv->queues[flavor] =
g_slist_delete_link (thumbnailer->priv->queues[flavor], last_visible);
}

thumbnailer->priv->queues[flavor]
= g_slist_prepend (thumbnailer->priv->queues[flavor], g_object_ref (file));
thumbnailer->priv->request_timer_ids[flavor]
= g_timeout_add_full (G_PRIORITY_LOW, 300, rstto_thumbnailer_queue_request_timer,
rstto_util_source_autoremove (thumbnailer),
rstto_thumbnailer_queue_request_timer_destroy);
thumbnailer->priv->queues[flavor] =
g_slist_prepend (thumbnailer->priv->queues[flavor], g_object_ref (file));
thumbnailer->priv->request_timer_ids[flavor] =
g_timeout_add_full (G_PRIORITY_LOW, 300, rstto_thumbnailer_queue_request_timer,
rstto_util_source_autoremove (thumbnailer),
rstto_thumbnailer_queue_request_timer_destroy);
}

static RsttoThumbnailFlavor
Expand Down Expand Up @@ -307,8 +307,8 @@ rstto_thumbnailer_queue_request_timer (gpointer user_data)
* here only when required */
if (!rstto_file_is_valid (iter->data))
{
thumbnailer->priv->remove_queue
= g_slist_prepend (thumbnailer->priv->remove_queue, iter->data);
thumbnailer->priv->remove_queue =
g_slist_prepend (thumbnailer->priv->remove_queue, iter->data);
continue;
}

Expand Down Expand Up @@ -389,8 +389,8 @@ rstto_thumbnailer_queue_request_timer (gpointer user_data)
/* TOOO: Nice cleanup */
}
else
thumbnailer->priv->handles[flavor]
= g_slist_prepend (thumbnailer->priv->handles[flavor], GUINT_TO_POINTER (handle));
thumbnailer->priv->handles[flavor] =
g_slist_prepend (thumbnailer->priv->handles[flavor], GUINT_TO_POINTER (handle));

g_free (uris);
g_free (mimetypes);
Expand Down Expand Up @@ -453,8 +453,8 @@ cb_rstto_thumbnailer_thumbnail_ready (TumblerThumbnailer1 *proxy,
0, iter->data, NULL);

g_object_unref (iter->data);
thumbnailer->priv->in_process_queues[flavor]
= g_slist_remove (thumbnailer->priv->in_process_queues[flavor], iter->data);
thumbnailer->priv->in_process_queues[flavor] =
g_slist_remove (thumbnailer->priv->in_process_queues[flavor], iter->data);

iter = thumbnailer->priv->in_process_queues[flavor];
n++;
Expand Down Expand Up @@ -508,8 +508,8 @@ cb_rstto_thumbnailer_thumbnail_error (TumblerThumbnailer1 *proxy,
}

g_object_unref (iter->data);
thumbnailer->priv->in_process_queues[flavor]
= g_slist_remove (thumbnailer->priv->in_process_queues[flavor], iter->data);
thumbnailer->priv->in_process_queues[flavor] =
g_slist_remove (thumbnailer->priv->in_process_queues[flavor], iter->data);

iter = thumbnailer->priv->in_process_queues[flavor];
n++;
Expand Down
4 changes: 2 additions & 2 deletions src/xfce_wallpaper_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ rstto_xfce_wallpaper_manager_init (RsttoXfceWallpaperManager *manager)
manager->priv->style = 3; /* stretched is now default value */
manager->priv->check_button = gtk_check_button_new_with_label ( _("Apply to all workspaces"));
if (manager->priv->channel != NULL)
manager->priv->workspace_mode
= xfconf_channel_get_bool (manager->priv->channel, SINGLE_WORKSPACE_MODE, TRUE);
manager->priv->workspace_mode =
xfconf_channel_get_bool (manager->priv->channel, SINGLE_WORKSPACE_MODE, TRUE);

manager->priv->dialog = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (manager->priv->dialog), _("Set as wallpaper"));
Expand Down

0 comments on commit 8895786

Please sign in to comment.