Skip to content

Commit

Permalink
fix app-id || improve translation || improve filechooser filter
Browse files Browse the repository at this point in the history
  • Loading branch information
pthrrr committed Nov 5, 2021
1 parent 44c6ac7 commit ebebe00
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 57 deletions.
2 changes: 1 addition & 1 deletion com.github.brain-child.moobo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runtime: io.elementary.Platform
runtime-version: '6'
sdk: io.elementary.Sdk

command: com.github.brain-child.moobo
command: com.github.brain_child.moobo

finish-args:
- '--share=ipc'
Expand Down
2 changes: 1 addition & 1 deletion data/gresource.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/com/github/brain-child/moobo">
<gresource prefix="/com/github/brain_child/moobo">
<file compressed="true">styles/Style.css</file>
<file compressed="true">styles/SourceRow.css</file>
<file compressed="true">styles/ColorButton.css</file>
Expand Down
2 changes: 1 addition & 1 deletion data/gschema.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<schema path="/com/github/brain-child/moobo/" id="com.github.brain-child.moobo">
<schema path="/com/github/brain_child/moobo/" id="com.github.brain_child.moobo">
<key name="win-x" type="i">
<default>100</default>
<summary>x-position</summary>
Expand Down
2 changes: 1 addition & 1 deletion data/moobo.appdata.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">

<id>com.github.brain-child.moobo</id>
<id>com.github.brain_child.moobo</id>
<metadata_license>CC0</metadata_license>
<name>Moobo</name>
<summary>Visualize your ideas on moodboards</summary>
Expand Down
4 changes: 2 additions & 2 deletions data/moobo.desktop.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Name=Moobo
GenericName=Moodboard Application
Comment=Visualize your ideas
Categories=GTK;Office;Utility;
Exec=com.github.brain-child.moobo
Icon=com.github.brain-child.moobo
Exec=com.github.brain_child.moobo
Icon=com.github.brain_child.moobo
Terminal=false
Type=Application
Keywords=notes;moobo;moodboard;idea;
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# project name and programming language
project('com.github.brain-child.moobo', 'vala', 'c')
project('com.github.brain_child.moobo', 'vala', 'c')

# Include the translations module
i18n = import('i18n')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the com.github.brain-child.moobo package.
# This file is distributed under the same license as the com.github.brain_child.moobo package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: com.github.brain-child.moobo\n"
"Project-Id-Version: com.github.brain_child.moobo\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-04 20:49+0100\n"
"POT-Creation-Date: 2021-11-05 18:32+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Pierre Fabarius <[email protected]>\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
Expand All @@ -19,23 +19,23 @@ msgstr ""

#: src/Window.vala:57
msgid "New Board"
msgstr "Neues Board"
msgstr ""

#: src/Window.vala:72
msgid "Boards"
msgstr ""

#: src/Movable.vala:67
msgid "Change Color"
msgstr "Farbe ändern"
msgstr ""

#: src/Movable.vala:100
msgid "Scale"
msgstr "Skalieren"
msgstr ""

#: src/Movable.vala:125 src/Controllers/RowController.vala:127
msgid "Delete"
msgstr "Löschen"
msgstr ""

#: src/Widgets/FloatingButton.vala:33
msgid "Text"
Expand All @@ -47,106 +47,103 @@ msgstr ""

#: src/Widgets/FloatingButton.vala:35
msgid "Image"
msgstr "Bild"
msgstr ""

#: src/Widgets/Row.vala:74
msgid "Rename"
msgstr "Umbenennen"
msgstr ""

#: src/Controllers/RowController.vala:120
#, c-format
msgid "Do you want to delete \"%s\"?"
msgstr "Möchtest du \"%s\" löschen?"
msgstr ""

#: src/Controllers/RowController.vala:121
msgid ""
"The content of this board will be deleted completely and cannot be restored."
msgstr "Der Inhalt des Boards wird komplett gelöscht und kann nicht wiederhergestellt werden."
msgstr ""

#: src/Controllers/ImageController.vala:33
msgid "Open File"
msgstr ""

