store the zoom factor. Doesn't work currently, but just needs a simple fix

2007-10-06  Sven Neumann  <sven@gimp.org>

	* plug-ins/helpbrowser/dialog.c: store the zoom factor. Doesn't
	work currently, but just needs a simple fix in gtkhtml2.


svn path=/trunk/; revision=23747
This commit is contained in:
Sven Neumann 2007-10-06 16:51:34 +00:00 committed by Sven Neumann
parent 985c993ea6
commit e04cfdc3b4
2 changed files with 16 additions and 11 deletions

View File

@ -1,3 +1,8 @@
2007-10-06 Sven Neumann <sven@gimp.org>
* plug-ins/helpbrowser/dialog.c: store the zoom factor. Doesn't
work currently, but just needs a simple fix in gtkhtml2.
2007-10-06 Sven Neumann <sven@gimp.org>
* app/core/gimpselection.c (gimp_selection_float): don't pop up a

View File

@ -67,9 +67,10 @@
typedef struct
{
gint32 width;
gint32 height;
gint32 paned_position;
gint width;
gint height;
gint paned_position;
gdouble zoom;
} DialogData;
enum
@ -196,7 +197,7 @@ browser_dialog_open (void)
GtkCellRenderer *cell;
GdkPixbuf *pixbuf;
gchar *eek_png_path;
DialogData data = { 720, 560, 240 };
DialogData data = { 720, 560, 240, 1.0 };
gimp_ui_init ("helpbrowser", TRUE);
@ -378,6 +379,7 @@ browser_dialog_open (void)
G_CALLBACK (view_button_press),
NULL);
html_view_set_magnification (HTML_VIEW (html), data.zoom);
html_view_set_document (HTML_VIEW (html), html_document_new ());
g_signal_connect (HTML_VIEW (html)->document, "title-changed",
@ -877,8 +879,8 @@ index_callback (GtkAction *action,
}
static void
zoom_in_callback (GtkAction *action,
gpointer data)
zoom_in_callback (GtkAction *action,
gpointer data)
{
html_view_zoom_in (HTML_VIEW (html));
}
@ -1053,15 +1055,13 @@ dialog_unmap (GtkWidget *window,
GtkWidget *paned)
{
DialogData data;
gint width;
gint height;
gtk_window_get_size (GTK_WINDOW (window), &width, &height);
gtk_window_get_size (GTK_WINDOW (window), &data.width, &data.height);
data.width = width;
data.height = height;
data.paned_position = gtk_paned_get_position (GTK_PANED (paned));
data.zoom = html ? html_view_get_magnification (HTML_VIEW (html)) : 1.0;
gimp_set_data (GIMP_HELP_BROWSER_DIALOG_DATA, &data, sizeof (data));
gtk_main_quit ();