Commit 016e8b56 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

connect the "F1" help accelerator.

1999-12-19  Michael Natterer  <mitch@gimp.org>

	* app/about_dialog.c: connect the "F1" help accelerator.
parent d6d9ad15
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "gimphelp.h"
#include "libgimp/gimpfeatures.h" #include "libgimp/gimpfeatures.h"
#include "config.h" #include "config.h"
...@@ -189,6 +191,9 @@ about_dialog_create (gint timeout) ...@@ -189,6 +191,9 @@ about_dialog_create (gint timeout)
gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE); gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE);
gtk_window_set_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER); gtk_window_set_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
gimp_help_connect_help_accel (about_dialog, gimp_standard_help_func,
"dialogs/about.html");
gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy", gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy",
GTK_SIGNAL_FUNC (about_dialog_destroy), GTK_SIGNAL_FUNC (about_dialog_destroy),
NULL); NULL);
...@@ -317,7 +322,7 @@ about_dialog_create (gint timeout) ...@@ -317,7 +322,7 @@ about_dialog_create (gint timeout)
} }
else else
{ {
gdk_window_raise(about_dialog->window); gdk_window_raise (about_dialog->window);
} }
} }
...@@ -394,8 +399,10 @@ about_dialog_load_logo (GtkWidget *window) ...@@ -394,8 +399,10 @@ about_dialog_load_logo (GtkWidget *window)
fclose (fp); fclose (fp);
dissolve_width = (logo_width / ANIMATION_SIZE)+(logo_width % ANIMATION_SIZE ==0 ?0 : 1); dissolve_width =
dissolve_height = (logo_height / ANIMATION_SIZE)+(logo_height % ANIMATION_SIZE ==0 ?0 : 1); (logo_width / ANIMATION_SIZE) + (logo_width % ANIMATION_SIZE == 0 ? 0 : 1);
dissolve_height =
(logo_height / ANIMATION_SIZE) + (logo_height % ANIMATION_SIZE == 0 ? 0 : 1);
dissolve_map = g_new (guchar, dissolve_width * dissolve_height); dissolve_map = g_new (guchar, dissolve_width * dissolve_height);
...@@ -490,7 +497,8 @@ about_dialog_timer (gpointer data) ...@@ -490,7 +497,8 @@ about_dialog_timer (gpointer data)
gdk_draw_pixmap (logo_area->window, gdk_draw_pixmap (logo_area->window,
logo_area->style->black_gc, logo_area->style->black_gc,
logo_pixmap, logo_pixmap,
j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE,
j * ANIMATION_SIZE, i * ANIMATION_SIZE,
ANIMATION_SIZE, ANIMATION_SIZE); ANIMATION_SIZE, ANIMATION_SIZE);
} }
...@@ -532,7 +540,8 @@ about_dialog_timer (gpointer data) ...@@ -532,7 +540,8 @@ about_dialog_timer (gpointer data)
break; break;
} }
if (offset > (scroll_text_widths[cur_scroll_text] + scroll_area->allocation.width)) if (offset > (scroll_text_widths[cur_scroll_text] +
scroll_area->allocation.width))
{ {
scroll_state = 0; scroll_state = 0;
cur_scroll_index += 1; cur_scroll_index += 1;
...@@ -564,10 +573,12 @@ about_dialog_timer (gpointer data) ...@@ -564,10 +573,12 @@ about_dialog_timer (gpointer data)
offset += 15; offset += 15;
if (scroll_state == 0) if (scroll_state == 0)
{ {
if (offset > ((scroll_area->allocation.width + scroll_text_widths[cur_scroll_text]) / 2)) if (offset > ((scroll_area->allocation.width +
scroll_text_widths[cur_scroll_text]) / 2))
{ {
scroll_state = 1; scroll_state = 1;
offset = (scroll_area->allocation.width + scroll_text_widths[cur_scroll_text]) / 2; offset = (scroll_area->allocation.width +
scroll_text_widths[cur_scroll_text]) / 2;
} }
} }
} }
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "gimphelp.h"
#include "libgimp/gimpfeatures.h" #include "libgimp/gimpfeatures.h"
#include "config.h" #include "config.h"
...@@ -189,6 +191,9 @@ about_dialog_create (gint timeout) ...@@ -189,6 +191,9 @@ about_dialog_create (gint timeout)
gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE); gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE);
gtk_window_set_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER); gtk_window_set_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
gimp_help_connect_help_accel (about_dialog, gimp_standard_help_func,
"dialogs/about.html");
gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy", gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy",
GTK_SIGNAL_FUNC (about_dialog_destroy), GTK_SIGNAL_FUNC (about_dialog_destroy),
NULL); NULL);
...@@ -317,7 +322,7 @@ about_dialog_create (gint timeout) ...@@ -317,7 +322,7 @@ about_dialog_create (gint timeout)
} }
else else
{ {
gdk_window_raise(about_dialog->window); gdk_window_raise (about_dialog->window);
} }
} }
...@@ -394,8 +399,10 @@ about_dialog_load_logo (GtkWidget *window) ...@@ -394,8 +399,10 @@ about_dialog_load_logo (GtkWidget *window)
fclose (fp); fclose (fp);
dissolve_width = (logo_width / ANIMATION_SIZE)+(logo_width % ANIMATION_SIZE ==0 ?0 : 1); dissolve_width =
dissolve_height = (logo_height / ANIMATION_SIZE)+(logo_height % ANIMATION_SIZE ==0 ?0 : 1); (logo_width / ANIMATION_SIZE) + (logo_width % ANIMATION_SIZE == 0 ? 0 : 1);
dissolve_height =
(logo_height / ANIMATION_SIZE) + (logo_height % ANIMATION_SIZE == 0 ? 0 : 1);
dissolve_map = g_new (guchar, dissolve_width * dissolve_height); dissolve_map = g_new (guchar, dissolve_width * dissolve_height);
...@@ -490,7 +497,8 @@ about_dialog_timer (gpointer data) ...@@ -490,7 +497,8 @@ about_dialog_timer (gpointer data)
gdk_draw_pixmap (logo_area->window, gdk_draw_pixmap (logo_area->window,
logo_area->style->black_gc, logo_area->style->black_gc,
logo_pixmap, logo_pixmap,
j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE,
j * ANIMATION_SIZE, i * ANIMATION_SIZE,
ANIMATION_SIZE, ANIMATION_SIZE); ANIMATION_SIZE, ANIMATION_SIZE);
} }
...@@ -532,7 +540,8 @@ about_dialog_timer (gpointer data) ...@@ -532,7 +540,8 @@ about_dialog_timer (gpointer data)
break; break;
} }
if (offset > (scroll_text_widths[cur_scroll_text] + scroll_area->allocation.width)) if (offset > (scroll_text_widths[cur_scroll_text] +
scroll_area->allocation.width))
{ {
scroll_state = 0; scroll_state = 0;
cur_scroll_index += 1; cur_scroll_index += 1;
...@@ -564,10 +573,12 @@ about_dialog_timer (gpointer data) ...@@ -564,10 +573,12 @@ about_dialog_timer (gpointer data)
offset += 15; offset += 15;
if (scroll_state == 0) if (scroll_state == 0)
{ {
if (offset > ((scroll_area->allocation.width + scroll_text_widths[cur_scroll_text]) / 2)) if (offset > ((scroll_area->allocation.width +
scroll_text_widths[cur_scroll_text]) / 2))
{ {
scroll_state = 1; scroll_state = 1;
offset = (scroll_area->allocation.width + scroll_text_widths[cur_scroll_text]) / 2; offset = (scroll_area->allocation.width +
scroll_text_widths[cur_scroll_text]) / 2;
} }
} }
} }
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "gimphelp.h"
#include "libgimp/gimpfeatures.h" #include "libgimp/gimpfeatures.h"
#include "config.h" #include "config.h"
...@@ -189,6 +191,9 @@ about_dialog_create (gint timeout) ...@@ -189,6 +191,9 @@ about_dialog_create (gint timeout)
gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE); gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE);
gtk_window_set_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER); gtk_window_set_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
gimp_help_connect_help_accel (about_dialog, gimp_standard_help_func,
"dialogs/about.html");
gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy", gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy",
GTK_SIGNAL_FUNC (about_dialog_destroy), GTK_SIGNAL_FUNC (about_dialog_destroy),
NULL); NULL);
...@@ -317,7 +322,7 @@ about_dialog_create (gint timeout) ...@@ -317,7 +322,7 @@ about_dialog_create (gint timeout)
} }
else else
{ {
gdk_window_raise(about_dialog->window); gdk_window_raise (about_dialog->window);
} }
} }
...@@ -394,8 +399,10 @@ about_dialog_load_logo (GtkWidget *window) ...@@ -394,8 +399,10 @@ about_dialog_load_logo (GtkWidget *window)
fclose (fp); fclose (fp);
dissolve_width = (logo_width / ANIMATION_SIZE)+(logo_width % ANIMATION_SIZE ==0 ?0 : 1); dissolve_width =
dissolve_height = (logo_height / ANIMATION_SIZE)+(logo_height % ANIMATION_SIZE ==0 ?0 : 1); (logo_width / ANIMATION_SIZE) + (logo_width % ANIMATION_SIZE == 0 ? 0 : 1);
dissolve_height =
(logo_height / ANIMATION_SIZE) + (logo_height % ANIMATION_SIZE == 0 ? 0 : 1);
dissolve_map = g_new (guchar, dissolve_width * dissolve_height); dissolve_map = g_new (guchar, dissolve_width * dissolve_height);
...@@ -490,7 +497,8 @@ about_dialog_timer (gpointer data) ...@@ -490,7 +497,8 @@ about_dialog_timer (gpointer data)
gdk_draw_pixmap (logo_area->window, gdk_draw_pixmap (logo_area->window,
logo_area->style->black_gc, logo_area->style->black_gc,
logo_pixmap, logo_pixmap,
j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE,
j * ANIMATION_SIZE, i * ANIMATION_SIZE,
ANIMATION_SIZE, ANIMATION_SIZE); ANIMATION_SIZE, ANIMATION_SIZE);
} }
...@@ -532,7 +540,8 @@ about_dialog_timer (gpointer data) ...@@ -532,7 +540,8 @@ about_dialog_timer (gpointer data)
break; break;
} }
if (offset > (scroll_text_widths[cur_scroll_text] + scroll_area->allocation.width)) if (offset > (scroll_text_widths[cur_scroll_text] +
scroll_area->allocation.width))
{ {
scroll_state = 0; scroll_state = 0;
cur_scroll_index += 1; cur_scroll_index += 1;
...@@ -564,10 +573,12 @@ about_dialog_timer (gpointer data) ...@@ -564,10 +573,12 @@ about_dialog_timer (gpointer data)
offset += 15; offset += 15;
if (scroll_state == 0) if (scroll_state == 0)
{ {
if (offset > ((scroll_area->allocation.width + scroll_text_widths[cur_scroll_text]) / 2)) if (offset > ((scroll_area->allocation.width +
scroll_text_widths[cur_scroll_text]) / 2))
{ {
scroll_state = 1; scroll_state = 1;
offset = (scroll_area->allocation.width + scroll_text_widths[cur_scroll_text]) / 2; offset = (scroll_area->allocation.width +
scroll_text_widths[cur_scroll_text]) / 2;
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment