Commit d90ee123 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/gui/info-window.c app/widgets/gimpfontselection.c replaced the last

2003-08-26  Michael Natterer  <mitch@gimp.org>

	* app/gui/info-window.c
	* app/widgets/gimpfontselection.c
	* app/widgets/gimpfontselection-dialog.c: replaced the last
	hardcoded html links by help IDs. Removed trailing whitespace.
parent 4571b6b5
2003-08-26 Michael Natterer <mitch@gimp.org>
* app/gui/info-window.c
* app/widgets/gimpfontselection.c
* app/widgets/gimpfontselection-dialog.c: replaced the last
hardcoded html links by help IDs. Removed trailing whitespace.
2003-08-26 Simon Budig <simon@gimp.org> 2003-08-26 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c: Minor code cleanup that * app/vectors/gimpbezierstroke.c: Minor code cleanup that
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h" #include "display/gimpdisplayshell.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpviewabledialog.h" #include "widgets/gimpviewabledialog.h"
#include "info-dialog.h" #include "info-dialog.h"
...@@ -95,8 +96,8 @@ info_window_close_callback (GtkWidget *widget, ...@@ -95,8 +96,8 @@ info_window_close_callback (GtkWidget *widget,
} }
static void static void
info_window_page_switch (GtkWidget *widget, info_window_page_switch (GtkWidget *widget,
GtkNotebookPage *page, GtkNotebookPage *page,
gint page_num, gint page_num,
InfoDialog *info_win) InfoDialog *info_win)
{ {
...@@ -381,7 +382,7 @@ info_window_create (GimpDisplay *gdisp) ...@@ -381,7 +382,7 @@ info_window_create (GimpDisplay *gdisp)
GIMP_STOCK_INFO, GIMP_STOCK_INFO,
_("Image Information"), _("Image Information"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/info_window.html"); GIMP_HELP_INFO_DIALOG);
gimp_dialog_create_action_area (GIMP_DIALOG (info_win->shell), gimp_dialog_create_action_area (GIMP_DIALOG (info_win->shell),
...@@ -468,7 +469,7 @@ info_window_follow_auto (Gimp *gimp) ...@@ -468,7 +469,7 @@ info_window_follow_auto (Gimp *gimp)
info_window_auto = info_window_create (gdisp); info_window_auto = info_window_create (gdisp);
g_signal_connect (context, "display_changed", g_signal_connect (context, "display_changed",
G_CALLBACK (info_window_change_display), G_CALLBACK (info_window_change_display),
NULL); NULL);
info_window_update (gdisp); info_window_update (gdisp);
...@@ -477,10 +478,10 @@ info_window_follow_auto (Gimp *gimp) ...@@ -477,10 +478,10 @@ info_window_follow_auto (Gimp *gimp)
info_dialog_popup (info_window_auto); info_dialog_popup (info_window_auto);
} }
/* Updates all extended information. */ /* Updates all extended information. */
void void
info_window_update_extended (GimpDisplay *gdisp, info_window_update_extended (GimpDisplay *gdisp,
gdouble tx, gdouble tx,
gdouble ty) gdouble ty)
...@@ -495,7 +496,7 @@ info_window_update_extended (GimpDisplay *gdisp, ...@@ -495,7 +496,7 @@ info_window_update_extended (GimpDisplay *gdisp,
InfoDialog *info_win; InfoDialog *info_win;
gboolean force_update = FALSE; gboolean force_update = FALSE;
gint i; gint i;
info_win = GIMP_DISPLAY_SHELL (gdisp->shell)->info_dialog; info_win = GIMP_DISPLAY_SHELL (gdisp->shell)->info_dialog;
if (! info_win && info_window_auto != NULL) if (! info_win && info_window_auto != NULL)
...@@ -555,7 +556,7 @@ info_window_update_extended (GimpDisplay *gdisp, ...@@ -555,7 +556,7 @@ info_window_update_extended (GimpDisplay *gdisp,
g_snprintf (buf, sizeof (buf), "%d", (gint) tx); g_snprintf (buf, sizeof (buf), "%d", (gint) tx);
gtk_label_set_text (GTK_LABEL (iwd->pos_labels[0]), buf); gtk_label_set_text (GTK_LABEL (iwd->pos_labels[0]), buf);
g_snprintf (buf, sizeof (buf), format_buf, g_snprintf (buf, sizeof (buf), format_buf,
tx * unit_factor / gdisp->gimage->xresolution); tx * unit_factor / gdisp->gimage->xresolution);
gtk_label_set_text (GTK_LABEL (iwd->pos_labels[1]), buf); gtk_label_set_text (GTK_LABEL (iwd->pos_labels[1]), buf);
...@@ -566,7 +567,7 @@ info_window_update_extended (GimpDisplay *gdisp, ...@@ -566,7 +567,7 @@ info_window_update_extended (GimpDisplay *gdisp,
g_snprintf (buf, sizeof (buf), format_buf, g_snprintf (buf, sizeof (buf), format_buf,
ty * unit_factor / gdisp->gimage->yresolution); ty * unit_factor / gdisp->gimage->yresolution);
gtk_label_set_text (GTK_LABEL (iwd->pos_labels[3]), buf); gtk_label_set_text (GTK_LABEL (iwd->pos_labels[3]), buf);
} }
/* fill in color information */ /* fill in color information */
...@@ -596,7 +597,7 @@ info_window_update_extended (GimpDisplay *gdisp, ...@@ -596,7 +597,7 @@ info_window_update_extended (GimpDisplay *gdisp,
g_snprintf (buf, sizeof (buf), "%d", (gint) color[i]); g_snprintf (buf, sizeof (buf), "%d", (gint) color[i]);
gtk_label_set_text (GTK_LABEL (iwd->rgb_labels[i]), buf); gtk_label_set_text (GTK_LABEL (iwd->rgb_labels[i]), buf);
} }
if (GIMP_IMAGE_TYPE_HAS_ALPHA (sample_type)) if (GIMP_IMAGE_TYPE_HAS_ALPHA (sample_type))
{ {
g_snprintf (buf, sizeof (buf), "%d (%d%%)", g_snprintf (buf, sizeof (buf), "%d (%d%%)",
...@@ -734,7 +735,7 @@ info_window_update (GimpDisplay *gdisp) ...@@ -734,7 +735,7 @@ info_window_update (GimpDisplay *gdisp)
g_snprintf (iwd->color_type_str, MAX_BUF, "%s", _("Grayscale")); g_snprintf (iwd->color_type_str, MAX_BUF, "%s", _("Grayscale"));
break; break;
case GIMP_INDEXED: case GIMP_INDEXED:
g_snprintf (iwd->color_type_str, MAX_BUF, "%s (%d %s)", g_snprintf (iwd->color_type_str, MAX_BUF, "%s (%d %s)",
_("Indexed Color"), gdisp->gimage->num_cols, _("colors")); _("Indexed Color"), gdisp->gimage->num_cols, _("colors"));
break; break;
} }
...@@ -745,7 +746,7 @@ info_window_update (GimpDisplay *gdisp) ...@@ -745,7 +746,7 @@ info_window_update (GimpDisplay *gdisp)
/* visual class */ /* visual class */
g_snprintf (iwd->visual_class_str, MAX_BUF, "%s", g_snprintf (iwd->visual_class_str, MAX_BUF, "%s",
gettext (visual_classes[visual->type])); gettext (visual_classes[visual->type]));
/* visual depth */ /* visual depth */
g_snprintf (iwd->visual_depth_str, MAX_BUF, "%d", visual->depth); g_snprintf (iwd->visual_depth_str, MAX_BUF, "%d", visual->depth);
} }
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h" #include "display/gimpdisplayshell.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpviewabledialog.h" #include "widgets/gimpviewabledialog.h"
#include "info-dialog.h" #include "info-dialog.h"
...@@ -95,8 +96,8 @@ info_window_close_callback (GtkWidget *widget, ...@@ -95,8 +96,8 @@ info_window_close_callback (GtkWidget *widget,
} }
static void static void
info_window_page_switch (GtkWidget *widget, info_window_page_switch (GtkWidget *widget,
GtkNotebookPage *page, GtkNotebookPage *page,
gint page_num, gint page_num,
InfoDialog *info_win) InfoDialog *info_win)
{ {
...@@ -381,7 +382,7 @@ info_window_create (GimpDisplay *gdisp) ...@@ -381,7 +382,7 @@ info_window_create (GimpDisplay *gdisp)
GIMP_STOCK_INFO, GIMP_STOCK_INFO,
_("Image Information"), _("Image Information"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/info_window.html"); GIMP_HELP_INFO_DIALOG);
gimp_dialog_create_action_area (GIMP_DIALOG (info_win->shell), gimp_dialog_create_action_area (GIMP_DIALOG (info_win->shell),
...@@ -468,7 +469,7 @@ info_window_follow_auto (Gimp *gimp) ...@@ -468,7 +469,7 @@ info_window_follow_auto (Gimp *gimp)
info_window_auto = info_window_create (gdisp); info_window_auto = info_window_create (gdisp);
g_signal_connect (context, "display_changed", g_signal_connect (context, "display_changed",
G_CALLBACK (info_window_change_display), G_CALLBACK (info_window_change_display),
NULL); NULL);
info_window_update (gdisp); info_window_update (gdisp);
...@@ -477,10 +478,10 @@ info_window_follow_auto (Gimp *gimp) ...@@ -477,10 +478,10 @@ info_window_follow_auto (Gimp *gimp)
info_dialog_popup (info_window_auto); info_dialog_popup (info_window_auto);
} }
/* Updates all extended information. */ /* Updates all extended information. */
void void
info_window_update_extended (GimpDisplay *gdisp, info_window_update_extended (GimpDisplay *gdisp,
gdouble tx, gdouble tx,
gdouble ty) gdouble ty)
...@@ -495,7 +496,7 @@ info_window_update_extended (GimpDisplay *gdisp, ...@@ -495,7 +496,7 @@ info_window_update_extended (GimpDisplay *gdisp,
InfoDialog *info_win; InfoDialog *info_win;
gboolean force_update = FALSE; gboolean force_update = FALSE;
gint i; gint i;
info_win = GIMP_DISPLAY_SHELL (gdisp->shell)->info_dialog; info_win = GIMP_DISPLAY_SHELL (gdisp->shell)->info_dialog;
if (! info_win && info_window_auto != NULL) if (! info_win && info_window_auto != NULL)
...@@ -555,7 +556,7 @@ info_window_update_extended (GimpDisplay *gdisp, ...@@ -555,7 +556,7 @@ info_window_update_extended (GimpDisplay *gdisp,
g_snprintf (buf, sizeof (buf), "%d", (gint) tx); g_snprintf (buf, sizeof (buf), "%d", (gint) tx);
gtk_label_set_text (GTK_LABEL (iwd->pos_labels[0]), buf); gtk_label_set_text (GTK_LABEL (iwd->pos_labels[0]), buf);
g_snprintf (buf, sizeof (buf), format_buf, g_snprintf (buf, sizeof (buf), format_buf,
tx * unit_factor / gdisp->gimage->xresolution); tx * unit_factor / gdisp->gimage->xresolution);
gtk_label_set_text (GTK_LABEL (iwd->pos_labels[1]), buf); gtk_label_set_text (GTK_LABEL (iwd->pos_labels[1]), buf);
...@@ -566,7 +567,7 @@ info_window_update_extended (GimpDisplay *gdisp, ...@@ -566,7 +567,7 @@ info_window_update_extended (GimpDisplay *gdisp,
g_snprintf (buf, sizeof (buf), format_buf, g_snprintf (buf, sizeof (buf), format_buf,
ty * unit_factor / gdisp->gimage->yresolution); ty * unit_factor / gdisp->gimage->yresolution);
gtk_label_set_text (GTK_LABEL (iwd->pos_labels[3]), buf); gtk_label_set_text (GTK_LABEL (iwd->pos_labels[3]), buf);
} }
/* fill in color information */ /* fill in color information */
...@@ -596,7 +597,7 @@ info_window_update_extended (GimpDisplay *gdisp, ...@@ -596,7 +597,7 @@ info_window_update_extended (GimpDisplay *gdisp,
g_snprintf (buf, sizeof (buf), "%d", (gint) color[i]); g_snprintf (buf, sizeof (buf), "%d", (gint) color[i]);
gtk_label_set_text (GTK_LABEL (iwd->rgb_labels[i]), buf); gtk_label_set_text (GTK_LABEL (iwd->rgb_labels[i]), buf);
} }
if (GIMP_IMAGE_TYPE_HAS_ALPHA (sample_type)) if (GIMP_IMAGE_TYPE_HAS_ALPHA (sample_type))
{ {
g_snprintf (buf, sizeof (buf), "%d (%d%%)", g_snprintf (buf, sizeof (buf), "%d (%d%%)",
...@@ -734,7 +735,7 @@ info_window_update (GimpDisplay *gdisp) ...@@ -734,7 +735,7 @@ info_window_update (GimpDisplay *gdisp)
g_snprintf (iwd->color_type_str, MAX_BUF, "%s", _("Grayscale")); g_snprintf (iwd->color_type_str, MAX_BUF, "%s", _("Grayscale"));
break; break;
case GIMP_INDEXED: case GIMP_INDEXED:
g_snprintf (iwd->color_type_str, MAX_BUF, "%s (%d %s)", g_snprintf (iwd->color_type_str, MAX_BUF, "%s (%d %s)",
_("Indexed Color"), gdisp->gimage->num_cols, _("colors")); _("Indexed Color"), gdisp->gimage->num_cols, _("colors"));
break; break;
} }
...@@ -745,7 +746,7 @@ info_window_update (GimpDisplay *gdisp) ...@@ -745,7 +746,7 @@ info_window_update (GimpDisplay *gdisp)
/* visual class */ /* visual class */
g_snprintf (iwd->visual_class_str, MAX_BUF, "%s", g_snprintf (iwd->visual_class_str, MAX_BUF, "%s",
gettext (visual_classes[visual->type])); gettext (visual_classes[visual->type]));
/* visual depth */ /* visual depth */
g_snprintf (iwd->visual_depth_str, MAX_BUF, "%d", visual->depth); g_snprintf (iwd->visual_depth_str, MAX_BUF, "%d", visual->depth);
} }
......
/* LIBGIMP - The GIMP Library /* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
* *
* gimpfontselection-dialog.c * gimpfontselection-dialog.c
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details. * Library General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "widgets-types.h" #include "widgets-types.h"
#include "gimphelp-ids.h"
#include "gimpfontselection.h" #include "gimpfontselection.h"
#include "gimpfontselection-dialog.h" #include "gimpfontselection-dialog.h"
...@@ -128,31 +129,31 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel) ...@@ -128,31 +129,31 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel)
dialog->fontsel = fontsel; dialog->fontsel = fontsel;
dialog->dialog = dialog->dialog =
gimp_dialog_new (_("GIMP Font Selection"), "font_selection", gimp_dialog_new (_("GIMP Font Selection"), "font_selection",
gimp_standard_help_func, "dialogs/font_selection.html", gimp_standard_help_func, GIMP_HELP_FONT_DIALOG,
GTK_WIN_POS_MOUSE, GTK_WIN_POS_MOUSE,
FALSE, TRUE, TRUE, FALSE, TRUE, TRUE,
GTK_STOCK_APPLY, gimp_font_selection_dialog_apply, GTK_STOCK_APPLY, gimp_font_selection_dialog_apply,
dialog, NULL, NULL, TRUE, FALSE, dialog, NULL, NULL, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_hide, GTK_STOCK_CANCEL, gtk_widget_hide,
NULL, (gpointer) 1, NULL, FALSE, TRUE, NULL, (gpointer) 1, NULL, FALSE, TRUE,
GTK_STOCK_OK, gimp_font_selection_dialog_ok, GTK_STOCK_OK, gimp_font_selection_dialog_ok,
dialog, NULL, NULL, TRUE, FALSE, dialog, NULL, NULL, TRUE, FALSE,
NULL); NULL);
gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog), 1); gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog), 1);
/* Create the font preview */ /* Create the font preview */
frame = gtk_frame_new (NULL); frame = gtk_frame_new (NULL);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->dialog)->vbox), frame, gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->dialog)->vbox), frame,
FALSE, FALSE, 0); FALSE, FALSE, 0);
gtk_widget_show (frame); gtk_widget_show (frame);
dialog->preview = gtk_drawing_area_new (); dialog->preview = gtk_drawing_area_new ();
gtk_widget_set_size_request (dialog->preview, -1, 30); gtk_widget_set_size_request (dialog->preview, -1, 30);
gtk_container_add (GTK_CONTAINER (frame), dialog->preview); gtk_container_add (GTK_CONTAINER (frame), dialog->preview);
...@@ -168,7 +169,7 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel) ...@@ -168,7 +169,7 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel)
table = gtk_table_new (2, 2, FALSE); table = gtk_table_new (2, 2, FALSE);
gtk_widget_show (table); gtk_widget_show (table);
gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_table_set_col_spacings (GTK_TABLE (table), 4);
/* Create the lists */ /* Create the lists */
model = gtk_list_store_new (2, model = gtk_list_store_new (2,
G_TYPE_OBJECT, /* FAMILY_COLUMN */ G_TYPE_OBJECT, /* FAMILY_COLUMN */
...@@ -176,7 +177,7 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel) ...@@ -176,7 +177,7 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel)
dialog->family_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); dialog->family_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
g_object_unref (model); g_object_unref (model);
column = column =
gtk_tree_view_column_new_with_attributes ("Family", gtk_tree_view_column_new_with_attributes ("Family",
gtk_cell_renderer_text_new (), gtk_cell_renderer_text_new (),
"text", FAMILY_NAME_COLUMN, "text", FAMILY_NAME_COLUMN,
...@@ -190,9 +191,9 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel) ...@@ -190,9 +191,9 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel)
gtk_tree_selection_set_mode (select, GTK_SELECTION_BROWSE); gtk_tree_selection_set_mode (select, GTK_SELECTION_BROWSE);
scrolled_win = gtk_scrolled_window_new (NULL, NULL); scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_SHADOW_IN); GTK_SHADOW_IN);
gtk_widget_set_size_request (scrolled_win, gtk_widget_set_size_request (scrolled_win,
FONT_LIST_WIDTH, FONT_LIST_HEIGHT); FONT_LIST_WIDTH, FONT_LIST_HEIGHT);
gtk_container_add (GTK_CONTAINER (scrolled_win), dialog->family_list); gtk_container_add (GTK_CONTAINER (scrolled_win), dialog->family_list);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
...@@ -204,15 +205,15 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel) ...@@ -204,15 +205,15 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel)
gtk_table_attach (GTK_TABLE (table), scrolled_win, 0, 1, 1, 2, gtk_table_attach (GTK_TABLE (table), scrolled_win, 0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
GTK_EXPAND | GTK_FILL, 0, 0); GTK_EXPAND | GTK_FILL, 0, 0);
model = gtk_list_store_new (2, model = gtk_list_store_new (2,
G_TYPE_OBJECT, /* FACE_COLUMN */ G_TYPE_OBJECT, /* FACE_COLUMN */
G_TYPE_STRING); /* FACE_NAME_COLUMN */ G_TYPE_STRING); /* FACE_NAME_COLUMN */
dialog->face_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); dialog->face_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
g_object_unref (model); g_object_unref (model);
column = column =
gtk_tree_view_column_new_with_attributes ("Face", gtk_tree_view_column_new_with_attributes ("Face",
gtk_cell_renderer_text_new (), gtk_cell_renderer_text_new (),
"text", FACE_NAME_COLUMN, "text", FACE_NAME_COLUMN,
...@@ -225,9 +226,9 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel) ...@@ -225,9 +226,9 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel)
gtk_tree_selection_set_mode (select, GTK_SELECTION_BROWSE); gtk_tree_selection_set_mode (select, GTK_SELECTION_BROWSE);
scrolled_win = gtk_scrolled_window_new (NULL, NULL); scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_SHADOW_IN); GTK_SHADOW_IN);
gtk_widget_set_size_request (scrolled_win, gtk_widget_set_size_request (scrolled_win,
FONT_STYLE_LIST_WIDTH, FONT_LIST_HEIGHT); FONT_STYLE_LIST_WIDTH, FONT_LIST_HEIGHT);
gtk_container_add (GTK_CONTAINER (scrolled_win), dialog->face_list); gtk_container_add (GTK_CONTAINER (scrolled_win), dialog->face_list);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
...@@ -244,7 +245,7 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel) ...@@ -244,7 +245,7 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel)
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_widget_show (label); gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_FILL, 0, 0, 0); GTK_FILL, 0, 0, 0);
label = gtk_label_new_with_mnemonic (_("_Style:")); label = gtk_label_new_with_mnemonic (_("_Style:"));
gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->face_list); gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->face_list);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
...@@ -252,23 +253,23 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel) ...@@ -252,23 +253,23 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel)
gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1,
GTK_FILL, 0, 0, 0); GTK_FILL, 0, 0, 0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->dialog)->vbox), table, gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->dialog)->vbox), table,
TRUE, TRUE, 0); TRUE, TRUE, 0);
gtk_widget_show (table); gtk_widget_show (table);
/* Insert the fonts. */ /* Insert the fonts. */
gimp_font_selection_dialog_show_available_fonts (dialog); gimp_font_selection_dialog_show_available_fonts (dialog);
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->family_list)); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->family_list));
g_signal_connect (select, "changed", g_signal_connect (select, "changed",
G_CALLBACK (gimp_font_selection_dialog_select_family), G_CALLBACK (gimp_font_selection_dialog_select_family),
dialog); dialog);
gimp_font_selection_dialog_show_available_styles (dialog); gimp_font_selection_dialog_show_available_styles (dialog);
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->face_list)); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->face_list));
g_signal_connect (select, "changed", g_signal_connect (select, "changed",
G_CALLBACK (gimp_font_selection_dialog_select_style), G_CALLBACK (gimp_font_selection_dialog_select_style),
dialog); dialog);
dialog->layout = pango_layout_new (fontsel->context); dialog->layout = pango_layout_new (fontsel->context);
...@@ -287,7 +288,7 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel) ...@@ -287,7 +288,7 @@ gimp_font_selection_dialog_new (GimpFontSelection *fontsel)
return dialog; return dialog;
} }
void void
gimp_font_selection_dialog_destroy (GimpFontSelectionDialog *dialog) gimp_font_selection_dialog_destroy (GimpFontSelectionDialog *dialog)
{ {
g_return_if_fail (dialog != NULL); g_return_if_fail (dialog != NULL);
...@@ -298,11 +299,11 @@ gimp_font_selection_dialog_destroy (GimpFontSelectionDialog *dialog) ...@@ -298,11 +299,11 @@ gimp_font_selection_dialog_destroy (GimpFontSelectionDialog *dialog)
g_free (dialog); g_free (dialog);
} }
void void
gimp_font_selection_dialog_show (GimpFontSelectionDialog *dialog) gimp_font_selection_dialog_show (GimpFontSelectionDialog *dialog)
{ {
g_return_if_fail (dialog != NULL); g_return_if_fail (dialog != NULL);
gtk_window_present (GTK_WINDOW (dialog->dialog)); gtk_window_present (GTK_WINDOW (dialog->dialog));
} }
...@@ -363,9 +364,9 @@ gimp_font_selection_dialog_set_font_desc (GimpFontSelectionDialog *dialog, ...@@ -363,9 +364,9 @@ gimp_font_selection_dialog_set_font_desc (GimpFontSelectionDialog *dialog,
valid = gtk_tree_model_iter_next (model, &iter)) valid = gtk_tree_model_iter_next (model, &iter))
{ {
PangoFontFamily *family; PangoFontFamily *family;
gtk_tree_model_get (model, &iter, FAMILY_COLUMN, &family, -1); gtk_tree_model_get (model, &iter, FAMILY_COLUMN, &family, -1);
if (g_ascii_strcasecmp (pango_font_family_get_name (family), name) == 0) if (g_ascii_strcasecmp (pango_font_family_get_name (family), name) == 0)
{ {
found = TRUE; found = TRUE;
...@@ -391,10 +392,10 @@ gimp_font_selection_dialog_set_font_desc (GimpFontSelectionDialog *dialog, ...@@ -391,10 +392,10 @@ gimp_font_selection_dialog_set_font_desc (GimpFontSelectionDialog *dialog,
{ {
PangoFontFace *face; PangoFontFace *face;
PangoFontDescription *tmp_desc; PangoFontDescription *tmp_desc;
gtk_tree_model_get (model, &iter, FACE_COLUMN, &face, -1); gtk_tree_model_get (model, &iter, FACE_COLUMN, &face, -1);
tmp_desc = pango_font_face_describe (face); tmp_desc = pango_font_face_describe (face);