首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

modal dialog兑现/ mainloop的嵌套/g_object_notify使用方法

2012-08-15 
modal dialog实现/ mainloop的嵌套/g_object_notify使用方法转载自:http://blog.csdn.net/hwizhao/archive

modal dialog实现/ mainloop的嵌套/g_object_notify使用方法

转载自:

http://blog.csdn.net/hwizhao/archive/2009/02/10/3873577.aspx

?

GtkWidget *button; button = gtk_radio_button_new_with_mnemonic (NULL, _("_Object1")); exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-single-click", G_OBJECT (button), "active");// 关联两个对象‘dialog->preferences’和‘button’的属性 g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (g_object_notify), "active");//radio button选中时发送notify给active gtk_table_attach (GTK_TABLE (table), button, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_widget_show (button); button = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (button), _("_Object2")); exo_mutual_binding_new_with_negation (G_OBJECT (dialog->preferences), "misc-single-click", G_OBJECT (button), "active"); g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (g_object_notify), "active"); gtk_table_attach (GTK_TABLE (table), button, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_widget_show (button);?关于控件绑定可以参考相关文章:Thunar中的控件绑定

热点排行