This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from ppvan/dev
Work on new feature
- Loading branch information
Showing
42 changed files
with
1,607 additions
and
512 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,6 @@ export | |
|
||
/build-aux | ||
|
||
*.dot | ||
*.flatpak | ||
*.dot | ||
me.ppvan.psequel.flatpak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
# This is just a file for me to type command faster, not the build file. | ||
|
||
debug: | ||
ninja -C build/ && G_MESSAGES_DEBUG=Psequel ./build/src/me.ppvan.psequel | ||
rm -rf build/resources/gtk | ||
ninja -C build/ && G_MESSAGES_DEBUG=Psequel ./build/src/psequel | ||
|
||
clean: | ||
rm -rf build/res | ||
rm -rf build/resources | ||
|
||
test: | ||
ninja -C build/ && ./build/test/psequel-test | ||
|
||
flatpak: | ||
flatpak-builder build-aux/ me.ppvan.psequel.json --force-clean | ||
flatpak-builder --install-deps-from=flathub build-aux/ me.ppvan.psequel.json --force-clean | ||
flatpak build-export export build-aux | ||
flatpak build-bundle export me.ppvan.psequel.flatpak --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo | ||
flatpak build-bundle export me.ppvan.psequel.flatpak me.ppvan.psequel --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo | ||
|
||
run: | ||
G_MESSAGES_DEBUG=Psequel ./build/src/me.ppvan.psequel | ||
G_MESSAGES_DEBUG=Psequel ./build/src/psequel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
template $PsequelBackupDialog: Adw.Dialog { | ||
follows-content-size: true; | ||
title: _("Back up database"); | ||
presentation-mode: floating; | ||
|
||
styles [ | ||
"backup-dialog" | ||
] | ||
|
||
child: Adw.ToolbarView { | ||
width-request: 600; | ||
|
||
[top] | ||
Adw.HeaderBar {} | ||
|
||
content: Adw.Clamp { | ||
maximum-size: 540; | ||
margin-top: 16; | ||
|
||
child: Box { | ||
orientation: vertical; | ||
|
||
Box { | ||
orientation: vertical; | ||
spacing: 16; | ||
|
||
ListBox { | ||
styles [ | ||
"boxed-list" | ||
] | ||
|
||
selection-mode: none; | ||
|
||
Adw.ComboRow database_row { | ||
title: _("Database"); | ||
subtitle: _("Database to backup"); | ||
model: bind template.viewmodel as <$PsequelConnectionViewModel>.connections; | ||
} | ||
|
||
Adw.ComboRow format_row { | ||
title: _("Format"); | ||
subtitle: _("Output file format"); | ||
model: bind template.formats; | ||
} | ||
|
||
Adw.ComboRow section_row { | ||
title: _("Export section"); | ||
subtitle: _("Export schema-only, data-only or both"); | ||
model: bind template.sections; | ||
} | ||
|
||
Adw.SwitchRow { | ||
title: _("Override old schema"); | ||
subtitle: _("Output DROP than CREATE"); | ||
active: bind template.clean bidirectional; | ||
} | ||
|
||
Adw.SwitchRow { | ||
title: _("Create database"); | ||
subtitle: _("Add CREATE DATABASE in output"); | ||
active: bind template.create bidirectional; | ||
} | ||
} | ||
|
||
Gtk.Button run_button { | ||
styles [ | ||
"suggested-action" | ||
] | ||
|
||
halign: end; | ||
margin-bottom: 20; | ||
label: _("_Back up"); | ||
valign: end; | ||
use-underline: true; | ||
clicked => $on_do_backup_click(); | ||
} | ||
} | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
template $PsequelRestoreDialog: Adw.Dialog { | ||
follows-content-size: true; | ||
title: _("Restore database"); | ||
presentation-mode: floating; | ||
|
||
styles [ | ||
"backup-dialog" | ||
] | ||
|
||
child: Adw.ToolbarView { | ||
width-request: 600; | ||
|
||
[top] | ||
Adw.HeaderBar {} | ||
|
||
content: Adw.Clamp { | ||
maximum-size: 540; | ||
margin-top: 16; | ||
|
||
child: Box { | ||
orientation: vertical; | ||
|
||
Box { | ||
orientation: vertical; | ||
spacing: 16; | ||
|
||
ListBox { | ||
styles [ | ||
"boxed-list" | ||
] | ||
|
||
selection-mode: none; | ||
|
||
Adw.ComboRow database_row { | ||
title: _("Database"); | ||
subtitle: _("Database to restore"); | ||
model: bind template.viewmodel as <$PsequelConnectionViewModel>.connections; | ||
} | ||
|
||
Adw.ComboRow format_row { | ||
title: _("Format"); | ||
subtitle: _("Input file format"); | ||
model: bind template.formats; | ||
} | ||
|
||
Adw.ComboRow section_row { | ||
title: _("Restore section"); | ||
subtitle: _("Restore schema-only, data-only or both"); | ||
model: bind template.sections; | ||
} | ||
|
||
Adw.SwitchRow { | ||
title: _("Override old schema"); | ||
subtitle: _("DROP old tables before restore"); | ||
active: bind template.clean bidirectional; | ||
} | ||
|
||
Adw.SwitchRow { | ||
title: _("Create database"); | ||
subtitle: _("Add CREATE DATABASE before restore"); | ||
active: bind template.create bidirectional; | ||
} | ||
} | ||
|
||
Gtk.Button run_button { | ||
styles [ | ||
"suggested-action" | ||
] | ||
|
||
halign: end; | ||
margin-bottom: 20; | ||
label: _("Restore"); | ||
valign: end; | ||
use-underline: true; | ||
clicked => $on_do_restore_click(); | ||
} | ||
} | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.