2004-05-18 14:58:20 +00:00
|
|
|
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
2004-05-17 17:03:38 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "control-center-categories.h"
|
|
|
|
|
re-write to use libgnome-menu to load the contents of the preferences
2004-11-10 Mark McLoughlin <mark@skynet.ie>
* control-center-categories.[ch]: re-write to use libgnome-menu
to load the contents of the preferences menu.
* control-center.c:
(relayout_canvas), (get_x), (get_y), (get_entry),
(get_line_length): update for control-center-categories.[ch] changes.
(activate_entry): load the .desktop file and launch.
(create_window), (main): remove all nautilus and bonobo stuff.
* gnome-control-center.png: rename from control-center2.png.
* gnomecc.desktop.in: update for new icon name.
* GNOME_ControlCenter.server.in: remove, we're not a Nautilus view
anymore.
* active.png, bcg_top.png, bg.png, bgtop.png,
blank.png, ccsplash.png, empty.png, foot.png,
gnome-lockscreen.png, gnome-unlockscreen.png,
gnomecc-ui.xml, html-view.xpm, kill-gnomecc.sh,
left.png, left_top.png, title.png, tree-view.xpm:
Remove what seems to be a big bunch of cruft.
* Makefile.am: remove cruft, install new icon, don't link
aganst libnautilus.
2004-11-16 08:56:50 +00:00
|
|
|
#include <gdk/gdkkeysyms.h>
|
|
|
|
#include <gtk/gtk.h>
|
2004-05-27 22:42:15 +00:00
|
|
|
#include <gconf/gconf-client.h>
|
re-write to use libgnome-menu to load the contents of the preferences
2004-11-10 Mark McLoughlin <mark@skynet.ie>
* control-center-categories.[ch]: re-write to use libgnome-menu
to load the contents of the preferences menu.
* control-center.c:
(relayout_canvas), (get_x), (get_y), (get_entry),
(get_line_length): update for control-center-categories.[ch] changes.
(activate_entry): load the .desktop file and launch.
(create_window), (main): remove all nautilus and bonobo stuff.
* gnome-control-center.png: rename from control-center2.png.
* gnomecc.desktop.in: update for new icon name.
* GNOME_ControlCenter.server.in: remove, we're not a Nautilus view
anymore.
* active.png, bcg_top.png, bg.png, bgtop.png,
blank.png, ccsplash.png, empty.png, foot.png,
gnome-lockscreen.png, gnome-unlockscreen.png,
gnomecc-ui.xml, html-view.xpm, kill-gnomecc.sh,
left.png, left_top.png, title.png, tree-view.xpm:
Remove what seems to be a big bunch of cruft.
* Makefile.am: remove cruft, install new icon, don't link
aganst libnautilus.
2004-11-16 08:56:50 +00:00
|
|
|
#include <libgnome/libgnome.h>
|
|
|
|
#include <libgnomeui/libgnomeui.h>
|
2005-05-16 13:57:06 +00:00
|
|
|
#include "gnomecc-canvas.h"
|
2004-05-17 17:03:38 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
gnome_cc_die (void)
|
|
|
|
{
|
2005-05-16 13:57:06 +00:00
|
|
|
gtk_main_quit ();
|
2004-05-17 17:03:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2005-05-16 13:57:06 +00:00
|
|
|
change_status (GnomeccCanvas *canvas, const gchar *status, void *data)
|
2004-05-17 17:03:38 +00:00
|
|
|
{
|
|
|
|
GnomeAppBar *bar = data;
|
|
|
|
|
|
|
|
if (!status)
|
|
|
|
status = "";
|
|
|
|
|
|
|
|
gnome_appbar_set_status (bar, status);
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWindow *
|
re-write to use libgnome-menu to load the contents of the preferences
2004-11-10 Mark McLoughlin <mark@skynet.ie>
* control-center-categories.[ch]: re-write to use libgnome-menu
to load the contents of the preferences menu.
* control-center.c:
(relayout_canvas), (get_x), (get_y), (get_entry),
(get_line_length): update for control-center-categories.[ch] changes.
(activate_entry): load the .desktop file and launch.
(create_window), (main): remove all nautilus and bonobo stuff.
* gnome-control-center.png: rename from control-center2.png.
* gnomecc.desktop.in: update for new icon name.
* GNOME_ControlCenter.server.in: remove, we're not a Nautilus view
anymore.
* active.png, bcg_top.png, bg.png, bgtop.png,
blank.png, ccsplash.png, empty.png, foot.png,
gnome-lockscreen.png, gnome-unlockscreen.png,
gnomecc-ui.xml, html-view.xpm, kill-gnomecc.sh,
left.png, left_top.png, title.png, tree-view.xpm:
Remove what seems to be a big bunch of cruft.
* Makefile.am: remove cruft, install new icon, don't link
aganst libnautilus.
2004-11-16 08:56:50 +00:00
|
|
|
create_window (void)
|
2004-05-17 17:03:38 +00:00
|
|
|
{
|
2005-05-16 13:57:06 +00:00
|
|
|
GtkWidget *window, *appbar, *sw, *canvas;
|
2004-05-17 17:03:38 +00:00
|
|
|
ControlCenterInformation *info;
|
2005-05-16 13:57:06 +00:00
|
|
|
GnomeClient *client;
|
2004-05-17 17:03:38 +00:00
|
|
|
|
|
|
|
client = gnome_master_client ();
|
2005-05-16 13:57:06 +00:00
|
|
|
g_signal_connect (G_OBJECT (client), "die",
|
|
|
|
G_CALLBACK (gnome_cc_die), NULL);
|
2004-05-17 17:03:38 +00:00
|
|
|
|
re-write to use libgnome-menu to load the contents of the preferences
2004-11-10 Mark McLoughlin <mark@skynet.ie>
* control-center-categories.[ch]: re-write to use libgnome-menu
to load the contents of the preferences menu.
* control-center.c:
(relayout_canvas), (get_x), (get_y), (get_entry),
(get_line_length): update for control-center-categories.[ch] changes.
(activate_entry): load the .desktop file and launch.
(create_window), (main): remove all nautilus and bonobo stuff.
* gnome-control-center.png: rename from control-center2.png.
* gnomecc.desktop.in: update for new icon name.
* GNOME_ControlCenter.server.in: remove, we're not a Nautilus view
anymore.
* active.png, bcg_top.png, bg.png, bgtop.png,
blank.png, ccsplash.png, empty.png, foot.png,
gnome-lockscreen.png, gnome-unlockscreen.png,
gnomecc-ui.xml, html-view.xpm, kill-gnomecc.sh,
left.png, left_top.png, title.png, tree-view.xpm:
Remove what seems to be a big bunch of cruft.
* Makefile.am: remove cruft, install new icon, don't link
aganst libnautilus.
2004-11-16 08:56:50 +00:00
|
|
|
info = control_center_get_information ();
|
|
|
|
window = gnome_app_new ("gnomecc", _("Desktop Preferences"));
|
|
|
|
gtk_window_set_icon_name (GTK_WINDOW (window), "gnome-control-center");
|
2004-05-17 17:03:38 +00:00
|
|
|
gtk_window_set_default_size (GTK_WINDOW (window), 760, 530);
|
|
|
|
|
|
|
|
appbar = gnome_appbar_new (FALSE, TRUE, GNOME_PREFERENCES_USER);
|
|
|
|
gnome_app_set_statusbar (GNOME_APP (window), appbar);
|
|
|
|
|
2005-05-16 13:57:06 +00:00
|
|
|
canvas = gnomecc_canvas_new (info);
|
|
|
|
g_signal_connect (G_OBJECT (canvas), "selection-changed",
|
|
|
|
G_CALLBACK (change_status), appbar);
|
|
|
|
|
2005-10-18 22:51:31 +00:00
|
|
|
sw = gtk_scrolled_window_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 10, 100, 100)),
|
|
|
|
GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 10, 100, 100)));
|
|
|
|
|
2005-05-16 13:57:06 +00:00
|
|
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
|
|
|
gtk_container_add (GTK_CONTAINER (sw), canvas);
|
2004-05-17 17:03:38 +00:00
|
|
|
|
2005-05-16 13:57:06 +00:00
|
|
|
gnome_app_set_contents (GNOME_APP (window), sw);
|
2004-05-17 17:03:38 +00:00
|
|
|
|
|
|
|
gtk_widget_show_all (window);
|
|
|
|
|
2005-10-18 22:51:31 +00:00
|
|
|
gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (sw),
|
|
|
|
GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 10, 100, 100)));
|
|
|
|
|
2004-05-17 17:03:38 +00:00
|
|
|
g_object_weak_ref (G_OBJECT (window), (GWeakNotify) gnome_cc_die, NULL);
|
|
|
|
|
|
|
|
return GTK_WINDOW (window);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
GnomeProgram *ccprogram;
|
|
|
|
|
|
|
|
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
|
|
|
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
|
|
|
textdomain (GETTEXT_PACKAGE);
|
|
|
|
|
|
|
|
ccprogram = gnome_program_init ("gnome-control-center",
|
|
|
|
VERSION, LIBGNOMEUI_MODULE,
|
|
|
|
argc, argv,
|
|
|
|
GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
|
|
|
|
NULL);
|
re-write to use libgnome-menu to load the contents of the preferences
2004-11-10 Mark McLoughlin <mark@skynet.ie>
* control-center-categories.[ch]: re-write to use libgnome-menu
to load the contents of the preferences menu.
* control-center.c:
(relayout_canvas), (get_x), (get_y), (get_entry),
(get_line_length): update for control-center-categories.[ch] changes.
(activate_entry): load the .desktop file and launch.
(create_window), (main): remove all nautilus and bonobo stuff.
* gnome-control-center.png: rename from control-center2.png.
* gnomecc.desktop.in: update for new icon name.
* GNOME_ControlCenter.server.in: remove, we're not a Nautilus view
anymore.
* active.png, bcg_top.png, bg.png, bgtop.png,
blank.png, ccsplash.png, empty.png, foot.png,
gnome-lockscreen.png, gnome-unlockscreen.png,
gnomecc-ui.xml, html-view.xpm, kill-gnomecc.sh,
left.png, left_top.png, title.png, tree-view.xpm:
Remove what seems to be a big bunch of cruft.
* Makefile.am: remove cruft, install new icon, don't link
aganst libnautilus.
2004-11-16 08:56:50 +00:00
|
|
|
create_window ();
|
2004-05-17 17:03:38 +00:00
|
|
|
|
re-write to use libgnome-menu to load the contents of the preferences
2004-11-10 Mark McLoughlin <mark@skynet.ie>
* control-center-categories.[ch]: re-write to use libgnome-menu
to load the contents of the preferences menu.
* control-center.c:
(relayout_canvas), (get_x), (get_y), (get_entry),
(get_line_length): update for control-center-categories.[ch] changes.
(activate_entry): load the .desktop file and launch.
(create_window), (main): remove all nautilus and bonobo stuff.
* gnome-control-center.png: rename from control-center2.png.
* gnomecc.desktop.in: update for new icon name.
* GNOME_ControlCenter.server.in: remove, we're not a Nautilus view
anymore.
* active.png, bcg_top.png, bg.png, bgtop.png,
blank.png, ccsplash.png, empty.png, foot.png,
gnome-lockscreen.png, gnome-unlockscreen.png,
gnomecc-ui.xml, html-view.xpm, kill-gnomecc.sh,
left.png, left_top.png, title.png, tree-view.xpm:
Remove what seems to be a big bunch of cruft.
* Makefile.am: remove cruft, install new icon, don't link
aganst libnautilus.
2004-11-16 08:56:50 +00:00
|
|
|
gtk_main ();
|
2004-05-17 17:03:38 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|