nemiver r894 - in trunk: . src/persp/dbgperspective src/persp/dbgperspective/schemas
- From: dodji svn gnome org
- To: svn-commits-list gnome org
- Subject: nemiver r894 - in trunk: . src/persp/dbgperspective src/persp/dbgperspective/schemas
- Date: Sat, 26 Jul 2008 18:14:12 +0000 (UTC)
Author: dodji
Date: Sat Jul 26 18:14:12 2008
New Revision: 894
URL: http://svn.gnome.org/viewvc/nemiver?rev=894&view=rev
Log:
Support no "auto-reload" source files.
* src/persp/dbgperspective/nmv-dbg-perspective.cc:
Allow the user to disallow source file auto-reloading for when
she chooses not to be asked about re-loading source files.
Modified:
trunk/ChangeLog
trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc
trunk/src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas
Modified: trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc (original)
+++ trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc Sat Jul 26 18:14:12 2008
@@ -130,6 +130,8 @@
"/apps/nemiver/dbgperspective/show-source-line-numbers" ;
static const char* CONF_KEY_CONFIRM_BEFORE_RELOAD_SOURCE =
"/apps/nemiver/dbgperspective/confirm-before-reload-source" ;
+static const char* CONF_KEY_ALLOW_AUTO_RELOAD_SOURCE =
+ "/apps/nemiver/dbgperspective/allow-auto-reload-source";
static const char* CONF_KEY_HIGHLIGHT_SOURCE_CODE =
"/apps/nemiver/dbgperspective/highlight-source-code" ;
static const char* CONF_KEY_SOURCE_FILE_ENCODING_LIST =
@@ -806,6 +808,7 @@
bool use_system_font ;
bool show_line_numbers ;
bool confirm_before_reload_source;
+ bool allow_auto_reload_source;
bool enable_syntax_highlight ;
UString custom_font_name ;
UString system_font_name ;
@@ -864,6 +867,7 @@
use_system_font (true),
show_line_numbers (true),
confirm_before_reload_source (true),
+ allow_auto_reload_source (true),
enable_syntax_highlight (true),
mouse_in_source_editor_x (0),
mouse_in_source_editor_y (0),
@@ -1873,6 +1877,8 @@
}
} else if (a_key == CONF_KEY_CONFIRM_BEFORE_RELOAD_SOURCE) {
m_priv->confirm_before_reload_source = boost::get<bool> (a_value);
+ } else if (a_key == CONF_KEY_ALLOW_AUTO_RELOAD_SOURCE) {
+ m_priv->allow_auto_reload_source = boost::get<bool> (a_value);
} else if (a_key == CONF_KEY_HIGHLIGHT_SOURCE_CODE) {
map<int, SourceEditor*>::iterator it ;
for (it = m_priv->pagenum_2_source_editor_map.begin () ;
@@ -2320,16 +2326,16 @@
"Do want to reload it ?"),
a_path.c_str ());
bool dont_ask_again = !m_priv->confirm_before_reload_source;
- bool need_to_reload_file = false;
+ bool need_to_reload_file = m_priv->allow_auto_reload_source;
if (!dont_ask_again) {
if (ask_yes_no_question (msg,
true /*propose to not ask again*/,
dont_ask_again)
== Gtk::RESPONSE_YES) {
need_to_reload_file = true;
+ } else {
+ need_to_reload_file = false;
}
- } else {
- need_to_reload_file = true;
}
if (need_to_reload_file)
reload_file ();
@@ -2338,6 +2344,9 @@
get_conf_mgr ().set_key_value
(CONF_KEY_CONFIRM_BEFORE_RELOAD_SOURCE,
!dont_ask_again);
+ get_conf_mgr ().set_key_value
+ (CONF_KEY_ALLOW_AUTO_RELOAD_SOURCE,
+ need_to_reload_file);
}
std::list<UString>::iterator iter =
std::find (pending_notifications.begin (),
Modified: trunk/src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas
==============================================================================
--- trunk/src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas (original)
+++ trunk/src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas Sat Jul 26 18:14:12 2008
@@ -47,6 +47,19 @@
</locale>
</schema>
<schema>
+ <key>/schemas/apps/nemiver/dbgperspective/allow-auto-reload-source</key>
+ <applyto>/apps/nemiver/dbgperspective/allow-auto-reload-source</applyto>
+ <owner>nemiver</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Do not automatically reload the source file</short>
+ <long>If the user choosed to never been asked about re-loading
+ source file and if this key is set to true, do re-load the source file
+ automatically.</long>
+ </locale>
+ </schema>
+ <schema>
<key>/schemas/apps/nemiver/dbgperspective/highlight-source-code</key>
<applyto>/apps/nemiver/dbgperspective/highlight-source-code</applyto>
<owner>nemiver</owner>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]