LayoutWindow *lw;
GList *work;
-/* FIXME: this is probably not the correct way to implement this */
+/** @FIXME this is probably not the correct way to implement this */
work = layout_window_list;
while (work)
{
void layout_status_update_info(LayoutWindow *lw, const gchar *text)
{
gchar *buf = NULL;
+ gint hrs;
+ gint min;
+ gdouble sec;
+ GString *delay;
if (!layout_valid(&lw)) return;
{
guint s;
gint64 s_bytes = 0;
- const gchar *ss;
+ gchar *ss;
if (layout_image_slideshow_active(lw))
{
+
if (!layout_image_slideshow_paused(lw))
{
- ss = _(" Slideshow");
+ delay = g_string_new(_(" Slideshow ["));
}
else
{
- ss = _(" Paused");
+ delay = g_string_new(_(" Paused ["));
+ }
+ hrs = options->slideshow.delay / (36000);
+ min = (options->slideshow.delay -(36000 * hrs))/600;
+ sec = (gdouble)(options->slideshow.delay -(36000 * hrs)-(min * 600)) / 10;
+
+ if (hrs > 0)
+ {
+ g_string_append_printf(delay, "%dh ", hrs);
}
+ if (min > 0)
+ {
+ g_string_append_printf(delay, "%dm ", min);
+ }
+ g_string_append_printf(delay, "%.1fs]", sec);
+
+ ss = g_strdup(delay->str);
+
+ g_string_free(delay, TRUE);
}
else
{
- ss = "";
+ ss = g_strdup("");
}
s = layout_selection_count(lw, &s_bytes);
buf = g_strdup_printf(_("%s, %d files (%s, %d)%s"), b, n, sb, s, ss);
g_free(b);
g_free(sb);
+ g_free(ss);
}
else if (n > 0)
{
gchar *b = text_from_size_abrev(n_bytes);
buf = g_strdup_printf(_("%s, %d files%s"), b, n, ss);
g_free(b);
+ g_free(ss);
}
else
{
buf = g_strdup_printf(_("%d files%s"), n, ss);
+ g_free(ss);
}
text = buf;
lw->info_status = layout_status_label(NULL, lw->info_box, TRUE, 0, (!small_format));
DEBUG_NAME(lw->info_status);
- gtk_widget_set_tooltip_text(GTK_WIDGET(lw->info_status), _("Folder contents (files selected)"));
+ gtk_widget_set_tooltip_text(GTK_WIDGET(lw->info_status), _("Folder contents (files selected)\nSlideshow [time interval]"));
if (small_format)
{
if (lw->vf) vf_select_invert(lw->vf);
}
+void layout_select_list(LayoutWindow *lw, GList *list)
+{
+ if (!layout_valid(&lw)) return;
+
+ if (lw->vf)
+ {
+ vf_select_list(lw->vf, list);
+ }
+}
+
void layout_mark_to_selection(LayoutWindow *lw, gint mark, MarkToSelectionMode mode)
{
if (!layout_valid(&lw)) return;
#if GTK_CHECK_VERSION(3,10,0)
GdkDisplay *display;
- display = gdk_display_get_default();
-
- if (GDK_IS_X11_DISPLAY(display))
+ if (options->save_window_workspace)
{
- window = gtk_widget_get_window(GTK_WIDGET(lw->window));
- lw->options.workspace = gdk_x11_window_get_desktop(window);
+ display = gdk_display_get_default();
+
+ if (GDK_IS_X11_DISPLAY(display))
+ {
+ window = gtk_widget_get_window(GTK_WIDGET(lw->window));
+ lw->options.workspace = gdk_x11_window_get_desktop(window);
+ }
}
#endif
#endif
gboolean refresh_lists;
if (!layout_valid(&lw)) return;
-/* FIXME: add other options too */
+/** @FIXME add other options too */
refresh_style = (lop->style != lw->options.style || strcmp(lop->order, lw->options.order) != 0);
refresh_lists = (lop->show_directory_date != lw->options.show_directory_date);
GdkWindow *window;
GdkDisplay *display;
- display = gdk_display_get_default();
-
- if (GDK_IS_X11_DISPLAY(display))
+ if (options->save_window_workspace)
{
- if (lw->options.workspace != -1)
+ display = gdk_display_get_default();
+
+ if (GDK_IS_X11_DISPLAY(display))
{
- window = gtk_widget_get_window(GTK_WIDGET(lw->window));
- gdk_x11_window_move_to_desktop(window, lw->options.workspace);
+ if (lw->options.workspace != -1)
+ {
+ window = gtk_widget_get_window(GTK_WIDGET(lw->window));
+ gdk_x11_window_move_to_desktop(window, lw->options.workspace);
+ }
}
}
#endif
pixbuf = pixbuf_inline(PIXBUF_INLINE_LOGO);
- /* FIXME: the zoom value set here is the value, which is then copied again and again
+ /** @FIXME the zoom value set here is the value, which is then copied again and again
in "Leave Zoom at previous setting" mode. This is not ideal. */
image_change_pixbuf(lw->image, pixbuf, 0.0, FALSE);
g_object_unref(pixbuf);
WRITE_NL(); WRITE_BOOL(*layout, show_thumbnails);
WRITE_NL(); WRITE_BOOL(*layout, show_directory_date);
WRITE_NL(); WRITE_CHAR(*layout, home_path);
- WRITE_NL(); WRITE_CHAR(*layout, last_path);
WRITE_NL(); WRITE_UINT(*layout, startup_path);
WRITE_SEPARATOR();
WRITE_NL(); WRITE_INT(*layout, log_window.w);
WRITE_NL(); WRITE_INT(*layout, log_window.h);
+ WRITE_NL(); WRITE_INT(*layout, preferences_window.x);
+ WRITE_NL(); WRITE_INT(*layout, preferences_window.y);
+ WRITE_NL(); WRITE_INT(*layout, preferences_window.w);
+ WRITE_NL(); WRITE_INT(*layout, preferences_window.h);
+ WRITE_NL(); WRITE_INT(*layout, preferences_window.page_number);
+
WRITE_NL(); WRITE_INT(*layout, search_window.x);
WRITE_NL(); WRITE_INT(*layout, search_window.y);
WRITE_NL(); WRITE_INT(*layout, search_window.w);
if (READ_BOOL(*layout, show_thumbnails)) continue;
if (READ_BOOL(*layout, show_directory_date)) continue;
if (READ_CHAR(*layout, home_path)) continue;
- if (READ_CHAR(*layout, last_path)) continue;
if (READ_UINT_CLAMP(*layout, startup_path, 0, STARTUP_PATH_HOME)) continue;
/* window positions */
if (READ_INT(*layout, log_window.w)) continue;
if (READ_INT(*layout, log_window.h)) continue;
+ if (READ_INT(*layout, preferences_window.x)) continue;
+ if (READ_INT(*layout, preferences_window.y)) continue;
+ if (READ_INT(*layout, preferences_window.w)) continue;
+ if (READ_INT(*layout, preferences_window.h)) continue;
+ if (READ_INT(*layout, preferences_window.page_number)) continue;
+
if (READ_INT(*layout, search_window.x)) continue;
if (READ_INT(*layout, search_window.y)) continue;
if (READ_INT(*layout, search_window.w)) continue;
switch (lop->startup_path)
{
case STARTUP_PATH_LAST:
- *path = (lop->last_path && isdir(lop->last_path)) ? g_strdup(lop->last_path) : get_current_dir();
+ *path = (history_list_find_last_path_by_key("path_list") && isdir(history_list_find_last_path_by_key("path_list"))) ? g_strdup(history_list_find_last_path_by_key("path_list")) : get_current_dir();
break;
case STARTUP_PATH_HOME:
*path = (lop->home_path && isdir(lop->home_path)) ? g_strdup(lop->home_path) : g_strdup(homedir());