[glade--]Buggy #include filenames.



The _glade files get the wrong include name sometimes.
It seems to be in the case where a widget has the separate class attribute set, and the .h file is already existing.

How to reproduce:

1. Create a C++ project file including these widgets:

<widget>
  <class>GtkWindow</class>
  <name>window1</name>
  <title>window1</title>

  <widget>
    <class>GtkButton</class>
    <cxx_separate_class>True</cxx_separate_class>
    <cxx_separate_file>True</cxx_separate_file>
    <name>button1</name>
  </widget>
</widget>

2. Run glade--:  glade-- proj1.glade

3. Check the output:   grep _new src/window1_glade.hh
   This should not return anything.

4. Create a button1.hh file in the current directory: touch button1.hh

5. Run glade--:  glade-- proj1.glade

6. Check the output:   grep _new src/window1_glade.hh
   Output is obviously wrong: #include "button1.hh_new"


The patch is created with: diff -u Class.cc.~1.11~ Class.cc
I'm not sure which format is common for submitting patches.
Since the tests woüldn't compile (perhaps because of me having old automake/conf stuff), I'm not sure if this patch has any side-effects.


--
Audun H. Ellertsen, Software engineer   http://www.procaptura.com
proCaptura A/S                          Tel work : +47 66 85 51 00
Billingstadsletta 14, Boks 132          Fax work : +47 66 85 51 01
N-1376 Billingstad, Norway              Cellular : +47 91 51 14 66




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