]>
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 // need GTK+-2.4 ou plus
30 #define LONG_VERSION_STRING "0.2"
32 static GtkUIManager
*myUIManager
= NULL
;
34 static const char *fallback_ui_file
=
36 " <menubar name='MenuBar'>"
37 " <menu action='ThemeMenu'>"
40 " <toolbar name='ToolBar'>"
41 " <toolitem action='ViewApply'/>"
46 static void about( GtkWindow
* parent
)
48 const char *authors
[] = { "Thierry Lorthiois", "Christian Ruppert (Build system)", NULL
};
50 const char *website_url
= "http://code.google.com/p/tint2/";
52 gtk_show_about_dialog( parent
, "name", g_get_application_name( ),
53 "comments", _( "Theming tool for tint2 panel" ),
54 "version", LONG_VERSION_STRING
,
55 "website", website_url
, "website-label", website_url
,
56 "copyright", _( "Copyright 2009 Thierry Lorthiois" ),
59 "license", LICENSE
, "wrap-license", TRUE
,
62 /* Translators: translate "translator-credits" as
63 your name to have it appear in the credits in the "About"
65 "translator-credits", _( "translator-credits" ),
70 static void destroy( GtkWidget
*widget
, gpointer data
)
76 int main (int argc
, char ** argv
)
79 bindtextdomain( domain, LOCALEDIR );
80 bind_textdomain_codeset( domain, "UTF-8" );
84 setlocale( LC_ALL
, "" );
85 gtk_init (&argc
, &argv
);
86 g_thread_init( NULL
);
88 GtkWidget
*window
= gtk_window_new (GTK_WINDOW_TOPLEVEL
);
89 gtk_window_set_title(GTK_WINDOW(window
), "Tint2 theme");
90 gtk_window_set_default_size(GTK_WINDOW(window
), 600, 350);
93 myUIManager
= gtk_ui_manager_new ( );
94 GtkActionGroup
*action_group
;
96 //actions_init ( myUIManager, cbdata );
97 gtk_ui_manager_add_ui_from_string ( myUIManager
, fallback_ui_file
, -1, NULL
);
98 gtk_ui_manager_ensure_update ( myUIManager
);
101 char *dir
= g_build_filename (g_get_user_config_dir(), "tint2", NULL
);
102 if (!g_file_test (dir
, G_FILE_TEST_IS_DIR
)) g_mkdir(dir
, 0777);
103 //window.view.set_dir(dir);
104 //window.view.load_dir();
107 g_signal_connect (G_OBJECT (window
), "destroy", G_CALLBACK (destroy
), NULL
);
108 // rig up idle/thread routines
109 //Glib::Thread::create(sigc::mem_fun(window.view, &Thumbview::load_cache_images), true);
110 //Glib::Thread::create(sigc::mem_fun(window.view, &Thumbview::create_cache_images), true);
112 gtk_widget_show (window
);
This page took 0.04229 seconds and 4 git commands to generate.