Re: [PATCH] Support Copy/Paste/Reset on target terminal
- From: Fabien Parent <parent f gmail com>
- To: The mailing list of the Nemiver project <nemiver-list gnome org>
- Subject: Re: [PATCH] Support Copy/Paste/Reset on target terminal
- Date: Tue, 9 Aug 2011 19:29:26 +0200
Hello Dodji,
>> diff --git a/menus/terminalmenu.xml b/menus/terminalmenu.xml
>> new file mode 100644
>> index 0000000..78911e8
>> --- /dev/null
>> +++ b/menus/terminalmenu.xml
>> @@ -0,0 +1,10 @@
>> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
>> + <ui>
>> + <popup name='TerminalMenu'>
>> + <menuitem action='CopyAction'/>
>> + <menuitem action='PasteAction'/>
>> + <separator/>
>> + <menuitem action='ResetAction'/>
>> + </popup>
>> + </ui>
>> +
>
> Please put this file into src/persp/dbgperspective/menus/ instead.
I don't agree, the terminal is something that could be useful to other
perspectives. I think that why the terminal source code is in
src/uicommon and not in src/persp/dbgperspective.
If you still want me to put this file in
src/pers/dbgperspective/menus/ I will have to move the
nmv-terminal.{cc,h} files inside the dbgperspective source directory.
>> diff --git a/src/uicommon/nmv-terminal.cc b/src/uicommon/nmv-terminal.cc
>> index 9573237..1b6092d 100644
>> --- a/src/uicommon/nmv-terminal.cc
>> +++ b/src/uicommon/nmv-terminal.cc
>> @@ -37,16 +37,62 @@
>> #endif
>> #include <unistd.h>
>> #include <iostream>
>> +#include <tr1/tuple>
>> #include <gtkmm/bin.h>
>> #include <gtkmm/main.h>
>> #include <gtkmm/window.h>
>> #include <gtkmm/adjustment.h>
>> +#include <gtkmm/menu.h>
>> +#include <gtkmm/builder.h>
>> +#include <gtkmm/uimanager.h>
>> #include <vte/vte.h>
>> +#include <glib/gi18n.h>
>> #include "common/nmv-exception.h"
>> #include "common/nmv-log-stream-utils.h"
>> +#include "common/nmv-env.h"
>> +#include "nmv-ui-utils.h"
>>
>> NEMIVER_BEGIN_NAMESPACE(nemiver)
>>
>> +using namespace common;
>> +
>> +typedef std::tr1::tuple<VteTerminal*&,
>> + Gtk::Menu*&,
>> + Glib::RefPtr<Gtk::ActionGroup>&> TerminalPrivDataTuple;
>> +
>
> Why references to pointers (VteTerminal*& and Gtk::Menu*?)? Why not
> just pointers?
Because I'm initializing the tuple when the vte and menu pointers are
NULL. So the tuple will contains a copy of the NULL pointer and the
menu won't be working.
And the reference also assure me that if someone change for any reason
the pointer of any of the two members, he won't have to update the
tuple and won't forget to do it.
Fabien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]