On Mon, 18 Aug 2008 14:27:49 +0100
Colin Clark <[EMAIL PROTECTED]> wrote:
> The Home icon on the toolbar takes me to my home directory. I would
> prefer to be able to configure the destination to take me back to the
> root of where I hold all my picture files (the same as my Startup folder
> in Preferences).
Hi,
here is a patch against latest cvs (should work on alpha2 too) which does more
or less
what you asked for.
just apply, recompile, and add the following line to your .geeqierc (while no
geeqie is running):
layout.home_path: "/your/directory"
After the Home button in the toolbar should open the specified directory.
Obviously, we may add an input box in the Preferences dialog (where??).
The Home button tip may not be appropriate anymore ("Change to home folder").
Please test and comment.
--
Laurent MONIN aka Zas
Index: src/options.c
===================================================================
--- src/options.c (révision 1068)
+++ src/options.c (copie de travail)
@@ -97,6 +97,7 @@
options->layout.float_window.w = 260;
options->layout.float_window.x = 0;
options->layout.float_window.y = 0;
+ options->layout.home_path = NULL;
options->layout.main_window.h = 400;
options->layout.main_window.hdivider_pos = -1;
options->layout.main_window.maximized = FALSE;
Index: src/options.h
===================================================================
--- src/options.h (révision 1068)
+++ src/options.h (copie de travail)
@@ -198,7 +198,8 @@
gboolean tools_restore_state;
gboolean toolbar_hidden;
-
+
+ gchar *home_path;
} layout;
/* panels */
Index: src/rcfile.c
===================================================================
--- src/rcfile.c (révision 1068)
+++ src/rcfile.c (copie de travail)
@@ -389,6 +389,7 @@
WRITE_BOOL(layout.show_marks);
WRITE_BOOL(layout.show_thumbnails);
WRITE_BOOL(layout.show_directory_date);
+ WRITE_CHAR(layout.home_path);
WRITE_SEPARATOR();
WRITE_BOOL(layout.save_window_positions);
@@ -773,6 +774,7 @@
READ_BOOL(layout.show_marks);
READ_BOOL(layout.show_thumbnails);
READ_BOOL(layout.show_directory_date);
+ READ_CHAR(layout.home_path);
/* window positions */
Index: src/layout_util.c
===================================================================
--- src/layout_util.c (révision 1068)
+++ src/layout_util.c (copie de travail)
@@ -1458,10 +1458,16 @@
static void layout_button_home_cb(GtkWidget *widget, gpointer data)
{
- LayoutWindow *lw = data;
- const gchar *path = homedir();
+ const gchar *path;
+
+ if (options->layout.home_path && *options->layout.home_path)
+ path = options->layout.home_path;
+ else
+ path = homedir();
+
if (path)
{
+ LayoutWindow *lw = data;
FileData *dir_fd = file_data_new_simple(path);
layout_set_fd(lw, dir_fd);
file_data_unref(dir_fd);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geeqie-devel mailing list
Geeqie-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geeqie-devel