* Improve handling of tabs.
[lxde/pcmanfm.git] / src / pcmanfm.c
CommitLineData
b6e3c554
HJYP
1/*
2 * pcmanfm.c
3 *
f0ce8c37 4 * Copyright 2009 PCMan <pcman.tw@gmail.com>
b6e3c554
HJYP
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 */
21
22#include <config.h>
23#include <gtk/gtk.h>
24#include <stdio.h>
25
26#include <fm-gtk.h>
4d55886c 27#include "app-config.h"
b6e3c554
HJYP
28#include "main-win.h"
29
30int main(int argc, char** argv)
31{
32 GtkWidget* w;
4d55886c 33 FmConfig* config;
b6e3c554
HJYP
34 gtk_init(&argc, &argv);
35
4d55886c
HJYP
36 config = fm_app_config_new();
37 fm_gtk_init(config);
b6e3c554
HJYP
38
39 w = fm_main_win_new();
40 gtk_window_set_default_size(w, 640, 480);
41 gtk_widget_show(w);
42
43 if(argc > 1)
44 {
45 FmPath* path = fm_path_new(argv[1]);
46 fm_main_win_chdir(w, path);
47 fm_path_unref(path);
48 }
49
50 gtk_main();
51
19fbd668
HJYP
52 fm_config_save(config, NULL); /* save libfm config */
53 fm_app_config_save((FmAppConfig*)config, NULL); /* save pcmanfm config */
54
55 fm_gtk_finalize();
b6e3c554
HJYP
56
57 return 0;
58}