Skip to content

Commit ab8eb91

Browse files
committed
lighttable: Code reformatting.
1 parent 4a1f7b7 commit ab8eb91

File tree

3 files changed

+244
-119
lines changed

3 files changed

+244
-119
lines changed

src/dtgtk/thumbtable.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,11 +2477,16 @@ dt_thumbtable_t *dt_thumbtable_new()
24772477
G_CALLBACK(_event_button_release), table);
24782478

24792479
// we register globals signals
2480-
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_COLLECTION_CHANGED, _dt_collection_changed_callback, table);
2481-
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_MOUSE_OVER_IMAGE_CHANGE, _dt_mouse_over_image_callback, table);
2482-
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_ACTIVE_IMAGES_CHANGE, _dt_active_images_callback, table);
2483-
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED, _dt_profile_change_callback, table);
2484-
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_PREFERENCES_CHANGE, _dt_pref_change_callback, table);
2480+
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_COLLECTION_CHANGED,
2481+
_dt_collection_changed_callback, table);
2482+
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_MOUSE_OVER_IMAGE_CHANGE,
2483+
_dt_mouse_over_image_callback, table);
2484+
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_ACTIVE_IMAGES_CHANGE,
2485+
_dt_active_images_callback, table);
2486+
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED,
2487+
_dt_profile_change_callback, table);
2488+
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_PREFERENCES_CHANGE,
2489+
_dt_pref_change_callback, table);
24852490
gtk_widget_show(table->widget);
24862491

24872492
g_object_ref(table->widget);
@@ -2504,7 +2509,8 @@ void dt_thumbtable_scrollbar_changed(dt_thumbtable_t *table,
25042509
if(table->mode == DT_THUMBTABLE_MODE_FILEMANAGER)
25052510
{
25062511
// get first visible line position
2507-
const float first_line = ((table->offset - 1) / table->thumbs_per_row)*table->thumb_size - table->thumbs_area.y;
2512+
const float first_line = ((table->offset - 1) / table->thumbs_per_row)
2513+
* table->thumb_size - table->thumbs_area.y;
25082514

25092515
_move(table, 0, first_line - y * table->thumb_size, TRUE);
25102516
}

src/gui/gtk.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,7 +1781,8 @@ static void _init_widgets(dt_gui_gtk_t *gui)
17811781
gtk_container_add(GTK_CONTAINER(container), widget);
17821782

17831783
/* connect to signal redraw all */
1784-
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_CONTROL_REDRAW_ALL, _ui_widget_redraw_callback, gui->ui->main_window);
1784+
DT_CONTROL_SIGNAL_CONNECT(DT_SIGNAL_CONTROL_REDRAW_ALL,
1785+
_ui_widget_redraw_callback, gui->ui->main_window);
17851786

17861787
container = widget;
17871788

@@ -2462,8 +2463,9 @@ static gboolean _side_panel_draw(GtkWidget *widget,
24622463
cairo_t *cr,
24632464
gpointer user_data)
24642465
{
2465-
// in lighttable view, if there are no thumbs displayed in the center view, we have lines to
2466-
// modules which need to be updated as we expand and collapse modules in the side panels
2466+
// in lighttable view, if there are no thumbs displayed in the
2467+
// center view, we have lines to modules which need to be updated as
2468+
// we expand and collapse modules in the side panels
24672469
if(darktable.collection
24682470
&& dt_view_get_current() == DT_VIEW_LIGHTTABLE
24692471
&& dt_collection_get_count(darktable.collection) == 0)

0 commit comments

Comments
 (0)