X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkaboutdialog.c;h=f50fed0af12473491817512203f8b8d36d113402;hb=ea043cab5718304d9b6170afa2d3f959fc99c718;hp=2a9757cc74fbbde15565c1890b55087abbae295a;hpb=9b6ae2e9d52459e7b737c32ff0155052d1206a77;p=~andy%2Fgtk
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 2a9757cc7..f50fed0af 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -14,9 +14,7 @@
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see .
*/
/*
@@ -103,7 +101,7 @@ static GdkColor default_visited_link_color = { 0, 0x5555, 0x1a1a, 0x8b8b };
/* Translators: this is the license preamble; the string at the end
* contains the URL of the license.
*/
-static const gchar *gtk_license_preamble = N_("This program comes with ABSOLUTELY NO WARRANTY; for details, visit %s");
+static const gchar *gtk_license_preamble = N_("This program comes with ABSOLUTELY NO WARRANTY;\nfor details, visit %s");
/* URLs for each GtkLicense type; keep in the same order as the enumeration */
static const gchar *gtk_license_urls[] = {
@@ -1016,7 +1014,7 @@ update_website (GtkAboutDialog *about)
else
{
markup = g_strdup_printf ("%s",
- priv->website_url, _("Homepage"));
+ priv->website_url, _("Website"));
}
gtk_label_set_markup (GTK_LABEL (priv->website_label), markup);
@@ -2097,11 +2095,9 @@ text_view_new (GtkAboutDialog *about,
GdkColor color;
GdkColor link_color;
GdkColor visited_link_color;
- gint size;
- PangoFontDescription *font_desc;
GtkAboutDialogPrivate *priv = about->priv;
- GtkStyleContext *context;
- GtkStateFlags state;
+ GtkTextIter start_iter, end_iter;
+ GtkTextTag *tag;
gtk_widget_style_get (GTK_WIDGET (about),
"link-color", &style_link_color,
@@ -2130,14 +2126,11 @@ text_view_new (GtkAboutDialog *about,
gtk_text_view_set_editable (text_view, FALSE);
gtk_text_view_set_wrap_mode (text_view, wrap_mode);
- context = gtk_widget_get_style_context (view);
- state = gtk_widget_get_state_flags (view);
-
- size = pango_font_description_get_size (gtk_style_context_get_font (context, state));
- font_desc = pango_font_description_new ();
- pango_font_description_set_size (font_desc, size * PANGO_SCALE_SMALL);
- gtk_widget_override_font (view, font_desc);
- pango_font_description_free (font_desc);
+ gtk_text_buffer_get_start_iter (buffer, &start_iter);
+ gtk_text_buffer_get_start_iter (buffer, &end_iter);
+ tag = gtk_text_tag_new (NULL);
+ g_object_set (tag, "font-scale", PANGO_SCALE_SMALL, NULL);
+ gtk_text_buffer_apply_tag (buffer, tag, &start_iter, &end_iter);
gtk_text_view_set_left_margin (text_view, 8);
gtk_text_view_set_right_margin (text_view, 8);
@@ -2363,6 +2356,8 @@ add_credits_section (GtkAboutDialog *about,
}
/* skip one at the end */
+ label = gtk_label_new ("");
+ gtk_grid_attach (grid, label, 1, *row, 1, 1);
(*row)++;
}
@@ -2380,7 +2375,7 @@ create_credits_page (GtkAboutDialog *about)
priv->credits_page = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), page_vbox, NULL);
sw = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_NONE);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
@@ -2389,11 +2384,15 @@ create_credits_page (GtkAboutDialog *about)
grid = gtk_grid_new ();
gtk_container_set_border_width (GTK_CONTAINER (grid), 5);
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);
- gtk_grid_set_column_spacing (GTK_GRID (grid), 2);
- gtk_grid_set_row_spacing (GTK_GRID (grid), 12);
+ gtk_grid_set_column_spacing (GTK_GRID (grid), 8);
+ gtk_grid_set_row_spacing (GTK_GRID (grid), 2);
gtk_widget_set_halign (grid, GTK_ALIGN_CENTER);
gtk_widget_set_valign (grid, GTK_ALIGN_START);
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), grid);
+ gtk_container_add (GTK_CONTAINER (sw), grid);
+ gtk_style_context_add_class (gtk_widget_get_style_context (gtk_bin_get_child (GTK_BIN (sw))),
+ GTK_STYLE_CLASS_VIEW);
+
+ row = 0;
if (priv->authors != NULL)
add_credits_section (about, GTK_GRID (grid), &row, _("Created by"), priv->authors);
@@ -2455,7 +2454,6 @@ create_license_page (GtkAboutDialog *about)
priv->license_page = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), page_vbox, NULL);
sw = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_set_border_width (GTK_CONTAINER (sw), 5);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
@@ -2665,7 +2663,7 @@ gtk_about_dialog_get_license_type (GtkAboutDialog *about)
* gtk_about_dialog_add_credit_section:
* @about: A #GtkAboutDialog
* @section_name: The name of the section
- * @people: The people who belong to that section
+ * @people: (array zero-terminated=1): The people who belong to that section
*
* Creates a new section in the Credits page.
*