-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamcardsync.cpp
More file actions
56 lines (43 loc) · 927 Bytes
/
camcardsync.cpp
File metadata and controls
56 lines (43 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <iostream>
#include <locale.h>
#include <gtk/gtk.h>
#include "config.h"
#include "camsession.h"
#include "configdb.h"
#include "halgetmountpoint.h"
#include "mainwindow.h"
#include "config.h"
#include "gettext.h"
#define _(x) gettext(x)
#define N_(x) gettext_noop(x)
using namespace std;
#define HALPATH "/org/freedesktop/Hal"
int main(int argc,char **argv)
{
gtk_init(&argc,&argv);
char *path=NULL;
cerr << "Setting up gettext... " << PACKAGE << ", " << LOCALEDIR << endl;
setlocale(LC_ALL,"");
bindtextdomain(PACKAGE,LOCALEDIR);
bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE);
if(argc==2)
{
#ifdef HAVE_HAL
if(strncasecmp(argv[1],HALPATH,strlen(HALPATH))==0)
{
path=HALGetMountPoint(argv[1]);
}
else
#endif
path=strdup(argv[1]);
}
MainWindow mw;
mw.SetSourceDir(path); // If null, a default will be used.
if(path)
{
free(path);
}
mw.Run();
return(0);
}