Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rectilinear lines #272

Merged
merged 2 commits into from Feb 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 9 additions & 3 deletions gaphor/diagram/propertypages.py
Expand Up @@ -453,6 +453,7 @@ def __init__(self, item):
super().__init__()
self.item = item
self.size_group = Gtk.SizeGroup(mode=Gtk.SizeGroupMode.HORIZONTAL)
self.horizontal_button: Gtk.Button

def construct(self):
page = Gtk.VBox()
Expand All @@ -463,7 +464,7 @@ def construct(self):
self.size_group.add_widget(label)
hbox.pack_start(label, False, True, 0)

button = Gtk.CheckButton(label=gettext("Orthogonal"))
button = Gtk.CheckButton(label=gettext("Rectilinear"))
button.set_active(self.item.orthogonal)
button.connect("toggled", self._on_orthogonal_change)
hbox.pack_start(button, True, True, 0)
Expand All @@ -476,11 +477,14 @@ def construct(self):
self.size_group.add_widget(label)
hbox.pack_start(label, False, True, 0)

button = Gtk.CheckButton(label=gettext("Horizontal"))
button = Gtk.CheckButton(label=gettext("Flip orientation"))
button.set_active(self.item.horizontal)
button.connect("toggled", self._on_horizontal_change)
hbox.pack_start(button, True, True, 0)

button.set_sensitive(self.item.orthogonal)
self.horizontal_button = button

page.pack_start(hbox, False, True, 0)

return page
Expand All @@ -490,8 +494,10 @@ def _on_orthogonal_change(self, button):
if len(self.item.handles()) < 3:
line_segment = Segment(self.item, None)
line_segment.split_segment(0)
self.item.orthogonal = button.get_active()
active = button.get_active()
self.item.orthogonal = active
self.item.canvas.update_now()
self.horizontal_button.set_sensitive(active)

@transactional
def _on_horizontal_change(self, button):
Expand Down
22 changes: 14 additions & 8 deletions po/ca.po
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Gaphor 0.15\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-02-11 23:46+0100\n"
"POT-Creation-Date: 2020-02-21 20:57+0100\n"
"PO-Revision-Date: 2011-03-05 20:26+0100\n"
"Last-Translator: Jordi Vilalta Prat <jvprat@gmail.com>\n"
"Language: ca\n"
Expand Down Expand Up @@ -239,14 +239,13 @@ msgstr "Extensió"
msgid "Name"
msgstr "Nom"

#: ../gaphor/diagram/propertypages.py:466
msgid "Orthogonal"
msgstr "Ortogonal"
#: ../gaphor/diagram/propertypages.py:467
msgid "Rectilinear"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:96
#: ../gaphor/diagram/propertypages.py:479
msgid "Horizontal"
msgstr "Horitzontal"
#: ../gaphor/diagram/propertypages.py:480
msgid "Flip orientation"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:34
msgid "Upper bound"
Expand All @@ -260,6 +259,10 @@ msgstr "Ordenació"
msgid "Join specification"
msgstr "Especificació de la unió"

#: ../gaphor/diagram/actions/actionspropertypages.py:96
msgid "Horizontal"
msgstr "Horitzontal"

#: ../gaphor/diagram/actions/actionspropertypages.py:133
#: ../gaphor/diagram/states/propertypages.py:34
msgid "Guard"
Expand Down Expand Up @@ -733,3 +736,6 @@ msgstr "Eines"
#~ msgid "New"
#~ msgstr ""

#~ msgid "Orthogonal"
#~ msgstr "Ortogonal"

18 changes: 12 additions & 6 deletions po/es.po
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Gaphor 0.8.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-02-11 23:46+0100\n"
"POT-Creation-Date: 2020-02-21 20:57+0100\n"
"PO-Revision-Date: 2006-02-11 08:02+0100\n"
"Last-Translator: Jordi Vilalta Prat <jvprat@gmail.com>\n"
"Language: es\n"
Expand Down Expand Up @@ -251,13 +251,12 @@ msgstr ""
msgid "Name"
msgstr ""

#: ../gaphor/diagram/propertypages.py:466
msgid "Orthogonal"
#: ../gaphor/diagram/propertypages.py:467
msgid "Rectilinear"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:96
#: ../gaphor/diagram/propertypages.py:479
msgid "Horizontal"
#: ../gaphor/diagram/propertypages.py:480
msgid "Flip orientation"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:34
Expand All @@ -272,6 +271,10 @@ msgstr ""
msgid "Join specification"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:96
msgid "Horizontal"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:133
#: ../gaphor/diagram/states/propertypages.py:34
msgid "Guard"
Expand Down Expand Up @@ -900,3 +903,6 @@ msgstr "Herramientas"
#~ msgid "New"
#~ msgstr ""

#~ msgid "Orthogonal"
#~ msgstr ""

22 changes: 14 additions & 8 deletions po/fr.po
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Gaphor 0.13.1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-02-11 23:46+0100\n"
"POT-Creation-Date: 2020-02-21 20:57+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Antonin Delpeuch <wetneb@gmail.com>\n"
"Language: fr\n"
Expand Down Expand Up @@ -238,14 +238,13 @@ msgstr "Extension"
msgid "Name"
msgstr "Nom"

#: ../gaphor/diagram/propertypages.py:466
msgid "Orthogonal"
msgstr "Orthogonal"
#: ../gaphor/diagram/propertypages.py:467
msgid "Rectilinear"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:96
#: ../gaphor/diagram/propertypages.py:479
msgid "Horizontal"
msgstr "Horizontal"
#: ../gaphor/diagram/propertypages.py:480
msgid "Flip orientation"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:34
msgid "Upper bound"
Expand All @@ -259,6 +258,10 @@ msgstr "Classement"
msgid "Join specification"
msgstr "Lier une spécification"

#: ../gaphor/diagram/actions/actionspropertypages.py:96
msgid "Horizontal"
msgstr "Horizontal"

#: ../gaphor/diagram/actions/actionspropertypages.py:133
#: ../gaphor/diagram/states/propertypages.py:34
msgid "Guard"
Expand Down Expand Up @@ -729,3 +732,6 @@ msgstr "Outils"
#~ msgid "New"
#~ msgstr "Nouveau"

#~ msgid "Orthogonal"
#~ msgstr "Orthogonal"

15 changes: 9 additions & 6 deletions po/gaphor.pot
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-02-11 23:46+0100\n"
"POT-Creation-Date: 2020-02-21 20:57+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -240,13 +240,12 @@ msgstr ""
msgid "Name"
msgstr ""

#: ../gaphor/diagram/propertypages.py:466
msgid "Orthogonal"
#: ../gaphor/diagram/propertypages.py:467
msgid "Rectilinear"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:96
#: ../gaphor/diagram/propertypages.py:479
msgid "Horizontal"
#: ../gaphor/diagram/propertypages.py:480
msgid "Flip orientation"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:34
Expand All @@ -261,6 +260,10 @@ msgstr ""
msgid "Join specification"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:96
msgid "Horizontal"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:133
#: ../gaphor/diagram/states/propertypages.py:34
msgid "Guard"
Expand Down
22 changes: 14 additions & 8 deletions po/nl.po
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.6.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-02-11 23:46+0100\n"
"POT-Creation-Date: 2020-02-21 20:57+0100\n"
"PO-Revision-Date: 2019-11-11 08:45+0100\n"
"Last-Translator: Arjan Molenaar <gaphor@gmail.com>\n"
"Language: nl_NL\n"
Expand Down Expand Up @@ -239,14 +239,13 @@ msgstr "Extension"
msgid "Name"
msgstr "Naam"

#: ../gaphor/diagram/propertypages.py:466
msgid "Orthogonal"
msgstr "Orthogonaal"
#: ../gaphor/diagram/propertypages.py:467
msgid "Rectilinear"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:96
#: ../gaphor/diagram/propertypages.py:479
msgid "Horizontal"
msgstr "Horizontaal"
#: ../gaphor/diagram/propertypages.py:480
msgid "Flip orientation"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:34
msgid "Upper bound"
Expand All @@ -260,6 +259,10 @@ msgstr "Ordering"
msgid "Join specification"
msgstr "Join specificatie"

