|
From: <kr_...@us...> - 2003-10-02 22:31:43
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv14885/src/cbits/GTK
Modified Files:
Button.c CheckBox.c EditBox.c Internals.h Label.c RadioBox.c
Window.c
Log Message:
bugfix
Index: Button.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Button.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Button.c 1 Oct 2003 21:47:15 -0000 1.9
--- Button.c 2 Oct 2003 22:31:39 -0000 1.10
***************
*** 36,49 ****
{
gchar *szText = toMnemonicString(txt);
- GtkWidget *window = gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(button)));
gtk_button_set_label(GTK_BUTTON(button), szText);
- handleContainerReLayout(window);
rfree(szText);
};
void osChangeButtonFont(WindowHandle button, FontHandle font)
{
- GtkWidget *window = gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(button)));
gtk_widget_modify_font(button, font->font_descr);
! handleContainerReLayout(window);
};
--- 36,47 ----
{
gchar *szText = toMnemonicString(txt);
gtk_button_set_label(GTK_BUTTON(button), szText);
rfree(szText);
+ osForceContainerReLayout(button);
};
void osChangeButtonFont(WindowHandle button, FontHandle font)
{
gtk_widget_modify_font(button, font->font_descr);
! osForceContainerReLayout(button);
};
Index: CheckBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/CheckBox.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** CheckBox.c 1 Oct 2003 21:47:15 -0000 1.8
--- CheckBox.c 2 Oct 2003 22:31:39 -0000 1.9
***************
*** 35,42 ****
{
gchar *szText = toMnemonicString(txt);
- GtkWidget *window = gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(button)));
gtk_button_set_label(GTK_BUTTON(button), szText);
- handleContainerReLayout(window);
rfree(szText);
};
--- 35,41 ----
{
gchar *szText = toMnemonicString(txt);
gtk_button_set_label(GTK_BUTTON(button), szText);
rfree(szText);
+ osForceContainerReLayout(button);
};
Index: EditBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/EditBox.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** EditBox.c 1 Oct 2003 21:47:15 -0000 1.10
--- EditBox.c 2 Oct 2003 22:31:39 -0000 1.11
***************
*** 55,60 ****
void osChangeEditBoxFont(WindowHandle entry, FontHandle font)
{
! gtk_widget_modify_font(entry, font->font_descr);
! // pango_layout_set_font_description(gtk_entry_get_layout(GTK_ENTRY(entry)), font->font_descr);
! handleContainerReLayout(gtk_widget_get_toplevel(entry));
};
--- 55,59 ----
void osChangeEditBoxFont(WindowHandle entry, FontHandle font)
{
! gtk_widget_modify_font(entry, font->font_descr);
! osForceContainerReLayout(entry);
};
Index: Internals.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Internals.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Internals.h 1 Oct 2003 21:47:15 -0000 1.5
--- Internals.h 2 Oct 2003 22:31:39 -0000 1.6
***************
*** 27,29 ****
--- 27,31 ----
extern void *rmalloc(unsigned long bytes);
+ void osForceContainerReLayout(GtkWidget *widget);
+
#endif
Index: Label.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Label.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Label.c 1 Oct 2003 21:47:15 -0000 1.8
--- Label.c 2 Oct 2003 22:31:39 -0000 1.9
***************
*** 33,47 ****
{
gchar *szText = toMnemonicString(txt);
- GtkWidget *window = gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(label)));
gtk_label_set_text_with_mnemonic(GTK_LABEL(label), szText);
- handleContainerReLayout(window);
rfree(szText);
};
void osChangeLabelFont(WindowHandle label, FontHandle font)
{
- GtkWidget *window = gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(label)));
gtk_widget_modify_font(label, font->font_descr);
! //pango_layout_set_font_description(gtk_label_get_layout(GTK_LABEL(label)), font->font_descr);
! handleContainerReLayout(window);
};
--- 33,44 ----
{
gchar *szText = toMnemonicString(txt);
gtk_label_set_text_with_mnemonic(GTK_LABEL(label), szText);
rfree(szText);
+ osForceContainerReLayout(label);
};
void osChangeLabelFont(WindowHandle label, FontHandle font)
{
gtk_widget_modify_font(label, font->font_descr);
! osForceContainerReLayout(label);
};
Index: RadioBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/RadioBox.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** RadioBox.c 1 Oct 2003 21:47:15 -0000 1.9
--- RadioBox.c 2 Oct 2003 22:31:39 -0000 1.10
***************
*** 37,44 ****
{
gchar *szText = toMnemonicString(txt);
- GtkWidget *window = gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(button)));
gtk_button_set_label(GTK_BUTTON(button), szText);
- handleContainerReLayout(window);
rfree(szText);
};
--- 37,43 ----
{
gchar *szText = toMnemonicString(txt);
gtk_button_set_label(GTK_BUTTON(button), szText);
rfree(szText);
+ osForceContainerReLayout(button);
};
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Window.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** Window.c 1 Oct 2003 21:47:15 -0000 1.29
--- Window.c 2 Oct 2003 22:31:39 -0000 1.30
***************
*** 833,834 ****
--- 833,848 ----
}
}
+
+ void osForceContainerReLayout(GtkWidget *widget)
+ {
+ while (widget)
+ {
+ widget = gtk_widget_get_parent(gtk_widget_get_parent(widget));
+
+ if (!GTK_IS_FRAME(widget) && !GTK_IS_NOTEBOOK(gtk_widget_get_parent(widget)))
+ {
+ handleContainerReLayout(widget);
+ break;
+ }
+ }
+ }
|