浏览代码

Minor simplification to the GTK exit handling.

legacy
Sam Hocevar sam 15 年前
父节点
当前提交
befc2ac884
共有 2 个文件被更改,包括 9 次插入6 次删除
  1. +5
    -6
      src/gtk/editor.xml
  2. +4
    -0
      src/gtk/glmapview.cpp

+ 5
- 6
src/gtk/editor.xml 查看文件

@@ -22,8 +22,8 @@
<child>
<object class="GtkImageMenuItem" id="imagemenuitem1">
<property name="visible">True</property>
<property name="use_action_appearance">True</property>
<property name="related_action">action_new</property>
<property name="use_action_appearance">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
@@ -31,8 +31,8 @@
<child>
<object class="GtkImageMenuItem" id="imagemenuitem2">
<property name="visible">True</property>
<property name="use_action_appearance">True</property>
<property name="related_action">action_open</property>
<property name="use_action_appearance">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
@@ -66,7 +66,6 @@
<property name="use_stock">True</property>
<property name="always_show_image">True</property>
<signal name="activate" handler="gtk_main_quit"/>
<signal name="activate" handler="gtk_true"/>
</object>
</child>
</object>
@@ -158,8 +157,8 @@
<child>
<object class="GtkToolButton" id="toolbutton2">
<property name="visible">True</property>
<property name="use_action_appearance">True</property>
<property name="related_action">action_new</property>
<property name="use_action_appearance">True</property>
<property name="label" translatable="yes">toolbutton</property>
<property name="use_underline">True</property>
</object>
@@ -171,8 +170,8 @@
<child>
<object class="GtkToolButton" id="toolbutton1">
<property name="visible">True</property>
<property name="use_action_appearance">True</property>
<property name="related_action">action_open</property>
<property name="use_action_appearance">True</property>
<property name="label" translatable="yes">Open...</property>
<property name="use_underline">True</property>
</object>
@@ -184,8 +183,8 @@
<child>
<object class="GtkToolButton" id="toolbutton4">
<property name="visible">True</property>
<property name="use_action_appearance">True</property>
<property name="related_action">action_save</property>
<property name="use_action_appearance">True</property>
<property name="label" translatable="yes">Save</property>
<property name="use_underline">True</property>
</object>


+ 4
- 0
src/gtk/glmapview.cpp 查看文件

@@ -50,6 +50,10 @@ GlMapView::GlMapView(GtkBuilder *builder)
* stealing time from the GTK loop when the callback time exceeds
* the timeout value. */
g_idle_add((GSourceFunc)IdleTickSignal, this);

/* We must divert gtk_main_quit() to release our resources when the
* GL widget is still realised. We'll call gtk_main_quit() when we
* are sure that everything has been cleaned. */
gtk_quit_add(0, (GtkFunction)ShutdownSignal, this);

gtk_signal_connect(GTK_OBJECT(glarea), "realize",


正在加载...
取消
保存