From: Kaj-Michael Lang Date: Thu, 24 Jan 2008 15:48:52 +0000 (+0200) Subject: More formating X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9df12ccff3cf8fc79ed1bce1eebc26ee5d5b2522;p=mapper More formating --- diff --git a/src/map-repo.c b/src/map-repo.c index 4632f81..02c9726 100644 --- a/src/map-repo.c +++ b/src/map-repo.c @@ -253,16 +253,13 @@ dialog = gtk_dialog_new_with_buttons(_("New Name"), gtk_widget_show_all(dialog); while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) { - gint active = - gtk_combo_box_get_active(GTK_COMBO_BOX(rmi->cmb_repos)); + gint active = gtk_combo_box_get_active(GTK_COMBO_BOX(rmi->cmb_repos)); RepoEditInfo *rei = g_list_nth_data(rmi->repo_edits, active); g_free(rei->name); rei->name = g_strdup(gtk_entry_get_text(GTK_ENTRY(txt_name))); - gtk_combo_box_insert_text(GTK_COMBO_BOX(rmi->cmb_repos), - active, g_strdup(rei->name)); + gtk_combo_box_insert_text(GTK_COMBO_BOX(rmi->cmb_repos), active, g_strdup(rei->name)); gtk_combo_box_set_active(GTK_COMBO_BOX(rmi->cmb_repos), active); - gtk_combo_box_remove_text(GTK_COMBO_BOX(rmi->cmb_repos), - active + 1); + gtk_combo_box_remove_text(GTK_COMBO_BOX(rmi->cmb_repos), active + 1); break; } @@ -293,14 +290,10 @@ gint active = gtk_combo_box_get_active(GTK_COMBO_BOX(rmi->cmb_repos)); confirm = hildon_note_new_confirmation(GTK_WINDOW(_window), buffer); if (GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm))) { - gtk_combo_box_remove_text(GTK_COMBO_BOX(rmi->cmb_repos), - active); + gtk_combo_box_remove_text(GTK_COMBO_BOX(rmi->cmb_repos), active); gtk_notebook_remove_page(GTK_NOTEBOOK(rmi->notebook), active); - rmi->repo_edits = g_list_remove_link(rmi->repo_edits, - g_list_nth(rmi->repo_edits, - active)); - gtk_combo_box_set_active(GTK_COMBO_BOX(rmi->cmb_repos), - MAX(0, active - 1)); + rmi->repo_edits = g_list_remove_link(rmi->repo_edits, g_list_nth(rmi->repo_edits, active)); + gtk_combo_box_set_active(GTK_COMBO_BOX(rmi->cmb_repos), MAX(0, active - 1)); } gtk_widget_destroy(confirm); @@ -363,64 +356,39 @@ gtk_notebook_append_page(GTK_NOTEBOOK(rmi->notebook), table = gtk_table_new(3, 2, FALSE), FALSE, FALSE, 0); /* Download Zoom Steps. */ - gtk_table_attach(GTK_TABLE(table), - label = gtk_label_new(_("Download Zoom Steps")), - 0, 1, 0, 1, GTK_FILL, 0, 2, 4); + gtk_table_attach(GTK_TABLE(table), label = gtk_label_new(_("Download Zoom Steps")), 0, 1, 0, 1, GTK_FILL, 0, 2, 4); gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f); - gtk_table_attach(GTK_TABLE(table), - label = gtk_alignment_new(0.f, 0.5f, 0.f, 0.f), - 1, 2, 0, 1, GTK_FILL, 0, 2, 4); - gtk_container_add(GTK_CONTAINER(label), - rei->num_dl_zoom_steps = hildon_controlbar_new()); - hildon_controlbar_set_range(HILDON_CONTROLBAR(rei->num_dl_zoom_steps), - 1, 4); - hildon_controlbar_set_value(HILDON_CONTROLBAR(rei->num_dl_zoom_steps), - REPO_DEFAULT_DL_ZOOM_STEPS); + gtk_table_attach(GTK_TABLE(table), label = gtk_alignment_new(0.f, 0.5f, 0.f, 0.f), 1, 2, 0, 1, GTK_FILL, 0, 2, 4); + gtk_container_add(GTK_CONTAINER(label), rei->num_dl_zoom_steps = hildon_controlbar_new()); + hildon_controlbar_set_range(HILDON_CONTROLBAR(rei->num_dl_zoom_steps), 1, 4); + hildon_controlbar_set_value(HILDON_CONTROLBAR(rei->num_dl_zoom_steps), REPO_DEFAULT_DL_ZOOM_STEPS); force_min_visible_bars(HILDON_CONTROLBAR(rei->num_dl_zoom_steps), 1); /* Download Zoom Steps. */ - gtk_table_attach(GTK_TABLE(table), - label = gtk_label_new(_("View Zoom Steps")), - 0, 1, 1, 2, GTK_FILL, 0, 2, 4); + gtk_table_attach(GTK_TABLE(table), label = gtk_label_new(_("View Zoom Steps")), 0, 1, 1, 2, GTK_FILL, 0, 2, 4); gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f); - gtk_table_attach(GTK_TABLE(table), - label = gtk_alignment_new(0.f, 0.5f, 0.f, 0.f), - 1, 2, 1, 2, GTK_FILL, 0, 2, 4); - gtk_container_add(GTK_CONTAINER(label), - rei->num_view_zoom_steps = hildon_controlbar_new()); - hildon_controlbar_set_range(HILDON_CONTROLBAR(rei->num_view_zoom_steps), - 1, 4); - hildon_controlbar_set_value(HILDON_CONTROLBAR(rei->num_view_zoom_steps), - REPO_DEFAULT_VIEW_ZOOM_STEPS); + gtk_table_attach(GTK_TABLE(table), label = gtk_alignment_new(0.f, 0.5f, 0.f, 0.f), 1, 2, 1, 2, GTK_FILL, 0, 2, 4); + gtk_container_add(GTK_CONTAINER(label), rei->num_view_zoom_steps = hildon_controlbar_new()); + hildon_controlbar_set_range(HILDON_CONTROLBAR(rei->num_view_zoom_steps), 1, 4); + hildon_controlbar_set_value(HILDON_CONTROLBAR(rei->num_view_zoom_steps), REPO_DEFAULT_VIEW_ZOOM_STEPS); force_min_visible_bars(HILDON_CONTROLBAR(rei->num_view_zoom_steps), 1); - gtk_table_attach(GTK_TABLE(table), - label = gtk_vseparator_new(), - 2, 3, 0, 2, GTK_FILL, GTK_FILL, 4, 4); + gtk_table_attach(GTK_TABLE(table), label = gtk_vseparator_new(), 2, 3, 0, 2, GTK_FILL, GTK_FILL, 4, 4); /* Double-size. */ - gtk_table_attach(GTK_TABLE(table), - rei->chk_double_size = - gtk_check_button_new_with_label(_("Double Pixels")), 3, - 4, 0, 1, GTK_FILL, GTK_FILL, 0, 4); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rei->chk_double_size), - FALSE); + gtk_table_attach(GTK_TABLE(table), rei->chk_double_size = gtk_check_button_new_with_label(_("Double Pixels")), 3, 4, 0, 1, GTK_FILL, GTK_FILL, 0, 4); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rei->chk_double_size), FALSE); /* Next-able */ - gtk_table_attach(GTK_TABLE(table), - rei->chk_nextable = - gtk_check_button_new_with_label(_("Next-able")), 3, 4, - 1, 2, GTK_FILL, GTK_FILL, 0, 4); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rei->chk_nextable), - TRUE); + gtk_table_attach(GTK_TABLE(table), rei->chk_nextable = gtk_check_button_new_with_label(_("Next-able")), 3, 4, 1, 2, GTK_FILL, GTK_FILL, 0, 4); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rei->chk_nextable), TRUE); rmi->repo_edits = g_list_append(rmi->repo_edits, rei); /* Connect signals. */ rei->browse_info.dialog = rmi->dialog; rei->browse_info.txt = rei->txt_cache_dir; - g_signal_connect(G_OBJECT(rei->btn_browse), "clicked", - G_CALLBACK(repoman_dialog_browse), &rei->browse_info); + g_signal_connect(G_OBJECT(rei->btn_browse), "clicked", G_CALLBACK(repoman_dialog_browse), &rei->browse_info); gtk_widget_show_all(vbox);