Esempio n. 1
0
static void
test_recent_chooser_widget_basic (void)
{
  GtkWidget *widget;

  widget = gtk_recent_chooser_widget_new ();
  g_assert (GTK_IS_RECENT_CHOOSER_WIDGET (widget));
  gtk_widget_destroy (widget);
}
static VALUE
rcw_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE manager;
    GtkWidget* widget;
    rb_scan_args(argc, argv, "01", &manager);
    if (NIL_P(manager)){
      widget = gtk_recent_chooser_widget_new_for_manager(GTK_RECENT_MANAGER(RVAL2GOBJ(manager)));
    } else {
      widget = gtk_recent_chooser_widget_new();
    }
    RBGTK_INITIALIZE(self, widget);
    return Qnil;
}
Esempio n. 3
0
/**
\brief
\author     William J Giddings
**/
int gnoclRecentChooserCmd ( ClientData data, Tcl_Interp *interp, int objc, Tcl_Obj * const objv[] )
{

	int            ret = TCL_OK;
	GtkWidget      *widget;

	if ( 0 )
	{
		if ( gnoclParseOptions ( interp, objc, objv, recentChooserOptions ) != TCL_OK )
		{
			gnoclClearOptions ( recentChooserOptions );
			return TCL_ERROR;
		}
	}

	widget = gtk_recent_chooser_widget_new() ;

	gtk_widget_show ( GTK_WIDGET ( widget ) );


	if ( 0 )
	{
		ret = gnoclSetOptions ( interp, recentChooserOptions, G_OBJECT ( widget ), -1 );

		if ( ret == TCL_OK )
		{
			ret = configure ( interp, G_OBJECT ( widget ), recentChooserOptions );
		}

		gnoclClearOptions ( recentChooserOptions );

		/* STEP 3)  -show the widget */

		if ( ret != TCL_OK )
		{
			gtk_widget_destroy ( GTK_WIDGET ( widget ) );
			return TCL_ERROR;
		}
	}

	/* STEP 4)  -everything has worked, register the widget with the Tcl interpretor. */
	return gnoclRegisterWidget ( interp, GTK_WIDGET ( widget ), recentChooserFunc );
}