[glom/glom-1-14] Fix a crash when using find mode.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-14] Fix a crash when using find mode.
- Date: Sat, 19 Jun 2010 12:52:32 +0000 (UTC)
commit ca7e2e61d5584668d0b2f50d40f99bfbe48187d0
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 4b03f99..be72463 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-19 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-06-19 Murray Cumming <murrayc murrayc com>
Remove unnecessary gtk C includes.
diff --git a/glom/application.cc b/glom/application.cc
index 03e57ad..95a6876 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -1542,12 +1542,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 332f0b9..2b61e72 100644
--- a/glom/application.h
+++ b/glom/application.h
@@ -215,7 +215,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]