{
GtkWidget *confirm;
-confirm = hildon_note_new_confirmation(GTK_WINDOW(_window),
- _("Replace all repositories with the default repository?"));
+confirm = hildon_note_new_confirmation(GTK_WINDOW(_window), _("Replace all repositories with the default repository?"));
if (GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm))) {
/* First, delete all existing repositories. */
while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(rmi.dialog))) {
/* Iterate through repos and verify each. */
- gboolean verified = TRUE;
+ gboolean verified=TRUE;
gint i;
GList *curr;
- gchar *old_curr_repo_name = _curr_repo->name;
+ gchar *old_curr_repo_name=_curr_repo->name;
for (i = 0, curr = rmi.repo_edits; verified && curr; curr = curr->next, i++) {
- RepoEditInfo *rei = curr->data;
- gchar *expanded = gnome_vfs_expand_initial_tilde(gtk_entry_get_text(GTK_ENTRY(rei->txt_cache_dir)));
- verified = tile_repo_make_cache_dir(rei);
- g_free(expanded);
+ RepoEditInfo *rei=curr->data;
+ /* XXX */
}
if (!verified) {
gtk_combo_box_set_active(GTK_COMBO_BOX(rmi.cmb_repos), i - 1);
}
/* But keep the repo list in memory, in case downloads are using it. */
- _repo_list = NULL;
+ g_list_foreach(_repo_list, g_object_unref, NULL);
+ _repo_list=NULL;
/* Write new _repo_list. */
- curr_repo_index = gtk_combo_box_get_active(GTK_COMBO_BOX(rmi.cmb_repos));
- _curr_repo = NULL;
+ curr_repo_index=gtk_combo_box_get_active(GTK_COMBO_BOX(rmi.cmb_repos));
+ _curr_repo=NULL;
for (i = 0, curr = rmi.repo_edits; curr; curr = curr->next, i++) {
RepoEditInfo *rei = curr->data;
TileRepo *rd = tile_repo_new();
- rd->name = g_strdup(rei->name);
- rd->url = g_strdup(gtk_entry_get_text(GTK_ENTRY(rei->txt_url)));
- rd->cache_dir = gnome_vfs_expand_initial_tilde(gtk_entry_get_text(GTK_ENTRY(rei->txt_cache_dir)));
- rd->dl_zoom_steps = hildon_controlbar_get_value(HILDON_CONTROLBAR(rei->num_dl_zoom_steps));
- rd->view_zoom_steps = hildon_controlbar_get_value(HILDON_CONTROLBAR(rei->num_view_zoom_steps));
- rd->double_size = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rei->chk_double_size));
- rd->nextable = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rei->chk_nextable));
-
+ rd->name=g_strdup(rei->name);
+ rd->url=g_strdup(gtk_entry_get_text(GTK_ENTRY(rei->txt_url)));
+ rd->cache_dir=gnome_vfs_expand_initial_tilde(gtk_entry_get_text(GTK_ENTRY(rei->txt_cache_dir)));
+ rd->dl_zoom_steps=hildon_controlbar_get_value(HILDON_CONTROLBAR(rei->num_dl_zoom_steps));
+ rd->view_zoom_steps=hildon_controlbar_get_value(HILDON_CONTROLBAR(rei->num_view_zoom_steps));
+ rd->double_size=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rei->chk_double_size));
+ rd->nextable=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rei->chk_nextable));
tile_repo_set_type(rd);
_repo_list = g_list_append(_repo_list, rd);