5dbc4b754b
xdg-user-dirs-gtk-update. This changes default upstream behaviour but makes much more sense in our case. idea from and "go ahead" landry@
49 lines
1.6 KiB
Plaintext
49 lines
1.6 KiB
Plaintext
$OpenBSD: patch-update_c,v 1.2 2009/06/13 10:48:55 ajacoutot Exp $
|
|
--- update.c.orig Sat Sep 6 02:50:31 2008
|
|
+++ update.c Sat Jun 13 12:22:15 2009
|
|
@@ -163,7 +163,7 @@ update_locale (XdgDirEntry *old_entries)
|
|
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
|
|
_("_Keep Old Names"), GTK_RESPONSE_NO,
|
|
_("_Update Names"), GTK_RESPONSE_YES,
|
|
- NULL);
|
|
+ (char *)NULL);
|
|
|
|
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_NO);
|
|
|
|
@@ -190,12 +190,12 @@ update_locale (XdgDirEntry *old_entries)
|
|
-1, _("Current folder name"),
|
|
cell,
|
|
"text", 0,
|
|
- NULL);
|
|
+ (char *)NULL);
|
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
|
-1, _("New folder name"),
|
|
cell,
|
|
"text", 1,
|
|
- NULL);
|
|
+ (char *)NULL);
|
|
|
|
gtk_container_add (GTK_CONTAINER (scrolledwindow),
|
|
treeview);
|
|
@@ -256,7 +256,7 @@ update_locale (XdgDirEntry *old_entries)
|
|
char *file;
|
|
|
|
file = g_build_filename (g_get_user_config_dir (),
|
|
- "user-dirs.locale", NULL);
|
|
+ "user-dirs.locale", (char *)NULL);
|
|
g_unlink (file);
|
|
g_free (file);
|
|
}
|
|
@@ -295,6 +295,11 @@ main (int argc, char *argv[])
|
|
dot = strchr (locale, '.');
|
|
if (dot)
|
|
*dot = 0;
|
|
+
|
|
+ /* give it a chance to initially create "well-known" user directories */
|
|
+ /* if they don't exist ; we don't care whether it was successfull or not */
|
|
+ if (old_entries != 0)
|
|
+ g_spawn_command_line_sync (XDG_USER_DIRS_UPDATE "", NULL, NULL, NULL, NULL);
|
|
|
|
if (old_locale && *old_locale != 0 &&
|
|
strcmp (old_locale, locale) != 0 &&
|