diff options
author | infirit <[email protected]> | 2014-12-18 00:23:57 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-18 00:23:57 +0100 |
commit | 12975909c589880030db6125ad6dcbea889edcdc (patch) | |
tree | fc374a8a3b855b5024d09f9edb2e47ca755cb7ac /src/selection.cpp | |
parent | 0dea7ab1931fb33f35eceab66dffcd56f4550f68 (diff) | |
download | mate-system-monitor-12975909c589880030db6125ad6dcbea889edcdc.tar.bz2 mate-system-monitor-12975909c589880030db6125ad6dcbea889edcdc.tar.xz |
Make indentation uniform across source files
No more tabs, 4 spaces instead. And remove trailing whitespace.
Diffstat (limited to 'src/selection.cpp')
-rw-r--r-- | src/selection.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index 6f293a6..7e15a9e 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -6,38 +6,38 @@ namespace procman { - void SelectionMemento::add_to_selected(GtkTreeModel* model, GtkTreePath*, GtkTreeIter* iter, gpointer data) - { - guint pid = 0; - gtk_tree_model_get(model, iter, COL_PID, &pid, -1); - if (pid) - static_cast<SelectionMemento*>(data)->pids.push_back(pid); - } + void SelectionMemento::add_to_selected(GtkTreeModel* model, GtkTreePath*, GtkTreeIter* iter, gpointer data) + { + guint pid = 0; + gtk_tree_model_get(model, iter, COL_PID, &pid, -1); + if (pid) + static_cast<SelectionMemento*>(data)->pids.push_back(pid); + } - void SelectionMemento::save(GtkWidget* tree) - { - GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); - gtk_tree_selection_selected_foreach(selection, &SelectionMemento::add_to_selected, this); - } + void SelectionMemento::save(GtkWidget* tree) + { + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); + gtk_tree_selection_selected_foreach(selection, &SelectionMemento::add_to_selected, this); + } - void SelectionMemento::restore(GtkWidget* tree) - { - if (not this->pids.empty()) - { - GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); - typedef std::vector<pid_t>::iterator iterator; - for (iterator it(this->pids.begin()); it != this->pids.end(); ++it) - { - if (ProcInfo* proc = ProcInfo::find(*it)) - { - gtk_tree_selection_select_iter(selection, &proc->node); - procman_debug("Re-selected process %u", unsigned(*it)); - } - else - procman_debug("Could not find process %u, cannot re-select it", unsigned(*it)); - } - } - } + void SelectionMemento::restore(GtkWidget* tree) + { + if (not this->pids.empty()) + { + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); + typedef std::vector<pid_t>::iterator iterator; + for (iterator it(this->pids.begin()); it != this->pids.end(); ++it) + { + if (ProcInfo* proc = ProcInfo::find(*it)) + { + gtk_tree_selection_select_iter(selection, &proc->node); + procman_debug("Re-selected process %u", unsigned(*it)); + } + else + procman_debug("Could not find process %u, cannot re-select it", unsigned(*it)); + } + } + } } |