* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gtk/gtk.h>
#include <string.h>
{
/* currently untestable properties */
static const IgnoreProperty ignore_properties[] = {
- { "GtkCurve", "", NULL, }, /* Just ignore it, not worth fixing */
{ "GtkContainer", "child", NULL, }, /* needs working child widget */
{ "GtkRadioMenuItem", "group", NULL, }, /* needs working sibling */
{ "GtkWidget", "parent", NULL, }, /* needs working parent widget */
{ "GtkColorSelection", "current-color", (void*) NULL, }, /* not a valid boxed color */
{ "GtkComboBox", "row-span-column", (void*) MATCH_ANY_VALUE }, /* GtkComboBoxEntry needs a tree model for this */
{ "GtkComboBox", "column-span-column", (void*) MATCH_ANY_VALUE }, /* GtkComboBoxEntry needs a tree model for this */
- { "GtkComboBoxEntry", "text-column", (void*) MATCH_ANY_VALUE }, /* GtkComboBoxEntry needs a tree model for this */
{ "GtkFileChooserButton", "select-multiple", (void*) MATCH_ANY_VALUE }, /* property disabled */
{ "GtkFileChooserButton", "action", (void*) GTK_FILE_CHOOSER_ACTION_SAVE },
{ "GtkFileChooserButton", "action", (void*) GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER },
if (g_value_fits_pointer (value))
return g_value_peek_pointer (value);
if (G_VALUE_HOLDS_BOOLEAN (value))
- return (void*) g_value_get_boolean (value);
+ return GINT_TO_POINTER(g_value_get_boolean (value));
if (G_VALUE_HOLDS_CHAR (value))
return (void*) (gssize) g_value_get_char (value);
if (G_VALUE_HOLDS_UCHAR (value))
return (void*) (gsize) g_value_get_uchar (value);
if (G_VALUE_HOLDS_INT (value))
- return (void*) g_value_get_int (value);
+ return GINT_TO_POINTER(g_value_get_int (value));
if (G_VALUE_HOLDS_UINT (value))
- return (void*) g_value_get_uint (value);
+ return GUINT_TO_POINTER(g_value_get_uint (value));
if (G_VALUE_HOLDS_LONG (value))
return (void*) g_value_get_long (value);
if (G_VALUE_HOLDS_ULONG (value))
if (pspec->flags & G_PARAM_WRITABLE &&
!(pspec->flags & (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY)))
{
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
guint i;
const IgnoreProperty *ignore_properties;
/* select value to set */
widget_fixups (GtkWidget *widget)
{
/* post-constructor for widgets that need additional settings to work correctly */
- if (GTK_IS_COMBO_BOX_ENTRY (widget))
- {
- GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING);
- g_object_set (widget, "model", store, "text-column", 0, NULL);
- g_object_unref (store);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "test text");
- }
- else if (GTK_IS_COMBO_BOX (widget))
+ if (GTK_IS_COMBO_BOX (widget))
{
GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING);
g_object_set (widget, "model", store, NULL);