[glom] Fix a crash when using find mode.
- From: Daniel Borgmann <dborg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Fix a crash when using find mode.
- Date: Fri, 14 May 2010 16:48:01 +0000 (UTC)
commit fc27f3fb1ba3919a499668e9bec23fa0be160279
Author: Daniel Borgmann <danielb openismus com>
Date: Fri May 14 17:42:26 2010 +0100
Fix a crash when using find mode.
* glom/application.cc: Don't access m_action_mode_data.
* glom/application.h: Remove m_action_mode_data.
ChangeLog | 7 +++++++
glom/application.cc | 12 ++++++++++--
glom/application.h | 2 +-
3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ac834a2..acee52c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-05-14 Daniel Borgmann <danielb openismus com>
+
+ Fix a crash when using find mode.
+
+ * glom/application.cc: Don't access m_action_mode_data.
+ * glom/application.h: Remove m_action_mode_data.
+
2010-05-12 Daniel Borgmann <danielb openismus com>
Don't allow deleting placeholder rows.
diff --git a/glom/application.cc b/glom/application.cc
index 0bf56d9..8666bdb 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -1545,12 +1545,20 @@ void Application::existing_or_new_new()
void Application::set_mode_data()
{
- m_action_mode_data->activate();
+ if (!m_pFrame)
+ return;
+
+ if (m_pFrame->m_Mode == Frame_Glom::MODE_Find)
+ m_action_mode_find->activate();
}
void Application::set_mode_find()
{
- m_action_mode_find->activate();
+ if (!m_pFrame)
+ return;
+
+ if (m_pFrame->m_Mode == Frame_Glom::MODE_Data)
+ m_action_mode_find->activate();
}
#ifndef GLOM_ENABLE_MAEMO
diff --git a/glom/application.h b/glom/application.h
index faaddaa..c075d15 100644
--- a/glom/application.h
+++ b/glom/application.h
@@ -216,7 +216,7 @@ private:
typedef std::list< Glib::RefPtr<Gtk::Action> > type_listActions;
type_listActions m_listDeveloperActions; //Only enabled when in developer mode.
type_listActions m_listTableSensitiveActions; // Only enabled when a table is loaded.
- Glib::RefPtr<Gtk::Action> m_action_mode_data, m_action_mode_find;
+ Glib::RefPtr<Gtk::Action> m_action_mode_find;
#ifndef GLOM_ENABLE_CLIENT_ONLY
Glib::RefPtr<Gtk::Action> m_action_developer_users;
Glib::RefPtr<Gtk::RadioAction> m_action_menu_userlevel_developer, m_action_menu_userlevel_operator;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]