Include a Other Software section in Help file
[geeqie.git] / src / ui_help.c
index dc834fc..0d09e08 100644 (file)
@@ -1,13 +1,22 @@
 /*
- * (SLIK) SimpLIstic sKin functions
- * (C) 2004 John Ellis
- * Copyright (C) 2008 - 2012 The Geeqie Team
+ * Copyright (C) 2004 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
  * Author: John Ellis
  *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -65,10 +74,6 @@ static void help_window_scroll(GtkWidget *text, const gchar *key)
                gtk_text_buffer_get_iter_at_line_offset(buffer, &iter, line, 0);
                gtk_text_buffer_place_cursor(buffer, &iter);
 
-#if 0
-               gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(text), &iter, 0.0, TRUE, 0, 0);
-#endif
-
                /* apparently only scroll_to_mark works when the textview is not visible yet */
 
                /* if mark exists, move it instead of creating one for every scroll */
@@ -167,7 +172,7 @@ void help_window_set_key(GtkWidget *window, const gchar *key)
        text = g_object_get_data(G_OBJECT(window), "text_widget");
        if (!text) return;
 
-       gdk_window_raise(window->window);
+       gdk_window_raise(gtk_widget_get_window(window));
 
        if (key) help_window_scroll(text, key);
 }
@@ -181,7 +186,7 @@ void help_window_set_file(GtkWidget *window, const gchar *path, const gchar *key
        text = g_object_get_data(G_OBJECT(window), "text_widget");
        if (!text) return;
 
-       gdk_window_raise(window->window);
+       gdk_window_raise(gtk_widget_get_window(window));
 
        help_window_load_text(text, path);
        help_window_scroll(text, key);
@@ -202,10 +207,8 @@ GtkWidget *help_window_new(const gchar *title,
        /* window */
 
        window = window_new(GTK_WINDOW_TOPLEVEL, subclass, NULL, NULL, title);
+       DEBUG_NAME(window);
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
-#if 0
-       gtk_container_set_border_width(GTK_CONTAINER(window), PREF_PAD_BORDER);
-#endif
        gtk_window_set_default_size(GTK_WINDOW(window), HELP_WINDOW_WIDTH, HELP_WINDOW_HEIGHT);
 
        g_signal_connect(G_OBJECT(window), "delete_event",
@@ -249,7 +252,7 @@ GtkWidget *help_window_new(const gchar *title,
        g_signal_connect(G_OBJECT(button), "clicked",
                         G_CALLBACK(help_window_close), window);
        gtk_container_add(GTK_CONTAINER(hbox), button);
-       GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
+       gtk_widget_set_can_default(button, TRUE);
        gtk_widget_grab_default(button);
        gtk_widget_show(button);