[glom/maemo5] Remove silly != NULLs
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom/maemo5] Remove silly != NULLs
- Date: Mon, 28 Sep 2009 09:19:03 +0000 (UTC)
commit 5164f2afaae5678d7f5808c6f5da2937a8c43a84
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Sep 28 11:10:51 2009 +0200
Remove silly != NULLs
glom/dialog_existing_or_new.cc | 14 +++++++-------
glom/dialog_existing_or_new.h | 1 -
2 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/glom/dialog_existing_or_new.cc b/glom/dialog_existing_or_new.cc
index f55fea6..2d98a4d 100644
--- a/glom/dialog_existing_or_new.cc
+++ b/glom/dialog_existing_or_new.cc
@@ -468,10 +468,10 @@ void Dialog_ExistingOrNew::existing_icon_data_func(Gtk::CellRenderer* renderer,
#endif
else if(iter == m_iter_existing_other)
pixbuf_renderer->property_stock_id() = Gtk::StockID(Gtk::Stock::OPEN);
- else if(m_iter_existing_recent_dummy.get() != NULL && iter == *m_iter_existing_recent_dummy)
+ else if(m_iter_existing_recent_dummy.get() && iter == *m_iter_existing_recent_dummy)
pixbuf_renderer->property_stock_id() = Gtk::StockID(Gtk::Stock::DIALOG_ERROR); // TODO: Use Stock::STOP instead?
#ifndef G_OS_WIN32
- else if(m_iter_existing_network_dummy.get() != NULL && iter == *m_iter_existing_network_dummy)
+ else if(m_iter_existing_network_dummy.get() && iter == *m_iter_existing_network_dummy)
pixbuf_renderer->property_stock_id() = Gtk::StockID(Gtk::Stock::DIALOG_ERROR); // TODO: Use Stock::STOP instead?
#endif
@@ -489,10 +489,10 @@ void Dialog_ExistingOrNew::existing_icon_data_func(Gtk::CellRenderer* renderer,
#endif
else if(iter == m_iter_existing_other)
pixbuf_renderer->set_property("stock-id", Gtk::StockID(Gtk::Stock::OPEN));
- else if(m_iter_existing_recent_dummy.get() != NULL && iter == *m_iter_existing_recent_dummy)
+ else if(m_iter_existing_recent_dummy.get() && iter == *m_iter_existing_recent_dummy)
pixbuf_renderer->set_property("stock-id", Gtk::StockID(Gtk::Stock::DIALOG_ERROR)); // TODO: Use Stock::STOP instead?
#ifndef G_OS_WIN32
- else if(m_iter_existing_network_dummy.get() != NULL && iter == *m_iter_existing_network_dummy)
+ else if(m_iter_existing_network_dummy.get() && iter == *m_iter_existing_network_dummy)
pixbuf_renderer->set_property("stock-id", Gtk::StockID(Gtk::Stock::DIALOG_ERROR)); // TODO: Use Stock::STOP instead?
#endif
@@ -584,7 +584,7 @@ void Dialog_ExistingOrNew::new_icon_data_func(Gtk::CellRenderer* renderer, const
pixbuf_renderer->property_stock_id() = Gtk::Stock::NEW.id;
else if(iter == m_iter_new_template)
pixbuf_renderer->property_stock_id() = Gtk::Stock::EDIT.id; // TODO: More meaningful icon?
- else if(m_iter_new_template_dummy.get() != NULL && iter == *m_iter_new_template_dummy)
+ else if(m_iter_new_template_dummy.get() && iter == *m_iter_new_template_dummy)
pixbuf_renderer->property_stock_id() = Gtk::Stock::DIALOG_ERROR.id; // TODO: Use Stock::STOP instead?
else
{
@@ -608,7 +608,7 @@ void Dialog_ExistingOrNew::new_icon_data_func(Gtk::CellRenderer* renderer, const
pixbuf_renderer->set_property("stock-id", Gtk::StockID(Gtk::Stock::NEW));
else if(iter == m_iter_new_template)
pixbuf_renderer->set_property("stock-id", Gtk::StockID(Gtk::Stock::EDIT)); // TODO: More meaningful icon?
- else if(m_iter_new_template_dummy.get() != NULL && iter == *m_iter_new_template_dummy)
+ else if(m_iter_new_template_dummy.get() && iter == *m_iter_new_template_dummy)
pixbuf_renderer->set_property("stock-id", Gtk::StockID(Gtk::Stock::DIALOG_ERROR)); // TODO: Use Stock::STOP instead?
else
{
@@ -820,7 +820,7 @@ void Dialog_ExistingOrNew::on_stream_read(const Glib::RefPtr<Gio::AsyncResult>&
}
else
{
- const bool is_first_item = m_iter_new_template_dummy.get() != NULL;
+ const bool is_first_item = m_iter_new_template_dummy.get();
// Add to list
Gtk::TreeModel::iterator iter = m_new_model->append(m_iter_new_template->children());
diff --git a/glom/dialog_existing_or_new.h b/glom/dialog_existing_or_new.h
index 82e83d5..6c2747a 100644
--- a/glom/dialog_existing_or_new.h
+++ b/glom/dialog_existing_or_new.h
@@ -150,7 +150,6 @@ private:
Gtk::TreeView* m_existing_view;
#ifndef GLOM_ENABLE_CLIENT_ONLY
-
class NewModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]