alexandria-book-collection-manager 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +31 -6
  3. data/.rubocop_todo.yml +33 -33
  4. data/.travis.yml +39 -0
  5. data/CHANGELOG.md +8 -0
  6. data/README.md +1 -1
  7. data/Rakefile +4 -2
  8. data/alexandria-book-collection-manager.gemspec +2 -1
  9. data/bin/alexandria +0 -10
  10. data/doc/FAQ +1 -2
  11. data/doc/dependency_decisions.yml +5 -5
  12. data/lib/alexandria.rb +3 -1
  13. data/lib/alexandria/book_providers.rb +1 -4
  14. data/lib/alexandria/book_providers/adlibris.rb +4 -20
  15. data/lib/alexandria/book_providers/amazon_aws.rb +15 -8
  16. data/lib/alexandria/book_providers/amazon_ecs_util.rb +16 -10
  17. data/lib/alexandria/book_providers/barnes_and_noble.rb +1 -1
  18. data/lib/alexandria/book_providers/douban.rb +2 -2
  19. data/lib/alexandria/book_providers/proxis.rb +6 -2
  20. data/lib/alexandria/book_providers/pseudomarc.rb +3 -1
  21. data/lib/alexandria/book_providers/siciliano.rb +24 -27
  22. data/lib/alexandria/book_providers/thalia.rb +1 -1
  23. data/lib/alexandria/book_providers/worldcat.rb +5 -3
  24. data/lib/alexandria/book_providers/z3950.rb +20 -14
  25. data/lib/alexandria/export_library.rb +15 -12
  26. data/lib/alexandria/import_library.rb +65 -65
  27. data/lib/alexandria/library_collection.rb +2 -1
  28. data/lib/alexandria/library_store.rb +18 -7
  29. data/lib/alexandria/models/book.rb +2 -1
  30. data/lib/alexandria/models/library.rb +9 -3
  31. data/lib/alexandria/preferences.rb +13 -6
  32. data/lib/alexandria/scanners/keyboard.rb +2 -2
  33. data/lib/alexandria/smart_library.rb +41 -39
  34. data/lib/alexandria/ui/acquire_dialog.rb +47 -48
  35. data/lib/alexandria/ui/alert_dialog.rb +2 -1
  36. data/lib/alexandria/ui/barcode_animation.rb +6 -5
  37. data/lib/alexandria/ui/book_properties_dialog_base.rb +7 -3
  38. data/lib/alexandria/ui/callbacks.rb +14 -7
  39. data/lib/alexandria/ui/dndable.rb +1 -1
  40. data/lib/alexandria/ui/export_dialog.rb +0 -2
  41. data/lib/alexandria/ui/icons.rb +2 -1
  42. data/lib/alexandria/ui/iconview.rb +5 -3
  43. data/lib/alexandria/ui/import_dialog.rb +6 -8
  44. data/lib/alexandria/ui/keep_bad_isbn_dialog.rb +4 -3
  45. data/lib/alexandria/ui/listview.rb +34 -31
  46. data/lib/alexandria/ui/multi_drag_treeview.rb +3 -2
  47. data/lib/alexandria/ui/new_book_dialog.rb +28 -30
  48. data/lib/alexandria/ui/new_book_dialog_manual.rb +3 -1
  49. data/lib/alexandria/ui/provider_preferences_base_dialog.rb +2 -1
  50. data/lib/alexandria/ui/sidepane_manager.rb +6 -3
  51. data/lib/alexandria/ui/smart_library_properties_dialog_base.rb +5 -3
  52. data/lib/alexandria/ui/ui_manager.rb +22 -12
  53. data/lib/alexandria/version.rb +2 -2
  54. data/po/Makefile +2 -2
  55. data/share/alexandria/glade/acquire_dialog__builder.glade +1 -1
  56. data/share/alexandria/glade/book_properties_dialog__builder.glade +1 -1
  57. data/share/alexandria/glade/new_book_dialog__builder.glade +1 -1
  58. data/share/alexandria/glade/preferences_dialog__builder.glade +1 -1
  59. data/share/gnome/help/alexandria/C/introduction.xml +0 -4
  60. data/share/gnome/help/alexandria/C/searching.xml +1 -1
  61. data/share/gnome/help/alexandria/ja/introduction.xml +0 -4
  62. data/spec/alexandria/book_providers_spec.rb +12 -16
  63. data/spec/alexandria/console_spec.rb +1 -1
  64. data/spec/alexandria/ui/main_app_spec.rb +4 -31
  65. data/spec/alexandria/ui/really_delete_dialog_spec.rb +2 -1
  66. data/tasks/spec.rake +6 -4
  67. data/util/rake/fileinstall.rb +3 -1
  68. metadata +19 -7
  69. data/dogtail/basic_run_test.py +0 -9
  70. data/lib/alexandria/book_providers/renaud.rb +0 -142
  71. data/tasks/dogtail.rake +0 -6
