[Nemiver-list] some questions



Hello,


I have some questions about hacking nemiver:


1. Is it possible to "make" and test nemiver, without doing a complete
"make install" ?

It seems the main program tries to load library modules and it always
looks in "/usr/lib"...

if I "make" nemiver in the source directory and try to execute
"./src/nemiver", the old modules are still loaded from "/usr/lib",
instead of my new and updated modules in the local directory.


Same thing happens for "xml" files - there are
"get_absolute_resource_path" functions that insist on loading the "xml"
files from "/usr/lib/nemiver/plugins/...." instead of the local directory.


So every time I change something and want to test it, and have to "su"
and "make install" - quite time consuming...

Is there a better way ?


2. I would like to suggest a small change in the "variables" view.
instead of using a "tree" (for Function arguments and Local Variables"),
I suggest to add a fourth column which will simply state the "scope" of
the variable.

The reason for this small change is because vertical screen estate is
very scarce, and having two lines that don't provide actual information
is not that good...

also, because I like using the keyboard, the "tree" just requires extra
work for me :-)

If you think it's acceptable, I'll try to implement it.


3. (keyboard again) - key handling inside the source view is quite
strange. "up" or "down" keys don't move the cursor to the previous/next
line, but instead switch to the next GTK widget...

What do you think is the best place to change that ?


Attached is an improved keyboard binding patch for
variables/stack/terminal/etc views, as per Jonathon suggestions.


Thanks,

   Gordon.



Index: src/persp/dbgperspective/nmv-dbg-perspective.cc
===================================================================
--- src/persp/dbgperspective/nmv-dbg-perspective.cc	(revision 554)
+++ src/persp/dbgperspective/nmv-dbg-perspective.cc	(working copy)
@@ -286,6 +286,15 @@
                                     (const UString &a_var_name,
                                      const IDebugger::VariableSafePtr &a_var,
                                      const UString &a_cooker) ;
+
+    void on_activate_call_stack_view () ;
+    void on_activate_variables_view () ;
+    void on_activate_output_view () ;
+    void on_activate_target_terminal_view () ;
+    void on_activate_breakpoints_view ();
+    void on_activate_logs_view ();
+    void on_activate_registers_view () ;
+    
     //************
     //</signal slots>
     //************
@@ -533,6 +542,8 @@
 
     bool do_unmonitor_file (const UString &a_path) ;
 
+    void activate_status_view(Gtk::Widget& page);
+
     sigc::signal<void, bool>& show_command_view_signal () ;
     sigc::signal<void, bool>& show_target_output_view_signal () ;
     sigc::signal<void, bool>& show_log_view_signal () ;
@@ -1965,6 +1976,83 @@
     NEMIVER_CATCH
 }
 
+void
+DBGPerspective::activate_status_view(Gtk::Widget& page)
+{
+    int pagenum;
+	
+    LOG_FUNCTION_SCOPE_NORMAL_DD ;
+
+    NEMIVER_TRY
+    THROW_IF_FAIL (m_priv) ;
+    THROW_IF_FAIL (m_priv->statuses_notebook) ;
+	
+    pagenum = m_priv->statuses_notebook->page_num(page);
+    if ( pagenum != -1 ) {
+	if (m_priv->statuses_notebook->get_current_page()!=pagenum)
+		m_priv->statuses_notebook->set_current_page (pagenum);
+	
+	page.grab_focus();
+    } else {
+	LOG_DD ("Invalid Pagenum") ;
+    }
+	
+	
+    NEMIVER_CATCH
+}
+
+void 
+DBGPerspective::on_activate_call_stack_view()
+{
+    LOG_FUNCTION_SCOPE_NORMAL_DD ;
+    activate_status_view(get_call_stack_scrolled_win());
+}
+
+void 
+DBGPerspective::on_activate_variables_view () 
+{
+    LOG_FUNCTION_SCOPE_NORMAL_DD ;
+    activate_status_view(get_local_vars_inspector_scrolled_win());
+}
+
+void 
+DBGPerspective::on_activate_output_view () 
+{
+    LOG_FUNCTION_SCOPE_NORMAL_DD ;
+    set_show_target_output_view(true);
+    activate_status_view(get_target_output_view_scrolled_win());
+}
+
+void 
+DBGPerspective::on_activate_target_terminal_view () 
+{
+    LOG_FUNCTION_SCOPE_NORMAL_DD ;
+    activate_status_view(get_terminal_box());
+}
+
+void 
+DBGPerspective::on_activate_breakpoints_view ()
+{
+    LOG_FUNCTION_SCOPE_NORMAL_DD ;
+    activate_status_view(get_breakpoints_scrolled_win());
+}
+
+void 
+DBGPerspective::on_activate_logs_view ()
+{
+    LOG_FUNCTION_SCOPE_NORMAL_DD ;
+    set_show_log_view(true);
+    activate_status_view(get_log_view_scrolled_win());
+}
+
+void 
+DBGPerspective::on_activate_registers_view () 
+{
+    LOG_FUNCTION_SCOPE_NORMAL_DD ;
+    activate_status_view(get_registers_scrolled_win());
+}
+
+
 //****************************
 //</slots>
 //***************************