#: ../gaphor/diagram/actions/actionspropertypages.py:96
msgid "Horizontal"
msgstr "Horizontaal"

#: ../gaphor/diagram/actions/actionspropertypages.py:133
#: ../gaphor/diagram/states/propertypages.py:34
msgid "Guard"
Expand Down Expand Up @@ -721,3 +724,6 @@ msgstr "Hulpmiddelen"
#~ msgid "New"
#~ msgstr "Nieuw"

#~ msgid "Orthogonal"
#~ msgstr "Orthogonaal"

22 changes: 14 additions & 8 deletions po/pt_BR.po
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Gaphor 0.14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-11 23:46+0100\n"
"POT-Creation-Date: 2020-02-21 20:57+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Ygor Mutti <ygormutti@dcc.ufba.br>\n"
"Language: pt_BR\n"
Expand Down Expand Up @@ -238,14 +238,13 @@ msgstr "Extensão"
msgid "Name"
msgstr "Nome"

#: ../gaphor/diagram/propertypages.py:466
msgid "Orthogonal"
msgstr "Ortogonal"
#: ../gaphor/diagram/propertypages.py:467
msgid "Rectilinear"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:96
#: ../gaphor/diagram/propertypages.py:479
msgid "Horizontal"
msgstr "Horizontal"
#: ../gaphor/diagram/propertypages.py:480
msgid "Flip orientation"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:34
msgid "Upper bound"
Expand All @@ -259,6 +258,10 @@ msgstr "Ordenação"
msgid "Join specification"
msgstr "Juntar especificação"

#: ../gaphor/diagram/actions/actionspropertypages.py:96
msgid "Horizontal"
msgstr "Horizontal"

#: ../gaphor/diagram/actions/actionspropertypages.py:133
#: ../gaphor/diagram/states/propertypages.py:34
msgid "Guard"
Expand Down Expand Up @@ -726,3 +729,6 @@ msgstr ""
#~ msgid "New"
#~ msgstr ""

#~ msgid "Orthogonal"
#~ msgstr "Ortogonal"

22 changes: 14 additions & 8 deletions po/ru.po
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Gaphor 0.13.1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-02-11 23:46+0100\n"
"POT-Creation-Date: 2020-02-21 20:57+0100\n"
"PO-Revision-Date: 2011-08-22 22:15+0000\n"
"Last-Translator: Евгений Лежнин <z_lezhnin@mail2000.ru>\n"
"Language: ru\n"
Expand Down Expand Up @@ -239,14 +239,13 @@ msgstr "Расширение"
msgid "Name"
msgstr "Имя"

#: ../gaphor/diagram/propertypages.py:466
msgid "Orthogonal"
msgstr "Прямоугольный"
#: ../gaphor/diagram/propertypages.py:467
msgid "Rectilinear"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:96
#: ../gaphor/diagram/propertypages.py:479
msgid "Horizontal"
msgstr "Горизонтальный"
#: ../gaphor/diagram/propertypages.py:480
msgid "Flip orientation"
msgstr ""

#: ../gaphor/diagram/actions/actionspropertypages.py:34
msgid "Upper bound"
Expand All @@ -260,6 +259,10 @@ msgstr "Порядок"
msgid "Join specification"
msgstr "Способ соединения"

#: ../gaphor/diagram/actions/actionspropertypages.py:96
msgid "Horizontal"
msgstr "Горизонтальный"

#: ../gaphor/diagram/actions/actionspropertypages.py:133
#: ../gaphor/diagram/states/propertypages.py:34
msgid "Guard"
Expand Down Expand Up @@ -721,3 +724,6 @@ msgstr ""
#~ msgid "New"
#~ msgstr ""

#~ msgid "Orthogonal"
#~ msgstr "Прямоугольный"