Re: [glade--]gtk combo pb in C++



Hi,

Thanks for the reply... You'll attach a .glade file which contains combo with items.
Please, to see the error, generate the code in C++.
Here is the exact error I get:

$glade-2 combo.glade
GTK Accessibility Module initialized
Changed dir to /home/aktarus/Combo
sh: line 1: autoconf2.50: command not found
Found pkg-config version 0.15.0
Generating code for gtk 2.2.4 (pkg-config), gtkmm 2.2.11 (pkg-config), [gnomemm 2.0.1 (compiled in) gnomeuimm 2.0.0 (compiled in) bonobomm 1.3.5 (compiled in) bonobouimm 1.3.5 (compiled in)]
glade--: unknown Widget type GtkListItem

See also my inline comments.

Christof Petig wrote:

Nicolas Montavont schrieb:

Hi,

I come back on a previous mail, sent last week.


I'd been on vacation (and if you did not specify the keyword glademm/glade-- I most likely overlooked it)

Currently we are trying to convert our GTK interface to gtk2 (in C++), but we have a problem with the combo box. When we create a combo box (with glade-2), with different items, we have the following error at generation:

glade--: unknown Widget type GtkListItem


glademm simply complains about deprecated widgets being used in the xml file (it's a warning IIRC).

Yes I can understand that, but it is glade-2 that generates the .xml file. So why does it use deprecated widgets ?


But, if we create empty combo box with glade-2, I mean without items, it compiles without errors. More, if we have items in combo box, and configure to generate C code instead of C++, it works as well.


Between the lines I read that the project does not compile when you put items into the combo.

Right

Thanks again for the help...

Nicolas

Can you confirm that [e.g. send me the compiler error]. And it would help me a lot if you could provide a minimal failing example (the .glade[p] files are enough)

  Christof (glademm maintainer)


<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>

<glade-interface>

<widget class="GtkWindow" id="window_main">
  <property agent="glademm" name="cxx_visibility">protected</property>
  <property name="visible">True</property>
  <property name="title" translatable="yes">window1</property>
  <property name="type">GTK_WINDOW_TOPLEVEL</property>
  <property name="window_position">GTK_WIN_POS_NONE</property>
  <property name="modal">False</property>
  <property name="resizable">True</property>
  <property name="destroy_with_parent">False</property>

  <child>
    <widget class="GtkFixed" id="fixed_window_main">
      <property agent="glademm" name="cxx_visibility">protected</property>
      <property name="visible">True</property>

      <child>
	<widget class="GtkCombo" id="combo1">
	  <property name="width_request">179</property>
	  <property name="height_request">25</property>
	  <property agent="glademm" name="cxx_visibility">protected</property>
	  <property name="visible">True</property>
	  <property name="value_in_list">True</property>
	  <property name="allow_empty">True</property>
	  <property name="case_sensitive">False</property>
	  <property name="enable_arrow_keys">True</property>
	  <property name="enable_arrows_always">True</property>

	  <child internal-child="entry">
	    <widget class="GtkEntry" id="combo-entry1">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="editable">True</property>
	      <property name="visibility">True</property>
	      <property name="max_length">0</property>
	      <property name="text" translatable="yes">hello</property>
	      <property name="has_frame">True</property>
	      <property name="invisible_char" translatable="yes">*</property>
	      <property name="activates_default">False</property>
	    </widget>
	  </child>

	  <child internal-child="list">
	    <widget class="GtkList" id="combo-list1">
	      <property name="visible">True</property>
	      <property name="selection_mode">GTK_SELECTION_BROWSE</property>

	      <child>
		<widget class="GtkListItem" id="listitem22">
		  <property name="visible">True</property>
		  <property name="can_focus">True</property>
		  <property name="label" translatable="yes">hello</property>
		</widget>
	      </child>

	      <child>
		<widget class="GtkListItem" id="listitem23">
		  <property name="visible">True</property>
		  <property name="can_focus">True</property>
		  <property name="label" translatable="yes">bye</property>
		</widget>
	      </child>

	      <child>
		<widget class="GtkListItem" id="listitem24">
		  <property name="visible">True</property>
		  <property name="can_focus">True</property>
		  <property name="label" translatable="yes"></property>
		</widget>
	      </child>
	    </widget>
	  </child>
	</widget>
	<packing>
	  <property name="x">100</property>
	  <property name="y">24</property>
	</packing>
      </child>
    </widget>
  </child>
</widget>

</glade-interface>


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