Skip to content

Commit

Permalink
add about tab + fr text
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcima committed Mar 14, 2019
1 parent 1c44a84 commit 1160108
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 41 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.3)
project(sysexxer-ng VERSION 0.1 LANGUAGES C CXX)
cmake_minimum_required(VERSION "3.3")
project(sysexxer-ng VERSION "1.0" LANGUAGES C CXX)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

include(GNUInstallDirs)
Expand Down Expand Up @@ -30,13 +30,15 @@ add_executable(sysexxer-ng
"sources/config.cc"
"sources/window.cxx"
"sources/dnd_hold_browser.cc"
"sources/hyperlink_button.cc"
"sources/system_exclusive.cc"
"sources/sysex_send.cc"
"sources/utility.cc"
"sources/device/midi.cc"
"sources/device/midi_apis.cc")
target_compile_definitions(sysexxer-ng
PRIVATE "LOCALE_DIRECTORY=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\"")
PRIVATE "LOCALE_DIRECTORY=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\""
PRIVATE "PROJECT_VERSION=\"${PROJECT_VERSION}\"")
target_include_directories(sysexxer-ng
PRIVATE "sources" "${FLTK_INCLUDE_DIR}")
target_link_libraries(sysexxer-ng PRIVATE "${FLTK_LIBRARIES}")
Expand Down
100 changes: 68 additions & 32 deletions po/fr/sysexxer-ng.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-01 21:18+0100\n"
"POT-Creation-Date: 2019-03-14 18:58+0100\n"
"PO-Revision-Date: 2018-10-28 13:44+0100\n"
"Last-Translator: Jean Pierre Cimalando <jp-dev@inbox.ru>\n"
"Language-Team: French\n"
Expand All @@ -19,92 +19,97 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. Fl_Button* btn_load
#: sources/window.cxx:96
#: sources/window.cxx:104
msgid "@-> Send"
msgstr "@-> Envoyer"

#: sources/window.cxx:129
#: sources/window.cxx:137
msgid "@<- Receive"
msgstr "@<- Recevoir"

#. Fl_Box* lbl_midi_out
#. Fl_Button* btn_midi_in
#: sources/window.cxx:206 sources/window.cxx:209
#: sources/window.cxx:214 sources/window.cxx:217
msgid "@DnArrow"
msgstr ""

#: sources/window.cxx:91
#: sources/window.cxx:99
msgid "@fileopen Load"
msgstr "@fileopen Charger"

#. Fl_Button* btn_receive
#: sources/window.cxx:135
#: sources/window.cxx:143
msgid "@filesave Save"
msgstr "@filesave Sauvegarder"

#: sources/window_impl.cc:279
#: sources/window_impl.cc:300
msgid "@undo Cancel"
msgstr "@undo Annuler"

#: sources/window_impl.cc:179
#. Fl_Group* tab_options
#: sources/window.cxx:230
msgid "About"
msgstr "À propos"

#: sources/window_impl.cc:200
msgid "Confirm overwrite"
msgstr "Confirmer l'écrasement"

#: sources/window_impl.cc:223
#: sources/window_impl.cc:244
msgid "Could not load the system-exclusive file."
msgstr "Impossible de charger le fichier system-exclusive"

#: sources/window_impl.cc:240 sources/window_impl.cc:251
#: sources/window_impl.cc:261 sources/window_impl.cc:272
msgid "Could not save the system-exclusive file."
msgstr "Impossible de sauvegarder le fichier system-exclusive"

#: sources/window_impl.cc:222 sources/window_impl.cc:239
#: sources/window_impl.cc:250
#: sources/window_impl.cc:243 sources/window_impl.cc:260
#: sources/window_impl.cc:271
msgid "Error"
msgstr "Erreur"

#: sources/main.cc:52
msgid "Invalid arguments"
msgstr "Arguments invalides"

#: sources/window_impl.cc:132
#: sources/window_impl.cc:153
msgid "Load"
msgstr "Charger"

#. Fl_Button* btn_midi_out
#: sources/window.cxx:212
#: sources/window.cxx:220
msgid "MIDI input port"
msgstr "Port d'entrée MIDI"

