libragephoto: add C++ namespaces (API change)
- RagePhoto::saveFile() -> use const char* instead of std::string - RagePhoto C++ -> C API: try catch for throwable functions (to match C impl. behaviour) - Rename header files and classes
This commit is contained in:
parent
b94e66624b
commit
e1cf6df258
14 changed files with 275 additions and 249 deletions
|
@ -16,7 +16,7 @@
|
|||
* responsible for anything with use of the software, you are self responsible.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <RagePhotoB>
|
||||
#include <RagePhoto>
|
||||
#include <gtkmm/application.h>
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
@ -36,11 +36,11 @@ bool readPhotoFile(const std::string &filename, Gtk::Window *win, Gtk::Image *im
|
|||
if (ifs.is_open()) {
|
||||
std::string data(std::istreambuf_iterator<char>{ifs}, {});
|
||||
ifs.close();
|
||||
RagePhotoB ragePhoto;
|
||||
RagePhoto ragePhoto;
|
||||
const bool loaded = ragePhoto.load(data);
|
||||
if (!loaded) {
|
||||
const int32_t error = ragePhoto.error();
|
||||
if (error <= RagePhotoB::PhotoReadError) {
|
||||
if (error <= RagePhoto::PhotoReadError) {
|
||||
Gtk::MessageDialog msg(*win, "Failed to read photo: " + filename, false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK, true);
|
||||
msg.set_title("Open Photo");
|
||||
msg.run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue