From: Andrew Lagun (Uman@editec-lotteries.com)
Date: Mon Jun 19 2000 - 09:23:13 EDT
hello
this is patch let compile glade and work with cygwin .
for generating of c-code just create
/usr/local/share/glade/gtk/autogen.sh
from your glade under unix.
diff -c -r ./glade/editor.c ./glade1/editor.c
*** ./glade/editor.c Sat Feb 12 23:54:48 2000
--- ./glade1/editor.c Mon Jun 19 14:56:24 2000
***************
*** 19,25 ****
--- 19,27 ----
#include <string.h>
#include <gdk/gdkkeysyms.h>
+ #ifndef _WIN32
#include <gdk/gdkx.h>
+ #endif
#include <gtk/gtk.h>
diff -c -r ./glade/gbwidgets/gbdialog.c ./glade1/gbwidgets/gbdialog.c
*** ./glade/gbwidgets/gbdialog.c Sun Jul 4 16:14:02 1999
--- ./glade1/gbwidgets/gbdialog.c Mon Jun 19 15:15:09 2000
***************
*** 75,91 ****
{
placeholder = editor_new_placeholder ();
gtk_widget_set_usize (placeholder, 300, 200);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (new_widget)->vbox), placeholder,
TRUE, TRUE, 0);
placeholder = editor_new_placeholder ();
gtk_widget_set_usize (placeholder, 300, 40);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (new_widget)->action_area),
placeholder, TRUE, TRUE, 0);
}
!
gb_widget_create_from (GTK_DIALOG (new_widget)->vbox,
data->action == GB_CREATING ? "dialog-vbox" : NULL);
gb_widget_set_child_name (GTK_DIALOG (new_widget)->vbox, DialogVBox);
gb_widget_create_from (GTK_DIALOG (new_widget)->action_area,
data->action == GB_CREATING ? "dialog-action_area"
--- 75,102 ----
{
placeholder = editor_new_placeholder ();
gtk_widget_set_usize (placeholder, 300, 200);
+ #ifdef _WIN32
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (new_widget)->action_area), placeholder,
+ TRUE, TRUE, 0);
+ #else
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (new_widget)->vbox), placeholder,
TRUE, TRUE, 0);
+ #endif
placeholder = editor_new_placeholder ();
gtk_widget_set_usize (placeholder, 300, 40);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (new_widget)->action_area),
placeholder, TRUE, TRUE, 0);
}
! #ifdef _WIN32
! gb_widget_create_from (GTK_DIALOG (new_widget)->action_area,
! data->action == GB_CREATING ? "dialog-action_area" : NULL);
! gb_widget_set_child_name (GTK_DIALOG (new_widget)->action_area, DialogVBox);
! #else
gb_widget_create_from (GTK_DIALOG (new_widget)->vbox,
data->action == GB_CREATING ? "dialog-vbox" : NULL);
gb_widget_set_child_name (GTK_DIALOG (new_widget)->vbox, DialogVBox);
+ #endif
+
gb_widget_create_from (GTK_DIALOG (new_widget)->action_area,
data->action == GB_CREATING ? "dialog-action_area"
***************
*** 191,203 ****
wname = g_strdup (data->wname);
source_add (data, "\n");
! child_name = gtk_widget_get_name (GTK_DIALOG (widget)->vbox);
child_name = source_create_valid_identifier (child_name);
source_add (data, " %s = GTK_DIALOG (%s)->vbox;\n",
child_name, wname);
g_free (child_name);
data->create_widget = FALSE;
gb_widget_write_source (GTK_DIALOG (widget)->vbox, data);
/* action_area is a child of vbox so I had to add a kludge to stop it
being written as a normal child - we need to do it here so that we
--- 202,227 ----
wname = g_strdup (data->wname);
source_add (data, "\n");
! #ifdef _WIN32
! child_name = gtk_widget_get_name (GTK_DIALOG (widget)->action_area);
! #else
! child_name = gtk_widget_get_name (GTK_DIALOG (widget)->vbox);
! #endif
child_name = source_create_valid_identifier (child_name);
+ #ifdef _WIN32
+ source_add (data, " %s = GTK_DIALOG (%s)->action_area;\n",
+ child_name, wname);
+ #else
source_add (data, " %s = GTK_DIALOG (%s)->vbox;\n",
child_name, wname);
+ #endif
g_free (child_name);
data->create_widget = FALSE;
+ #ifdef _WIN32
+ gb_widget_write_source (GTK_DIALOG (widget)->action_area, data);
+ #else
gb_widget_write_source (GTK_DIALOG (widget)->vbox, data);
+ #endif
/* action_area is a child of vbox so I had to add a kludge to stop it
being written as a normal child - we need to do it here so that we
***************
*** 221,227 ****
--- 245,255 ----
const gchar * child_name)
{
if (!strcmp (child_name, DialogVBox))
+ #ifdef _WIN32
+ return GTK_DIALOG (widget)->action_area;
+ #else
return GTK_DIALOG (widget)->vbox;
+ #endif
else if (!strcmp (child_name, DialogActionArea))
return GTK_DIALOG (widget)->action_area;
else
diff -c -r ./glade/glade_keys_dialog.c ./glade1/glade_keys_dialog.c
*** ./glade/glade_keys_dialog.c Sun Jan 23 21:50:00 2000
--- ./glade1/glade_keys_dialog.c Mon Jun 19 14:58:32 2000
***************
*** 103,110 ****
--- 103,115 ----
gtk_container_add (GTK_CONTAINER (scrolled_win), dialog->clist);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ #ifdef _WIN32
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), scrolled_win,
+ TRUE, TRUE, 0);
+ #else
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), scrolled_win,
TRUE, TRUE, 0);
+ #endif
gtk_widget_show (scrolled_win);
/* Insert events & descriptions */
diff -c -r ./glade/property.c ./glade1/property.c
*** ./glade/property.c Wed Mar 8 12:15:48 2000
--- ./glade1/property.c Mon Jun 19 15:12:51 2000
***************
*** 1486,1492 ****
--- 1486,1496 ----
gtk_signal_connect (GTK_OBJECT (accel_dialog), "delete_event",
GTK_SIGNAL_FUNC (glade_util_close_window_on_delete),
NULL);
+ #ifdef _WIN32
+ vbox = GTK_DIALOG (accel_dialog)->action_area;
+ #else
vbox = GTK_DIALOG (accel_dialog)->vbox;
+ #endif
#endif
vbox2 = gtk_vbox_new (FALSE, 0);
diff -c -r ./glade/utils.c ./glade1/utils.c
*** ./glade/utils.c Sat Feb 26 12:11:06 2000
--- ./glade1/utils.c Mon Jun 19 15:13:42 2000
***************
*** 116,123 ****
--- 116,128 ----
label = gtk_label_new (message);
gtk_misc_set_padding (GTK_MISC (label), 20, 20);
+ #ifdef _WIN32
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), label,
+ TRUE, TRUE, 0);
+ #else
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label,
TRUE, TRUE, 0);
+ #endif
gtk_widget_show (label);
button = gtk_button_new_with_label (_("OK"));
***************
*** 167,174 ****
--- 172,184 ----
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 20);
+ #ifdef _WIN32
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbox,
+ TRUE, TRUE, 0);
+ #else
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
TRUE, TRUE, 0);
+ #endif
gtk_widget_show (hbox);
label = gtk_label_new (message);
***************
*** 237,244 ****
--- 247,259 ----
hbox = gtk_hbox_new (FALSE, 10);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 20);
+ #ifdef _WIN32
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbox,
+ TRUE, TRUE, 0);
+ #else
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
TRUE, TRUE, 0);
+ #endif
gtk_widget_show (hbox);
label = gtk_label_new (message);
***************
*** 359,365 ****
--- 374,384 ----
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (dialog));
+ #ifdef _WIN32
+ *vbox = GTK_DIALOG (dialog)->action_area;
+ #else
*vbox = GTK_DIALOG (dialog)->vbox;
+ #endif
#endif
if (transient_for)
+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to majordomo@ncis.pn.org
with the line "unsubscribe glade-devel" in the body of the message.
This archive was generated by hypermail 2b29 : Tue Aug 01 2000 - 19:30:03 EDT