Re: Sawfish-capplet Patch
- From: JeyaSudha <jeyasudha duraipandy wipro com>
- To: John Harper <jsh pixelslut com>
- Cc: "desktop-devel-list gnome org" <desktop-devel-list gnome org>, "gnomecc-list gnome org" <gnomecc-list gnome org>
- Subject: Re: Sawfish-capplet Patch
- Date: Sun, 24 Feb 2002 00:43:56 +0530
Hi
Please check the attached patch with changes in the configure file.
Thanks,
JeyaSudha.
> |- AC_MSG_CHECKING([for GNOME control center config])
>
> Is removing all these checks correct?
>
> |--- sawfish/capplet/Makefile.in Fri Feb 22 10:10:50 2002
> |+ GNOME_CC_CFLAGS=-I/opt/gnome-2.0/include/gtk-2.0 ...
>
> This is definitely wrong. You should never hardcode this type of thing
> in Makefiles, it's totally non-portable.
>
--- sawfish/configure.in Wed Feb 13 07:52:14 2002
+++ sawfish_wip/configure.in Sat Feb 23 18:38:17 2002
@@ -208,23 +208,15 @@ AC_ARG_ENABLE(capplet,
--disable-capplet Don't built the capplet], [],
[enable_capplet=yes])
-if test "$enable_capplet" = "yes"; then
- AC_MSG_CHECKING([for GNOME control center config])
- GNOME_CC_CFLAGS="`(gnome-config --cflags capplet) 2>/dev/null`"
- GNOME_CC_LIBS="`(gnome-config --libs capplet) 2>/dev/null`"
- if test $? -ne 0; then
- AC_MSG_RESULT([no])
- AC_MSG_WARN([Can't run "gnome-config capplet", not building capplet])
- else
- AC_MSG_RESULT([yes])
- dnl XXX this is bogus!
- GNOME_CC_CFLAGS="`gnome-config --cflags gnome capplet`"
- GNOME_CC_LIBS="`gnome-config --libs gnome capplet`"
- AC_SUBST(GNOME_CC_CFLAGS)
- AC_SUBST(GNOME_CC_LIBS)
- add_subdir "capplet"
- fi
-fi
+ if test "$enable_capplet" = "yes"; then
+
+ AC_MSG_CHECKING([for GNOME control center config])
+ CAP_MODULES="gtk+-2.0 gconf-2.0 libgnomeui-2.0 libglade-2.0 libbonobo-2.0 libbonoboui-2.0 libglade-2.0 gconf-2.0"
+ PKG_CHECK_MODULES(GNOME_CC, $CAP_MODULES)
+ AC_SUBST(GNOME_CC_CFLAGS)
+ AC_SUBST(GNOME_CC_LIBS)
+ add_subdir "capplet"
+ fi
AC_ARG_ENABLE(themer,
[ --enable-themer Build the sawfish-themer program [default]
--- sawfish/ChangeLog Wed Feb 13 07:52:14 2002
+++ sawfish_wip/ChangeLog Sat Feb 23 18:42:59 2002
@@ -1,3 +1,8 @@
+2002-02-22 JeyaSudha <jeyasudha duriapandy wipro com>
+
+ * configure.in : Changed the GNOME_CC_CFLAGS and GNOME_CC_LIBS for
+ Gnome2 with removal of libcapplet
+
2002-02-12 John Harper <jsh unfactored org>
* po/sawfish.pot: committed an updated version
--- sawfish/capplet/ChangeLog Sat Sep 1 06:13:20 2001
+++ sawfish_wip/capplet/ChangeLog Sat Feb 23 18:43:30 2002
@@ -1,3 +1,11 @@
+2002-02-22 JeyaSudha <jeyasudha duraipandy wipro com>
+
+ Changes made to bring up sawfish-capplet in Gnome2
+
+ * sawmill-capplet.c : Removed the libcapplet library calls.
+ In a gtk dialog widget get the sawfish-ui and display it.
+ Instead of gnome_capplet_init, gnome_program_init is used.
+
2001-08-31 John Harper <jsh pixelslut com>
Fixed 4235 (error in sawfish-ui -> sawfish-capplet livelocks):
--- sawfish/capplet/sawmill-capplet.c Sat Sep 1 06:13:20 2001
+++ sawfish_wip/capplet/sawmill-capplet.c Fri Feb 22 08:55:06 2002
@@ -39,12 +39,14 @@
# include <sys/wait.h>
#endif
-#include <capplet-widget.h>
#include <gdk/gdkx.h>
+#include <gtk/gtk.h>
+#include <gnome.h>
static GtkWidget *ui_socket;
static GtkWidget *capplet;
+
static int ui_pid;
static int ui_stdin[2];
static int ui_stdout[2];
@@ -140,7 +142,6 @@ ui_output_callback (gpointer data, gint
switch (out)
{
case 'c':
- capplet_widget_state_changed (CAPPLET_WIDGET (capplet), TRUE);
break;
case 'g': /* group doesn't exist */
@@ -178,14 +179,12 @@ sawmill_revert (void)
static void
sawmill_ok (void)
{
- gtk_container_remove (GTK_CONTAINER (capplet), ui_socket);
ui_command ("ok\n");
}
static void
sawmill_cancel (void)
{
- gtk_container_remove (GTK_CONTAINER (capplet), ui_socket);
ui_command ("cancel\n");
}
@@ -205,8 +204,7 @@ sawmill_running_p (void)
static void
sawmill_setup (void)
{
- capplet = capplet_widget_new ();
-
+ capplet = gtk_dialog_new();
if (!sawmill_running_p ())
{
GtkWidget *label = gtk_label_new (_("Sawfish isn't running"));
@@ -214,22 +212,9 @@ sawmill_setup (void)
return;
}
- gtk_signal_connect (GTK_OBJECT (capplet), "help",
- GTK_SIGNAL_FUNC (sawmill_help), NULL);
- gtk_signal_connect (GTK_OBJECT (capplet), "try",
- GTK_SIGNAL_FUNC (sawmill_apply), NULL);
- gtk_signal_connect (GTK_OBJECT (capplet), "revert",
- GTK_SIGNAL_FUNC (sawmill_revert), NULL);
- gtk_signal_connect (GTK_OBJECT (capplet), "ok",
- GTK_SIGNAL_FUNC (sawmill_ok), NULL);
- gtk_signal_connect (GTK_OBJECT (capplet), "cancel",
- GTK_SIGNAL_FUNC (sawmill_cancel), NULL);
-
ui_socket = gtk_socket_new ();
- gtk_container_add (GTK_CONTAINER (capplet), ui_socket);
-
- /* show this here so the widget gets realized */
- gtk_widget_show_all (capplet);
+ gtk_container_add (GTK_CONTAINER ((GTK_DIALOG(capplet))->vbox), ui_socket);
+
/* now fork the sawmill-ui script */
pipe (ui_stdin);
@@ -250,15 +235,12 @@ sawmill_setup (void)
close (ui_stdin[1]);
close (ui_stdout[0]);
close (ui_stdout[1]);
- sprintf (buf, "%ld", (long)GDK_WINDOW_XWINDOW (ui_socket->window));
i = 0;
argv[i++] = "sawfish-ui";
if (!no_flatten)
argv[i++] = "--flatten";
else
argv[i++] = "--single-level";
- argv[i++] = "--socket-id";
- argv[i++] = buf;
if (group != 0)
{
argv[i++] = "--group";
@@ -277,7 +259,6 @@ sawmill_setup (void)
}
}
-
/* entry point */
int
@@ -293,8 +274,8 @@ main (int argc, char **argv)
0, "Sawfish customization group", "GROUP" },
{ "sawfish-group", 0, POPT_ARG_STRING, &group,
0, "Sawfish customization group", "GROUP" },
- { "sawfish-no-flatten", 0, POPT_ARG_NONE, &no_flatten,
- 0, "Don't flatten group trees", 0 },
+// { "sawfish-no-flatten", 0, POPT_ARG_NONE, &no_flatten,
+ // 0, "Don't flatten group trees", 0 },
{ 0, 0, 0, 0, 0 }
};
@@ -302,16 +283,7 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
#endif
-
- init_results = gnome_capplet_init("sawfish-properties", SAWFISH_VERSION,
- argc, argv, options, 0, NULL);
-
- if (init_results < 0) {
- g_warning ("an initialization error occurred while "
- "starting 'sawfish-properties-capplet'.\n"
- "aborting...\n");
- exit (1);
- }
+ gnome_program_init("sawfish-properties", SAWFISH_VERSION, LIBGNOMEUI_MODULE, argc, argv, GNOME_PARAM_POPT_TABLE, options, NULL);
client = gnome_master_client ();
flags = gnome_client_get_flags(client);
@@ -342,12 +314,9 @@ main (int argc, char **argv)
token = 1;
#endif
- if (init_results != 1) {
sawmill_setup ();
- gtk_widget_show_all (capplet);
- capplet_gtk_main ();
+ gtk_main ();
if (ui_pid != 0)
waitpid (ui_pid, 0, 0);
- }
return 0;
}
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]