File: dialogcheck.cpp

package info (click to toggle)
photoprint 0.3.8b-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,396 kB
  • ctags: 3,472
  • sloc: cpp: 25,818; sh: 9,132; ansic: 4,778; makefile: 491; sed: 16
file content (57 lines) | stat: -rw-r--r-- 1,129 bytes parent folder | download | duplicates (4)
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
56
57
#include <iostream>

#include <gtk/gtkmain.h>

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "effectlist.h"
#include "effects_dialog.h"

#include "ppeffect_desaturate.h"
#include "ppeffect_temperature.h"

#include "egg-pixbuf-thumbnail.h"

using namespace std;

int main(int argc,char **argv)
{
	cerr << "Starting..." << endl;
	if(argc==2)
	{
		gtk_init(&argc,&argv);
		PPEffectHeader header;
		GError *err=NULL;
		char *filename=argv[1];
		GdkPixbuf *pb=egg_pixbuf_get_thumbnail_for_file(filename,EGG_PIXBUF_THUMBNAIL_LARGE,&err);
		EffectsDialog(header,NULL,pb);
		g_object_unref(G_OBJECT(pb));
	}
	else
	{
		cerr << "No argument supplied" << endl;
		PPEffectHeader header;
		EffectListSource fxs;
		fxs.CreateEffect(0,header);
		fxs.CreateEffect(1,header);
		fxs.CreateEffect(2,header);
		PPEffect *e=header.Find(fxs.GetID(1));
		if(e)
			delete e;
		else
			cerr << "not found" << endl;
		fxs.CreateEffect(1,header);
		e=header.Find(fxs.GetID(1));
		if(e)
			delete e;			
		else
			cerr << "not found" << endl;
		fxs.CreateEffect(1,header);
		e=header.Find(fxs.GetID(1));
		if(e)
			delete e;			
	}
	return(0);
}