@@ -8,7 +8,8 @@ module Alexandria
8
8
  module UI
9
9
  class AlertDialog < SimpleDelegator
10
10
  def initialize(parent, title, stock_icon, buttons, message = nil)
11
- dialog = Gtk::Dialog.new(title: "", parent: parent, flags: :destroy_with_parent, buttons: buttons)
11
+ dialog = Gtk::Dialog.new(title: "", parent: parent, flags: :destroy_with_parent,
12
+ buttons: buttons)
12
13
  super(dialog)
13
14
 
14
15
  self.border_width = 6
@@ -129,11 +129,12 @@ module Alexandria
129
129
  def draw_barcode_bars
130
130
  @barcode_data.each do |space_width, bar_width|
131
131
  @hpos += space_width
132
- rect_item = GooCanvas::CanvasRect.new(parent: @root,
133
- x: @bar_left_edge + @scale * @hpos, y: @bar_top,
134
- width: @scale * bar_width, height: @bar_height,
135
- line_width: 0,
136
- fill_color: "white")
132
+ rect_item =
133
+ GooCanvas::CanvasRect.new(parent: @root,
134
+ x: @bar_left_edge + @scale * @hpos, y: @bar_top,
135
+ width: @scale * bar_width, height: @bar_height,
136
+ line_width: 0,
137
+ fill_color: "white")
137
138
  @hpos += bar_width
138
139
  @barcode_bars << rect_item
139
140
  end
@@ -279,7 +279,10 @@ module Alexandria
279
279
  if cover.height > COVER_ABSOLUTE_MAXHEIGHT
280
280
  FileUtils.cp(dialog.filename, "#{@cover_file}.orig")
281
281
  new_width = cover.width / (cover.height / COVER_ABSOLUTE_MAXHEIGHT.to_f)
282
- puts "Scaling large cover image to #{new_width.to_i} x #{COVER_ABSOLUTE_MAXHEIGHT}"
282
+ log.info do
283
+ "Scaling large cover image to" \
284
+ " #{new_width.to_i} x #{COVER_ABSOLUTE_MAXHEIGHT}"
285
+ end
283
286
  cover = cover.scale(new_width.to_i, COVER_ABSOLUTE_MAXHEIGHT)
284
287
  cover.save(@cover_file, "jpeg")
285
288
  else
@@ -393,8 +396,9 @@ module Alexandria
393
396
  end
394
397
 
395
398
  def parse_date(datestring)
396
- date_format = "%d/%m/%Y" # or '%m/%d/%Y' for USA and Canada ; or '%Y-%m-%d' for most of Asia
397
- ## http://en.wikipedia.org/wiki/Calendar_date#Middle_endian_forms.2C_starting_with_the_month
399
+ # '%m/%d/%Y' for USA and Canada ; or '%Y-%m-%d' for most of Asia
400
+ # http://en.wikipedia.org/wiki/Calendar_date#Middle_endian_forms.2C_starting_with_the_month
401
+ date_format = "%d/%m/%Y"
398
402
  begin
