Skip to content

Commit

Permalink
* [core]: add Synnefo Oyranos front send
Browse files Browse the repository at this point in the history
Synnefo is derived from Kolor Manager code.
  • Loading branch information
beku committed Apr 10, 2011
1 parent 8ba13ab commit 0b90205
Show file tree
Hide file tree
Showing 18 changed files with 66 additions and 23 deletions.
2 changes: 1 addition & 1 deletion icc_draw.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2008 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_draw.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2008 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
26 changes: 19 additions & 7 deletions icc_examin.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2009 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down Expand Up @@ -344,14 +344,24 @@ ICCexamin::start (int argc, char** argv)
# endif

#if !defined(WIN32)
FILE *out = icc_popen_m("oyranos-config", "r");
const char * oyranos_settings_gui_app = getenv("OYRANOS_SETTINGS_GUI");
if(!oyranos_settings_gui_app)
oyranos_settings_gui_app = "synnefo";
char * app = findApplication( oyranos_settings_gui_app );
if(out)
{
char name[64] = {0};
size_t r = fscanf( out, "%12s", name ); r=r;
if( strcmp(name, "oyranos") == 0 )
oyranos_settings_gui = oyranos_settings_gui_app;
icc_betrachter->menu_einstellungen->show();
}
else
{
oyranos_settings_gui_app = "oyranos-config-fltk";
app = findApplication( oyranos_settings_gui_app );
if(out)
{
oyranos_settings_gui = oyranos_settings_gui_app;
icc_betrachter->menu_einstellungen->show();
icc_pclose_m(out);
}
}
#endif

Expand Down Expand Up @@ -1104,7 +1114,9 @@ ICCexamin::auffrischen(int schalter)
void
ICCexamin::oyranos_einstellungen()
{
int r = system("oyranos-config-fltk"); r = r;
int r = 0;
if(oyranos_settings_gui.size())
r = system(oyranos_settings_gui.c_str());
auffrischen( PROGRAMM | OYRANOS );
}

Expand Down
3 changes: 2 additions & 1 deletion icc_examin.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2008 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down Expand Up @@ -96,6 +96,7 @@ class ICCexamin : public icc_examin_ns::Beobachter,
bool lade ();
void lade (ICClist<Speicher> & neu);
void oyranos_einstellungen();
std::string oyranos_settings_gui;

private:
void erneuerTagBrowserText_ (void);//!< profile text in browserText
Expand Down
2 changes: 1 addition & 1 deletion icc_examin_farbraum.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2008 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_examin_io.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2008 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_formeln.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2009 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_formeln.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2008 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_gamut.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2005 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_gamut.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2005 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_gl.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2009 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
31 changes: 30 additions & 1 deletion icc_helfer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2008 Kai-Uwe Behrmann
* Copyright (C) 2004-2010 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down Expand Up @@ -1522,6 +1522,35 @@ getExecPath(const char *filename)
return exec_path;
}

extern "C" {
char ** oySplitString_(const char * name, int32_t * n, oyAlloc_f alloc);
void oyStringListRelease_( char***, int, oyDeAlloc_f );
} /* extern "C" */
/* resembles which */
char * findApplication(const char * app_name)
{
const char * path = getenv("PATH");
char * full_app_name = NULL;
if(path && name)
{
int paths_n = 0, i;
char ** paths = oySplitString_( path, ":", &paths_n, malloc );
for(i = 0; i < paths_n; ++i)
{
std::string full_name = paths[i];
full_name += name;
int found = isFileFull( full_name );
if(found)
{
i = paths_n;
full_app_name = strcpy( full_name.c_str() );
}
}
oyStringListRelease_( &paths, paths_n, free );
}
return full_app_name;
}

#include "fl_i18n/fl_i18n.H"

void
Expand Down
1 change: 1 addition & 0 deletions icc_helfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ std::string tempFileName ();

// common
char* getExecPath ( const char *filename );
char* findApplication ( const char * app_name );
void setI18N ( const char *exename );

// text helper
Expand Down
2 changes: 1 addition & 1 deletion icc_icc.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2007 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_oyranos.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2004-2009 Kai-Uwe Behrmann
* Copyright (C) 2004-2011 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_vrml_parser.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2005-2008 Kai-Uwe Behrmann
* Copyright (C) 2005-2010 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_vrml_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2005-2008 Kai-Uwe Behrmann
* Copyright (C) 2005-2010 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion icc_waehler.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ICC Examin ist eine ICC Profil Betrachter
*
* Copyright (C) 2005-2008 Kai-Uwe Behrmann
* Copyright (C) 2005-2010 Kai-Uwe Behrmann
*
* Autor: Kai-Uwe Behrmann <[email protected]>
*
Expand Down

0 comments on commit 0b90205

Please sign in to comment.