@@ -2224,6 +2312,69 @@
             ActionEntry::DEFAULT,
             ""
         },
+	{
+		"ActivateCallStackViewMenuAction",
+		nil_stock_id,
+		_("Stack View"),
+		_("Switch to Stack View"),
+		sigc::mem_fun(*this, &DBGPerspective::on_activate_call_stack_view),
+		ActionEntry::DEFAULT,
+		"<alt>1"
+	},
+	{
+		"ActivateVariablesViewMenuAction",
+		nil_stock_id,
+		_("Variables View"),
+		_("Switch to Variables View"),
+		sigc::mem_fun(*this, &DBGPerspective::on_activate_variables_view),
+		ActionEntry::DEFAULT,
+		"<alt>2"
+	},
+	{
+		"ActivateTargetTerminalViewMenuAction",
+		nil_stock_id,
+		_("Target Terminal View"),
+		_("Switch to Target Terminal View"),
+		sigc::mem_fun(*this, &DBGPerspective::on_activate_target_terminal_view),
+		ActionEntry::DEFAULT,
+		"<alt>3"
+	},
+	{
+		"ActivateBreakpointsViewMenuAction",
+		nil_stock_id,
+		_("Breakpoints View"),
+		_("Switch to Breakpoints  View"),
+		sigc::mem_fun(*this, &DBGPerspective::on_activate_breakpoints_view),
+		ActionEntry::DEFAULT,
+		"<alt>4"
+	},
+	{
+		"ActivateRegistersViewMenuAction",
+		nil_stock_id,
+		_("Registers View"),
+		_("Switch to Registers View"),
+		sigc::mem_fun(*this, &DBGPerspective::on_activate_registers_view),
+		ActionEntry::DEFAULT,
+		"<alt>5"
+	},
+	{
+		"ActivateOutputViewMenuAction",
+		nil_stock_id,
+		_("Output View"),
+		_("Switch to Output View"),
+		sigc::mem_fun(*this, &DBGPerspective::on_activate_output_view),
+		ActionEntry::DEFAULT,
+		"<alt>6"
+	},
+	{
+		"ActivateLogsViewMenuAction",
+		nil_stock_id,
+		_("Logs/Errors View"),
+		_("Switch Logs/Error View"),
+		sigc::mem_fun(*this, &DBGPerspective::on_activate_logs_view),
+		ActionEntry::DEFAULT,
+		"<alt>7"
+	},
         {
             "ShowCommandsMenuAction",
             nil_stock_id,
Index: src/persp/dbgperspective/menus/menus.xml
===================================================================
--- src/persp/dbgperspective/menus/menus.xml	(revision 554)
+++ src/persp/dbgperspective/menus/menus.xml	(working copy)
@@ -36,13 +36,28 @@
                       name="CurrentSessionPropertiesMenuItem"/>
         </menu>
         <menu action="ViewMenuAction" name="ViewMenu">
+	    <menuitem action="ActivateCallStackViewMenuAction"
+		      name="ActivateCallStackViewMenuItem"/>
+	    <menuitem action="ActivateVariablesViewMenuAction"
+		      name="ActivateVariablesViewMenuItem"/>
+	    <menuitem action="ActivateTargetTerminalViewMenuAction"
+		      name="ActivateTargetTerminalViewMenuItem"/>
+	    <menuitem action="ActivateBreakpointsViewMenuAction"
+		      name="ActivateBreakpointsViewMenuItem"/>
+	    <menuitem action="ActivateRegistersViewMenuAction"
+		      name="ActivateRegistersViewMenuItem"/>
+	    <menuitem action="ActivateOutputViewMenuAction"
+		      name="ActivateOutputViewMenuItem"/>
+	    <menuitem action="ActivateLogsViewMenuAction"
+		      name="ActivateLogsViewMenuItem"/>
+            <separator/>
             <!--<menuitem action="ShowCommandsMenuAction"
                       name="ShowCommandsMenuItem"/> -->
             <menuitem action="ShowErrorsMenuAction"
                       name="ShowErrorsMenuItem"/>
             <menuitem action="ShowTargetOutputMenuAction"
                       name="ShowTargetOutputMenuItem"/>
-        </menu>
+        </menu>	    
         <menu action="DebugMenuAction" name="DebugMenu">
             <menuitem action="RunMenuItemAction" name="RunMenuItem"/>
             <menuitem action="StopMenuItemAction" name="StopMenuItem"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]