comparison src/layout_util.c @ 1472:b4001cb9fbc4

do not copy existing layout id to new window
author nadvornik
date Sat, 21 Mar 2009 18:22:04 +0000
parents 38925ff71a46
children d062522699dc
comparison
equal deleted inserted replaced
1471:65a5c27823c2 1472:b4001cb9fbc4
192 192
193 static void layout_menu_new_window_cb(GtkAction *action, gpointer data) 193 static void layout_menu_new_window_cb(GtkAction *action, gpointer data)
194 { 194 {
195 LayoutWindow *lw = data; 195 LayoutWindow *lw = data;
196 LayoutWindow *nw; 196 LayoutWindow *nw;
197 LayoutOptions lop;
197 gboolean tmp = options->save_window_positions; 198 gboolean tmp = options->save_window_positions;
198 options->save_window_positions = FALSE; /* let the windowmanager decide for the first time */ 199 options->save_window_positions = FALSE; /* let the windowmanager decide for the first time */
199 200
200 layout_exit_fullscreen(lw); 201 layout_exit_fullscreen(lw);
201 202
202 layout_sync_options_with_current_state(lw); 203 layout_sync_options_with_current_state(lw);
203 nw = layout_new(NULL, &lw->options); 204 lop = lw->options; /* we can copy it directly, no strings are modified */
205
206 lop.id = NULL; /* get a new id */
207 nw = layout_new(NULL, &lop);
204 layout_sort_set(nw, options->file_sort.method, options->file_sort.ascending); 208 layout_sort_set(nw, options->file_sort.method, options->file_sort.ascending);
205 layout_set_fd(nw, lw->dir_fd); 209 layout_set_fd(nw, lw->dir_fd);
206 options->save_window_positions = tmp; 210 options->save_window_positions = tmp;
207 } 211 }
208 212