Style changes and additional parseable arguments

This commit is contained in:
Moritz Lipp 2012-02-21 17:11:59 +01:00
parent 6aced3f870
commit ffd2da55bd
2 changed files with 27 additions and 23 deletions

View file

@ -231,7 +231,7 @@ config_load_default(zathura_t* zathura)
girara_shortcut_mapping_add(gsession, "change_mode", sc_change_mode);
girara_shortcut_mapping_add(gsession, "follow", sc_follow);
girara_shortcut_mapping_add(gsession, "goto", sc_goto);
girara_shortcut_mapping_add(gsession, "index_navigate", sc_navigate_index);
girara_shortcut_mapping_add(gsession, "navigate_index", sc_navigate_index);
girara_shortcut_mapping_add(gsession, "navigate", sc_navigate);
girara_shortcut_mapping_add(gsession, "quit", sc_quit);
girara_shortcut_mapping_add(gsession, "recolor", sc_recolor);
@ -248,7 +248,11 @@ config_load_default(zathura_t* zathura)
/* add argument mappings */
girara_argument_mapping_add(gsession, "bottom", BOTTOM);
girara_argument_mapping_add(gsession, "default", DEFAULT);
girara_argument_mapping_add(gsession, "collapse", COLLAPSE);
girara_argument_mapping_add(gsession, "collapse-all", COLLAPSE_ALL);
girara_argument_mapping_add(gsession, "down", DOWN);
girara_argument_mapping_add(gsession, "expand", EXPAND);
girara_argument_mapping_add(gsession, "expand-all", EXPAND_ALL);
girara_argument_mapping_add(gsession, "full-down", FULL_DOWN);
girara_argument_mapping_add(gsession, "full-up", FULL_UP);
girara_argument_mapping_add(gsession, "half-down", HALF_DOWN);

View file

@ -598,14 +598,14 @@ sc_navigate_index(girara_session_t* session, girara_argument_t* argument,
}
break;
case COLLAPSE:
if(!gtk_tree_view_collapse_row(tree_view, path)
if (gtk_tree_view_collapse_row(tree_view, path) == FALSE
&& gtk_tree_path_get_depth(path) > 1) {
gtk_tree_path_up(path);
gtk_tree_view_collapse_row(tree_view, path);
}
break;
case DOWN:
if(gtk_tree_view_row_expanded(tree_view, path)) {
if (gtk_tree_view_row_expanded(tree_view, path) == TRUE) {
gtk_tree_path_down(path);
} else {
do {