#: sources/window.cxx:168
#: sources/window.cxx:176
msgid "MIDI interface"
msgstr "Interface MIDI"

#. Fl_Box* o
#: sources/window.cxx:216
#: sources/window.cxx:224
msgid "MIDI output port"
msgstr "Port de sortie MIDI"

#. Fl_Box* o
#: sources/window.cxx:172
#: sources/window.cxx:180
msgid "Max Transmission Rate"
msgstr "Taux de transmission maximum"

#: sources/window_impl.cc:180
#: sources/window_impl.cc:201
msgid "No"
msgstr "Non"

#. Fl_Group* tab_recv
#: sources/window.cxx:165
#: sources/window.cxx:173
msgid "Options"
msgstr "Options"

#. Fl_Group* tab_send
#: sources/window.cxx:126
#: sources/window.cxx:134
msgid "Receive"
msgstr "Recevoir"

#: sources/window_impl.cc:109
#: sources/window_impl.cc:111
msgid ""
"Receiving instructions\n"
"1. Connect the MIDI output to software input.\n"
Expand All @@ -118,15 +123,15 @@ msgstr ""
"3. Transmettre, et désactiver Recevoir quand c'est fini.\n"
"4. Sauvegarder le fichier system-exclusive."

#: sources/window_impl.cc:165
#: sources/window_impl.cc:186
msgid "Save"
msgstr "Sauvegarder"

#: sources/window.cxx:88
#: sources/window.cxx:96
msgid "Send"
msgstr "Envoyer"

#: sources/window_impl.cc:104
#: sources/window_impl.cc:106
msgid ""
"Sending instructions\n"
"1. Load a system-exclusive file.\n"
Expand Down Expand Up @@ -155,44 +160,75 @@ msgstr "Entrée MIDI Sysexxer"
msgid "Sysexxer MIDI out"
msgstr "Sortie MIDI Sysexxer"

#: sources/main.cc:60 sources/window.cxx:80
#: sources/main.cc:60 sources/window.cxx:88
msgid "Sysexxer NG"
msgstr "Sysexxer NG"

#: sources/device/midi.cc:49
msgid "Sysexxer Out"
msgstr "Sortie Sysexxer"

#: sources/window_impl.cc:167
#: sources/window_impl.cc:132
#, c-format
msgid ""
"Sysexxer-NG is a universal tool to exchange MIDI system-exclusive data.\n"
"\n"
"This free program is published under the terms of the Boost Software License "
"1.0.\n"
"\n"
"Version %s © 2018-2019\n"
"Author: Jean Pierre Cimalando\n"
"Contributor: Olivier Humbert"
msgstr ""
"Sysexxer-NG est un outil universel d'échange de données MIDI exclusives-système.\n"
"\n"
"Ce logiciel libre est publié sous les termes de la licence Boost Software License "
"1.0.\n"
"\n"
"Version %s © 2018-2019\n"
"Auteur : Jean Pierre Cimalando\n"
"Contributeur : Olivier Humbert"

#: sources/window_impl.cc:188
msgid "System-exclusive dump\t*.syx"
msgstr "Dump system-exclusive\t*.syx"

#: sources/window_impl.cc:134
#: sources/window_impl.cc:155
msgid ""
"System-exclusive dump\t*.syx\n"
"Standard MIDI file\t*.mid"
msgstr ""
"Dump system-exclusive\t*.syx\n"
"Fichier MIDI standard\t*.mid"

#: sources/window_impl.cc:180
#: sources/window_impl.cc:201
msgid "The file already exists. Replace it?"
msgstr "Le fichier existe déjà. L'écraser ?"

#: sources/system_exclusive.cc:583
msgid "Unknown"
msgstr "Inconnu"

#: sources/window_impl.cc:343 sources/window_impl.cc:344
#: sources/window_impl.cc:361 sources/window_impl.cc:389
#: sources/window_impl.cc:364 sources/window_impl.cc:365
#: sources/window_impl.cc:382 sources/window_impl.cc:410
msgid "Virtual port"
msgstr "Port virtuel"