#: src/Controllers/ImageController.vala:36
msgid "Open"
msgstr "Öffnen"
msgstr ""

#: src/Controllers/ImageController.vala:37
msgid "Cancel"
msgstr "Abbrechen"
msgstr ""

#: src/Helper/DemoBoard.vala:3
msgid "Widget selection"
msgstr "Widget Auswahl"
msgstr ""

#: src/Helper/DemoBoard.vala:4
msgid "Double click anywhere to add a widget"
msgstr "Mach irgendwo einen doppelklick um ein Widget zu erstellen"
msgstr ""

#: src/Helper/DemoBoard.vala:5
msgid ""
"Change font size: ctrl +/-\n"
"save and close app: ctrl q/w"
msgstr "Schriftgröße ändern: strg +/-\nSpeichern und schließen: strg q/w"
msgstr ""

#: src/Helper/DemoBoard.vala:6
msgid ""
"Right click on widget for\n"
"context menu.\n"
"(when 'grabbing cursor' appears)"
msgstr ""
"Rechtsklick auf einem Widget\n"
"öffnet ein Kontextmenü.\n"
"(wenn 'Handcursor' erscheint)"

#: src/Helper/DemoBoard.vala:7
msgid "Create new board"
msgstr "Neues Board erstellen"
msgstr ""

#: src/Helper/DemoBoard.vala:8
msgid "Right click to edit"
msgstr "Rechtsklick zum ändern"
msgstr ""

#: data/moobo.desktop.in:3 data/moobo.appdata.xml.in:6
msgid "Moobo"
msgstr ""

#: data/moobo.desktop.in:4
msgid "Moodboard Application"
msgstr "Moodboard Applikation"
msgstr ""

#: data/moobo.desktop.in:5
msgid "Visualize your ideas"
msgstr "Visualisiere deine Ideen"
msgstr ""

#: data/moobo.desktop.in:8
msgid "com.github.brain-child.moobo"
msgid "com.github.brain_child.moobo"
msgstr ""

#: data/moobo.desktop.in:11
msgid "notes;moobo;moodboard;idea;"
msgstr "notizen;moobo;moodbord;idee"
msgstr ""

#: data/moobo.appdata.xml.in:7
msgid "Visualize your ideas on moodboards"
msgstr "Visualisiere deine Ideen auf Moodboards"
msgstr ""

#: data/moobo.appdata.xml.in:10
msgid ""
"Take your ideas; visualize them on different moodboards. Use different kinds "
"of widgets. Drag, stack, scale and color them."
msgstr ""
"Sammle Ideen; Visualisiere sie auf verschiedenen Moodboards. Benutze "
"verschiedene Widgets. Bewege, stapel, skaliere und färbe sie."

#: data/moobo.appdata.xml.in:13
msgid ""
"⚠ NOTE: The potential of this app has not yet been reached. At the moment, I "
"consider the program as proof of concept. Unexpected behavior may occur."
msgstr ""
"⚠ HINWEIS: Das Potential der App ist noch nicht ausgeschöpft. Im Moment wird "
"sie als Proof of Concept betrachtet."

#: data/moobo.appdata.xml.in:22
msgid "brain·​child"
msgstr ""

#: data/moobo.appdata.xml.in:40
msgid "First release!"
msgstr "Erste Veröffentlichung!"
msgstr ""
14 changes: 9 additions & 5 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: com.github.brain-child.moobo\n"
"Project-Id-Version: com.github.brain_child.moobo\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-04 20:49+0100\n"
"POT-Creation-Date: 2021-11-05 18:32+0100\n"
"PO-Revision-Date: 2021-10-14 20:06+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -65,13 +65,17 @@ msgstr ""
"Der Inhalt des Boards wird komplett gelöscht und kann nicht "
"wiederhergestellt werden."

#: src/Controllers/ImageController.vala:33
msgid "Open File"
msgstr "Datei Öffnen"

#: src/Controllers/ImageController.vala:36
msgid "Open"
msgstr ""
msgstr "Öffnen"

#: src/Controllers/ImageController.vala:37
msgid "Cancel"
msgstr ""
msgstr "Abbrechen"

#: src/Helper/DemoBoard.vala:3
msgid "Widget selection"
Expand Down Expand Up @@ -120,7 +124,7 @@ msgid "Visualize your ideas"
msgstr "Visualisiere deine Ideen"

#: data/moobo.desktop.in:8
msgid "com.github.brain-child.moobo"
msgid "com.github.brain_child.moobo"
msgstr ""

#: data/moobo.desktop.in:11
Expand Down
2 changes: 1 addition & 1 deletion src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Application : Gtk.Application {
protected override void activate () {

var css_provider = new Gtk.CssProvider();
css_provider.load_from_resource ("com/github/brain-child/moobo/styles/Style.css");
css_provider.load_from_resource ("com/github/brain_child/moobo/styles/Style.css");
Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER);

var gtk_settings = Gtk.Settings.get_default ();
Expand Down
19 changes: 10 additions & 9 deletions src/Controllers/ImageController.vala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public class ImageController {
public ImageModel model { private set; get; }

private BoardController board_controller;
private string app_dir = "%s/com.github.brain-child.moobo".printf (Environment.get_user_data_dir ());
private string app_dir = "%s/com.github.brain_child.moobo".printf (Environment.get_user_data_dir ());
private int width;
private int height;

Expand All @@ -14,9 +14,9 @@ public class ImageController {
this.model = model;

if (model.path == "") { model.path = get_file (); }

Gdk.Pixbuf.get_file_info (model.path, out width, out height);

if (model.path != "") {
movable.init (model.path);
update_widget ();
Expand All @@ -30,14 +30,15 @@ public class ImageController {
public string get_file () {
string file_path = "";
var file_chooser = new Gtk.FileChooserNative (
"Open File",
null,
_("Open File"),
board_controller.window,
Gtk.FileChooserAction.OPEN,
_("Open"),
_("Cancel")
);
var filter = new Gtk.FileFilter ();
filter.add_mime_type ("image/*");
filter.add_pixbuf_formats ();
file_chooser.set_transient_for (board_controller.window);
file_chooser.filter = filter;
var res = file_chooser.run ();
if (res == Gtk.ResponseType.ACCEPT) {
Expand All @@ -52,10 +53,10 @@ public class ImageController {
private void update_widget () {
movable.rel_pos_x = movable.margin_start = model.x;
movable.rel_pos_y = movable.margin_top = model.y;

var scaled_width = (int) (width * model.scale_factor);
var scaled_height = (int) (height * model.scale_factor);

movable.pixbuf = movable.pixbuf.scale_simple (scaled_width, scaled_height, Gdk.InterpType.HYPER);
}

Expand All @@ -79,7 +80,7 @@ public class ImageController {
var scale_val = board_controller.board.scale.get_value ();
var new_width = (int) (scale_val * width);
var new_height = (int) (scale_val * height);

try {
movable.image.pixbuf = new Gdk.Pixbuf.from_file_at_size (model.path, new_width, new_height);
} catch (Error e) {
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/Constants.vala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Const {
public const string APP_NAME = "Moobo";
public const string APP_ID = "com.github.brain-child.moobo";
public const string APP_ID = "com.github.brain_child.moobo";
public const string APP_PATH = "/" + APP_ID;

public const int WIN_WIDTH = 1400;
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/ColorButton.vala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ private class ColorButton : Gtk.CheckButton {

static construct {
css_provider = new Gtk.CssProvider ();
css_provider.load_from_resource ("com/github/brain-child/moobo/styles/ColorButton.css");
css_provider.load_from_resource ("com/github/brain_child/moobo/styles/ColorButton.css");
}

public ColorButton (string color_name) {
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/Row.vala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class Row : Gtk.ListBoxRow {

construct {
listrow_provider = new Gtk.CssProvider ();
listrow_provider.load_from_resource ("com/github/brain-child/moobo/styles/SourceRow.css");
listrow_provider.load_from_resource ("com/github/brain_child/moobo/styles/SourceRow.css");

source_color = new Gtk.Grid () {
halign = Gtk.Align.START,
Expand Down

0 comments on commit ebebe00

Please sign in to comment.