How to add new files to gui?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to add new files to gui?

Richard Crozier
Dear list,

How do I go about adding new source files to the GUI?

I wanted to make the tabbar moveable, and have horizontal text when it's
to the left or right (i.e. vertical). I have created two new classes,
octave_editor_tabwidget and octave_editor_tabbar, therefore the files:

octave_editor_tabwidget.h
octave_editor_tabwidget.cc
octave_editor_tabbar.h
octave_editor_tabbar.cc

I have also then modified libgui/src/m-editor/module.mk

to octave_gui_MOC I added like below:

if AMCOND_HAVE_QSCINTILLA
octave_gui_MOC += \
   src/m-editor/moc-file-editor-interface.cc \
   src/m-editor/moc-octave_editor_tabbar.cc \
   src/m-editor/moc-octave_editor_tabwidget.cc \
   src/m-editor/moc-file-editor-tab.cc \
   src/m-editor/moc-file-editor.cc \
   src/m-editor/moc-find-dialog.cc \
   src/m-editor/moc-octave-qscintilla.cc
endif

to noinst_HEADERS I added

   src/m-editor/octave_editor_tabbar.h \
   src/m-editor/octave_editor_tabwidget.h \

and to src_libgui_src_la_SOURCES

   src/m-editor/octave_editor_tabbar.cc \
   src/m-editor/octave_editor_tabwidget.cc \

I have also attached my modified module.mk file. I have run bootstrap,
configure and make -j4 but I get the error:

make[3]: *** No rule to make target
`src/m-editor/octave_editor_tabbar.cc', needed by
`src/m-editor/src_libgui_src_la-octave_editor_tabbar.lo'. Stop.
make[3]: *** Waiting for unfinished jobs....
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/freetype2
-I/usr/include/freetype2 -I/usr/include/qt4 -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4/QtNetwork
-I/usr/include/qt4/QtOpenGL -I./qterminal/libqterminal -Isrc -I./src
-I./src/m-editor -I./src/qtinfo -I./graphics -I../liboctave/cruft/misc
-I../liboctave/array -I../liboctave/numeric -I../liboctave/numeric
-I../liboctave/operators -I../liboctave/operators -I../liboctave/system
-I../liboctave/util -I../libinterp -I../libinterp
-I../libinterp/parse-tree -I../libinterp/parse-tree
-I../libinterp/corefcn -I../libinterp/corefcn
-I../libinterp/octave-value -I../libgnu -I../libgnu -Wall -W -Wshadow
-Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align
-Wcast-qual -g -O2 -pthread -MT
src/m-editor/src_libgui_src_la-file-editor-tab.lo -MD -MP -MF
src/m-editor/.deps/src_libgui_src_la-file-editor-tab.Tpo -c
src/m-editor/file-editor-tab.cc  -fPIC -DPIC -o
src/m-editor/.libs/src_libgui_src_la-file-editor-tab.o
mv -f src/.deps/src_libgui_src_la-history-dock-widget.Tpo
src/.deps/src_libgui_src_la-history-dock-widget.Plo
mv -f src/.deps/src_libgui_src_la-dialog.Tpo
src/.deps/src_libgui_src_la-dialog.Plo
mv -f src/.deps/src_libgui_src_la-files-dock-widget.Tpo
src/.deps/src_libgui_src_la-files-dock-widget.Plo
mv -f src/m-editor/.deps/src_libgui_src_la-file-editor-tab.Tpo
src/m-editor/.deps/src_libgui_src_la-file-editor-tab.Plo
make[3]: Leaving directory `/home/rcrozier/src/octave-src/libgui'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/rcrozier/src/octave-src/libgui'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rcrozier/src/octave-src'
make: *** [all] Error 2


It's probably obvious, but could someone point out what I'm missing here
please?

Thanks,
Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


module.mk (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to add new files to gui?

Richard Crozier
On 24/07/14 16:00, John W. Eaton wrote:
> On 07/24/2014 07:18 AM, Richard Crozier wrote:
>> Dear list,
>>
>> How do I go about adding new source files to the GUI?
>>

<snip>

>>
>> It's probably obvious, but could someone point out what I'm missing here
>> please?
>
> Sorry, I'm not sure what the problem is, but I have a small request
> about your change.  Could you please follow the convention we have for
> file names and use hyphen instead of underscore in the names?  I don't
> mean to nitpick, but I'd prefer to keep the naming scheme for Octave
> source files somewhat consistent.
>

yes, I am happy to change this, and there are plenty of other style
rules etc. to be fixed I'm sure before getting to the patch stage, at
this point I was just hacking around.


> Also, if you'd post a complete current version of your proposed changes,
> I'd be willing to look at it to see why the build is not working.
>
> Thanks,
>
> jwe
>
>

Thanks I might try and get a patch together next week, at the moment the
change discussed here is now mixed in with another, which seems to be
causing my build to fail with a different error, and I'm experimenting
with mercurial queues to untangle them.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.