]>
Dogcows Code - chaz/tint2/blob - src/tint2conf/main.c
1 /**************************************************************************
5 * Copyright (C) 2009 Thierry lorthiois (lorthiois@bbsoft.fr)
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version 2
9 * as published by the Free Software Foundation.
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 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 **************************************************************************/
24 #include <glib/gstdio.h>
25 #include <glib/gi18n.h>
28 // gcc -Wall -g main.c -o tint2conf `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0 --libs gthread-2.0`
29 // need GTK+-2.4 ou plus
31 #define LONG_VERSION_STRING "0.2"
33 static GtkUIManager
*myUIManager
= NULL
;
35 static const char *fallback_ui_file
=
37 " <menubar name='MenuBar'>"
38 " <menu action='ThemeMenu'>"
41 " <toolbar name='ToolBar'>"
42 " <toolitem action='ViewRefreshAll'/>"
44 " <toolitem action='ThemeProperties'/>"
45 " <toolitem action='ViewApply'/>"
50 static void about( GtkWindow
* parent
)
52 const char *authors
[] = { "Thierry Lorthiois", "Christian Ruppert (Build system)", NULL
};
54 const char *website_url
= "http://code.google.com/p/tint2/";
56 gtk_show_about_dialog( parent
, "name", g_get_application_name( ),
57 "comments", _( "Theming tool for tint2 panel" ),
58 "version", LONG_VERSION_STRING
,
59 "website", website_url
, "website-label", website_url
,
60 "copyright", _( "Copyright 2009 Thierry Lorthiois" ),
63 "license", LICENSE
, "wrap-license", TRUE
,
66 /* Translators: translate "translator-credits" as
67 your name to have it appear in the credits in the "About"
69 "translator-credits", _( "translator-credits" ),
74 static void destroy( GtkWidget
*widget
, gpointer data
)
80 int main (int argc
, char ** argv
)
83 bindtextdomain( domain, LOCALEDIR );
84 bind_textdomain_codeset( domain, "UTF-8" );
88 setlocale( LC_ALL
, "" );
89 gtk_init (&argc
, &argv
);
90 g_thread_init( NULL
);
92 GtkWidget
*window
= gtk_window_new (GTK_WINDOW_TOPLEVEL
);
93 gtk_window_set_title(GTK_WINDOW(window
), "Tint2 theme");
94 gtk_window_set_default_size(GTK_WINDOW(window
), 600, 350);
97 myUIManager
= gtk_ui_manager_new ( );
98 GtkActionGroup
*action_group
;
100 //actions_init ( myUIManager, cbdata );
101 gtk_ui_manager_add_ui_from_string ( myUIManager
, fallback_ui_file
, -1, NULL
);
102 gtk_ui_manager_ensure_update ( myUIManager
);
105 char *dir
= g_build_filename (g_get_user_config_dir(), "tint2", NULL
);
106 if (!g_file_test (dir
, G_FILE_TEST_IS_DIR
)) g_mkdir(dir
, 0777);
107 //window.view.set_dir(dir);
108 //window.view.load_dir();
111 g_signal_connect (G_OBJECT (window
), "destroy", G_CALLBACK (destroy
), NULL
);
112 // rig up idle/thread routines
113 //Glib::Thread::create(sigc::mem_fun(window.view, &Thumbview::load_cache_images), true);
114 //Glib::Thread::create(sigc::mem_fun(window.view, &Thumbview::create_cache_images), true);
116 gtk_widget_show (window
);
This page took 0.039506 seconds and 5 git commands to generate.