399
403
  d = Date.strptime(datestring, date_format)
400
404
  Time.gm(d.year, d.month, d.day)
@@ -70,7 +70,9 @@ module Alexandria
70
70
 
71
71
  def on_window_state_event(_window, event)
72
72
  log.debug { "window-state-event" }
73
- @maximized = event.new_window_state == :maximized if event.is_a?(Gdk::EventWindowState)
73
+ if event.is_a?(Gdk::EventWindowState)
74
+ @maximized = event.new_window_state == :maximized
75
+ end
74
76
  log.debug { "end window-state-event" }
75
77
  end
76
78
 
@@ -274,7 +276,7 @@ module Alexandria
274
276
  end
275
277
 
276
278
  def connect_signals
277
- # rubocop:disable Metrics/LineLength
279
+ # rubocop:disable Layout/LineLength
278
280
  standard_actions = [
279
281
  ["LibraryMenu", nil, _("_Library")],
280
282
  ["New", Gtk::Stock::NEW, _("_New Library"), "<control>L", _("Create a new library"), method(:on_new)],
@@ -313,7 +315,6 @@ module Alexandria
313
315
  ["Help", Gtk::Stock::HELP, _("Contents"), "F1", _("View Alexandria's manual"), method(:on_help)],
314
316
  ["About", Gtk::Stock::ABOUT, _("_About"), nil, _("Show information about Alexandria"), method(:on_about)],
315
317
  ]
316
- # rubocop:enable Metrics/LineLength
317
318
 
318
319
  toggle_actions = [
319
320
  ["Sidepane", nil, _("Side _Pane"), "F9", nil, method(:on_view_sidepane), true],
@@ -335,6 +336,8 @@ module Alexandria
335
336
  ["ByEdition", nil, _("By _Binding"), nil, nil, 4],
336
337
  ["ByRating", nil, _("By _Rating"), nil, nil, 5]
337
338
  ]
339
+ # rubocop:enable Layout/LineLength
340
+
338
341
  providers_actions = BookProviders.map do |provider|
