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;
}
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);
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);