/* ---------------------------------------------------------------------------- * gnetadm -- Gtk+ network configuration tool * Main Module * ---------------------------------------------------------------------------- * copyright (c) 2006 Jérôme BENHAÏM , Mirsal ENNAIME * * ---------------------------------------------------------------------------- * This program is free software ; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation ; either version 2 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * ---------------------------------------------------------------------------- */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include #include "gnetadm.h" /* Get widgets from glade. This is possible because * widgets glade names and widgets pointer names are the same. */ gint init_app_interface (gnetadm_app_t* app) { gint err; GladeXML* xml; GtkWidget *w; xml=glade_xml_new("gnetadm.glade",NULL,NULL); g_assert(xml != NULL); glade_xml_signal_autoconnect(xml); w=glade_xml_get_widget(xml,"window"); /* * TODO attacher les signaux */ gtk_object_set_data (GTK_OBJECT (w), "info_window", w); g_signal_connect(G_OBJECT(w),"destroy",G_CALLBACK(gtk_main_quit),NULL); /*gtk_widget_show(w);*/ gtk_main(); return 0; } gint main (gint argc, gchar *argv[]) { gint err; gnetadm_app_t* app; #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); #endif gtk_set_locale (); gtk_init (&argc, &argv); app = (gnetadm_app_t*) g_malloc (sizeof (gnetadm_app_t)); err = init_app_interface (app); if(err) return err; gtk_main (); return 0; }