339
342
  [provider.action_name, Gtk::Stock::JUMP_TO,
340
343
  _("At _%s") % provider.fullname, nil, nil,
@@ -357,8 +360,10 @@ module Alexandria
357
360
  action.signal_connect("activate", &callback) if callback
358
361
  end
359
362
 
360
- toggle_actions.each do |name, stock_id, label, accelerator, tooltip, callback, is_active|
361
- action = Gtk::ToggleAction.new(name, label: label, tooltip: tooltip, stock_id: stock_id)
363
+ toggle_actions
364
+ .each do |name, stock_id, label, accelerator, tooltip, callback, is_active|
365
+ action = Gtk::ToggleAction.new(name, label: label, tooltip: tooltip,
366
+ stock_id: stock_id)
362
367
  action.set_active is_active
363
368
  @actiongroup.add_action_with_accel(action, accelerator)
364
369
  action.signal_connect("toggled", &callback) if callback
@@ -366,7 +371,8 @@ module Alexandria
366
371
 
367
372
  first_action = nil
368
373
  view_as_actions.each do |name, stock_id, label, accelerator, tooltip, value|
369
- action = Gtk::RadioAction.new(name, value, label: label, tooltip: tooltip, stock_id: stock_id)
374
+ action = Gtk::RadioAction.new(name, value, label: label, tooltip: tooltip,
375
+ stock_id: stock_id)
370
376
  if first_action
371
377
  action.join_group first_action
372
378
  else
@@ -385,7 +391,8 @@ module Alexandria
385
391
 
386
392
  first_action = nil
387
393
  arrange_icons_actions.each do |name, stock_id, label, accelerator, tooltip, value|
388
- action = Gtk::RadioAction.new(name, value, label: label, tooltip: tooltip, stock_id: stock_id)
394
+ action = Gtk::RadioAction.new(name, value, label: label, tooltip: tooltip,
395
+ stock_id: stock_id)
389
396
  if first_action
390
397
  action.join_group first_action
391
398
  else
@@ -66,7 +66,7 @@ module Alexandria
66
66
  end
67
67
  end
68
68
 
69
- view.signal_connect("drag-data-get") do |_widget, _drag_context, selection_data, _info, _time|
69
+ view.signal_connect("drag-data-get") do |_, _, selection_data, _, _|
70
70
  idents = @parent.selected_books.map(&:ident)
71
71
  unless idents.empty?
72
72
  selection_data.set(Gdk::Selection::TYPE_STRING,
@@ -108,8 +108,6 @@ module Alexandria
108
108
  private
109
109
 
110
110
  def on_export(format, theme)
111
- raise NotImplementedError unless @library.respond_to?(format.message)
112
-
113
111
  filename = self.filename
114
112
  if format.ext
115
113
  filename += "." + format.ext if File.extname(filename).empty?
@@ -70,7 +70,8 @@ module Alexandria
70
70
  return GdkPixbuf::Pixbuf.new(file: filename) if File.exist?(filename)
71
71
  rescue GdkPixbuf::PixbufError
72
72
  log.error do
73
- "Failed to load GdkPixbuf::Pixbuf, please ensure that #{filename} is a valid image file"
73
+ "Failed to load GdkPixbuf::Pixbuf," \
74
+ " please ensure that #{filename} is a valid image file"
74
75
  end
75
76
  end
76
77
  BOOK_ICON
@@ -68,12 +68,14 @@ module Alexandria
68
68
 
69
69
  ICONS_SORTS = [
70
70
  Columns::TITLE, Columns::AUTHORS, Columns::ISBN,
71
- Columns::PUBLISHER, Columns::EDITION, Columns::RATING, Columns::REDD, Columns::OWN, Columns::WANT
71
+ Columns::PUBLISHER, Columns::EDITION, Columns::RATING,
72
+ Columns::REDD, Columns::OWN, Columns::WANT
72
73
  ].freeze
74
+
73
75
  def setup_books_iconview_sorting
74
76
  mode = ICONS_SORTS[@prefs.arrange_icons_mode]
75
- @iconview_model.set_sort_column_id(mode,
76
- @prefs.reverse_icons ? Gtk::SORT_DESCENDING : Gtk::SORT_ASCENDING)
77
+ sort = @prefs.reverse_icons ? Gtk::SORT_DESCENDING : Gtk::SORT_ASCENDING
78
+ @iconview_model.set_sort_column_id(mode, sort)
77
79
  @filtered_model.refilter # force redraw
78
80
  end
79
81
  end
@@ -56,7 +56,7 @@ module Alexandria
56
56
  end
57
57
 
58
58
  signal_connect("selection_changed") do
59
- import_button.sensitive = filename && File.file?(filename)
59
+ import_button.sensitive = !!(filename && File.file?(filename))
60
60
  end
61
61
 
62
62
  # before adding the (hidden) progress bar, we must re-set the
@@ -119,13 +119,11 @@ module Alexandria
119
119
  @bad_isbns = nil
120
120
  @failed_isbns = nil
121
121
  thread = Thread.start do
122
- begin
123
- library, @bad_isbns, @failed_isbns = filter.invoke(new_library_name,
124
- filename)
125
- rescue StandardError => ex
126
- trace = ex.backtrace.join("\n> ")
127
- log.error { "Import failed: #{ex.message} #{trace}" }
128
- end
122
+ library, @bad_isbns, @failed_isbns = filter.invoke(new_library_name,
123
+ filename)
124
+ rescue StandardError => ex
125
+ trace = ex.backtrace.join("\n> ")
126
+ log.error { "Import failed: #{ex.message} #{trace}" }
129
127
  end
130
128
 
131
129
  while thread.alive? && !@destroyed
@@ -14,9 +14,10 @@ module Alexandria
14
14
 
15
15
  def initialize(parent, book)
16
16
  title = _("Invalid ISBN '%s'") % book.isbn
17
- message = _("The book titled '%s' has an invalid ISBN, but still " \
18
- "exists in the providers libraries. Do you want to " \
19
- "keep the book but change the ISBN or cancel the addition?") % book.title
17
+ message =
18
+ _("The book titled '%s' has an invalid ISBN, but still " \
19
+ "exists in the providers libraries. Do you want to " \
20
+ "keep the book but change the ISBN or cancel the addition?") % book.title
20
21
  super(parent, title,
21
22
  Gtk::Stock::DIALOG_QUESTION,
22
23
  [[Gtk::Stock::CANCEL, Gtk::ResponseType::CANCEL],
@@ -128,40 +128,38 @@ module Alexandria
128
128
  renderer = CellRendererToggle.new
129
129
  renderer.activatable = true
130
130
  renderer.signal_connect("toggled") do |_rndrr, path|
131
- begin
132
- tree_path = Gtk::TreePath.new(path)
133
- child_path = @listview_model.convert_path_to_child_path(tree_path)
134
- if child_path
135
- unfiltered_path = @filtered_model.convert_path_to_child_path(child_path)
136
- # FIX this sometimes returns a nil path for iconview...
137
- if unfiltered_path
138
- iter = @model.get_iter(unfiltered_path)
139
- if iter
140
- book = @parent.book_from_iter(@parent.selected_library, iter)
141
- toggle_state = case iterid
142
- when Columns::REDD then book.redd
143
- when Columns::OWN then book.own
144
- when Columns::WANT then book.want
145
- end
146
- # invert toggle_state
147
- unless iterid == Columns::WANT && book.own
148
- toggle_state = !toggle_state
149
- case iterid
150
- when Columns::REDD then book.redd = toggle_state
151
- when Columns::OWN then book.own = toggle_state
152
- when Columns::WANT then book.want = toggle_state
153
- end
154
- iter[iterid] = toggle_state
155
- lib = @parent.selected_library
156
- lib.save(book)
131
+ tree_path = Gtk::TreePath.new(path)
132
+ child_path = @listview_model.convert_path_to_child_path(tree_path)
133
+ if child_path
134
+ unfiltered_path = @filtered_model.convert_path_to_child_path(child_path)
135
+ # FIX this sometimes returns a nil path for iconview...
136
+ if unfiltered_path
137
+ iter = @model.get_iter(unfiltered_path)
138
+ if iter
139
+ book = @parent.book_from_iter(@parent.selected_library, iter)
140
+ toggle_state = case iterid
141
+ when Columns::REDD then book.redd
142
+ when Columns::OWN then book.own
143
+ when Columns::WANT then book.want
144
+ end
145
+ # invert toggle_state
146
+ unless iterid == Columns::WANT && book.own
147
+ toggle_state = !toggle_state
148
+ case iterid
149
+ when Columns::REDD then book.redd = toggle_state
150
+ when Columns::OWN then book.own = toggle_state
151
+ when Columns::WANT then book.want = toggle_state
157
152
  end
153
+ iter[iterid] = toggle_state
154
+ lib = @parent.selected_library
155
+ lib.save(book)
158
156
  end
159
157
  end
160
-
161
158
  end
162
- rescue StandardError => ex
163
- log.error { "toggle failed for path #{path} #{ex}\n" + e.backtrace.join("\n") }
159
+
164
160
  end
161
+ rescue StandardError => ex
162
+ log.error { "toggle failed for path #{path} #{ex}\n" + e.backtrace.join("\n") }
165
163
  end
166
164
  column = Gtk::TreeViewColumn.new(title, renderer, text: iterid)
167
165
  column.sort_column_id = iterid
@@ -169,7 +167,9 @@ module Alexandria
169
167
  log.debug { format("Create listview column for %s...", title) }
170
168
 
171
169
  column.add_attribute(renderer, "active", iterid)
172
- column.add_attribute(renderer, "inconsistent", Columns::OWN) if iterid == Columns::WANT
170
+ if iterid == Columns::WANT
171
+ column.add_attribute(renderer, "inconsistent", Columns::OWN)
172
+ end
173
173
 
174
174
  log.debug { "append_column #{column}" }
175
175
  @listview.append_column(column)
@@ -206,7 +206,10 @@ module Alexandria
206
206
  cols.each_index do |i|
207
207
  cols[i].visible = !!cols_visibility[i]
208
208
  end
209
- log.debug { "Columns visibility: " + cols.map { |col| "#{col.title} #{col.visible?}" }.join(", ") }
209
+ log.debug do
210
+ "Columns visibility: " +
211
+ cols.map { |col| "#{col.title} #{col.visible?}" }.join(", ")
212
+ end
210
213
  end
211
214
 
212
215
  # Sets the width of each column based on any respective
@@ -7,7 +7,9 @@
7
7
  module Alexandria
8
8
  module EventOverrides
9
9
  def ==(obj)
10
- obj.is_a?(self.class) && (time == obj.time) && (x == obj.x) && (y == obj.y) && (button == obj.button)
10
+ obj.is_a?(self.class) &&
11
+ (time == obj.time) && (x == obj.x) && (y == obj.y) &&
12
+ (button == obj.button)
11
13
  end
12
14
  end
13
15
 
@@ -104,7 +106,6 @@ module Alexandria
104
106
  path, _, cell_x, cell_y = get_path_at_pos(event.x, event.y)
105
107
  return false if path.nil?
106
108
 
107
- # call_parent = (event.state.control_mask? or event.state.shift_mask?) or !selected or event.button != 1
108
109
  (call_parent = !selection.path_is_selected?(path)) ||
109
110
  (event.button != 1)
110
111
 
@@ -179,24 +179,22 @@ module Alexandria
179
179
  image_error_dialog(@image_error).display
180
180
  else
181
181
  @images.each_pair do |key, value|
182
- begin
183
- loader = GdkPixbuf::PixbufLoader.new
184
- loader.last_write(value)
185
- pixbuf = loader.pixbuf
186
-
187
- if pixbuf.width > 1
188
- iter = @treeview_results.model.get_iter(key.to_s)
189
- unless @treeview_results.model.iter_is_valid?(iter)
190
- raise format("Iter is invalid! %s", iter)
191
- end
192
-
193
- iter[2] = pixbuf # I bet you this is it!
182
+ loader = GdkPixbuf::PixbufLoader.new
183
+ loader.last_write(value)
184
+ pixbuf = loader.pixbuf
185
+
186
+ if pixbuf.width > 1
187
+ iter = @treeview_results.model.get_iter(key.to_s)
188
+ unless @treeview_results.model.iter_is_valid?(iter)
189
+ raise format("Iter is invalid! %s", iter)
194
190
  end
195
191
 
196
- @images.delete(key)
197
- rescue StandardError => ex
198
- image_error_dialog(ex.message).display
192
+ iter[2] = pixbuf # I bet you this is it!
199
193
  end
194
+
195
+ @images.delete(key)
196
+ rescue StandardError => ex
197
+ image_error_dialog(ex.message).display
200
198
  end
201
199
  end
202
200
 
@@ -538,19 +536,18 @@ module Alexandria
538
536
  if (event.event_type == :button_press) &&
539
537
  (event.button == 1)
540
538
 
541
- radio, target_widget, box2, box3 = case widget
542
- when @eventbox_entry_search
543
- [@title_radiobutton, @entry_search,
544
- @eventbox_combo_search, @eventbox_entry_isbn]
545
-
546
- when @eventbox_combo_search
547
- [@title_radiobutton, @combo_search,
548
- @eventbox_entry_search, @eventbox_entry_isbn]
549
-
550
- when @eventbox_entry_isbn
551
- [@isbn_radiobutton, @entry_isbn,
552
- @eventbox_entry_search, @eventbox_combo_search]
553
- end
539
+ radio, target_widget, box2, box3 =
540
+ case widget
541
+ when @eventbox_entry_search
542
+ [@title_radiobutton, @entry_search,
543
+ @eventbox_combo_search, @eventbox_entry_isbn]
544
+ when @eventbox_combo_search
545
+ [@title_radiobutton, @combo_search,
546
+ @eventbox_entry_search, @eventbox_entry_isbn]
547
+ when @eventbox_entry_isbn
548
+ [@isbn_radiobutton, @entry_isbn,
549
+ @eventbox_entry_search, @eventbox_combo_search]
550
+ end
554
551
  radio.active = true
555
552
  target_widget.grab_focus
556
553
  widget.above_child = false
@@ -570,8 +567,9 @@ module Alexandria
570
567
  return unless isbn13
571
568
 
572
569
  if (book = library.find { |bk| bk.isbn == isbn13 })
573
- raise DuplicateBookException, format(_("'%s' already exists in '%s' (titled '%s')."),
574
- isbn, library.name, book.title.sub("&", "&amp;"))
570
+ raise DuplicateBookException,
571
+ format(_("'%s' already exists in '%s' (titled '%s')."),
572
+ isbn, library.name, book.title.sub("&", "&amp;"))
575
573
  end
576
574
  end
577
575
  end
@@ -75,7 +75,9 @@ module Alexandria
75
75
  "sure it is written correcty, and try again.")
76
76
  end
77
77
  ary = @library.select { |book| book.ident == isbn }
78
- raise AddError, _("The EAN/ISBN you provided is already used in this library.") unless ary.empty?
78
+ unless ary.empty?
79
+ raise AddError, _("The EAN/ISBN you provided is already used in this library.")
80
+ end
79
81
  end
80
82
  if (publisher = @entry_publisher.text.strip).empty?
81
83
  raise AddError, _("A publisher must be provided.")
@@ -15,7 +15,8 @@ module Alexandria
15
15
  module UI
16
16
  class ProviderPreferencesBaseDialog < SimpleDelegator
17
17
  def initialize(title:, parent:, flags:, buttons:)
18
- dialog = Gtk::Dialog.new(title: title, parent: parent, flags: flags, buttons: buttons)
18
+ dialog = Gtk::Dialog.new(title: title, parent: parent, flags: flags,
19
+ buttons: buttons)
19
20
  super(dialog)
20
21
 
21
22
  self.resizable = false
@@ -126,7 +126,8 @@ module Alexandria
126
126
 
127
127
  @library_listview.enable_model_drag_dest(BOOKS_TARGET_TABLE, :move)
128
128
 
129
- @library_listview.signal_connect("drag-motion") do |_widget, drag_context, x, y, time, _data|
129
+ @library_listview
130
+ .signal_connect("drag-motion") do |_widget, drag_context, x, y, time, _data|
130
131
  log.debug { "drag-motion" }
131
132
 
132
133
  path, column, =
@@ -156,7 +157,8 @@ module Alexandria
156
157
  time)
157
158
  end
158
159
 
159
- @library_listview.signal_connect("drag-drop") do |widget, drag_context, _x, _y, time, _data|
160
+ @library_listview
161
+ .signal_connect("drag-drop") do |widget, drag_context, _x, _y, time, _data|
160
162
  log.debug { "drag-drop" }
161
163
 
162
164
  widget.drag_get_data(drag_context,
@@ -165,7 +167,8 @@ module Alexandria
165
167
  true
166
168
  end
167
169
 
168
- @library_listview.signal_connect("drag-data-received") do |_, drag_context, x, y, data, _, _|
170
+ @library_listview
171
+ .signal_connect("drag-data-received") do |_, drag_context, x, y, data, _, _|
169
172
  log.debug { "drag-data-received" }
170
173
 
171
174
  success = false