#define IMAGE_SIZE_W 200
#define IMAGE_SIZE_H 200
-#define DEF_PROPERTY_WIDTH 600
-#define DEF_PROPERTY_HEIGHT 400
typedef struct _TabData TabData;
struct _TabData
*-------------------------------------------------------------------
*/
-static gint info_window_last_width = DEF_PROPERTY_WIDTH;
-static gint info_window_last_height = DEF_PROPERTY_HEIGHT;
-
static void info_window_image_update_cb(ImageWindow *imd, gpointer data)
{
InfoData *id = data;
static void info_window_close(InfoData *id)
{
- gdk_drawable_get_size(id->window->window, &info_window_last_width, &info_window_last_height);
- info_window_last_width = MAX(info_window_last_width, DEF_PROPERTY_WIDTH);
- info_window_last_height = MAX(info_window_last_height, DEF_PROPERTY_HEIGHT);
+ gdk_drawable_get_size(id->window->window, &options->layout.properties_window.w, &options->layout.properties_window.h);
+ options->layout.properties_window.w = MAX(options->layout.properties_window.w, DEF_PROPERTY_WIDTH);
+ options->layout.properties_window.h = MAX(options->layout.properties_window.h, DEF_PROPERTY_HEIGHT);
gtk_widget_destroy(id->window);
}
gtk_window_set_geometry_hints(GTK_WINDOW(id->window), NULL, &geometry,
GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE);
+ if (options->layout.save_window_positions)
+ gtk_window_set_default_size(GTK_WINDOW(id->window), options->layout.properties_window.w, options->layout.properties_window.h);
+ else
+ gtk_window_set_default_size(GTK_WINDOW(id->window), DEF_PROPERTY_WIDTH, DEF_PROPERTY_HEIGHT);
- gtk_window_set_default_size(GTK_WINDOW(id->window), info_window_last_width, info_window_last_height);
gtk_container_set_border_width(GTK_CONTAINER(id->window), PREF_PAD_BORDER);
g_signal_connect(G_OBJECT(id->window), "delete_event",
options->layout.main_window.x = 0;
options->layout.main_window.y = 0;
options->layout.order = NULL;
+ options->layout.properties_window.w = DEF_PROPERTY_WIDTH;
+ options->layout.properties_window.h = DEF_PROPERTY_HEIGHT;
options->layout.save_window_positions = FALSE;
options->layout.show_marks = FALSE;
options->layout.show_thumbnails = FALSE;
WRITE_INT(layout.float_window.vdivider_pos);
WRITE_SEPARATOR();
+ WRITE_INT(layout.properties_window.w);
+ WRITE_INT(layout.properties_window.h);
+ WRITE_SEPARATOR();
+
WRITE_BOOL(layout.tools_float);
WRITE_BOOL(layout.tools_hidden);
WRITE_BOOL(layout.tools_restore_state);
READ_INT(layout.main_window.w);
READ_INT(layout.main_window.h);
READ_BOOL(layout.main_window.maximized);
+ READ_INT(layout.main_window.hdivider_pos);
+ READ_INT(layout.main_window.vdivider_pos);
+
READ_INT(layout.float_window.x);
READ_INT(layout.float_window.y);
READ_INT(layout.float_window.w);
READ_INT(layout.float_window.h);
READ_INT(layout.float_window.vdivider_pos);
- READ_INT(layout.main_window.hdivider_pos);
- READ_INT(layout.main_window.vdivider_pos);
+
+ READ_INT(layout.properties_window.w);
+ READ_INT(layout.properties_window.h);
+
READ_BOOL(layout.tools_float);
READ_BOOL(layout.tools_hidden);
READ_BOOL(layout.tools_restore_state);