[Glade-users] problem on "about dialog"



Hi,all


i use Anjuta(2.4.1),include glade(3.4.5) inside.use libglade(not GtkBuilder object) to get UI.
while using the "about dialog" supplied  by glade itself ,there comes a problem.
i use "about dialog" under "Container",and in one callback function ,get UI from XML file.
code follows:

void on_about_item_activate(GtkMenuItem *menu_item)
{
    GladeXML *gxml;
    gxml = glade_xml_new ("about.glade","aboutdialog",NULL);//have set "about dialog" to "visible" in glade
     glade_xml_signal_autoconnect (gxml);
}

i set "license" and "copyright" in glade.
but after i get the UI ,and i click the "close" button,but no response .others (include "license","x"button 
on title bar) are ok.
i can not find how to set the response to the "click" signal of the "close" button.
widget packs the buttons on the bottom line together ,called internal action_area.
it seems that the system responses every button internally auto,that we can not separate them and get each 
one manual.
i do not know if my code is wrong,should no write like this,or i did not find the way to set it.
please do not teach me to use g_show_about_dialog(......) or something like that,i want to use libglade.
maybe i should check source code of glade for answer,but i do not where to begin.:) 
do someone know how to solve this problem?thanks very much.

ubuntu8.04  kernel2.6.24    gcc4.2.4  gtk+2.12.9   gnome2.22.3
following about.glade??the XML file of "about dialog"??


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.4.5 on Fri Apr 10 09:22:04 2009 -->
<glade-interface>
  <widget class="GtkAboutDialog" id="aboutdialog">
    <property name="visible">True</property>
    <property name="border_width">2</property>
    <property name="title" translatable="yes">About Project02</property>
    <property name="resizable">False</property>
    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
    <property name="destroy_with_parent">True</property>
    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
    <property name="has_separator">False</property>
    <property name="program_name">Project02</property>
    <property name="version">0.1</property>
    <property name="copyright" translatable="yes">Copyright (c) Dong Longchao 2009
&lt;donglongchao at 163.com&gt;</property>
    <property name="license" translatable="yes">GPL</property>
    <child internal-child="vbox">
      <widget class="GtkVBox" id="dialog-vbox1">
        <property name="visible">True</property>
        <property name="spacing">2</property>
        <child>
          <placeholder/>
        </child>
        <child internal-child="action_area">
          <widget class="GtkHButtonBox" id="dialog-action_area1">
            <property name="visible">True</property>
            <property name="layout_style">GTK_BUTTONBOX_END</property>
          </widget>
          <packing>
            <property name="expand">False</property>
            <property name="pack_type">GTK_PACK_END</property>
          </packing>
        </child>
      </widget>
    </child>
  </widget>
</glade-interface>

Wish you happy.
Dong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20090410/0afc0e17/attachment-0001.html 




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