내 gtk 응용 프로그램이로드되면 툴바의 첫 번째 항목이 자동으로 선택됩니다 (강조 표시되고 Enter 키를 누를 때 누름). 이것은 사소한 문제 일 뿐이지 만 기본적으로 아무것도 선택하지 않는 것이 좋습니다. 여기 gtk 응용 프로그램이로드 될 때 첫 번째 툴바 버튼이 자동으로 선택되는 이유는 무엇입니까?
몇 가지 기본적인 예제 코드입니다 : 이것은 아마 GTK 일부 위젯에 초점을 나눠 +됩니다<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.16 -->
<!-- interface-naming-policy project-wide -->
<widget class="GtkWindow" id="window1">
<property name="width_request">200</property>
<property name="visible">True</property>
<child>
<widget class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
<child>
<widget class="GtkToolButton" id="toolbutton1">
<property name="visible">True</property>
<property name="label" translatable="yes">toolbutton1</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-new</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<widget class="GtkToolButton" id="toolbutton2">
<property name="visible">True</property>
<property name="label" translatable="yes">toolbutton2</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-open</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>