(self, name, group, position, image_file, description,
toggle)
| 465 | self.append(self._message) |
| 466 | |
| 467 | def add_toolitem(self, name, group, position, image_file, description, |
| 468 | toggle): |
| 469 | if toggle: |
| 470 | button = Gtk.ToggleButton() |
| 471 | else: |
| 472 | button = Gtk.Button() |
| 473 | button.set_label(name) |
| 474 | button.add_css_class('flat') |
| 475 | |
| 476 | if image_file is not None: |
| 477 | image = Gtk.Image.new_from_gicon( |
| 478 | Gio.Icon.new_for_string(image_file)) |
| 479 | button.set_child(image) |
| 480 | button.add_css_class('image-button') |
| 481 | |
| 482 | if position is None: |
| 483 | position = -1 |
| 484 | |
| 485 | self._add_button(button, group, position) |
| 486 | signal = button.connect('clicked', self._call_tool, name) |
| 487 | button.set_tooltip_text(description) |
| 488 | self._toolitems.setdefault(name, []) |
| 489 | self._toolitems[name].append((button, signal)) |
| 490 | |
| 491 | def _find_child_at_position(self, group, position): |
| 492 | children = [None] |
nothing calls this directly
no test coverage detected