From 37626aa550395d03cab2720585dbb62da59006db Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Thu, 24 Jan 2008 17:46:29 +0200 Subject: [PATCH] Formating --- src/map-repo.c | 99 ++++++++++++++------------------------------------ 1 file changed, 27 insertions(+), 72 deletions(-) diff --git a/src/map-repo.c b/src/map-repo.c index 0a22759..4632f81 100644 --- a/src/map-repo.c +++ b/src/map-repo.c @@ -512,7 +512,7 @@ repoman_download(GtkWidget * widget, RepoManInfo * rmi) GtkWidget *confirm; confirm = hildon_note_new_confirmation(GTK_WINDOW(rmi->dialog), - _("Maemo Mapper will now download and add a list of " + _("Mapper will now download and add a list of " "possibly-duplicate repositories from the internet. " "Continue?")); @@ -527,11 +527,9 @@ GtkWidget *confirm; if (GNOME_VFS_OK != (vfs_result = gnome_vfs_read_entire_file (MAP_REPO_LIST_URL, &size, &bytes))) { popup_error(rmi->dialog, - _ - ("An error occurred while retrieving the repositories. " + _("An error occurred while retrieving the repositories. " "The web service may be temporarily down.")); - g_printerr("Error while download repositories: %s\n", - gnome_vfs_result_to_string(vfs_result)); + g_printerr("Error while download repositories: %s\n", gnome_vfs_result_to_string(vfs_result)); } /* Parse each line as a reposotory. */ else { @@ -541,32 +539,14 @@ GtkWidget *confirm; tail = strchr(head, '\n'); *tail++ = '\0'; rd = config_parse_repo(head); - rei = - repoman_dialog_add_repo(rmi, - g_strdup(rd->name)); + rei = repoman_dialog_add_repo(rmi, g_strdup(rd->name)); /* Initialize fields with data from the RepoData object. */ - gtk_entry_set_text(GTK_ENTRY(rei->txt_url), - rd->url); - gtk_entry_set_text(GTK_ENTRY - (rei->txt_cache_dir), - rd->cache_dir); - hildon_controlbar_set_value(HILDON_CONTROLBAR - (rei-> - num_dl_zoom_steps), - rd->dl_zoom_steps); - hildon_controlbar_set_value(HILDON_CONTROLBAR - (rei-> - num_view_zoom_steps), - rd-> - view_zoom_steps); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON - (rei-> - chk_double_size), - rd->double_size); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON - (rei-> - chk_nextable), - rd->nextable); + gtk_entry_set_text(GTK_ENTRY(rei->txt_url), rd->url); + gtk_entry_set_text(GTK_ENTRY(rei->txt_cache_dir), rd->cache_dir); + hildon_controlbar_set_value(HILDON_CONTROLBAR(rei->num_dl_zoom_steps), rd->dl_zoom_steps); + hildon_controlbar_set_value(HILDON_CONTROLBAR(rei->num_view_zoom_steps), rd->view_zoom_steps); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rei->chk_double_size), rd->double_size); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rei->chk_nextable), rd->nextable); } g_free(bytes); } @@ -599,46 +579,28 @@ repoman_dialog() /* Reset button. */ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(rmi.dialog)->action_area), btn_reset = gtk_button_new_with_label(_("Reset..."))); - g_signal_connect(G_OBJECT(btn_reset), "clicked", - G_CALLBACK(repoman_reset), &rmi); + g_signal_connect(G_OBJECT(btn_reset), "clicked", G_CALLBACK(repoman_reset), &rmi); /* Download button. */ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(rmi.dialog)->action_area), - btn_download = - gtk_button_new_with_label(_("Download..."))); - g_signal_connect(G_OBJECT(btn_download), "clicked", - G_CALLBACK(repoman_download), &rmi); + btn_download = gtk_button_new_with_label(_("Download..."))); + g_signal_connect(G_OBJECT(btn_download), "clicked", G_CALLBACK(repoman_download), &rmi); /* Cancel button. */ - gtk_dialog_add_button(GTK_DIALOG(rmi.dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT); + gtk_dialog_add_button(GTK_DIALOG(rmi.dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT); hbox = gtk_hbox_new(FALSE, 4); - gtk_box_pack_start(GTK_BOX(hbox), - rmi.cmb_repos = - gtk_combo_box_new_text(), TRUE, TRUE, 4); + gtk_box_pack_start(GTK_BOX(hbox), rmi.cmb_repos = gtk_combo_box_new_text(), TRUE, TRUE, 4); - gtk_box_pack_start(GTK_BOX(hbox), - gtk_vseparator_new(), FALSE, FALSE, 4); - gtk_box_pack_start(GTK_BOX(hbox), - btn_rename = - gtk_button_new_with_label(_("Rename...")), FALSE, - FALSE, 4); - gtk_box_pack_start(GTK_BOX(hbox), btn_delete = - gtk_button_new_with_label(_("Delete...")), FALSE, - FALSE, 4); - gtk_box_pack_start(GTK_BOX(hbox), btn_new = - gtk_button_new_with_label(_("New...")), FALSE, FALSE, - 4); - - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(rmi.dialog)->vbox), - hbox, FALSE, FALSE, 4); - - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(rmi.dialog)->vbox), - gtk_hseparator_new(), TRUE, TRUE, 4); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(rmi.dialog)->vbox), - rmi.notebook = gtk_notebook_new(), TRUE, TRUE, 4); + gtk_box_pack_start(GTK_BOX(hbox), gtk_vseparator_new(), FALSE, FALSE, 4); + gtk_box_pack_start(GTK_BOX(hbox), btn_rename = gtk_button_new_with_label(_("Rename...")), FALSE, FALSE, 4); + gtk_box_pack_start(GTK_BOX(hbox), btn_delete = gtk_button_new_with_label(_("Delete...")), FALSE, FALSE, 4); + gtk_box_pack_start(GTK_BOX(hbox), btn_new = gtk_button_new_with_label(_("New...")), FALSE, FALSE, 4); + + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(rmi.dialog)->vbox), hbox, FALSE, FALSE, 4); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(rmi.dialog)->vbox), gtk_hseparator_new(), TRUE, TRUE, 4); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(rmi.dialog)->vbox), rmi.notebook = gtk_notebook_new(), TRUE, TRUE, 4); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(rmi.notebook), FALSE); gtk_notebook_set_show_border(GTK_NOTEBOOK(rmi.notebook), FALSE); @@ -653,17 +615,10 @@ repoman_dialog() /* Initialize fields with data from the RepoData object. */ gtk_entry_set_text(GTK_ENTRY(rei->txt_url), rd->url); gtk_entry_set_text(GTK_ENTRY(rei->txt_cache_dir), rd->cache_dir); - hildon_controlbar_set_value(HILDON_CONTROLBAR - (rei->num_dl_zoom_steps), - rd->dl_zoom_steps); - hildon_controlbar_set_value(HILDON_CONTROLBAR - (rei->num_view_zoom_steps), - rd->view_zoom_steps); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON - (rei->chk_double_size), - rd->double_size); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON - (rei->chk_nextable), rd->nextable); + hildon_controlbar_set_value(HILDON_CONTROLBAR(rei->num_dl_zoom_steps), rd->dl_zoom_steps); + hildon_controlbar_set_value(HILDON_CONTROLBAR(rei->num_view_zoom_steps), rd->view_zoom_steps); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rei->chk_double_size), rd->double_size); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rei->chk_nextable), rd->nextable); if (rd == _curr_repo) curr_repo_index = i; } -- 2.39.5