diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/GNOME_Yelp.server.in | 2 | ||||
-rw-r--r-- | src/yelp-window.c | 34 |
3 files changed, 41 insertions, 4 deletions
@@ -1,6 +1,13 @@ 2003-08-15 Mikael Hallendal <micke@imendio.com> - * configure.in: + * src/GNOME_Yelp.server.in: Replaced yelp-base for yelp. Not sure what + should be in there really... Might fix bug #119764 + + * src/yelp-window.c: (window_init), (window_configure_cb): + - Save size from last window. Patch by Shaun McCance. + - Fixes bug #90451 + + * configure.in: - Applied patch from Steve Chaplin that fixes the CFLAGS. - Fixes bug #118984 diff --git a/src/GNOME_Yelp.server.in b/src/GNOME_Yelp.server.in index 074f5db6..974ab238 100644 --- a/src/GNOME_Yelp.server.in +++ b/src/GNOME_Yelp.server.in @@ -1,5 +1,5 @@ <oaf_info> - <oaf_server iid="OAFIID:GNOME_Yelp_Factory" type="exe" location="yelp-base"> + <oaf_server iid="OAFIID:GNOME_Yelp_Factory" type="exe" location="yelp"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/GenericFactory:1.0"/> </oaf_attribute> diff --git a/src/yelp-window.c b/src/yelp-window.c index 9aadf2a4..3ac7cc92 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -33,6 +33,7 @@ #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-url.h> #include <libgnome/gnome-program.h> +#include <libgnome/gnome-config.h> #include <glade/glade.h> #include <string.h> #include "yelp-error.h" @@ -49,6 +50,11 @@ #define RESPONSE_PREV 1 #define RESPONSE_NEXT 2 +#define YELP_CONFIG_WIDTH "/yelp/Geometry/width" +#define YELP_CONFIG_HEIGHT "/yelp/Geometry/height" +#define YELP_CONFIG_WIDTH_DEFAULT "600" +#define YELP_CONFIG_HEIGHT_DEFAULT "420" + typedef enum { YELP_WINDOW_ACTION_BACK = 1, YELP_WINDOW_ACTION_FORWARD @@ -117,7 +123,9 @@ static void window_find_response_cb (GtkWidget *dialog , static YelpView * window_get_active_view (YelpWindow *window); static GtkWidget * window_create_toolbar (YelpWindow *window); static GdkPixbuf * window_load_icon (void); - +static gboolean window_configure_cb (GtkWidget *widget, + GdkEventConfigure *event, + gpointer data); enum { @@ -233,7 +241,16 @@ window_init (YelpWindow *window) G_CALLBACK (window_toggle_history_forward), window); - gtk_window_set_default_size (GTK_WINDOW (window), 600, 420); + gint width, height; + width = gnome_config_get_int (YELP_CONFIG_WIDTH + "=" YELP_CONFIG_WIDTH_DEFAULT); + height = gnome_config_get_int (YELP_CONFIG_HEIGHT + "=" YELP_CONFIG_HEIGHT_DEFAULT); + gtk_window_set_default_size (GTK_WINDOW (window), width, height); + g_signal_connect (window, + "configure-event", + G_CALLBACK (window_configure_cb), + NULL); gtk_window_set_title (GTK_WINDOW (window), _("Help Browser")); } @@ -865,6 +882,19 @@ window_load_icon (void) return pixbuf; } +static gboolean +window_configure_cb (GtkWidget *widget, + GdkEventConfigure *event, + gpointer data) +{ + gint width, height; + gtk_window_get_size (GTK_WINDOW (widget), &width, &height); + gnome_config_set_int (YELP_CONFIG_WIDTH, width); + gnome_config_set_int (YELP_CONFIG_HEIGHT, height); + gnome_config_sync (); + + return FALSE; +} GtkWidget * yelp_window_new (GNode *doc_tree, GList *index) |