#: sources/window_impl.cc:180
#. Hyperlink_Button* o
#: sources/window.cxx:250
msgid "Visit the home page"
msgstr "Visiter la page d'accueil"

#: sources/window_impl.cc:201
msgid "Yes"
msgstr "Oui"

#. Fl_Text_Display* txt_about
#: sources/window.cxx:238
msgid "https://github.com/linuxmao-org/sysexxer-ng"
msgstr ""

#. Fl_Box* lbl_sendrate
#: sources/window.cxx:192
#: sources/window.cxx:200
msgid "kb/s"
msgstr "kb/s"
26 changes: 26 additions & 0 deletions sources/hyperlink_button.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright Jean Pierre Cimalando 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include "hyperlink_button.h"
#include <FL/Fl_Window.H>

Hyperlink_Button::Hyperlink_Button(int x, int y, int w, int h, const char *l)
: Fl_Button(x, y, w, h, l)
{
}

int Hyperlink_Button::handle(int event)
{
if (event == FL_ENTER) {
Fl_Window *win = window();
win->cursor(FL_CURSOR_HAND);
}
else if (event == FL_LEAVE) {
Fl_Window *win = window();
win->cursor(FL_CURSOR_DEFAULT);
}

return Fl_Button::handle(event);
}
13 changes: 13 additions & 0 deletions sources/hyperlink_button.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright Jean Pierre Cimalando 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#pragma once
#include <FL/Fl_Button.H>

class Hyperlink_Button : public Fl_Button {
public:
Hyperlink_Button(int x, int y, int w, int h, const char *l = nullptr);
int handle(int event) override;
};
36 changes: 35 additions & 1 deletion sources/window.cxx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0304
// generated by Fast Light User Interface Designer (fluid) version 1.0305

#include "app_i18n.h"
#include "window.h"
#include "dnd_hold_browser.h"
#include "hyperlink_button.h"
#include "window_impl.cc"

void Main_Window::cb_btn_load_i(Fl_Button*, void*) {
Expand Down Expand Up @@ -74,6 +75,13 @@ void Main_Window::cb_btn_midi_out_i(Fl_Button*, void*) {
void Main_Window::cb_btn_midi_out(Fl_Button* o, void* v) {
((Main_Window*)(o->parent()->parent()->parent()))->cb_btn_midi_out_i(o,v);
}

void Main_Window::cb_https_i(Hyperlink_Button* o, void*) {
fl_open_uri(o->label());
}
void Main_Window::cb_https(Hyperlink_Button* o, void* v) {
((Main_Window*)(o->parent()->parent()->parent()))->cb_https_i(o,v);
}
Main_Window::Main_Window(int X, int Y, int W, int H, const char *L)
: Fl_Group(X, Y, W, H, L) {
P.reset(new Impl);
Expand Down Expand Up @@ -219,6 +227,32 @@ P.reset(new Impl);
} // Fl_Box* o
tab_options->end();
} // Fl_Group* tab_options
{ Fl_Group* o = new Fl_Group(0, 25, 465, 225, _("About"));
o->labelsize(12);
o->hide();
{ txt_about = new Fl_Text_Display(10, 35, 445, 140);
txt_about->box(FL_THIN_DOWN_BOX);
txt_about->labelsize(12);
txt_about->textsize(12);
} // Fl_Text_Display* txt_about
{ Hyperlink_Button* o = new Hyperlink_Button(10, 215, 325, 20, _("https://github.com/linuxmao-org/sysexxer-ng"));
o->box(FL_NO_BOX);
o->color(FL_BACKGROUND_COLOR);
o->selection_color(FL_BACKGROUND_COLOR);
o->labeltype(FL_NORMAL_LABEL);
o->labelfont(1);
o->labelsize(12);
o->labelcolor((Fl_Color)4);
o->callback((Fl_Callback*)cb_https);
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
} // Hyperlink_Button* o
{ Fl_Box* o = new Fl_Box(10, 195, 325, 20, _("Visit the home page"));
o->labelsize(12);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
o->end();
} // Fl_Group* o
tabs->end();
} // Fl_Tabs* tabs
P->init(this);
Expand Down
Loading

0 comments on commit 1160108

Please sign in to comment.