[Glade-users] GtkMessageDialog Doesn't Work



Hi, all:

My development environment of GTK+ is Glade/GTK+ Dev 2.12.8 & Visual C++ 6.0.
I can create GUI by glade and build it by Visual C++ 6.0.
GtkFileChooserDialog, GtkWindow, GtkButton, ... can work normally by my test but GtkMessageDialog.
GtkButton in GtkMessageDialog didn't appear. This is my screen shot:
http://www.pixnet.net/photo/zxvc/97696785

This is my main C program:
~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <gtk/gtk.h>
#include <glade/glade.h>


GladeXML *xml;

int main(int argc, char *argv[]) {
 GtkWidget *gw;

    gtk_init(&argc, &argv);

    /* load the interface */
    xml = glade_xml_new("test.glade", NULL, NULL);

    /* connect the signals in the interface */
    glade_xml_signal_autoconnect(xml);

 gw = glade_xml_get_widget(xml, "messagedialog1");
 gtk_widget_show(gw);

    /* start the event loop */
    gtk_main();

    return 0;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~

This is my test.glade file. It just has a GtkMessageDialog and two GtkButton:
~~~~~~~~~~~~~~~~~~~~~~~~~~
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.4.3 on Tue Jul 29 13:09:21 2008 -->
<glade-interface>
  <widget class="GtkMessageDialog" id="messagedialog1">
    <property name="border_width">5</property>
    <property name="resizable">False</property>
    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
    <property name="skip_taskbar_hint">True</property>
    <property name="has_separator">False</property>
    <property name="image"></property>
    <child internal-child="vbox">
      <widget class="GtkVBox" id="dialog-vbox1">
        <property name="visible">True</property>
        <property name="spacing">2</property>
        <child internal-child="action_area">
          <widget class="GtkHButtonBox" id="dialog-action_area2">
            <property name="visible">True</property>
            <property name="layout_style">GTK_BUTTONBOX_END</property>
            <child>
              <widget class="GtkButton" id="button1">
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="receives_default">True</property>
                <property name="label" translatable="yes">button</property>
                <property name="response_id">0</property>
              </widget>
            </child>
            <child>
              <widget class="GtkButton" id="button2">
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="receives_default">True</property>
                <property name="label" translatable="yes">button</property>
                <property name="response_id">0</property>
              </widget>
              <packing>
                <property name="position">1</property>
              </packing>
            </child>
          </widget>
          <packing>
            <property name="expand">False</property>
            <property name="pack_type">GTK_PACK_END</property>
          </packing>
        </child>
      </widget>
    </child>
  </widget>
</glade-interface>
~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20080729/efa3996d/attachment.html 




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