Use GnomeDialog rather than BonoboWindow

2001-07-03  Bradford Hovinen  <hovinen@ximian.com>

	* capplet-dir.c (capplet_control_launch): Use GnomeDialog rather
	than BonoboWindow

	* archiver/Makefile.am (bonobo_moniker_archiver_LDADD): Use @...@
	rather than $(...) for pkg-config's sake
This commit is contained in:
Bradford Hovinen 2001-07-03 19:18:51 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent 963cbcaff5
commit 0e31da4c76
4 changed files with 30 additions and 28 deletions

View file

@ -1,7 +1,11 @@
2001-07-03 Bradford Hovinen <hovinen@ximian.com>
* archiver/Makefile.am (bonobo_moniker_archiver_LDADD): Use @...@
rather than $(...) for pkg-config's sake
* capplets/Makefile.am (INCLUDES): Use correct location for Glade
data
Added sound-properties.glade, sound-properties.desktop
2001-07-03 Richard Hestilow <hestilow@ximian.com>

View file

@ -21,10 +21,22 @@ sound_properties_capplet_SOURCES = sound-properties-capplet.c
sound_properties_capplet_LDADD = @CAPPLET_LIBS@
OAF_FILES = \
oafdir = $(datadir)/oaf
oaf_DATA = \
Bonobo_Control_Capplet_sound_properties.oaf
oafdir = $(datadir)/oaf
oaf_DATA = $(OAF_FILES)
Gladedir = $(datadir)/control-center-data
Glade_DATA = \
sound-properties.glade
EXTRA_DIST = $(OAF_FILES)
glade_msgs = \
sound-properties.glade.h
Applicationsdir = $(datadir)/control-center/Desktop
Applications_DATA = \
sound-properties.desktop
pApplicationsdir = $(datadir)/gnome/apps/Settings/Desktop
pApplications_DATA = \
sound-properties.desktop
EXTRA_DIST = ChangeLog $(Applications_DATA) $(Glade_DATA) $(glade_msgs) $(oaf_DATA)

View file

@ -1,5 +1,8 @@
2001-07-03 Bradford Hovinen <hovinen@ximian.com>
* capplet-dir.c (capplet_control_launch): Use GnomeDialog rather
than BonoboWindow
* main.c (main): Connect destroy signal on capplet window to
gtk_main_quit

View file

@ -403,15 +403,14 @@ capplet_control_launch (const gchar *capplet_name)
gchar *oaf_iid, *moniker;
gchar *tmp, *tmp1;
GtkWidget *app, *control, *box, *buttons, *ok_button, *cancel_button;
BonoboUIContainer *uic;
GtkWidget *app, *control;
BonoboControlFrame *frame;
Bonobo_PropertyBag bag;
Bonobo_Property property;
CORBA_Environment ev;
BonoboArg *value;
g_return_if_fail (capplet_name != NULL);
g_return_val_if_fail (capplet_name != NULL, NULL);
CORBA_exception_init (&ev);
@ -423,14 +422,9 @@ capplet_control_launch (const gchar *capplet_name)
moniker = g_strconcat ("archiver:", tmp, NULL);
/* FIXME: Use a human-readable capplet name here */
app = bonobo_window_new (tmp, _("Capplet"));
uic = bonobo_ui_container_new ();
bonobo_ui_container_set_win (uic, BONOBO_WINDOW (app));
box = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
bonobo_window_set_contents (BONOBO_WINDOW (app), box);
control = bonobo_widget_new_control (oaf_iid, BONOBO_OBJREF (uic));
app = gnome_dialog_new (_("Capplet"), GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL, NULL);
control = bonobo_widget_new_control (oaf_iid, CORBA_OBJECT_NIL);
if (control == NULL) {
g_critical ("Could not create capplet control");
@ -439,18 +433,7 @@ capplet_control_launch (const gchar *capplet_name)
goto end;
}
gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, 0);
buttons = gtk_hbutton_box_new ();
ok_button = gtk_button_new_with_label (_("Ok"));
gtk_signal_connect (GTK_OBJECT (ok_button), "clicked",
(GtkSignalFunc) capplet_ok_cb, app);
gtk_box_pack_start (GTK_BOX (buttons), ok_button, TRUE, FALSE, 0);
cancel_button = gtk_button_new_with_label (_("Cancel"));
gtk_signal_connect (GTK_OBJECT (ok_button), "clicked",
(GtkSignalFunc) capplet_cancel_cb, app);
gtk_box_pack_start (GTK_BOX (buttons), cancel_button, TRUE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (box), buttons, TRUE, FALSE, 0);
gtk_box_pack_start (GNOME_DIALOG (app)->vbox, control, TRUE, TRUE, 0);
frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (control));
bag = bonobo_control_frame_get_control_property_bag (frame, &ev);