Update to new PangoLanguage changes.

2001-06-15  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkfont-fb.c (gdk_font_from_description):
	Update to new PangoLanguage changes.

	* gtk/gtkwindow-decorate.c:
	* gtk/gtkwindow.[ch]:
	Added setting argument to gtk_window_set_has_frame ()
This commit is contained in:
Alexander Larsson 2001-06-15 15:58:26 +00:00 committed by Alexander Larsson
parent 426ac9c6fe
commit 46880b96cf
4 changed files with 17 additions and 11 deletions

View File

@ -94,7 +94,7 @@ gdk_font_from_description (PangoFontDescription *desc)
PangoFont *pango_font;
PangoContext *context;
PangoFontMetrics metrics;
gchar *lang;
PangoLanguage *lang;
g_return_val_if_fail (desc, NULL);
@ -106,6 +106,9 @@ gdk_font_from_description (PangoFontDescription *desc)
font->type = GDK_FONT_FONT;
context = gdk_pango_context_get ();
pango_context_set_base_dir (context, PANGO_DIRECTION_LTR);
pango_context_set_language (context, pango_language_from_string ("UNKNOWN"));
pango_font = pango_context_load_font (context, desc);
if (!pango_font)
{
@ -134,8 +137,8 @@ gdk_font_from_description (PangoFontDescription *desc)
metrics.ascent = 0;
metrics.descent = 0;
lang = pango_context_get_lang (context);
pango_font_get_metrics (pango_font, "fr", &metrics);
lang = pango_context_get_language (context);
pango_font_get_metrics (pango_font, lang, &metrics);
private->pango_font = pango_font;

View File

@ -139,7 +139,7 @@ gtk_decorated_window_init (GtkWindow *window)
g_object_set_data_full (G_OBJECT (window), "gtk-window-decoration", deco,
(GDestroyNotify) gtk_decoration_free);
gtk_window_set_has_frame (window);
gtk_window_set_has_frame (window, TRUE);
gtk_signal_connect (GTK_OBJECT (window),
"frame_event",

View File

@ -3096,24 +3096,26 @@ gtk_window_expose (GtkWidget *widget,
/**
* gtk_window_set_has_frame:
* @window: a #GtkWindow
* @setting: a boolean
*
* If this function is called on a window before it is realized
* or showed it will have a "frame" window around widget-window,
* accessible in window->frame. Using the signal frame_event
* you can recieve all events targeted at the frame.
* If this function is called on a window with setting of TRUE, before
* it is realized or showed, it will have a "frame" window around
* widget-window, accessible in window->frame. Using the signal
* frame_event you can recieve all events targeted at the frame.
*
* This function is used by the linux-fb port to implement managed
* windows, but it could concievably be used by X-programs that
* want to do their own window decorations.
**/
void
gtk_window_set_has_frame (GtkWindow *window)
gtk_window_set_has_frame (GtkWindow *window,
gboolean setting)
{
g_return_if_fail (window != NULL);
g_return_if_fail (GTK_IS_WINDOW (window));
g_return_if_fail (!GTK_WIDGET_REALIZED (window));
window->has_frame = TRUE;
window->has_frame = setting;
}
/**

View File

@ -185,7 +185,8 @@ void gtk_window_set_geometry_hints (GtkWindow *window,
GdkWindowHints geom_mask);
/* gtk_window_set_has_frame () must be called before realizing the window_*/
void gtk_window_set_has_frame (GtkWindow *window);
void gtk_window_set_has_frame (GtkWindow *window,
gboolean setting);
void gtk_window_set_frame_dimensions (GtkWindow *window,
gint left,
gint top,